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 /ui | |
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 'ui')
-rw-r--r-- | ui/base/resource/resource_bundle.cc | 12 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_dummy.cc | 4 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_linux.cc | 8 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_posix.cc | 2 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_win.cc | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc index 94885b0..6f93748 100644 --- a/ui/base/resource/resource_bundle.cc +++ b/ui/base/resource/resource_bundle.cc @@ -4,10 +4,10 @@ #include "ui/base/resource/resource_bundle.h" -#include "base/lock.h" #include "base/logging.h" #include "base/stl_util-inl.h" #include "base/string_piece.h" +#include "base/synchronization/lock.h" #include "build/build_config.h" #include "gfx/codec/png_codec.h" #include "gfx/font.h" @@ -96,7 +96,7 @@ ResourceBundle& ResourceBundle::GetSharedInstance() { SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) { // Check to see if we already have the Skia image in the cache. { - AutoLock lock_scope(*lock_); + base::AutoLock lock_scope(*lock_); SkImageMap::const_iterator found = skia_images_.find(resource_id); if (found != skia_images_.end()) return found->second; @@ -108,7 +108,7 @@ SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) { if (bitmap.get()) { // We loaded successfully. Cache the Skia version of the bitmap. - AutoLock lock_scope(*lock_); + base::AutoLock lock_scope(*lock_); // Another thread raced us, and has already cached the skia image. if (skia_images_.count(resource_id)) @@ -123,7 +123,7 @@ SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) { LOG(WARNING) << "Unable to load bitmap with id " << resource_id; NOTREACHED(); // Want to assert in debug mode. - AutoLock lock_scope(*lock_); // Guard empty_bitmap initialization. + base::AutoLock lock_scope(*lock_); // Guard empty_bitmap initialization. static SkBitmap* empty_bitmap = NULL; if (!empty_bitmap) { @@ -183,7 +183,7 @@ gfx::NativeImage ResourceBundle::GetNativeImageNamed(int resource_id) { } ResourceBundle::ResourceBundle() - : lock_(new Lock), + : lock_(new base::Lock), resources_data_(NULL), locale_resources_data_(NULL) { } @@ -195,7 +195,7 @@ void ResourceBundle::FreeImages() { } void ResourceBundle::LoadFontsIfNecessary() { - AutoLock lock_scope(*lock_); + base::AutoLock lock_scope(*lock_); if (!base_font_.get()) { base_font_.reset(new gfx::Font()); diff --git a/ui/base/resource/resource_bundle_dummy.cc b/ui/base/resource/resource_bundle_dummy.cc index fc46ace..653d9f0 100644 --- a/ui/base/resource/resource_bundle_dummy.cc +++ b/ui/base/resource/resource_bundle_dummy.cc @@ -6,8 +6,8 @@ #include <windows.h> -#include "base/lock.h" #include "base/logging.h" +#include "base/synchronization/lock.h" #include "gfx/font.h" #include "gfx/platform_font_win.h" @@ -51,7 +51,7 @@ ResourceBundle& ResourceBundle::GetSharedInstance() { } ResourceBundle::ResourceBundle() - : lock_(new Lock), + : lock_(new base::Lock), resources_data_(NULL), locale_resources_data_(NULL) { } diff --git a/ui/base/resource/resource_bundle_linux.cc b/ui/base/resource/resource_bundle_linux.cc index 92a39df..8bef0a2 100644 --- a/ui/base/resource/resource_bundle_linux.cc +++ b/ui/base/resource/resource_bundle_linux.cc @@ -10,11 +10,11 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/i18n/rtl.h" -#include "base/lock.h" #include "base/logging.h" #include "base/path_service.h" #include "base/string_piece.h" #include "base/string_util.h" +#include "base/synchronization/lock.h" #include "gfx/font.h" #include "gfx/gtk_util.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -92,7 +92,7 @@ GdkPixbuf* ResourceBundle::GetPixbufImpl(int resource_id, bool rtl_enabled) { // Check to see if we already have the pixbuf in the cache. { - AutoLock lock_scope(*lock_); + base::AutoLock lock_scope(*lock_); GdkPixbufMap::const_iterator found = gdk_pixbufs_.find(key); if (found != gdk_pixbufs_.end()) return found->second; @@ -104,7 +104,7 @@ GdkPixbuf* ResourceBundle::GetPixbufImpl(int resource_id, bool rtl_enabled) { // We loaded successfully. Cache the pixbuf. if (pixbuf) { - AutoLock lock_scope(*lock_); + base::AutoLock lock_scope(*lock_); // Another thread raced us, and has already cached the pixbuf. if (gdk_pixbufs_.count(key)) { @@ -121,7 +121,7 @@ GdkPixbuf* ResourceBundle::GetPixbufImpl(int resource_id, bool rtl_enabled) { LOG(WARNING) << "Unable to load GdkPixbuf with id " << resource_id; NOTREACHED(); // Want to assert in debug mode. - AutoLock lock_scope(*lock_); // Guard empty_bitmap initialization. + base::AutoLock lock_scope(*lock_); // Guard empty_bitmap initialization. static GdkPixbuf* empty_bitmap = NULL; if (!empty_bitmap) { diff --git a/ui/base/resource/resource_bundle_posix.cc b/ui/base/resource/resource_bundle_posix.cc index 119d721..277974d 100644 --- a/ui/base/resource/resource_bundle_posix.cc +++ b/ui/base/resource/resource_bundle_posix.cc @@ -5,11 +5,11 @@ #include "ui/base/resource/resource_bundle.h" #include "app/l10n_util.h" -#include "base/lock.h" #include "base/logging.h" #include "base/stl_util-inl.h" #include "base/string16.h" #include "base/string_piece.h" +#include "base/synchronization/lock.h" #include "gfx/font.h" #include "ui/base/resource/data_pack.h" diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc index 9f590d5..629265a 100644 --- a/ui/base/resource/resource_bundle_win.cc +++ b/ui/base/resource/resource_bundle_win.cc @@ -9,12 +9,12 @@ #include "app/l10n_util.h" #include "base/debug/stack_trace.h" #include "base/file_util.h" -#include "base/lock.h" #include "base/logging.h" #include "base/path_service.h" #include "base/resource_util.h" #include "base/stl_util-inl.h" #include "base/string_piece.h" +#include "base/synchronization/lock.h" #include "base/win/windows_version.h" #include "gfx/font.h" #include "ui/base/ui_base_paths.h" |