Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |