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

Unified Diff: remoting/client/jni/chromoting_jni_instance.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/client/chromoting_client.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_instance.cc
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc
index 0d5314ef2d4f6178e7dd1ae3ccb252821ed0782f..535ca0f9804336726b7110d6afefe98962c454a4 100644
--- a/remoting/client/jni/chromoting_jni_instance.cc
+++ b/remoting/client/jni/chromoting_jni_instance.cc
@@ -21,10 +21,10 @@
#include "remoting/protocol/chromium_port_allocator.h"
#include "remoting/protocol/chromium_socket_factory.h"
#include "remoting/protocol/host_stub.h"
-#include "remoting/protocol/ice_transport_factory.h"
#include "remoting/protocol/negotiating_client_authenticator.h"
#include "remoting/protocol/network_settings.h"
#include "remoting/protocol/performance_tracker.h"
+#include "remoting/protocol/transport_context.h"
#include "remoting/signaling/server_log_entry.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
@@ -423,17 +423,17 @@ void ChromotingJniInstance::ConnectToHostOnNetworkThread() {
protocol::NetworkSettings::NAT_TRAVERSAL_FULL);
// Use Chrome's network stack to allocate ports for peer-to-peer channels.
- scoped_ptr<protocol::ChromiumPortAllocator> port_allocator(
- protocol::ChromiumPortAllocator::Create(jni_runtime_->url_requester(),
- network_settings));
+ scoped_ptr<protocol::ChromiumPortAllocatorFactory> port_allocator_factory(
+ new protocol::ChromiumPortAllocatorFactory(
+ jni_runtime_->url_requester()));
- scoped_ptr<protocol::TransportFactory> transport_factory(
- new protocol::IceTransportFactory(
- signaling_.get(), port_allocator.Pass(), network_settings,
- protocol::TransportRole::CLIENT));
+ scoped_refptr<protocol::TransportContext> transport_context =
+ new protocol::TransportContext(
+ signaling_.get(), port_allocator_factory.Pass(), network_settings,
+ protocol::TransportRole::CLIENT);
- client_->Start(signaling_.get(), authenticator_.Pass(),
- transport_factory.Pass(), host_jid_, capabilities_);
+ client_->Start(signaling_.get(), authenticator_.Pass(), transport_context,
+ host_jid_, capabilities_);
}
void ChromotingJniInstance::FetchSecret(
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698