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 #include "content/public/browser/bluetooth_allowed_devices_map_base.h" | |
| 6 | |
| 7 #include "content/browser/bluetooth/bluetooth_allowed_devices.h" | |
| 8 | |
| 9 namespace content { | |
| 10 | |
| 11 BluetoothAllowedDevicesMapBase::BluetoothAllowedDevicesMapBase() {} | |
| 12 | |
| 13 BluetoothAllowedDevicesMapBase::~BluetoothAllowedDevicesMapBase() {} | |
| 14 | |
| 15 content::BluetoothAllowedDevices* | |
| 16 BluetoothAllowedDevicesMapBase::GetOrCreateAllowedDevices(url::Origin origin) { | |
| 17 auto iter = origin_to_allowed_devices_map_.find(origin); | |
| 18 if (iter == origin_to_allowed_devices_map_.end()) { | |
| 19 iter = origin_to_allowed_devices_map_.insert( | |
|
scheib
2017/01/26 04:27:36
The unique origin problem has been moved to here.
juncai
2017/01/30 20:34:55
Done.
| |
| 20 iter, std::make_pair(origin, content::BluetoothAllowedDevices())); | |
| 21 } | |
| 22 return &(iter->second); | |
| 23 } | |
| 24 | |
| 25 } // namespace content | |
| OLD | NEW |