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

Unified Diff: device/usb/usb_service_impl.cc

Issue 2700563007: Clean up DeviceInfoQueryWin. (Closed)
Patch Set: Add INITGUID to serial_io_handler_win.cc. Created 3 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
« no previous file with comments | « device/serial/serial_io_handler_win.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 6c1922d37c1dd5561ccaf1d2b71e42e19a289728..2408eb4b32e06af9ff2dc5f4e33116681fce8cbd 100644
--- a/device/usb/usb_service_impl.cc
+++ b/device/usb/usb_service_impl.cc
@@ -28,6 +28,8 @@
#include "third_party/libusb/src/libusb/libusb.h"
#if defined(OS_WIN)
+#define INITGUID
+#include <devpkey.h>
#include <setupapi.h>
#include <usbiodef.h>
@@ -54,7 +56,7 @@ bool IsWinUsbInterface(const std::string& device_path) {
}
// This will add the device so we can query driver info.
- if (!device_info_query.AddDevice(device_path.c_str())) {
+ if (!device_info_query.AddDevice(device_path)) {
USB_PLOG(ERROR) << "Failed to get device interface data for "
<< device_path;
return false;
@@ -66,7 +68,8 @@ bool IsWinUsbInterface(const std::string& device_path) {
}
std::string buffer;
- if (!device_info_query.GetDeviceStringProperty(SPDRP_SERVICE, &buffer)) {
+ if (!device_info_query.GetDeviceStringProperty(DEVPKEY_Device_Service,
+ &buffer)) {
USB_PLOG(ERROR) << "Failed to get device service property";
return false;
}
« no previous file with comments | « device/serial/serial_io_handler_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698