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

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

Issue 1484643002: Make //device pass "gn check" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/sequenced_task_runner.h" 11 #include "base/sequenced_task_runner.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/thread_task_runner_handle.h" 14 #include "base/thread_task_runner_handle.h"
15 #include "components/device_event_log/device_event_log.h" 15 #include "components/device_event_log/device_event_log.h"
16 #include "device/usb/usb_context.h" 16 #include "device/usb/usb_context.h"
17 #include "device/usb/usb_descriptors.h" 17 #include "device/usb/usb_descriptors.h"
18 #include "device/usb/usb_device_handle_impl.h" 18 #include "device/usb/usb_device_handle_impl.h"
19 #include "device/usb/usb_error.h" 19 #include "device/usb/usb_error.h"
20 #include "third_party/libusb/src/libusb/libusb.h" 20 #include "third_party/libusb/src/libusb/libusb.h"
21 21
22 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
23 #include "chromeos/dbus/dbus_thread_manager.h" 23 #include "chromeos/dbus/dbus_thread_manager.h"
24 #include "chromeos/dbus/permission_broker_client.h" 24 #include "chromeos/dbus/permission_broker_client.h"
25 #include "dbus/file_descriptor.h" 25 #include "dbus/file_descriptor.h" // nogncheck
26 #endif // defined(OS_CHROMEOS) 26 #endif // defined(OS_CHROMEOS)
27 27
28 namespace device { 28 namespace device {
29 29
30 namespace { 30 namespace {
31 31
32 UsbEndpointDirection GetDirection( 32 UsbEndpointDirection GetDirection(
33 const libusb_endpoint_descriptor* descriptor) { 33 const libusb_endpoint_descriptor* descriptor) {
34 switch (descriptor->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK) { 34 switch (descriptor->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK) {
35 case LIBUSB_ENDPOINT_IN: 35 case LIBUSB_ENDPOINT_IN:
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle, 328 void UsbDeviceImpl::Opened(PlatformUsbDeviceHandle platform_handle,
329 const OpenCallback& callback) { 329 const OpenCallback& callback) {
330 DCHECK(thread_checker_.CalledOnValidThread()); 330 DCHECK(thread_checker_.CalledOnValidThread());
331 scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl( 331 scoped_refptr<UsbDeviceHandleImpl> device_handle = new UsbDeviceHandleImpl(
332 context_, this, platform_handle, blocking_task_runner_); 332 context_, this, platform_handle, blocking_task_runner_);
333 handles_.push_back(device_handle); 333 handles_.push_back(device_handle);
334 callback.Run(device_handle); 334 callback.Run(device_handle);
335 } 335 }
336 336
337 } // namespace device 337 } // namespace device
OLDNEW
« no previous file with comments | « device/test/test_device_client.cc ('k') | tools/generate_library_loader/generate_library_loader.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698