Restore original override in base::ScopedPathOverride

This affects ui/base unit tests, where the test suite overrides
ui::DIR_LOCALES in its initialization function. Any ScopedPathOverride
which overrides ui::DIR_LOCALES will cause it to reset to the original
ui::DIR_LOCALES value - not the override in the test suite
initialization - which might cause order dependent tests.

Fixed: 1153235
Change-Id: I03981980a3e0c6ab2596989a2e499ec237fce206
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563013
Commit-Queue: Michael Cui <[email protected]>
Reviewed-by: danakj <[email protected]>
Cr-Commit-Position: refs/heads/master@{#833181}
diff --git a/base/path_service.h b/base/path_service.h
index 7d55c8d..57e687f5 100644
--- a/base/path_service.h
+++ b/base/path_service.h
@@ -86,6 +86,9 @@
   // was an override to remove or false if none was present.
   // NOTE: This function is intended to be used by tests only!
   static bool RemoveOverride(int key);
+
+  // Returns whether an override is present for a special directory or file.
+  static bool IsOverriddenForTests(int key);
 };
 
 }  // namespace base