| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/bluetooth/bluetooth_allowed_devices_map_factory.h" |
| 6 |
| 7 #include "chrome/browser/bluetooth/bluetooth_allowed_devices_map.h" |
| 8 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 9 |
| 10 BluetoothAllowedDevicesMapFactory::BluetoothAllowedDevicesMapFactory() |
| 11 : BrowserContextKeyedServiceFactory( |
| 12 "BluetoothAllowedDevicesMap", |
| 13 BrowserContextDependencyManager::GetInstance()) {} |
| 14 |
| 15 BluetoothAllowedDevicesMapFactory::~BluetoothAllowedDevicesMapFactory() {} |
| 16 |
| 17 KeyedService* BluetoothAllowedDevicesMapFactory::BuildServiceInstanceFor( |
| 18 content::BrowserContext* context) const { |
| 19 return new BluetoothAllowedDevicesMap(); |
| 20 } |
| 21 |
| 22 // static |
| 23 BluetoothAllowedDevicesMapFactory* |
| 24 BluetoothAllowedDevicesMapFactory::GetInstance() { |
| 25 return base::Singleton<BluetoothAllowedDevicesMapFactory>::get(); |
| 26 } |
| 27 |
| 28 // static |
| 29 BluetoothAllowedDevicesMap* BluetoothAllowedDevicesMapFactory::GetForProfile( |
| 30 content::BrowserContext* context) { |
| 31 return static_cast<BluetoothAllowedDevicesMap*>( |
| 32 GetInstance()->GetServiceForBrowserContext(context, true)); |
| 33 } |
| OLD | NEW |