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

Side by Side Diff: device/usb/mojo/fake_permission_provider.h

Issue 1847183002: Use interface associations to check function permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit and fixed Windows build. Created 4 years, 8 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
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 #ifndef DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_
6 #define DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_
7
8 #include <stdint.h>
9
10 #include "base/memory/weak_ptr.h"
11 #include "device/usb/mojo/permission_provider.h"
12
13 namespace device {
14 namespace usb {
15
16 class FakePermissionProvider : public PermissionProvider {
17 public:
18 FakePermissionProvider();
19 ~FakePermissionProvider() override;
20
21 base::WeakPtr<PermissionProvider> GetWeakPtr();
22 bool HasDevicePermission(const DeviceInfo& device_info) const override;
23 bool HasConfigurationPermission(uint8_t requested_configuration,
24 const DeviceInfo& device_info) const override;
25 bool HasInterfacePermission(uint8_t requested_interface,
26 uint8_t configuration_value,
27 const DeviceInfo& device_info) const override;
28
29 private:
30 base::WeakPtrFactory<PermissionProvider> weak_factory_;
31 };
32
33 } // namespace usb
34 } // namespace device
35
36 #endif // DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_
OLDNEW
« no previous file with comments | « device/usb/mojo/device_manager_impl_unittest.cc ('k') | device/usb/mojo/fake_permission_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698