OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FAKE_PERMISSION_BROKER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "chromeos/dbus/permission_broker_client.h" | 12 #include "chromeos/dbus/permission_broker_client.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class CHROMEOS_EXPORT FakePermissionBrokerClient | 16 class CHROMEOS_EXPORT FakePermissionBrokerClient |
17 : public PermissionBrokerClient { | 17 : public PermissionBrokerClient { |
18 public: | 18 public: |
19 FakePermissionBrokerClient(); | 19 FakePermissionBrokerClient(); |
20 ~FakePermissionBrokerClient() override; | 20 ~FakePermissionBrokerClient() override; |
21 | 21 |
22 void Init(dbus::Bus* bus) override; | 22 void Init(dbus::Bus* bus) override; |
23 void CheckPathAccess(const std::string& path, | 23 void CheckPathAccess(const std::string& path, |
24 const ResultCallback& callback) override; | 24 const ResultCallback& callback) override; |
25 void OpenPath(const std::string& path, | 25 void OpenPath(const std::string& path, |
26 const OpenPathCallback& callback) override; | 26 const OpenPathCallback& callback, |
| 27 const ErrorCallback& error_callback) override; |
27 void RequestTcpPortAccess(uint16_t port, | 28 void RequestTcpPortAccess(uint16_t port, |
28 const std::string& interface, | 29 const std::string& interface, |
29 const dbus::FileDescriptor& lifeline_fd, | 30 const dbus::FileDescriptor& lifeline_fd, |
30 const ResultCallback& callback) override; | 31 const ResultCallback& callback) override; |
31 void RequestUdpPortAccess(uint16_t port, | 32 void RequestUdpPortAccess(uint16_t port, |
32 const std::string& interface, | 33 const std::string& interface, |
33 const dbus::FileDescriptor& lifeline_fd, | 34 const dbus::FileDescriptor& lifeline_fd, |
34 const ResultCallback& callback) override; | 35 const ResultCallback& callback) override; |
35 void ReleaseTcpPort(uint16_t port, | 36 void ReleaseTcpPort(uint16_t port, |
36 const std::string& interface, | 37 const std::string& interface, |
37 const ResultCallback& callback) override; | 38 const ResultCallback& callback) override; |
38 void ReleaseUdpPort(uint16_t port, | 39 void ReleaseUdpPort(uint16_t port, |
39 const std::string& interface, | 40 const std::string& interface, |
40 const ResultCallback& callback) override; | 41 const ResultCallback& callback) override; |
41 | 42 |
42 private: | 43 private: |
43 DISALLOW_COPY_AND_ASSIGN(FakePermissionBrokerClient); | 44 DISALLOW_COPY_AND_ASSIGN(FakePermissionBrokerClient); |
44 }; | 45 }; |
45 | 46 |
46 } // namespace chromeos | 47 } // namespace chromeos |
47 | 48 |
48 #endif // CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ | 49 #endif // CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ |
OLD | NEW |