| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h" | 5 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h" | 7 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h" |
| 8 #include "chrome/browser/extensions/extension_system_factory.h" | 8 #include "chrome/browser/extensions/extension_system_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 11 #include "extensions/browser/extensions_browser_client.h" | 11 #include "extensions/browser/extensions_browser_client.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 // static | 15 // static |
| 16 BluetoothAPI* BluetoothAPIFactory::GetForProfile(Profile* profile) { | 16 BluetoothAPI* BluetoothAPIFactory::GetForBrowserContext( |
| 17 content::BrowserContext* context) { |
| 17 return static_cast<BluetoothAPI*>( | 18 return static_cast<BluetoothAPI*>( |
| 18 GetInstance()->GetServiceForBrowserContext(profile, true)); | 19 GetInstance()->GetServiceForBrowserContext(context, true)); |
| 19 } | 20 } |
| 20 | 21 |
| 21 // static | 22 // static |
| 22 BluetoothAPIFactory* BluetoothAPIFactory::GetInstance() { | 23 BluetoothAPIFactory* BluetoothAPIFactory::GetInstance() { |
| 23 return Singleton<BluetoothAPIFactory>::get(); | 24 return Singleton<BluetoothAPIFactory>::get(); |
| 24 } | 25 } |
| 25 | 26 |
| 26 BluetoothAPIFactory::BluetoothAPIFactory() | 27 BluetoothAPIFactory::BluetoothAPIFactory() |
| 27 : BrowserContextKeyedServiceFactory( | 28 : BrowserContextKeyedServiceFactory( |
| 28 "BluetoothAPI", | 29 "BluetoothAPI", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 | 46 |
| 46 bool BluetoothAPIFactory::ServiceIsCreatedWithBrowserContext() const { | 47 bool BluetoothAPIFactory::ServiceIsCreatedWithBrowserContext() const { |
| 47 return true; | 48 return true; |
| 48 } | 49 } |
| 49 | 50 |
| 50 bool BluetoothAPIFactory::ServiceIsNULLWhileTesting() const { | 51 bool BluetoothAPIFactory::ServiceIsNULLWhileTesting() const { |
| 51 return true; | 52 return true; |
| 52 } | 53 } |
| 53 | 54 |
| 54 } // namespace extensions | 55 } // namespace extensions |
| OLD | NEW |