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

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: modified ChooserPermissionManager to take url::Origin as parameter 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(
17 const url::Origin& requesting_origin,
18 const url::Origin& embedding_origin,
19 const std::string& id) {
20 BluetoothPermissionContext* permission_context =
Jeffrey Yasskin 2016/01/21 00:32:30 Something called "ChooserPermissionManager" can't
juncai 2016/01/25 18:53:31 Done.
21 BluetoothPermissionContextFactory::GetForProfile(profile_);
22 permission_context->GrantDevicePermission(requesting_origin, embedding_origin,
23 id);
24 }
25
26 void ChooserPermissionManager::RevokePermission(
27 const url::Origin& requesting_origin,
28 const url::Origin& embedding_origin,
29 const std::string& id) {
30 BluetoothPermissionContext* permission_context =
31 BluetoothPermissionContextFactory::GetForProfile(profile_);
32 permission_context->RevokeDevicePermission(requesting_origin,
33 embedding_origin, id);
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698