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

Side by Side Diff: content/public/browser/bluetooth_allowed_devices_map_base.h

Issue 2658473002: Refactor BluetoothAllowedDevicesMap (Closed)
Patch Set: updated test code Created 3 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 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 #ifndef CONTENT_PUBLIC_BROWSER_BLUETOOTH_ALLOWED_DEVICES_MAP_BASE_H_
6 #define CONTENT_PUBLIC_BROWSER_BLUETOOTH_ALLOWED_DEVICES_MAP_BASE_H_
7
8 #include <map>
9
10 #include "content/common/content_export.h"
11 #include "url/origin.h"
12
13 namespace content {
14
15 class BluetoothAllowedDevices;
16
17 // Base class for keeping track of which origins are allowed to access which
18 // Bluetooth devices and their services. This class is used with KeyedService
19 // to make sure there is only one instance of this class for each browser
20 // profile.
21 class CONTENT_EXPORT BluetoothAllowedDevicesMapBase {
22 public:
23 BluetoothAllowedDevicesMapBase();
24 virtual ~BluetoothAllowedDevicesMapBase();
25
26 // Gets a BluetoothAllowedDevices for each origin; creates one if it doesn't
27 // exist.
28 content::BluetoothAllowedDevices* GetOrCreateAllowedDevices(
29 url::Origin origin);
dcheng 2017/02/01 07:54:09 const url::Origin&
dcheng 2017/02/02 05:26:03 I think this comment still hasn't been addressed.
juncai 2017/02/03 04:47:55 Done.
juncai 2017/02/03 04:47:55 Done.
30
31 private:
32 std::map<url::Origin, content::BluetoothAllowedDevices>
33 origin_to_allowed_devices_map_;
34 };
35
36 } // namespace content
37
38 #endif // CONTENT_PUBLIC_BROWSER_BLUETOOTH_ALLOWED_DEVICES_MAP_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698