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

Unified Diff: blimp/net/test_common.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/test_common.h ('k') | blimp/net/thread_pipe_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/test_common.cc
diff --git a/blimp/net/test_common.cc b/blimp/net/test_common.cc
deleted file mode 100644
index da3d8c6779382064bc8a8f5bd534fa1e00e13fff..0000000000000000000000000000000000000000
--- a/blimp/net/test_common.cc
+++ /dev/null
@@ -1,90 +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/test_common.h"
-
-#include <string>
-#include <utility>
-
-#include "base/memory/ptr_util.h"
-#include "base/sys_byteorder.h"
-#include "blimp/common/proto/blimp_message.pb.h"
-#include "blimp/net/blimp_connection.h"
-#include "blimp/net/common.h"
-#include "blimp/net/message_port.h"
-#include "net/base/io_buffer.h"
-
-namespace blimp {
-
-MockStreamSocket::MockStreamSocket() {}
-
-MockStreamSocket::~MockStreamSocket() {}
-
-MockTransport::MockTransport() {}
-
-std::unique_ptr<BlimpConnection> MockTransport::MakeConnection() {
- return std::move(connection_);
-}
-
-void MockTransport::SetMockConnection(
- std::unique_ptr<MockBlimpConnection> connection) {
- connection_ = std::move(connection);
-}
-
-MockTransport::~MockTransport() {}
-
-const char* MockTransport::GetName() const {
- return "mock";
-}
-
-MockConnectionHandler::MockConnectionHandler() {}
-
-MockConnectionHandler::~MockConnectionHandler() {}
-
-void MockConnectionHandler::HandleConnection(
- std::unique_ptr<BlimpConnection> connection) {
- HandleConnectionPtr(connection.get());
-}
-
-MockPacketReader::MockPacketReader() {}
-
-MockPacketReader::~MockPacketReader() {}
-
-MockPacketWriter::MockPacketWriter() {}
-
-MockPacketWriter::~MockPacketWriter() {}
-
-MockBlimpConnection::MockBlimpConnection() {}
-
-MockBlimpConnection::~MockBlimpConnection() {}
-
-MockConnectionErrorObserver::MockConnectionErrorObserver() {}
-
-MockConnectionErrorObserver::~MockConnectionErrorObserver() {}
-
-MockBlimpMessageProcessor::MockBlimpMessageProcessor() {}
-
-MockBlimpMessageProcessor::~MockBlimpMessageProcessor() {}
-
-void MockBlimpMessageProcessor::ProcessMessage(
- std::unique_ptr<BlimpMessage> message,
- const net::CompletionCallback& callback) {
- MockableProcessMessage(*message, callback);
-}
-
-std::string EncodeHeader(size_t size) {
- std::unique_ptr<char[]> serialized(new char[kPacketHeaderSizeBytes]);
- uint32_t net_size = base::HostToNet32(size);
- memcpy(serialized.get(), &net_size, sizeof(net_size));
- return std::string(serialized.get(), kPacketHeaderSizeBytes);
-}
-
-bool BufferStartsWith(net::GrowableIOBuffer* buf,
- size_t buf_size,
- const std::string& str) {
- return (buf_size >= str.size() &&
- str == std::string(buf->data(), str.size()));
-}
-
-} // namespace blimp
« no previous file with comments | « blimp/net/test_common.h ('k') | blimp/net/thread_pipe_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698