diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 20:30:47 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 20:30:47 +0000 |
commit | 4dcbc1b552d96791b13dc3d876868dae3f8ad09d (patch) | |
tree | 82283d5f574dd529990f4a4cf4d5a99e8b2c28b6 /app/resource_bundle_linux.cc | |
parent | 7e74015beb3489b46150bdfe055f67c9e2a0c475 (diff) | |
download | chromium_src-4dcbc1b552d96791b13dc3d876868dae3f8ad09d.zip chromium_src-4dcbc1b552d96791b13dc3d876868dae3f8ad09d.tar.gz chromium_src-4dcbc1b552d96791b13dc3d876868dae3f8ad09d.tar.bz2 |
Remove lock.h from resource_bundle.h and histogram.h.
Use a scoped_ptr<Lock> instead of Lock in resource bundle.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3038005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/resource_bundle_linux.cc')
-rw-r--r-- | app/resource_bundle_linux.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/resource_bundle_linux.cc b/app/resource_bundle_linux.cc index 7ebe4e6..a137a92 100644 --- a/app/resource_bundle_linux.cc +++ b/app/resource_bundle_linux.cc @@ -13,6 +13,7 @@ #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" @@ -91,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_); + AutoLock lock_scope(*lock_); GdkPixbufMap::const_iterator found = gdk_pixbufs_.find(key); if (found != gdk_pixbufs_.end()) return found->second; @@ -103,7 +104,7 @@ GdkPixbuf* ResourceBundle::GetPixbufImpl(int resource_id, bool rtl_enabled) { // We loaded successfully. Cache the pixbuf. if (pixbuf) { - AutoLock lock_scope(lock_); + AutoLock lock_scope(*lock_); // Another thread raced us, and has already cached the pixbuf. if (gdk_pixbufs_.count(key)) { @@ -120,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. + AutoLock lock_scope(*lock_); // Guard empty_bitmap initialization. static GdkPixbuf* empty_bitmap = NULL; if (!empty_bitmap) { |