Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3593)

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 0adec3284b04d067c2b5b59ba0661fe63073e411..b44c3464585f8c5333feb353e963f470673c3171 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -4,11 +4,14 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "base/singleton.h"
+#include "base/lazy_instance.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/password_manager_delegate_impl.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+static base::LazyInstance<PropertyAccessor<TabContentsWrapper*> >
+ g_tab_contents_wrapper_property_accessor(base::LINKER_INITIALIZED);
+
////////////////////////////////////////////////////////////////////////////////
// TabContentsWrapper, public:
@@ -29,7 +32,7 @@ TabContentsWrapper::~TabContentsWrapper() {
}
PropertyAccessor<TabContentsWrapper*>* TabContentsWrapper::property_accessor() {
- return Singleton< PropertyAccessor<TabContentsWrapper*> >::get();
+ return g_tab_contents_wrapper_property_accessor.Pointer();
}
TabContentsWrapper* TabContentsWrapper::Clone() {

Powered by Google App Engine
This is Rietveld 408576698