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

Unified Diff: device/devices_app/usb/device_impl.cc

Issue 1265833005: Get all the UsbConfigDescriptor for the device configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated code to continue instead of return if error happens when getting config descriptor Created 5 years, 4 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/devices_app/usb/device_impl.cc
diff --git a/device/devices_app/usb/device_impl.cc b/device/devices_app/usb/device_impl.cc
index e8b299b86b77f69da4f8992d90bc413cf13d89ab..4b370f26b595a7930839df6a8c415eee63032029 100644
--- a/device/devices_app/usb/device_impl.cc
+++ b/device/devices_app/usb/device_impl.cc
@@ -8,7 +8,6 @@
#include "base/callback.h"
#include "base/stl_util.h"
#include "device/devices_app/usb/type_converters.h"
-#include "device/usb/usb_descriptors.h"
#include "device/usb/usb_device.h"
#include "net/base/io_buffer.h"
@@ -123,7 +122,7 @@ void DeviceImpl::GetDeviceInfo(const GetDeviceInfoCallback& callback) {
// but GetConfiguration() is non-const so we do it here for now.
DeviceInfoPtr info = DeviceInfo::From(*device_handle_->GetDevice());
const UsbConfigDescriptor* config =
- device_handle_->GetDevice()->GetConfiguration();
+ device_handle_->GetDevice()->GetActiveConfiguration();
info->configurations = mojo::Array<ConfigurationInfoPtr>::New(0);
if (config)
info->configurations.push_back(ConfigurationInfo::From(*config));

Powered by Google App Engine
This is Rietveld 408576698