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

Side by Side Diff: device/usb/usb_device_impl.cc

Issue 1697863003: Revert of Parse USB interface association descriptors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « device/usb/usb_descriptors_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/usb/usb_device_impl.h" 5 #include "device/usb/usb_device_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 platform_alt_setting->extra, 128 platform_alt_setting->extra,
129 platform_alt_setting->extra + platform_alt_setting->extra_length); 129 platform_alt_setting->extra + platform_alt_setting->extra_length);
130 130
131 configuration->interfaces.push_back(interface); 131 configuration->interfaces.push_back(interface);
132 } 132 }
133 } 133 }
134 134
135 configuration->extra_data.assign( 135 configuration->extra_data.assign(
136 platform_config->extra, 136 platform_config->extra,
137 platform_config->extra + platform_config->extra_length); 137 platform_config->extra + platform_config->extra_length);
138
139 configuration->AssignFirstInterfaceNumbers();
140 } 138 }
141 139
142 } // namespace 140 } // namespace
143 141
144 UsbDeviceImpl::UsbDeviceImpl( 142 UsbDeviceImpl::UsbDeviceImpl(
145 scoped_refptr<UsbContext> context, 143 scoped_refptr<UsbContext> context,
146 PlatformUsbDevice platform_device, 144 PlatformUsbDevice platform_device,
147 uint16_t vendor_id, 145 uint16_t vendor_id,
148 uint16_t product_id, 146 uint16_t product_id,
149 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) 147 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner)
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle, 329 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle,
332 const OpenCallback& callback) { 330 const OpenCallback& callback) {
333 DCHECK(thread_checker_.CalledOnValidThread()); 331 DCHECK(thread_checker_.CalledOnValidThread());
334 scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl( 332 scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl(
335 context_, this, platform_handle, blocking_task_runner_); 333 context_, this, platform_handle, blocking_task_runner_);
336 handles_.push_back(device_handle); 334 handles_.push_back(device_handle);
337 callback.Run(device_handle); 335 callback.Run(device_handle);
338 } 336 }
339 337
340 } // namespace device 338 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/usb_descriptors_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698