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

Unified Diff: remoting/protocol/jingle_session_unittest.cc

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « remoting/protocol/ice_transport_unittest.cc ('k') | remoting/protocol/port_allocator_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session_unittest.cc
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index c1338951f3886f4ffa9a81b9cc40b3a7bb85d384..03cb5339ccab3a24fe6cbc989c6d0f50ee20cf5f 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -19,9 +19,10 @@
#include "remoting/protocol/chromium_port_allocator.h"
#include "remoting/protocol/connection_tester.h"
#include "remoting/protocol/fake_authenticator.h"
-#include "remoting/protocol/ice_transport_factory.h"
+#include "remoting/protocol/ice_transport.h"
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/network_settings.h"
+#include "remoting/protocol/transport_context.h"
#include "remoting/signaling/fake_signal_strategy.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -102,11 +103,10 @@ class JingleSessionTest : public testing::Test {
FakeSignalStrategy::Connect(host_signal_strategy_.get(),
client_signal_strategy_.get());
- scoped_ptr<TransportFactory> host_transport(new IceTransportFactory(
- nullptr,
- ChromiumPortAllocator::Create(nullptr, network_settings_).Pass(),
- network_settings_, TransportRole::SERVER));
- host_server_.reset(new JingleSessionManager(host_transport.Pass()));
+ host_server_.reset(new JingleSessionManager(
+ make_scoped_ptr(new IceTransportFactory(new TransportContext(
+ nullptr, make_scoped_ptr(new ChromiumPortAllocatorFactory(nullptr)),
+ network_settings_, TransportRole::SERVER)))));
host_server_->Init(host_signal_strategy_.get(), &host_server_listener_);
scoped_ptr<AuthenticatorFactory> factory(
@@ -114,12 +114,10 @@ class JingleSessionTest : public testing::Test {
messages_till_start, auth_action, true));
host_server_->set_authenticator_factory(factory.Pass());
- scoped_ptr<TransportFactory> client_transport(new IceTransportFactory(
- nullptr,
- ChromiumPortAllocator::Create(nullptr, network_settings_).Pass(),
- network_settings_, TransportRole::CLIENT));
- client_server_.reset(
- new JingleSessionManager(client_transport.Pass()));
+ client_server_.reset(new JingleSessionManager(
+ make_scoped_ptr(new IceTransportFactory(new TransportContext(
+ nullptr, make_scoped_ptr(new ChromiumPortAllocatorFactory(nullptr)),
+ network_settings_, TransportRole::CLIENT)))));
client_server_->Init(client_signal_strategy_.get(),
&client_server_listener_);
}
« no previous file with comments | « remoting/protocol/ice_transport_unittest.cc ('k') | remoting/protocol/port_allocator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698