| Index: blimp/client/session/blimp_client_session.cc
|
| diff --git a/blimp/client/session/blimp_client_session.cc b/blimp/client/session/blimp_client_session.cc
|
| index 29c0b32b28703cecc197fbd6a7aa36226a1c4875..4c100b7790d1b18de589d16d7b760e315166f5a8 100644
|
| --- a/blimp/client/session/blimp_client_session.cc
|
| +++ b/blimp/client/session/blimp_client_session.cc
|
| @@ -22,6 +22,7 @@
|
| #include "blimp/net/client_connection_manager.h"
|
| #include "blimp/net/common.h"
|
| #include "blimp/net/null_blimp_message_processor.h"
|
| +#include "blimp/net/ssl_client_transport.h"
|
| #include "blimp/net/tcp_client_transport.h"
|
| #include "net/base/address_list.h"
|
| #include "net/base/ip_address.h"
|
| @@ -66,7 +67,6 @@ class ClientNetworkComponents {
|
| // they are used from the UI thread.
|
| std::vector<scoped_ptr<BlimpMessageThreadPipe>> outgoing_pipes_;
|
| std::vector<scoped_ptr<BlimpMessageProcessor>> outgoing_message_processors_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(ClientNetworkComponents);
|
| };
|
|
|
| @@ -81,8 +81,21 @@ void ClientNetworkComponents::ConnectWithAssignment(
|
| DCHECK(connection_manager_);
|
| connection_manager_->set_client_token(assignment.client_token);
|
|
|
| - connection_manager_->AddTransport(make_scoped_ptr(new TCPClientTransport(
|
| - net::AddressList(assignment.ip_endpoint), nullptr)));
|
| + switch (assignment.transport_protocol) {
|
| + case Assignment::SSL:
|
| + DCHECK(assignment.cert);
|
| + connection_manager_->AddTransport(make_scoped_ptr(new SSLClientTransport(
|
| + assignment.ip_endpoint, std::move(assignment.cert), nullptr)));
|
| + break;
|
| + case Assignment::TCP:
|
| + connection_manager_->AddTransport(make_scoped_ptr(
|
| + new TCPClientTransport(assignment.ip_endpoint, nullptr)));
|
| + break;
|
| + default:
|
| + DLOG(FATAL) << "No support for transport "
|
| + << assignment.transport_protocol << ".";
|
| + break;
|
| + }
|
|
|
| connection_manager_->Connect();
|
| }
|
| @@ -118,8 +131,7 @@ BlimpClientSession::BlimpClientSession()
|
| options.message_loop_type = base::MessageLoop::TYPE_IO;
|
| io_thread_.StartWithOptions(options);
|
|
|
| - assignment_source_.reset(new AssignmentSource(
|
| - base::ThreadTaskRunnerHandle::Get(), io_thread_.task_runner()));
|
| + assignment_source_.reset(new AssignmentSource(io_thread_.task_runner()));
|
|
|
| // Register features' message senders and receivers.
|
| tab_control_feature_->set_outgoing_message_processor(
|
|
|