From fee46a89f493080db0838e2314b4400faeec94f3 Mon Sep 17 00:00:00 2001 From: "satish@chromium.org" Date: Thu, 9 Dec 2010 16:42:15 +0000 Subject: This is a continuation of http://codereview.chromium.org/5519016/, adds a new GetInstance() method for remaining files with singleton classes under chrome/browser. For types declared and used within the same .cc file, I changed them over to LazyInstance. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5711001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68739 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_omnibox_api.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'chrome/browser/extensions/extension_omnibox_api.cc') diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc index 8492788..760e459 100644 --- a/chrome/browser/extensions/extension_omnibox_api.cc +++ b/chrome/browser/extensions/extension_omnibox_api.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/extension_omnibox_api.h" #include "base/json/json_writer.h" -#include "base/singleton.h" +#include "base/lazy_instance.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -36,8 +36,11 @@ const char kDescriptionStylesType[] = "type"; const char kDescriptionStylesOffset[] = "offset"; const char kDescriptionStylesLength[] = "length"; +static base::LazyInstance > + g_extension_omnibox_suggestion_property_accessor(base::LINKER_INITIALIZED); + PropertyAccessor& GetPropertyAccessor() { - return *Singleton< PropertyAccessor >::get(); + return g_extension_omnibox_suggestion_property_accessor.Get(); } // Returns the suggestion object set by the extension via the -- cgit v1.1