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

Unified Diff: chrome/browser/extensions/api/runtime/runtime_api.cc

Issue 168253002: Cleanup many APIs to use ProfileKeyedAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months 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/runtime/runtime_api.cc
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc
index 682b62cc9cf7be8f7c027e2e640dee658dd0dcb0..562a76dd0e8d1df4db64c7b7bc7592fcd3592bff 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.cc
+++ b/chrome/browser/extensions/api/runtime/runtime_api.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
@@ -138,6 +139,14 @@ std::string GetUninstallURL(ExtensionPrefs* prefs,
///////////////////////////////////////////////////////////////////////////////
+static base::LazyInstance<ProfileKeyedAPIFactory<RuntimeAPI> > g_factory =
+ LAZY_INSTANCE_INITIALIZER;
+
+// static
+ProfileKeyedAPIFactory<RuntimeAPI>* RuntimeAPI::GetFactoryInstance() {
+ return g_factory.Pointer();
+}
+
RuntimeAPI::RuntimeAPI(content::BrowserContext* context)
: browser_context_(context),
dispatch_chrome_updated_event_(false),
« no previous file with comments | « chrome/browser/extensions/api/runtime/runtime_api.h ('k') | chrome/browser/extensions/api/runtime/runtime_api_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698