Index: chrome/browser/extensions/api/preference/preference_api.cc |
diff --git a/chrome/browser/extensions/api/preference/preference_api.cc b/chrome/browser/extensions/api/preference/preference_api.cc |
index e3e8ce58441ef45c34daec2aaa0c67c9584fd70c..a747857530d4e1e79a7a19a5cafa38c6a11dcb90 100644 |
--- a/chrome/browser/extensions/api/preference/preference_api.cc |
+++ b/chrome/browser/extensions/api/preference/preference_api.cc |
@@ -7,6 +7,7 @@ |
#include <map> |
#include <utility> |
+#include "base/lazy_instance.h" |
#include "base/memory/singleton.h" |
#include "base/stl_util.h" |
#include "base/stringprintf.h" |
@@ -326,6 +327,15 @@ void PreferenceAPI::OnListenerAdded(const EventListenerInfo& details) { |
ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); |
} |
+static base::LazyInstance<ProfileKeyedAPIFactory<PreferenceAPI> > |
+g_factory = LAZY_INSTANCE_INITIALIZER; |
+ |
+template <> |
+ProfileKeyedAPIFactory<PreferenceAPI>* |
+ProfileKeyedAPIFactory<PreferenceAPI>::GetInstance() { |
+ return &g_factory.Get(); |
+} |
+ |
PreferenceFunction::~PreferenceFunction() { } |
bool PreferenceFunction::ValidateBrowserPref( |