| OLD | NEW |
| 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_win.h" | 5 #include "device/hid/hid_service_win.h" |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 HidService::GetDevices(devices); | 220 HidService::GetDevices(devices); |
| 221 } | 221 } |
| 222 | 222 |
| 223 scoped_refptr<HidConnection> HidServiceWin::Connect( | 223 scoped_refptr<HidConnection> HidServiceWin::Connect( |
| 224 const HidDeviceId& device_id) { | 224 const HidDeviceId& device_id) { |
| 225 HidDeviceInfo device_info; | 225 HidDeviceInfo device_info; |
| 226 if (!GetDeviceInfo(device_id, &device_info)) | 226 if (!GetDeviceInfo(device_id, &device_info)) |
| 227 return NULL; | 227 return NULL; |
| 228 scoped_refptr<HidConnectionWin> connection(new HidConnectionWin(device_info)); | 228 scoped_refptr<HidConnectionWin> connection(new HidConnectionWin(device_info)); |
| 229 if (!connection->available()) { | 229 if (!connection->available()) { |
| 230 LOG_GETLASTERROR(ERROR) << "Failed to open device."; | 230 PLOG(ERROR) << "Failed to open device."; |
| 231 return NULL; | 231 return NULL; |
| 232 } | 232 } |
| 233 return connection; | 233 return connection; |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace device | 236 } // namespace device |
| OLD | NEW |