Index: device/usb/usb_service.cc |
diff --git a/device/usb/usb_service.cc b/device/usb/usb_service.cc |
index 3faa3e56413a24335ca1fde440b41ae4657f410b..5bb7f20f2e7c2d151cfaa7c4b5804e08d4fbc946 100644 |
--- a/device/usb/usb_service.cc |
+++ b/device/usb/usb_service.cc |
@@ -6,6 +6,7 @@ |
#include "base/message_loop/message_loop.h" |
#include "device/usb/usb_device.h" |
+#include "device/usb/usb_log.h" |
#include "device/usb/usb_service_impl.h" |
namespace device { |
@@ -83,11 +84,19 @@ void UsbService::RemoveObserver(Observer* observer) { |
void UsbService::NotifyDeviceAdded(scoped_refptr<UsbDevice> device) { |
DCHECK(CalledOnValidThread()); |
+ |
+ USB_LOG(EVENT) << "USB device added: vendorId = " << device->vendor_id() |
+ << ", productId = " << device->product_id() |
+ << ", uniqueId = " << device->unique_id(); |
stevenjb
2015/02/20 00:01:27
These might be a good candidate for 'USER' since i
Reilly Grant (use Gerrit)
2015/02/20 00:10:22
Fair enough. There will be a small burst of events
|
+ |
FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceAdded(device)); |
} |
void UsbService::NotifyDeviceRemoved(scoped_refptr<UsbDevice> device) { |
DCHECK(CalledOnValidThread()); |
+ |
+ USB_LOG(EVENT) << "USB device removed: uniqueId = " << device->unique_id(); |
+ |
FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceRemoved(device)); |
FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceRemovedCleanup(device)); |
} |