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

Unified Diff: device/usb/usb_device_impl.cc

Issue 941063003: Log device/usb messages to chrome://device-log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/usb/usb_device_impl.cc
diff --git a/device/usb/usb_device_impl.cc b/device/usb/usb_device_impl.cc
index 782b0caa182a01c94c6601c5e59c36fc3fd21e29..8695fef3f3fea66eef2ad4efe2c994bd5331c236 100644
--- a/device/usb/usb_device_impl.cc
+++ b/device/usb/usb_device_impl.cc
@@ -17,6 +17,7 @@
#include "device/usb/usb_descriptors.h"
#include "device/usb/usb_device_handle_impl.h"
#include "device/usb/usb_error.h"
+#include "device/usb/usb_log.h"
#include "third_party/libusb/src/libusb/libusb.h"
#if defined(OS_CHROMEOS)
@@ -221,7 +222,8 @@ scoped_refptr<UsbDeviceHandle> UsbDeviceImpl::Open() {
handles_.push_back(device_handle);
return device_handle;
} else {
- VLOG(1) << "Failed to open device: " << ConvertPlatformUsbErrorToString(rv);
+ USB_LOG(DEBUG) << "Failed to open device: "
+ << ConvertPlatformUsbErrorToString(rv);
stevenjb 2015/02/20 00:01:27 These seem like they should be actual ERROR events
return NULL;
}
}
@@ -302,8 +304,8 @@ void UsbDeviceImpl::RefreshConfiguration() {
int rv =
libusb_get_active_config_descriptor(platform_device_, &platform_config);
if (rv != LIBUSB_SUCCESS) {
- VLOG(1) << "Failed to get config descriptor: "
- << ConvertPlatformUsbErrorToString(rv);
+ USB_LOG(DEBUG) << "Failed to get config descriptor: "
+ << ConvertPlatformUsbErrorToString(rv);
return;
}
@@ -382,11 +384,12 @@ void UsbDeviceImpl::CacheStrings() {
}
device_handle->Close();
} else {
- VLOG(1) << "Failed to open device to cache string descriptors.";
+ USB_LOG(DEBUG) << "Failed to open device to cache string descriptors.";
}
} else {
- VLOG(1) << "Failed to read device descriptor to cache string descriptors: "
- << ConvertPlatformUsbErrorToString(rv);
+ USB_LOG(DEBUG)
+ << "Failed to read device descriptor to cache string descriptors: "
+ << ConvertPlatformUsbErrorToString(rv);
}
strings_cached_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698