Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / device / usb / mock_usb_device.cc
blob1b3e69bc19f4ca75c5ec7321824bdf42f7ef8729
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.
5 #include "device/usb/mock_usb_device.h"
7 #include "base/strings/utf_string_conversions.h"
9 namespace device {
11 MockUsbDevice::MockUsbDevice(uint16 vendor_id, uint16 product_id)
12 : MockUsbDevice(vendor_id, product_id, "", "", "") {
15 MockUsbDevice::MockUsbDevice(uint16 vendor_id,
16 uint16 product_id,
17 const std::string& manufacturer_string,
18 const std::string& product_string,
19 const std::string& serial_number)
20 : UsbDevice(vendor_id,
21 product_id,
22 base::UTF8ToUTF16(manufacturer_string),
23 base::UTF8ToUTF16(product_string),
24 base::UTF8ToUTF16(serial_number)) {
27 MockUsbDevice::MockUsbDevice(uint16 vendor_id,
28 uint16 product_id,
29 const std::string& manufacturer_string,
30 const std::string& product_string,
31 const std::string& serial_number,
32 const GURL& webusb_landing_page)
33 : UsbDevice(vendor_id,
34 product_id,
35 base::UTF8ToUTF16(manufacturer_string),
36 base::UTF8ToUTF16(product_string),
37 base::UTF8ToUTF16(serial_number)) {
38 webusb_landing_page_ = webusb_landing_page;
41 MockUsbDevice::MockUsbDevice(uint16 vendor_id,
42 uint16 product_id,
43 const UsbConfigDescriptor& configuration)
44 : MockUsbDevice(vendor_id, product_id) {
45 configurations_.push_back(configuration);
48 MockUsbDevice::MockUsbDevice(
49 uint16 vendor_id,
50 uint16 product_id,
51 const std::string& manufacturer_string,
52 const std::string& product_string,
53 const std::string& serial_number,
54 const std::vector<UsbConfigDescriptor>& configurations)
55 : MockUsbDevice(vendor_id,
56 product_id,
57 manufacturer_string,
58 product_string,
59 serial_number) {
60 configurations_ = configurations;
63 MockUsbDevice::~MockUsbDevice() {
66 } // namespace device