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

Side by Side Diff: device/bluetooth/bluetooth_device_win.cc

Issue 1099383002: Change ScopedPtrHashMap's 2nd template parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
« no previous file with comments | « content/test/mock_webblob_registry_impl.h ('k') | media/base/cdm_promise_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_device_win.h" 5 #include "device/bluetooth/bluetooth_device_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (address_ != device_state.address || name_ != device_state.name || 82 if (address_ != device_state.address || name_ != device_state.name ||
83 bluetooth_class_ != device_state.bluetooth_class || 83 bluetooth_class_ != device_state.bluetooth_class ||
84 visible_ != device_state.visible || 84 visible_ != device_state.visible ||
85 connected_ != device_state.connected || 85 connected_ != device_state.connected ||
86 paired_ != device_state.authenticated) { 86 paired_ != device_state.authenticated) {
87 return false; 87 return false;
88 } 88 }
89 89
90 // Checks service collection 90 // Checks service collection
91 typedef std::set<BluetoothUUID> UUIDSet; 91 typedef std::set<BluetoothUUID> UUIDSet;
92 typedef base::ScopedPtrHashMap<std::string, BluetoothServiceRecordWin> 92 typedef base::ScopedPtrHashMap<
93 ServiceRecordMap; 93 std::string, scoped_ptr<BluetoothServiceRecordWin>> ServiceRecordMap;
94 94
95 UUIDSet known_services; 95 UUIDSet known_services;
96 for (UUIDList::const_iterator iter = uuids_.begin(); iter != uuids_.end(); 96 for (UUIDList::const_iterator iter = uuids_.begin(); iter != uuids_.end();
97 ++iter) { 97 ++iter) {
98 known_services.insert((*iter)); 98 known_services.insert((*iter));
99 } 99 }
100 100
101 UUIDSet new_services; 101 UUIDSet new_services;
102 ServiceRecordMap new_service_records; 102 ServiceRecordMap new_service_records;
103 for (ScopedVector<BluetoothTaskManagerWin::ServiceRecordState>::const_iterator 103 for (ScopedVector<BluetoothTaskManagerWin::ServiceRecordState>::const_iterator
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 for (ServiceRecordList::const_iterator iter = service_record_list_.begin(); 275 for (ServiceRecordList::const_iterator iter = service_record_list_.begin();
276 iter != service_record_list_.end(); 276 iter != service_record_list_.end();
277 ++iter) { 277 ++iter) {
278 if ((*iter)->uuid() == uuid) 278 if ((*iter)->uuid() == uuid)
279 return *iter; 279 return *iter;
280 } 280 }
281 return NULL; 281 return NULL;
282 } 282 }
283 283
284 } // namespace device 284 } // namespace device
OLDNEW
« no previous file with comments | « content/test/mock_webblob_registry_impl.h ('k') | media/base/cdm_promise_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698