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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | chromeos/network/firewall_hole.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_permission_broker_client.cc
diff --git a/chromeos/dbus/fake_permission_broker_client.cc b/chromeos/dbus/fake_permission_broker_client.cc
index 17d84acbf7711537341b6a1553a563f4d5254321..c4b265c16daa4bb6ee4bd9ce7baa6161e5e4fb6b 100644
--- a/chromeos/dbus/fake_permission_broker_client.cc
+++ b/chromeos/dbus/fake_permission_broker_client.cc
@@ -5,6 +5,8 @@
#include "chromeos/dbus/fake_permission_broker_client.h"
#include "base/callback.h"
+#include "base/logging.h"
+#include "dbus/file_descriptor.h"
namespace chromeos {
@@ -26,7 +28,8 @@ void FakePermissionBrokerClient::RequestTcpPortAccess(
const std::string& interface,
const dbus::FileDescriptor& lifeline_fd,
const ResultCallback& callback) {
- callback.Run(false);
+ DCHECK(lifeline_fd.is_valid());
+ callback.Run(true);
}
void FakePermissionBrokerClient::RequestUdpPortAccess(
@@ -34,21 +37,22 @@ void FakePermissionBrokerClient::RequestUdpPortAccess(
const std::string& interface,
const dbus::FileDescriptor& lifeline_fd,
const ResultCallback& callback) {
- callback.Run(false);
+ DCHECK(lifeline_fd.is_valid());
+ callback.Run(true);
}
void FakePermissionBrokerClient::ReleaseTcpPort(
uint16 port,
const std::string& interface,
const ResultCallback& callback) {
- callback.Run(false);
+ callback.Run(true);
}
void FakePermissionBrokerClient::ReleaseUdpPort(
uint16 port,
const std::string& interface,
const ResultCallback& callback) {
- callback.Run(false);
+ callback.Run(true);
}
} // namespace chromeos
« 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