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

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

Issue 1144493003: Extract //device/usb mocks so that they can be shared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android and GN builds for real. Created 5 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
« no previous file with comments | « device/usb/mock_usb_device.h ('k') | device/usb/mock_usb_device_handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "device/usb/mock_usb_device.h"
6
7 #include "base/strings/utf_string_conversions.h"
8
9 namespace device {
10
11 namespace {
12
13 static uint32 next_id;
14
15 } // namespace
16
17 MockUsbDevice::MockUsbDevice(uint16 vendor_id, uint16 product_id)
18 : UsbDevice(vendor_id,
19 product_id,
20 next_id++,
21 base::string16(),
22 base::string16(),
23 base::string16()) {
24 }
25
26 MockUsbDevice::MockUsbDevice(uint16 vendor_id,
27 uint16 product_id,
28 const std::string& manufacturer_string,
29 const std::string& product_string,
30 const std::string& serial_number)
31 : UsbDevice(vendor_id,
32 product_id,
33 next_id++,
34 base::UTF8ToUTF16(manufacturer_string),
35 base::UTF8ToUTF16(product_string),
36 base::UTF8ToUTF16(serial_number)) {
37 }
38
39 MockUsbDevice::~MockUsbDevice() {
40 }
41
42 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/mock_usb_device.h ('k') | device/usb/mock_usb_device_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698