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

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

Issue 11747019: Use generated shim headers for libusb (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include path Created 7 years, 11 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_service.h ('k') | third_party/libusb/libusb.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_service.h" 5 #include "chrome/browser/usb/usb_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "chrome/browser/usb/usb_device.h" 13 #include "chrome/browser/usb/usb_device.h"
14 #include "third_party/libusb/libusb.h" 14 #include "third_party/libusb/src/libusb/libusb.h"
15 15
16 #if defined(OS_CHROMEOS) 16 #if defined(OS_CHROMEOS)
17 #include "chromeos/dbus/dbus_thread_manager.h" 17 #include "chromeos/dbus/dbus_thread_manager.h"
18 #include "chromeos/dbus/permission_broker_client.h" 18 #include "chromeos/dbus/permission_broker_client.h"
19 #endif // defined(OS_CHROMEOS) 19 #endif // defined(OS_CHROMEOS)
20 20
21 using std::vector; 21 using std::vector;
22 22
23 // The UsbEventHandler works around a design flaw in the libusb interface. There 23 // The UsbEventHandler works around a design flaw in the libusb interface. There
24 // is currently no way to signal to libusb that any caller into one of the event 24 // is currently no way to signal to libusb that any caller into one of the event
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (libusb_open(device, &handle)) { 180 if (libusb_open(device, &handle)) {
181 LOG(WARNING) << "Could not open device."; 181 LOG(WARNING) << "Could not open device.";
182 return NULL; 182 return NULL;
183 } 183 }
184 184
185 UsbDevice* wrapper = new UsbDevice(this, handle); 185 UsbDevice* wrapper = new UsbDevice(this, handle);
186 devices_[device] = wrapper; 186 devices_[device] = wrapper;
187 } 187 }
188 return devices_[device]; 188 return devices_[device];
189 } 189 }
OLDNEW
« no previous file with comments | « chrome/browser/usb/usb_service.h ('k') | third_party/libusb/libusb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698