| 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/mojo/fake_permission_provider.h" | |
| 6 | |
| 7 #include <stddef.h> | |
| 8 #include <utility> | |
| 9 | |
| 10 namespace device { | |
| 11 namespace usb { | |
| 12 | |
| 13 FakePermissionProvider::FakePermissionProvider() : weak_factory_(this) {} | |
| 14 | |
| 15 FakePermissionProvider::~FakePermissionProvider() {} | |
| 16 | |
| 17 base::WeakPtr<PermissionProvider> FakePermissionProvider::GetWeakPtr() { | |
| 18 return weak_factory_.GetWeakPtr(); | |
| 19 } | |
| 20 | |
| 21 bool FakePermissionProvider::HasDevicePermission( | |
| 22 const device::usb::DeviceInfo& device_info) const { | |
| 23 return true; | |
| 24 } | |
| 25 | |
| 26 bool FakePermissionProvider::HasConfigurationPermission( | |
| 27 uint8_t requested_configuration, | |
| 28 const device::usb::DeviceInfo& device_info) const { | |
| 29 return true; | |
| 30 } | |
| 31 | |
| 32 bool FakePermissionProvider::HasInterfacePermission( | |
| 33 uint8_t requested_interface, | |
| 34 uint8_t configuration_value, | |
| 35 const device::usb::DeviceInfo& device_info) const { | |
| 36 return true; | |
| 37 } | |
| 38 | |
| 39 } // namespace usb | |
| 40 } // namespace device | |
| OLD | NEW |