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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 11719004: Remove Profile-keyed factory boilerplate: cookies, managed_mode & web_navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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/extensions/api/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index d3793821665fc0c7bf05ee94ce55070217e222f2..4855a0f21da36251461b6b31bbfa99c85f59e012 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -768,4 +768,13 @@ void WebNavigationAPI::OnListenerAdded(
ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
}
+static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> >
+g_factory = LAZY_INSTANCE_INITIALIZER;
+
+template <>
+ProfileKeyedAPIFactory<WebNavigationAPI>*
+ProfileKeyedAPIFactory<WebNavigationAPI>::GetInstance() {
+ return &g_factory.Get();
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698