Index: device/hid/hid_connection_mac.cc |
diff --git a/device/hid/hid_connection_mac.cc b/device/hid/hid_connection_mac.cc |
index fe485f7ec7f931e51187e75b7c81e4b1ab8eda25..8df5277083a5f5295ba7ddcf6a7b054403de60b0 100644 |
--- a/device/hid/hid_connection_mac.cc |
+++ b/device/hid/hid_connection_mac.cc |
@@ -10,6 +10,7 @@ |
#include "base/single_thread_task_runner.h" |
#include "base/strings/stringprintf.h" |
#include "base/thread_task_runner_handle.h" |
+#include "components/device_event_log/device_event_log.h" |
#include "device/hid/hid_connection_mac.h" |
namespace device { |
@@ -59,8 +60,8 @@ void HidConnectionMac::PlatformClose() { |
device_.get(), CFRunLoopGetMain(), kCFRunLoopDefaultMode); |
IOReturn result = IOHIDDeviceClose(device_.get(), 0); |
if (result != kIOReturnSuccess) { |
- VLOG(1) << "Failed to close HID device: " |
- << base::StringPrintf("0x%04x", result); |
+ HID_LOG(EVENT) << "Failed to close HID device: " << base::StringPrintf( |
+ "0x%04x", result); |
stevenjb
2015/02/23 21:45:29
nit: We do this a lot here, maybe wrap the StringP
Reilly Grant (use Gerrit)
2015/02/23 22:40:38
Done.
|
} |
while (!pending_reads_.empty()) { |
@@ -120,8 +121,8 @@ void HidConnectionMac::InputReportCallback(void* context, |
CFIndex report_length) { |
HidConnectionMac* connection = static_cast<HidConnectionMac*>(context); |
if (result != kIOReturnSuccess) { |
- VLOG(1) << "Failed to read input report: " |
- << base::StringPrintf("0x%08x", result); |
+ HID_LOG(EVENT) << "Failed to read input report: " << base::StringPrintf( |
+ "0x%08x", result); |
return; |
} |
@@ -186,8 +187,8 @@ void HidConnectionMac::GetFeatureReportAsync(uint8_t report_id, |
this, |
base::Bind(callback, true, buffer, report_size))); |
} else { |
- VLOG(1) << "Failed to get feature report: " |
- << base::StringPrintf("0x%08x", result); |
+ HID_LOG(EVENT) << "Failed to get feature report: " << base::StringPrintf( |
+ "0x%08x", result); |
task_runner_->PostTask(FROM_HERE, |
base::Bind(&HidConnectionMac::ReturnAsyncResult, |
this, |
@@ -222,7 +223,8 @@ void HidConnectionMac::SetReportAsync(IOHIDReportType report_type, |
this, |
base::Bind(callback, true))); |
} else { |
- VLOG(1) << "Failed to set report: " << base::StringPrintf("0x%08x", result); |
+ HID_LOG(EVENT) << "Failed to set report: " << base::StringPrintf("0x%08x", |
+ result); |
task_runner_->PostTask(FROM_HERE, |
base::Bind(&HidConnectionMac::ReturnAsyncResult, |
this, |