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

Unified Diff: device/usb/usb_device.h

Issue 601073002: Move string descriptor getters from UsbDeviceHandle to UsbDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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.h
diff --git a/device/usb/usb_device.h b/device/usb/usb_device.h
index f4bd5915467086be66671c7751e6347770d141f8..372f019ab26cd6fa5bc1eca45f899b9f96f021de 100644
--- a/device/usb/usb_device.h
+++ b/device/usb/usb_device.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
+#include "base/strings/string16.h"
namespace device {
@@ -54,6 +55,18 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
// Blocking method. Must be called on FILE thread.
virtual const UsbConfigDescriptor& GetConfiguration() = 0;
+ // Gets the manufacturer string from the device.
scheib 2014/09/25 17:36:04 "from the device" implies getting data from an act
Reilly Grant (use Gerrit) 2014/09/25 17:58:44 Done.
+ // Blocking method. Must be called on FILE thread.
+ virtual bool GetManufacturer(base::string16* manufacturer) = 0;
+
+ // Gets the product string from the device.
+ // Blocking method. Must be called on FILE thread.
+ virtual bool GetProduct(base::string16* product) = 0;
+
+ // Gets the serial number string from the device.
+ // Blocking method. Must be called on FILE thread.
+ virtual bool GetSerialNumber(base::string16* serial) = 0;
+
void AddObserver(Observer* obs) { observer_list_.AddObserver(obs); }
void RemoveObserver(Observer* obs) { observer_list_.RemoveObserver(obs); }

Powered by Google App Engine
This is Rietveld 408576698