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

Unified Diff: blimp/net/engine_connection_manager.cc

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 years, 11 months 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 | « blimp/net/engine_connection_manager.h ('k') | blimp/net/engine_connection_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/engine_connection_manager.cc
diff --git a/blimp/net/engine_connection_manager.cc b/blimp/net/engine_connection_manager.cc
deleted file mode 100644
index 11ab02a85a5be2522aee67824ced7172000606ae..0000000000000000000000000000000000000000
--- a/blimp/net/engine_connection_manager.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/net/engine_connection_manager.h"
-
-#include <utility>
-
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-#include "blimp/net/blimp_connection.h"
-#include "blimp/net/blimp_transport.h"
-#include "blimp/net/message_port.h"
-#include "blimp/net/tcp_engine_transport.h"
-#include "net/base/ip_address.h"
-#include "net/base/net_errors.h"
-
-namespace blimp {
-
-EngineConnectionManager::EngineConnectionManager(
- ConnectionHandler* connection_handler,
- net::NetLog* net_log)
- : connection_handler_(connection_handler), net_log_(net_log) {
- DCHECK(connection_handler_);
-}
-
-EngineConnectionManager::~EngineConnectionManager() {}
-
-void EngineConnectionManager::ConnectTransport(
- net::IPEndPoint* ip_endpoint,
- EngineTransportType transport_type) {
- switch (transport_type) {
- case EngineTransportType::TCP: {
- transport_ = base::MakeUnique<TCPEngineTransport>(*ip_endpoint, net_log_);
- break;
- }
-
- case EngineTransportType::GRPC: {
- NOTIMPLEMENTED();
- // TODO(perumaal): Unimplemented as yet.
- // transport_ =
- // base::MakeUnique<GrpcEngineTransport>(ip_endpoint.ToString());
- break;
- }
- }
-
- Connect();
- transport_->GetLocalAddress(ip_endpoint);
-}
-
-void EngineConnectionManager::Connect() {
- transport_->Connect(base::Bind(&EngineConnectionManager::OnConnectResult,
- base::Unretained(this)));
-}
-
-void EngineConnectionManager::OnConnectResult(int result) {
- CHECK_EQ(net::OK, result) << "Transport failure:" << transport_->GetName();
- connection_handler_->HandleConnection(transport_->MakeConnection());
- Connect();
-}
-
-} // namespace blimp
« no previous file with comments | « blimp/net/engine_connection_manager.h ('k') | blimp/net/engine_connection_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698