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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_api.cc

Issue 168253002: Cleanup many APIs to use ProfileKeyedAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/bluetooth/bluetooth_api.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
index b6cf1660dd3c0d2da3edb0c5f8d8b9270a5b7257..07c541740e0aeb2466c8daecd3d285268c55ba0d 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
@@ -6,8 +6,8 @@
#include <string>
+#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h"
#include "chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.h"
#include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h"
#include "chrome/browser/extensions/event_names.h"
@@ -77,9 +77,17 @@ namespace Write = extensions::api::bluetooth::Write;
namespace extensions {
+static base::LazyInstance<ProfileKeyedAPIFactory<BluetoothAPI> > g_factory =
+ LAZY_INSTANCE_INITIALIZER;
+
+// static
+ProfileKeyedAPIFactory<BluetoothAPI>* BluetoothAPI::GetFactoryInstance() {
+ return g_factory.Pointer();
+}
+
// static
BluetoothAPI* BluetoothAPI::Get(Profile* profile) {
- return BluetoothAPIFactory::GetForProfile(profile);
+ return GetFactoryInstance()->GetForProfile(profile);
}
BluetoothAPI::BluetoothAPI(Profile* profile) : profile_(profile) {

Powered by Google App Engine
This is Rietveld 408576698