Do not clear ephemeral device permissions when an app is suspended.
[chromium-blink-merge.git] / device / usb / usb_device.cc
blob2be93d954974276bfdb438a1d59d24d58f813de8
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/usb_device.h"
7 #include "base/guid.h"
9 namespace device {
11 UsbDevice::UsbDevice(uint16 vendor_id,
12 uint16 product_id,
13 const base::string16& manufacturer_string,
14 const base::string16& product_string,
15 const base::string16& serial_number)
16 : guid_(base::GenerateGUID()),
17 vendor_id_(vendor_id),
18 product_id_(product_id),
19 manufacturer_string_(manufacturer_string),
20 product_string_(product_string),
21 serial_number_(serial_number) {
24 UsbDevice::~UsbDevice() {
27 void UsbDevice::CheckUsbAccess(const ResultCallback& callback) {
28 callback.Run(true);
31 // Like CheckUsbAccess but actually changes the ownership of the device node.
32 void UsbDevice::RequestUsbAccess(int interface_id,
33 const ResultCallback& callback) {
34 callback.Run(true);
37 } // namespace device