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

Unified Diff: blimp/net/tcp_engine_transport.cc

Issue 2439403003: Refactor BlimpConnection to TCPConnection (Closed)
Patch Set: Added missing Engine Transport Created 4 years, 2 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
Index: blimp/net/tcp_engine_transport.cc
diff --git a/blimp/net/tcp_engine_transport.cc b/blimp/net/tcp_engine_transport.cc
index 01026e630264cc202a00c35659da2bbdd7763368..9d18f1770b6e716af391af87d2d07564b9b11f89 100644
--- a/blimp/net/tcp_engine_transport.cc
+++ b/blimp/net/tcp_engine_transport.cc
@@ -13,6 +13,7 @@
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "blimp/net/message_port.h"
+#include "blimp/net/tcp_connection.h"
#include "net/log/net_log_source.h"
#include "net/socket/stream_socket.h"
#include "net/socket/tcp_server_socket.h"
@@ -65,13 +66,17 @@ std::unique_ptr<MessagePort> TCPEngineTransport::TakeMessagePort() {
std::move(accepted_socket_));
}
+std::unique_ptr<BlimpConnection> TCPEngineTransport::MakeConnection() {
scf 2016/11/10 21:59:10 rename to CreateConnection ?
perumaal 2016/11/11 01:50:55 We had a discussion around this before. I learnt t
+ return base::MakeUnique<TCPConnection>(TakeMessagePort());
+}
+
const char* TCPEngineTransport::GetName() const {
return "TCP";
}
-int TCPEngineTransport::GetLocalAddress(net::IPEndPoint* address) const {
+void TCPEngineTransport::GetLocalAddress(net::IPEndPoint* address) const {
DCHECK(server_socket_);
- return server_socket_->GetLocalAddress(address);
+ server_socket_->GetLocalAddress(address);
}
void TCPEngineTransport::OnTCPConnectAccepted(int result) {

Powered by Google App Engine
This is Rietveld 408576698