diff options
author | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 00:45:36 +0000 |
---|---|---|
committer | pastarmovj@chromium.org <pastarmovj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 00:45:36 +0000 |
commit | d3e6d251d0c24fb352246fdbb926f16e4ed335ba (patch) | |
tree | e8d6f7e14daf1d9d797c47acfb165ebc9056fe33 /base/path_service.h | |
parent | 8b9af6bb0a2e0b46f361bd0ffdc4d5d0dc76544e (diff) | |
download | chromium_src-d3e6d251d0c24fb352246fdbb926f16e4ed335ba.zip chromium_src-d3e6d251d0c24fb352246fdbb926f16e4ed335ba.tar.gz chromium_src-d3e6d251d0c24fb352246fdbb926f16e4ed335ba.tar.bz2 |
Add ScopedPathOverride to the unit test suite.
Unit tests have to restore the Overrdies they make because they all live in the same
process and not cleaning up their mess means other tests will run against possibly
modified profiles. This class allows tests to set up path overrides and clean them up
in a convenient way and makes sure the global path map stays clean afterwards.
BUG=149161
TEST=unit_tests still pass.
Review URL: https://chromiumcodereview.appspot.com/10948010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service.h')
-rw-r--r-- | base/path_service.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/path_service.h b/base/path_service.h index 40da55a..94b0db3 100644 --- a/base/path_service.h +++ b/base/path_service.h @@ -14,6 +14,10 @@ class FilePath; +namespace base { +class ScopedPathOverride; +} // namespace + // The path service is a global table mapping keys to file system paths. It is // OK to use this service from multiple threads. // @@ -64,6 +68,7 @@ class BASE_EXPORT PathService { int key_end); private: + friend class base::ScopedPathOverride; FRIEND_TEST_ALL_PREFIXES(PathServiceTest, RemoveOverride); // Removes an override for a special directory or file. Returns true if there |