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

Side by Side Diff: chrome/browser/usb/usb_device.cc

Issue 10332075: Adding use_system_libusb option for third_party/libusb (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes. Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/usb/usb_device.h ('k') | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/usb/usb_device.h" 5 #include "chrome/browser/usb/usb_device.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/synchronization/lock.h" 8 #include "base/synchronization/lock.h"
9 #include "chrome/browser/usb/usb_service.h" 9 #include "chrome/browser/usb/usb_service.h"
10 #include "third_party/libusb/libusb/libusb.h" 10 #include "third_party/libusb/libusb.h"
11 11
12 namespace { 12 namespace {
13 13
14 static uint8 ConvertTransferDirection( 14 static uint8 ConvertTransferDirection(
15 const UsbDevice::TransferDirection direction) { 15 const UsbDevice::TransferDirection direction) {
16 switch (direction) { 16 switch (direction) {
17 case UsbDevice::INBOUND: 17 case UsbDevice::INBOUND:
18 return LIBUSB_ENDPOINT_IN; 18 return LIBUSB_ENDPOINT_IN;
19 case UsbDevice::OUTBOUND: 19 case UsbDevice::OUTBOUND:
20 return LIBUSB_ENDPOINT_OUT; 20 return LIBUSB_ENDPOINT_OUT;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const net::CompletionCallback& callback) { 156 const net::CompletionCallback& callback) {
157 Transfer transfer; 157 Transfer transfer;
158 transfer.buffer = buffer; 158 transfer.buffer = buffer;
159 transfer.callback = callback; 159 transfer.callback = callback;
160 160
161 { 161 {
162 base::AutoLock lock(lock_); 162 base::AutoLock lock(lock_);
163 transfers_[handle] = transfer; 163 transfers_[handle] = transfer;
164 } 164 }
165 } 165 }
OLDNEW
« no previous file with comments | « chrome/browser/usb/usb_device.h ('k') | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698