| 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) {
|
|
|