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

Unified Diff: device/usb/usb_configuration_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/mojo/device_impl_unittest.cc ('k') | device/usb/usb_descriptors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_configuration_android.cc
diff --git a/device/usb/usb_configuration_android.cc b/device/usb/usb_configuration_android.cc
index 4a9c7129d9747014d99d7e705f10806a69346e88..d7c140162b2a1079017d8effcbf1be5092d848f9 100644
--- a/device/usb/usb_configuration_android.cc
+++ b/device/usb/usb_configuration_android.cc
@@ -23,15 +23,11 @@ UsbConfigDescriptor UsbConfigurationAndroid::Convert(
ScopedJavaLocalRef<jobject> wrapper =
Java_ChromeUsbConfiguration_create(env, usb_configuration.obj());
- UsbConfigDescriptor config;
- config.configuration_value =
- Java_ChromeUsbConfiguration_getConfigurationValue(env, wrapper.obj());
- config.self_powered =
- Java_ChromeUsbConfiguration_isSelfPowered(env, wrapper.obj());
- config.remote_wakeup =
- Java_ChromeUsbConfiguration_isRemoteWakeup(env, wrapper.obj());
- config.maximum_power =
- Java_ChromeUsbConfiguration_getMaxPower(env, wrapper.obj());
+ UsbConfigDescriptor config(
+ Java_ChromeUsbConfiguration_getConfigurationValue(env, wrapper.obj()),
+ Java_ChromeUsbConfiguration_isSelfPowered(env, wrapper.obj()),
+ Java_ChromeUsbConfiguration_isRemoteWakeup(env, wrapper.obj()),
+ Java_ChromeUsbConfiguration_getMaxPower(env, wrapper.obj()));
ScopedJavaLocalRef<jobjectArray> interfaces =
Java_ChromeUsbConfiguration_getInterfaces(env, wrapper.obj());
« no previous file with comments | « device/usb/mojo/device_impl_unittest.cc ('k') | device/usb/usb_descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698