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

Unified Diff: blimp/net/test_common.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/test_common.cc
diff --git a/blimp/net/test_common.cc b/blimp/net/test_common.cc
index f72ed236b002ea7aa902abe657baa405bd63aee1..da3d8c6779382064bc8a8f5bd534fa1e00e13fff 100644
--- a/blimp/net/test_common.cc
+++ b/blimp/net/test_common.cc
@@ -5,6 +5,7 @@
#include "blimp/net/test_common.h"
#include <string>
+#include <utility>
#include "base/memory/ptr_util.h"
#include "base/sys_byteorder.h"
@@ -22,12 +23,17 @@ MockStreamSocket::~MockStreamSocket() {}
MockTransport::MockTransport() {}
-MockTransport::~MockTransport() {}
+std::unique_ptr<BlimpConnection> MockTransport::MakeConnection() {
+ return std::move(connection_);
+}
-std::unique_ptr<MessagePort> MockTransport::TakeMessagePort() {
- return base::WrapUnique(TakeMessagePortPtr());
+void MockTransport::SetMockConnection(
+ std::unique_ptr<MockBlimpConnection> connection) {
+ connection_ = std::move(connection);
}
+MockTransport::~MockTransport() {}
+
const char* MockTransport::GetName() const {
return "mock";
}

Powered by Google App Engine
This is Rietveld 408576698