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

Unified Diff: device/usb/usb_device_android.cc

Issue 1468423003: Construct USB descriptors over explicit values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Android code. Created 4 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/usb/usb_descriptors.cc ('k') | device/usb/usb_device_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_android.cc
diff --git a/device/usb/usb_device_android.cc b/device/usb/usb_device_android.cc
index ee9e93b8b7f1db6d2438ea19b3c686f3c976f4e0..6d246ba8e5d310f90cca170ce3af7128bb28b522 100644
--- a/device/usb/usb_device_android.cc
+++ b/device/usb/usb_device_android.cc
@@ -83,11 +83,10 @@ UsbDeviceAndroid::UsbDeviceAndroid(JNIEnv* env,
} else {
// Pre-lollipop only the first configuration was supported. Build a basic
// configuration out of the available interfaces.
- UsbConfigDescriptor config;
- config.configuration_value = 1; // Reasonable guess.
- config.self_powered = false; // Arbitrary default.
- config.remote_wakeup = false; // Arbitrary default.
- config.maximum_power = 0; // Arbitrary default.
+ UsbConfigDescriptor config(1, // Configuration value, reasonable guess.
+ false, // Self powered, arbitrary default.
+ false, // Remote wakeup, rbitrary default.
+ 0); // Maximum power, aitrary default.
ScopedJavaLocalRef<jobjectArray> interfaces =
Java_ChromeUsbDevice_getInterfaces(env, wrapper.obj());
« no previous file with comments | « device/usb/usb_descriptors.cc ('k') | device/usb/usb_device_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698