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

Side by Side Diff: device/usb/mojo/mock_permission_provider.cc

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
« no previous file with comments | « device/usb/mojo/mock_permission_provider.h ('k') | device/usb/mojo/permission_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "device/usb/mojo/mock_permission_provider.h"
6
7 #include <stddef.h>
8 #include <utility>
9
10 #include "device/usb/public/interfaces/device.mojom.h"
11
12 using ::testing::Return;
13 using ::testing::_;
14
15 namespace device {
16 namespace usb {
17
18 MockPermissionProvider::MockPermissionProvider() : weak_factory_(this) {
19 ON_CALL(*this, HasDevicePermission(_)).WillByDefault(Return(true));
20 ON_CALL(*this, HasConfigurationPermission(_, _)).WillByDefault(Return(true));
21 ON_CALL(*this, HasFunctionPermission(_, _, _)).WillByDefault(Return(true));
22 }
23
24 MockPermissionProvider::~MockPermissionProvider() {}
25
26 base::WeakPtr<PermissionProvider> MockPermissionProvider::GetWeakPtr() {
27 return weak_factory_.GetWeakPtr();
28 }
29
30 } // namespace usb
31 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/mojo/mock_permission_provider.h ('k') | device/usb/mojo/permission_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698