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

Side by Side Diff: chromeos/dbus/mock_permission_broker_client.h

Issue 1681383002: Add path open errors from the permission broker to the device log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_request_access
Patch Set: Addresses stevenjb@'s comments. Created 4 years, 10 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
6 #define CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_ 6 #define CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "chromeos/dbus/permission_broker_client.h" 10 #include "chromeos/dbus/permission_broker_client.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 12
13 namespace dbus { 13 namespace dbus {
14 class FileDescriptor; 14 class FileDescriptor;
15 } // namespace dbus 15 } // namespace dbus
16 16
17 namespace chromeos { 17 namespace chromeos {
18 18
19 class MockPermissionBrokerClient : public PermissionBrokerClient { 19 class MockPermissionBrokerClient : public PermissionBrokerClient {
20 public: 20 public:
21 MockPermissionBrokerClient(); 21 MockPermissionBrokerClient();
22 ~MockPermissionBrokerClient() override; 22 ~MockPermissionBrokerClient() override;
23 23
24 MOCK_METHOD1(Init, void(dbus::Bus* bus)); 24 MOCK_METHOD1(Init, void(dbus::Bus* bus));
25 MOCK_METHOD2(CheckPathAccess, 25 MOCK_METHOD2(CheckPathAccess,
26 void(const std::string& path, const ResultCallback& callback)); 26 void(const std::string& path, const ResultCallback& callback));
27 MOCK_METHOD2(OpenPath, 27 MOCK_METHOD3(OpenPath,
28 void(const std::string& path, const OpenPathCallback& callback)); 28 void(const std::string& path,
29 const OpenPathCallback& callback,
30 const ErrorCallback& error_callback));
29 MOCK_METHOD4(RequestTcpPortAccess, 31 MOCK_METHOD4(RequestTcpPortAccess,
30 void(uint16_t port, 32 void(uint16_t port,
31 const std::string& interface, 33 const std::string& interface,
32 const dbus::FileDescriptor& lifeline_fd, 34 const dbus::FileDescriptor& lifeline_fd,
33 const ResultCallback& callback)); 35 const ResultCallback& callback));
34 MOCK_METHOD4(RequestUdpPortAccess, 36 MOCK_METHOD4(RequestUdpPortAccess,
35 void(uint16_t port, 37 void(uint16_t port,
36 const std::string& interface, 38 const std::string& interface,
37 const dbus::FileDescriptor& lifeline_fd, 39 const dbus::FileDescriptor& lifeline_fd,
38 const ResultCallback& callback)); 40 const ResultCallback& callback));
39 MOCK_METHOD3(ReleaseTcpPort, 41 MOCK_METHOD3(ReleaseTcpPort,
40 void(uint16_t port, 42 void(uint16_t port,
41 const std::string& interface, 43 const std::string& interface,
42 const ResultCallback& callback)); 44 const ResultCallback& callback));
43 MOCK_METHOD3(ReleaseUdpPort, 45 MOCK_METHOD3(ReleaseUdpPort,
44 void(uint16_t port, 46 void(uint16_t port,
45 const std::string& interface, 47 const std::string& interface,
46 const ResultCallback& callback)); 48 const ResultCallback& callback));
47 }; 49 };
48 50
49 } // namespace chromeos 51 } // namespace chromeos
50 52
51 #endif // CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_ 53 #endif // CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_permission_broker_client.cc ('k') | chromeos/dbus/permission_broker_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698