diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 04:55:52 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 04:55:52 +0000 |
commit | 20305ec6f1acf21392c2f3938a14a96f1e28e76d (patch) | |
tree | 6eff1f7be4bad1a1362d3466f0ac59292dc51acc /base/path_service.cc | |
parent | c6e8346b56ab61b35845aefcf9b241c654fe1253 (diff) | |
download | chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.zip chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.tar.gz chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.tar.bz2 |
Remove obsolete base/lock.h and fix up callers to use the new header file and
the base namespace. Fix several files including lock.h unnecessarily.
BUG=none
TEST=none
Original review=http://codereview.chromium.org/6142009/
Patch by leviw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service.cc')
-rw-r--r-- | base/path_service.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/base/path_service.cc b/base/path_service.cc index 56ce5fa..117feb5 100644 --- a/base/path_service.cc +++ b/base/path_service.cc @@ -14,8 +14,8 @@ #include "base/file_util.h" #include "base/hash_tables.h" #include "base/lazy_instance.h" -#include "base/lock.h" #include "base/logging.h" +#include "base/synchronization/lock.h" namespace base { bool PathProvider(int key, FilePath* result); @@ -92,9 +92,9 @@ static Provider base_provider_posix = { struct PathData { - Lock lock; - PathMap cache; // Cache mappings from path key to path value. - PathMap overrides; // Track path overrides. + base::Lock lock; + PathMap cache; // Cache mappings from path key to path value. + PathMap overrides; // Track path overrides. Provider* providers; // Linked list of path service providers. PathData() { @@ -130,7 +130,7 @@ static PathData* GetPathData() { // static bool PathService::GetFromCache(int key, FilePath* result) { PathData* path_data = GetPathData(); - AutoLock scoped_lock(path_data->lock); + base::AutoLock scoped_lock(path_data->lock); // check for a cached version PathMap::const_iterator it = path_data->cache.find(key); @@ -144,7 +144,7 @@ bool PathService::GetFromCache(int key, FilePath* result) { // static bool PathService::GetFromOverrides(int key, FilePath* result) { PathData* path_data = GetPathData(); - AutoLock scoped_lock(path_data->lock); + base::AutoLock scoped_lock(path_data->lock); // check for an overriden version. PathMap::const_iterator it = path_data->overrides.find(key); @@ -158,7 +158,7 @@ bool PathService::GetFromOverrides(int key, FilePath* result) { // static void PathService::AddToCache(int key, const FilePath& path) { PathData* path_data = GetPathData(); - AutoLock scoped_lock(path_data->lock); + base::AutoLock scoped_lock(path_data->lock); // Save the computed path in our cache. path_data->cache[key] = path; } @@ -225,7 +225,7 @@ bool PathService::Override(int key, const FilePath& path) { if (!file_util::AbsolutePath(&file_path)) return false; - AutoLock scoped_lock(path_data->lock); + base::AutoLock scoped_lock(path_data->lock); // Clear the cache now. Some of its entries could have depended // on the value we are overriding, and are now out of sync with reality. @@ -243,7 +243,7 @@ void PathService::RegisterProvider(ProviderFunc func, int key_start, DCHECK(path_data); DCHECK(key_end > key_start); - AutoLock scoped_lock(path_data->lock); + base::AutoLock scoped_lock(path_data->lock); Provider* p; |