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

Side by Side Diff: chromeos/dbus/fake_permission_broker_client.cc

Issue 965613002: Open a firewall hole when a TCP server or UDP socket is bound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 9 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 | « chromeos/chromeos_switches.cc ('k') | chromeos/network/firewall_hole.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
9 #include "dbus/file_descriptor.h"
8 10
9 namespace chromeos { 11 namespace chromeos {
10 12
11 FakePermissionBrokerClient::FakePermissionBrokerClient() {} 13 FakePermissionBrokerClient::FakePermissionBrokerClient() {}
12 14
13 FakePermissionBrokerClient::~FakePermissionBrokerClient() {} 15 FakePermissionBrokerClient::~FakePermissionBrokerClient() {}
14 16
15 void FakePermissionBrokerClient::Init(dbus::Bus* bus) {} 17 void FakePermissionBrokerClient::Init(dbus::Bus* bus) {}
16 18
17 void FakePermissionBrokerClient::RequestPathAccess( 19 void FakePermissionBrokerClient::RequestPathAccess(
18 const std::string& path, 20 const std::string& path,
19 int interface_id, 21 int interface_id,
20 const ResultCallback& callback) { 22 const ResultCallback& callback) {
21 callback.Run(false); 23 callback.Run(false);
22 } 24 }
23 25
24 void FakePermissionBrokerClient::RequestTcpPortAccess( 26 void FakePermissionBrokerClient::RequestTcpPortAccess(
25 uint16 port, 27 uint16 port,
26 const std::string& interface, 28 const std::string& interface,
27 const dbus::FileDescriptor& lifeline_fd, 29 const dbus::FileDescriptor& lifeline_fd,
28 const ResultCallback& callback) { 30 const ResultCallback& callback) {
29 callback.Run(false); 31 DCHECK(lifeline_fd.is_valid());
32 callback.Run(true);
30 } 33 }
31 34
32 void FakePermissionBrokerClient::RequestUdpPortAccess( 35 void FakePermissionBrokerClient::RequestUdpPortAccess(
33 uint16 port, 36 uint16 port,
34 const std::string& interface, 37 const std::string& interface,
35 const dbus::FileDescriptor& lifeline_fd, 38 const dbus::FileDescriptor& lifeline_fd,
36 const ResultCallback& callback) { 39 const ResultCallback& callback) {
37 callback.Run(false); 40 DCHECK(lifeline_fd.is_valid());
41 callback.Run(true);
38 } 42 }
39 43
40 void FakePermissionBrokerClient::ReleaseTcpPort( 44 void FakePermissionBrokerClient::ReleaseTcpPort(
41 uint16 port, 45 uint16 port,
42 const std::string& interface, 46 const std::string& interface,
43 const ResultCallback& callback) { 47 const ResultCallback& callback) {
44 callback.Run(false); 48 callback.Run(true);
45 } 49 }
46 50
47 void FakePermissionBrokerClient::ReleaseUdpPort( 51 void FakePermissionBrokerClient::ReleaseUdpPort(
48 uint16 port, 52 uint16 port,
49 const std::string& interface, 53 const std::string& interface,
50 const ResultCallback& callback) { 54 const ResultCallback& callback) {
51 callback.Run(false); 55 callback.Run(true);
52 } 56 }
53 57
54 } // namespace chromeos 58 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | chromeos/network/firewall_hole.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698