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

Unified Diff: device/hid/hid_connection_win.cc

Issue 947663002: Log device/hid messages to chrome://device-log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarified destructor behavior, cleaned up OS X error logging. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: device/hid/hid_connection_win.cc
diff --git a/device/hid/hid_connection_win.cc b/device/hid/hid_connection_win.cc
index 3b1a9c3229f106bb72bc453b84e858b086134aa0..87845eb106efcf9765fef83a948536bb985c6165 100644
--- a/device/hid/hid_connection_win.cc
+++ b/device/hid/hid_connection_win.cc
@@ -12,6 +12,7 @@
#include "base/numerics/safe_conversions.h"
#include "base/profiler/scoped_tracker.h"
#include "base/win/object_watcher.h"
+#include "components/device_event_log/device_event_log.h"
#define INITGUID
@@ -83,7 +84,7 @@ void PendingHidTransfer::TakeResultFromWindowsAPI(BOOL result) {
AddRef();
watcher_.StartWatching(event_.Get(), this);
} else {
- VPLOG(1) << "HID transfer failed";
+ HID_PLOG(EVENT) << "HID transfer failed";
callback_.Run(this, false);
}
}
@@ -216,7 +217,7 @@ void HidConnectionWin::OnReadComplete(scoped_refptr<net::IOBuffer> buffer,
file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) {
CompleteRead(buffer, bytes_transferred, callback);
} else {
- VPLOG(1) << "HID read failed";
+ HID_PLOG(EVENT) << "HID read failed";
callback.Run(false, NULL, 0);
}
}
@@ -236,7 +237,7 @@ void HidConnectionWin::OnReadFeatureComplete(
file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) {
callback.Run(true, buffer, bytes_transferred);
} else {
- VPLOG(1) << "HID read failed";
+ HID_PLOG(EVENT) << "HID read failed";
callback.Run(false, NULL, 0);
}
}
@@ -254,7 +255,7 @@ void HidConnectionWin::OnWriteComplete(const WriteCallback& callback,
file_.Get(), transfer->GetOverlapped(), &bytes_transferred, FALSE)) {
callback.Run(true);
} else {
- VPLOG(1) << "HID write failed";
+ HID_PLOG(EVENT) << "HID write failed";
callback.Run(false);
}
}

Powered by Google App Engine
This is Rietveld 408576698