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

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

Issue 2658473002: Refactor BluetoothAllowedDevicesMap (Closed)
Patch Set: set --similarity=20 when did git cl upload Created 3 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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698