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

Unified Diff: remoting/protocol/fake_stream_socket.cc

Issue 1536713005: Cleanup ChannelMultiplexer tests to avoid dependency on FakeSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@connection_tests
Patch Set: Created 5 years 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 | « remoting/protocol/fake_stream_socket.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_stream_socket.cc
diff --git a/remoting/protocol/fake_stream_socket.cc b/remoting/protocol/fake_stream_socket.cc
index 12b771229b19d41b269b9e17f345c2c600d51c85..a1e7ee5704958ad5a950d7caf94ac9481b0c649e 100644
--- a/remoting/protocol/fake_stream_socket.cc
+++ b/remoting/protocol/fake_stream_socket.cc
@@ -18,16 +18,7 @@ namespace remoting {
namespace protocol {
FakeStreamSocket::FakeStreamSocket()
- : async_write_(false),
- write_pending_(false),
- write_limit_(0),
- next_write_error_(net::OK),
- next_read_error_(net::OK),
- read_buffer_size_(0),
- input_pos_(0),
- task_runner_(base::ThreadTaskRunnerHandle::Get()),
- weak_factory_(this) {
-}
+ : task_runner_(base::ThreadTaskRunnerHandle::Get()), weak_factory_(this) {}
FakeStreamSocket::~FakeStreamSocket() {
EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
@@ -157,8 +148,6 @@ void FakeStreamSocket::DoWrite(const scoped_refptr<net::IOBuffer>& buf,
FakeStreamChannelFactory::FakeStreamChannelFactory()
: task_runner_(base::ThreadTaskRunnerHandle::Get()),
- asynchronous_create_(false),
- fail_create_(false),
weak_factory_(this) {
}
@@ -180,6 +169,7 @@ void FakeStreamChannelFactory::CreateChannel(
const ChannelCreatedCallback& callback) {
scoped_ptr<FakeStreamSocket> channel(new FakeStreamSocket());
channels_[name] = channel->GetWeakPtr();
+ channel->set_async_write(async_write_);
if (peer_factory_) {
FakeStreamSocket* peer_channel = peer_factory_->GetFakeChannel(name);
« no previous file with comments | « remoting/protocol/fake_stream_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698