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

Unified Diff: device/usb/usb_service_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: Rebase and adjust log levels. 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
« device/usb/usb_device_handle_impl.cc ('K') | « device/usb/usb_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_impl.cc
diff --git a/device/usb/usb_service_impl.cc b/device/usb/usb_service_impl.cc
index d789e702b68b64fe9bfbb38953015bc5ac94696a..d63c493dd632f59533966550ff1ae3441f1f1c14 100644
--- a/device/usb/usb_service_impl.cc
+++ b/device/usb/usb_service_impl.cc
@@ -12,6 +12,7 @@
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/thread_task_runner_handle.h"
+#include "components/device_event_log/device_event_log.h"
#include "device/usb/usb_error.h"
#if defined(OS_WIN)
@@ -69,8 +70,8 @@ UsbService* UsbServiceImpl::Create(
PlatformUsbContext context = NULL;
const int rv = libusb_init(&context);
if (rv != LIBUSB_SUCCESS) {
- VLOG(1) << "Failed to initialize libusb: "
- << ConvertPlatformUsbErrorToString(rv);
+ USB_LOG(ERROR) << "Failed to initialize libusb: "
+ << ConvertPlatformUsbErrorToString(rv);
return nullptr;
}
if (!context) {
@@ -153,8 +154,8 @@ void UsbServiceImpl::RefreshDevices() {
const ssize_t device_count =
libusb_get_device_list(context_->context(), &platform_devices);
if (device_count < 0) {
- VLOG(1) << "Failed to get device list: "
- << ConvertPlatformUsbErrorToString(device_count);
+ USB_LOG(ERROR) << "Failed to get device list: "
+ << ConvertPlatformUsbErrorToString(device_count);
}
std::set<UsbDevice*> connected_devices;
@@ -213,8 +214,8 @@ scoped_refptr<UsbDeviceImpl> UsbServiceImpl::AddDevice(
NotifyDeviceAdded(new_device);
return new_device;
} else {
- VLOG(1) << "Failed to get device descriptor: "
- << ConvertPlatformUsbErrorToString(rv);
+ USB_LOG(EVENT) << "Failed to get device descriptor: "
+ << ConvertPlatformUsbErrorToString(rv);
return nullptr;
}
}
« device/usb/usb_device_handle_impl.cc ('K') | « device/usb/usb_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698