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

Unified Diff: blimp/net/engine_connection_manager.cc

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: Fixed a few minor comments Created 4 years, 1 month 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
Index: blimp/net/engine_connection_manager.cc
diff --git a/blimp/net/engine_connection_manager.cc b/blimp/net/engine_connection_manager.cc
index 88d8234ccbcc0f5ae0fb34bd731d6babab9771d1..6a56ee3ff72aad1338c1d4f8e1ae5ca06eadee31 100644
--- a/blimp/net/engine_connection_manager.cc
+++ b/blimp/net/engine_connection_manager.cc
@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "blimp/net/blimp_connection.h"
#include "blimp/net/blimp_transport.h"
+#include "blimp/net/grpc_engine_transport.h"
#include "blimp/net/message_port.h"
#include "blimp/net/tcp_engine_transport.h"
#include "net/base/ip_address.h"
@@ -27,19 +28,17 @@ EngineConnectionManager::EngineConnectionManager(
EngineConnectionManager::~EngineConnectionManager() {}
void EngineConnectionManager::ConnectTransport(
- net::IPEndPoint* ip_endpoint,
+ AssignmentOptions* assignment_options,
EngineTransportType transport_type) {
switch (transport_type) {
case EngineTransportType::TCP: {
- transport_ = base::MakeUnique<TCPEngineTransport>(*ip_endpoint, net_log_);
+ transport_ = base::MakeUnique<TCPEngineTransport>(
+ assignment_options->engine_endpoint, net_log_);
break;
}
case EngineTransportType::GRPC: {
- NOTIMPLEMENTED();
- // TODO(perumaal): Unimplemented as yet.
- // transport_ =
- // base::MakeUnique<GrpcEngineTransport>(ip_endpoint.ToString());
+ transport_ = base::MakeUnique<GrpcEngineTransport>(*assignment_options);
break;
}
}
@@ -47,7 +46,11 @@ void EngineConnectionManager::ConnectTransport(
transport_->Connect(base::Bind(&EngineConnectionManager::OnConnectResult,
base::Unretained(this),
base::Unretained(transport_.get())));
- transport_->GetLocalAddress(ip_endpoint);
+ transport_->GetAssignmentOptions(assignment_options);
+
+ DVLOG(3) << "Assigner options: ip addr = "
+ << assignment_options->engine_endpoint.ToString()
+ << ", file_descriptor = " << assignment_options->file_descriptor;
}
void EngineConnectionManager::OnConnectResult(BlimpTransport* transport,

Powered by Google App Engine
This is Rietveld 408576698