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

Side by Side Diff: chrome/browser/bluetooth/bluetooth_allowed_devices_map_factory.cc

Issue 2658473002: Refactor BluetoothAllowedDevicesMap (Closed)
Patch Set: set --similarity=20 when did git cl upload Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698