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

Unified Diff: device/serial/serial_io_handler_win.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/base/device_info_query_win.cc ('k') | device/usb/usb_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_io_handler_win.cc
diff --git a/device/serial/serial_io_handler_win.cc b/device/serial/serial_io_handler_win.cc
index f09e4a2ffc93a83a7097067e2a12a9223fa18bd8..6be1127d12e84eb41bdf39748c981d9fdd9c16e4 100644
--- a/device/serial/serial_io_handler_win.cc
+++ b/device/serial/serial_io_handler_win.cc
@@ -4,8 +4,10 @@
#include "device/serial/serial_io_handler_win.h"
-#include <windows.h>
+#define INITGUID
+#include <devpkey.h>
#include <setupapi.h>
+#include <windows.h>
#include "base/bind.h"
#include "base/macros.h"
@@ -203,7 +205,7 @@ void SerialIoHandlerWin::OnDeviceRemoved(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)) {
DVPLOG(1) << "Failed to get device interface data for " << device_path;
return;
}
@@ -214,7 +216,7 @@ void SerialIoHandlerWin::OnDeviceRemoved(const std::string& device_path) {
}
std::string friendly_name;
- if (!device_info_query.GetDeviceStringProperty(SPDRP_FRIENDLYNAME,
+ if (!device_info_query.GetDeviceStringProperty(DEVPKEY_Device_FriendlyName,
&friendly_name)) {
DVPLOG(1) << "Failed to get device service property";
return;
« no previous file with comments | « device/base/device_info_query_win.cc ('k') | device/usb/usb_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698