summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-29 18:18:14 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-29 18:18:14 +0000
commit15241d869e70294ff2c4e20bfe963dc68974c87e (patch)
tree3a1059d3a5046c1448e5b954296bed3e056ed681
parent007ed1d91a47828586d4416c942b3999984f116e (diff)
downloadchromium_src-15241d869e70294ff2c4e20bfe963dc68974c87e.zip
chromium_src-15241d869e70294ff2c4e20bfe963dc68974c87e.tar.gz
chromium_src-15241d869e70294ff2c4e20bfe963dc68974c87e.tar.bz2
Remove JingleSessionManager::set_allow_local_ips().
Currently allow_local_ips is always set to true, and there is no reason not to allow local IP addresses. Review URL: http://codereview.chromium.org/8728011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111973 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/host/chromoting_host.cc2
-rw-r--r--remoting/protocol/jingle_session_manager.cc9
-rw-r--r--remoting/protocol/jingle_session_manager.h4
-rw-r--r--remoting/protocol/jingle_session_unittest.cc2
4 files changed, 2 insertions, 15 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index c648577..60cc6cbd 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -257,8 +257,6 @@ void ChromotingHost::OnStateChange(
// Create and start session manager.
protocol::JingleSessionManager* server =
new protocol::JingleSessionManager(context_->network_message_loop());
- // TODO(ajwong): Make this a command switch when we're more stable.
- server->set_allow_local_ips(true);
// Assign key and certificate to server.
HostKeyPair key_pair;
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc
index e1a935d..8408f94 100644
--- a/remoting/protocol/jingle_session_manager.cc
+++ b/remoting/protocol/jingle_session_manager.cc
@@ -31,7 +31,6 @@ JingleSessionManager::JingleSessionManager(
: message_loop_(message_loop),
signal_strategy_(NULL),
allow_nat_traversal_(false),
- allow_local_ips_(false),
http_port_allocator_(NULL),
closed_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
@@ -120,10 +119,6 @@ void JingleSessionManager::Close() {
}
}
-void JingleSessionManager::set_allow_local_ips(bool allow_local_ips) {
- allow_local_ips_ = allow_local_ips;
-}
-
Session* JingleSessionManager::Connect(
const std::string& host_jid,
const std::string& host_public_key,
@@ -156,8 +151,8 @@ void JingleSessionManager::OnSessionCreate(
cricket::Session* cricket_session, bool incoming) {
DCHECK(CalledOnValidThread());
- // Allow local connections if neccessary.
- cricket_session->set_allow_local_ips(allow_local_ips_);
+ // Allow local connections.
+ cricket_session->set_allow_local_ips(true);
// If this is an incoming session, create a JingleSession on top of it.
if (incoming) {
diff --git a/remoting/protocol/jingle_session_manager.h b/remoting/protocol/jingle_session_manager.h
index 73f2530..2f2125e 100644
--- a/remoting/protocol/jingle_session_manager.h
+++ b/remoting/protocol/jingle_session_manager.h
@@ -54,8 +54,6 @@ class JingleSessionManager
const Session::StateChangeCallback& state_change_callback) OVERRIDE;
virtual void Close() OVERRIDE;
- void set_allow_local_ips(bool allow_local_ips);
-
// cricket::SessionClient interface.
virtual void OnSessionCreate(cricket::Session* cricket_session,
bool received_initiate) OVERRIDE;
@@ -108,8 +106,6 @@ class JingleSessionManager
scoped_ptr<crypto::RSAPrivateKey> private_key_;
bool allow_nat_traversal_;
- bool allow_local_ips_;
-
scoped_ptr<cricket::PortAllocator> port_allocator_;
cricket::HttpPortAllocator* http_port_allocator_;
scoped_ptr<cricket::SessionManager> cricket_session_manager_;
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index 15ce76c..7ac4c3a 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -179,7 +179,6 @@ class JingleSessionTest : public testing::Test {
.Times(1);
host_server_.reset(new JingleSessionManager(
base::MessageLoopProxy::current()));
- host_server_->set_allow_local_ips(true);
host_server_->Init(
kHostJid, host_signal_strategy_.get(), &host_server_listener_,
private_key.release(), cert_der, false);
@@ -188,7 +187,6 @@ class JingleSessionTest : public testing::Test {
.Times(1);
client_server_.reset(new JingleSessionManager(
base::MessageLoopProxy::current()));
- client_server_->set_allow_local_ips(true);
client_server_->Init(
kClientJid, client_signal_strategy_.get(), &client_server_listener_,
NULL, "", false);