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: device/hid/hid_service.cc

Issue 2230083003: device: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « device/hid/hid_report_descriptor.cc ('k') | device/hid/hid_service_mac.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/hid/hid_service.h" 5 #include "device/hid/hid_service.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 HidService::HidService() : enumeration_ready_(false) { 85 HidService::HidService() : enumeration_ready_(false) {
86 } 86 }
87 87
88 HidService::~HidService() { 88 HidService::~HidService() {
89 DCHECK(thread_checker_.CalledOnValidThread()); 89 DCHECK(thread_checker_.CalledOnValidThread());
90 } 90 }
91 91
92 void HidService::AddDevice(scoped_refptr<HidDeviceInfo> device_info) { 92 void HidService::AddDevice(scoped_refptr<HidDeviceInfo> device_info) {
93 DCHECK(thread_checker_.CalledOnValidThread()); 93 DCHECK(thread_checker_.CalledOnValidThread());
94 if (!ContainsKey(devices_, device_info->device_id())) { 94 if (!base::ContainsKey(devices_, device_info->device_id())) {
95 devices_[device_info->device_id()] = device_info; 95 devices_[device_info->device_id()] = device_info;
96 96
97 HID_LOG(USER) << "HID device " 97 HID_LOG(USER) << "HID device "
98 << (enumeration_ready_ ? "added" : "detected") 98 << (enumeration_ready_ ? "added" : "detected")
99 << ": vendorId=" << device_info->vendor_id() 99 << ": vendorId=" << device_info->vendor_id()
100 << ", productId=" << device_info->product_id() << ", name='" 100 << ", productId=" << device_info->product_id() << ", name='"
101 << device_info->product_name() << "', serial='" 101 << device_info->product_name() << "', serial='"
102 << device_info->serial_number() << "', deviceId='" 102 << device_info->serial_number() << "', deviceId='"
103 << device_info->device_id() << "'"; 103 << device_info->device_id() << "'";
104 104
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 for (const GetDevicesCallback& callback : pending_enumerations_) { 138 for (const GetDevicesCallback& callback : pending_enumerations_) {
139 callback.Run(devices); 139 callback.Run(devices);
140 } 140 }
141 pending_enumerations_.clear(); 141 pending_enumerations_.clear();
142 } 142 }
143 } 143 }
144 144
145 } // namespace device 145 } // namespace device
OLDNEW
« no previous file with comments | « device/hid/hid_report_descriptor.cc ('k') | device/hid/hid_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698