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

Unified Diff: blimp/net/tcp_engine_transport.cc

Issue 2236093002: Decouple Blimp transport output from BlimpConnections using MessagePort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@statistics-singleton
Patch Set: wez feedback Created 4 years, 4 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/tcp_engine_transport.h ('k') | blimp/net/tcp_transport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/tcp_engine_transport.cc
diff --git a/blimp/net/tcp_engine_transport.cc b/blimp/net/tcp_engine_transport.cc
index bc41e0556888fe46af24c4e50f3b8bf8d59e09d8..b4757a065f4ac6974badf51c98a1d924ac1063b4 100644
--- a/blimp/net/tcp_engine_transport.cc
+++ b/blimp/net/tcp_engine_transport.cc
@@ -11,9 +11,8 @@
#include "base/callback_helpers.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
-#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "blimp/net/stream_socket_connection.h"
+#include "blimp/net/message_port.h"
#include "net/socket/stream_socket.h"
#include "net/socket/tcp_server_socket.h"
@@ -51,7 +50,6 @@ void TCPEngineTransport::Connect(const net::CompletionCallback& callback) {
}
if (result != net::OK) {
- // TODO(haibinlu): investigate when we can keep using this server socket.
server_socket_.reset();
}
@@ -59,10 +57,11 @@ void TCPEngineTransport::Connect(const net::CompletionCallback& callback) {
base::Bind(callback, result));
}
-std::unique_ptr<BlimpConnection> TCPEngineTransport::TakeConnection() {
+std::unique_ptr<MessagePort> TCPEngineTransport::TakeMessagePort() {
DCHECK(connect_callback_.is_null());
DCHECK(accepted_socket_);
- return base::MakeUnique<StreamSocketConnection>(std::move(accepted_socket_));
+ return MessagePort::CreateForStreamSocketWithCompression(
+ std::move(accepted_socket_));
}
const char* TCPEngineTransport::GetName() const {
« no previous file with comments | « blimp/net/tcp_engine_transport.h ('k') | blimp/net/tcp_transport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698