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

Unified Diff: chrome/browser/dom_ui/html_dialog_ui.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/dom_ui/html_dialog_ui.cc
diff --git a/chrome/browser/dom_ui/html_dialog_ui.cc b/chrome/browser/dom_ui/html_dialog_ui.cc
index ee9ce3442c1b2f61512ef8fa14dbc2c6bbae4d7e..fbea1f63e0c55070704b79d5422d58f3771c8ad8 100644
--- a/chrome/browser/dom_ui/html_dialog_ui.cc
+++ b/chrome/browser/dom_ui/html_dialog_ui.cc
@@ -5,13 +5,16 @@
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "base/callback.h"
-#include "base/singleton.h"
+#include "base/lazy_instance.h"
#include "base/values.h"
#include "chrome/browser/dom_ui/dom_ui_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/common/bindings_policy.h"
+static base::LazyInstance<PropertyAccessor<HtmlDialogUIDelegate*> >
+ g_html_dialog_ui_property_accessor(base::LINKER_INITIALIZED);
+
HtmlDialogUI::HtmlDialogUI(TabContents* tab_contents) : DOMUI(tab_contents) {
}
@@ -28,7 +31,7 @@ HtmlDialogUI::~HtmlDialogUI() {
// static
PropertyAccessor<HtmlDialogUIDelegate*>& HtmlDialogUI::GetPropertyAccessor() {
- return *Singleton< PropertyAccessor<HtmlDialogUIDelegate*> >::get();
+ return g_html_dialog_ui_property_accessor.Get();
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698