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

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

Issue 980023002: Move device/usb classes from the FILE thread to UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more thread assertions. Created 5 years, 8 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_device.h ('k') | device/usb/usb_device_filter_unittest.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.h" 5 #include "device/usb/usb_device.h"
6 6
7 namespace device { 7 namespace device {
8 8
9 UsbDevice::UsbDevice(uint16 vendor_id, uint16 product_id, uint32 unique_id) 9 UsbDevice::UsbDevice(uint16 vendor_id,
10 : vendor_id_(vendor_id), product_id_(product_id), unique_id_(unique_id) { 10 uint16 product_id,
11 uint32 unique_id,
12 const base::string16& manufacturer_string,
13 const base::string16& product_string,
14 const base::string16& serial_number)
15 : vendor_id_(vendor_id),
16 product_id_(product_id),
17 unique_id_(unique_id),
18 manufacturer_string_(manufacturer_string),
19 product_string_(product_string),
20 serial_number_(serial_number) {
11 } 21 }
12 22
13 UsbDevice::~UsbDevice() { 23 UsbDevice::~UsbDevice() {
14 } 24 }
15 25
16 void UsbDevice::CheckUsbAccess(const ResultCallback& callback) { 26 void UsbDevice::CheckUsbAccess(const ResultCallback& callback) {
17 callback.Run(true); 27 callback.Run(true);
18 } 28 }
19 29
20 // Like CheckUsbAccess but actually changes the ownership of the device node. 30 // Like CheckUsbAccess but actually changes the ownership of the device node.
21 void UsbDevice::RequestUsbAccess(int interface_id, 31 void UsbDevice::RequestUsbAccess(int interface_id,
22 const ResultCallback& callback) { 32 const ResultCallback& callback) {
23 callback.Run(true); 33 callback.Run(true);
24 } 34 }
25 35
26 } // namespace device 36 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/usb_device.h ('k') | device/usb/usb_device_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698