OLD | NEW |
(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 |
OLD | NEW |