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 #include "chromeos/dbus/fake_permission_broker_client.h" | 5 #include "chromeos/dbus/fake_permission_broker_client.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "dbus/file_descriptor.h" | 9 #include "dbus/file_descriptor.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 FakePermissionBrokerClient::FakePermissionBrokerClient() {} | 13 FakePermissionBrokerClient::FakePermissionBrokerClient() {} |
14 | 14 |
15 FakePermissionBrokerClient::~FakePermissionBrokerClient() {} | 15 FakePermissionBrokerClient::~FakePermissionBrokerClient() {} |
16 | 16 |
17 void FakePermissionBrokerClient::Init(dbus::Bus* bus) {} | 17 void FakePermissionBrokerClient::Init(dbus::Bus* bus) {} |
18 | 18 |
| 19 void FakePermissionBrokerClient::CheckPathAccess( |
| 20 const std::string& path, |
| 21 const ResultCallback& callback) { |
| 22 callback.Run(true); |
| 23 } |
| 24 |
19 void FakePermissionBrokerClient::RequestPathAccess( | 25 void FakePermissionBrokerClient::RequestPathAccess( |
20 const std::string& path, | 26 const std::string& path, |
21 int interface_id, | 27 int interface_id, |
22 const ResultCallback& callback) { | 28 const ResultCallback& callback) { |
23 callback.Run(false); | 29 callback.Run(true); |
24 } | 30 } |
25 | 31 |
26 void FakePermissionBrokerClient::RequestTcpPortAccess( | 32 void FakePermissionBrokerClient::RequestTcpPortAccess( |
27 uint16 port, | 33 uint16 port, |
28 const std::string& interface, | 34 const std::string& interface, |
29 const dbus::FileDescriptor& lifeline_fd, | 35 const dbus::FileDescriptor& lifeline_fd, |
30 const ResultCallback& callback) { | 36 const ResultCallback& callback) { |
31 DCHECK(lifeline_fd.is_valid()); | 37 DCHECK(lifeline_fd.is_valid()); |
32 callback.Run(true); | 38 callback.Run(true); |
33 } | 39 } |
(...skipping 15 matching lines...) Expand all Loading... |
49 } | 55 } |
50 | 56 |
51 void FakePermissionBrokerClient::ReleaseUdpPort( | 57 void FakePermissionBrokerClient::ReleaseUdpPort( |
52 uint16 port, | 58 uint16 port, |
53 const std::string& interface, | 59 const std::string& interface, |
54 const ResultCallback& callback) { | 60 const ResultCallback& callback) { |
55 callback.Run(true); | 61 callback.Run(true); |
56 } | 62 } |
57 | 63 |
58 } // namespace chromeos | 64 } // namespace chromeos |
OLD | NEW |