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

Side by Side Diff: device/core/device_monitor_win.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « crypto/symmetric_key_unittest.cc ('k') | device/hid/hid_service_win.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/core/device_monitor_win.h" 5 #include "device/core/device_monitor_win.h"
6 6
7 #include <dbt.h> 7 #include <dbt.h>
8 #include <map> 8 #include <map>
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 DeviceMonitorWin* device_monitor = nullptr; 107 DeviceMonitorWin* device_monitor = nullptr;
108 DEV_BROADCAST_DEVICEINTERFACE* db = 108 DEV_BROADCAST_DEVICEINTERFACE* db =
109 reinterpret_cast<DEV_BROADCAST_DEVICEINTERFACE*>(lparam); 109 reinterpret_cast<DEV_BROADCAST_DEVICEINTERFACE*>(lparam);
110 const auto& map_entry = device_monitors_.find(db->dbcc_classguid); 110 const auto& map_entry = device_monitors_.find(db->dbcc_classguid);
111 if (map_entry != device_monitors_.end()) { 111 if (map_entry != device_monitors_.end()) {
112 device_monitor = map_entry->second.get(); 112 device_monitor = map_entry->second.get();
113 } 113 }
114 114
115 std::string device_path(base::SysWideToUTF8(db->dbcc_name)); 115 std::string device_path(base::SysWideToUTF8(db->dbcc_name));
116 DCHECK(base::IsStringASCII(device_path)); 116 DCHECK(base::IsStringASCII(device_path));
117 device_path = base::StringToLowerASCII(device_path); 117 device_path = base::ToLowerASCII(device_path);
118 118
119 if (wparam == DBT_DEVICEARRIVAL) { 119 if (wparam == DBT_DEVICEARRIVAL) {
120 if (device_monitor) { 120 if (device_monitor) {
121 device_monitor->NotifyDeviceAdded(db->dbcc_classguid, device_path); 121 device_monitor->NotifyDeviceAdded(db->dbcc_classguid, device_path);
122 } 122 }
123 all_device_monitor_.NotifyDeviceAdded(db->dbcc_classguid, device_path); 123 all_device_monitor_.NotifyDeviceAdded(db->dbcc_classguid, device_path);
124 } else if (wparam == DBT_DEVICEREMOVECOMPLETE) { 124 } else if (wparam == DBT_DEVICEREMOVECOMPLETE) {
125 if (device_monitor) { 125 if (device_monitor) {
126 device_monitor->NotifyDeviceRemoved(db->dbcc_classguid, device_path); 126 device_monitor->NotifyDeviceRemoved(db->dbcc_classguid, device_path);
127 } 127 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 OnDeviceAdded(class_guid, device_path)); 194 OnDeviceAdded(class_guid, device_path));
195 } 195 }
196 196
197 void DeviceMonitorWin::NotifyDeviceRemoved(const GUID& class_guid, 197 void DeviceMonitorWin::NotifyDeviceRemoved(const GUID& class_guid,
198 const std::string& device_path) { 198 const std::string& device_path) {
199 FOR_EACH_OBSERVER(Observer, observer_list_, 199 FOR_EACH_OBSERVER(Observer, observer_list_,
200 OnDeviceRemoved(class_guid, device_path)); 200 OnDeviceRemoved(class_guid, device_path));
201 } 201 }
202 202
203 } // namespace device 203 } // namespace device
OLDNEW
« no previous file with comments | « crypto/symmetric_key_unittest.cc ('k') | device/hid/hid_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698