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

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

Issue 1706503002: Add enterprise policy to turn off Bluetooth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Sync Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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_permission_context_factory.h"
6
7 #include "chrome/browser/bluetooth/bluetooth_permission_context.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10
11 BluetoothPermissionContextFactory::BluetoothPermissionContextFactory()
12 : PermissionContextFactoryBase(
13 "BluetoothPermissionContext",
14 BrowserContextDependencyManager::GetInstance()) {}
15
16 BluetoothPermissionContextFactory::~BluetoothPermissionContextFactory() {}
17
18 // static
19 BluetoothPermissionContextFactory*
20 BluetoothPermissionContextFactory::GetInstance() {
21 return base::Singleton<BluetoothPermissionContextFactory>::get();
22 }
23
24 // static
25 BluetoothPermissionContext* BluetoothPermissionContextFactory::GetForProfile(
26 Profile* profile) {
27 return static_cast<BluetoothPermissionContext*>(
28 GetInstance()->GetServiceForBrowserContext(profile, true));
29 }
30
31 KeyedService* BluetoothPermissionContextFactory::BuildServiceInstanceFor(
32 content::BrowserContext* context) const {
33 return new BluetoothPermissionContext(Profile::FromBrowserContext(context));
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698