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

Side by Side Diff: chrome/browser/permissions/chooser_permission_manager.cc

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up changes at bluetooth_dispatcher_host.cc Created 4 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 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/permissions/chooser_permission_manager.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/bluetooth/bluetooth_permission_context.h"
9 #include "chrome/browser/ui/bluetooth/bluetooth_permission_context_factory.h"
10
11 ChooserPermissionManager::ChooserPermissionManager(Profile* profile)
12 : profile_(profile) {}
13
14 ChooserPermissionManager::~ChooserPermissionManager() {}
15
16 void ChooserPermissionManager::GrantPermission(const GURL& requesting_origin,
17 const GURL& embedding_origin,
18 const std::string& id) {
19 BluetoothPermissionContext* permission_context =
20 BluetoothPermissionContextFactory::GetForProfile(profile_);
21 permission_context->GrantDevicePermission(requesting_origin, embedding_origin,
22 id);
23 }
24
25 void ChooserPermissionManager::RevokePermission(const GURL& requesting_origin,
26 const GURL& embedding_origin,
27 const std::string& id) {
28 BluetoothPermissionContext* permission_context =
29 BluetoothPermissionContextFactory::GetForProfile(profile_);
30 permission_context->RevokeDevicePermission(requesting_origin,
31 embedding_origin, id);
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698