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

Side by Side Diff: remoting/protocol/fake_stream_socket.cc

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Return fake ConnectionAttempt in MockTCPClientSocket Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/fake_stream_socket.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/fake_stream_socket.h" 5 #include "remoting/protocol/fake_stream_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); 237 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
238 NOTIMPLEMENTED(); 238 NOTIMPLEMENTED();
239 return net::kProtoUnknown; 239 return net::kProtoUnknown;
240 } 240 }
241 241
242 bool FakeStreamSocket::GetSSLInfo(net::SSLInfo* ssl_info) { 242 bool FakeStreamSocket::GetSSLInfo(net::SSLInfo* ssl_info) {
243 EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); 243 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
244 return false; 244 return false;
245 } 245 }
246 246
247 void FakeStreamSocket::GetConnectionAttempts(
248 net::ConnectionAttempts* out) const {
249 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
250 out->clear();
251 }
252
247 FakeStreamChannelFactory::FakeStreamChannelFactory() 253 FakeStreamChannelFactory::FakeStreamChannelFactory()
248 : task_runner_(base::ThreadTaskRunnerHandle::Get()), 254 : task_runner_(base::ThreadTaskRunnerHandle::Get()),
249 asynchronous_create_(false), 255 asynchronous_create_(false),
250 fail_create_(false), 256 fail_create_(false),
251 weak_factory_(this) { 257 weak_factory_(this) {
252 } 258 }
253 259
254 FakeStreamChannelFactory::~FakeStreamChannelFactory() {} 260 FakeStreamChannelFactory::~FakeStreamChannelFactory() {}
255 261
256 FakeStreamSocket* FakeStreamChannelFactory::GetFakeChannel( 262 FakeStreamSocket* FakeStreamChannelFactory::GetFakeChannel(
(...skipping 26 matching lines...) Expand all
283 if (channels_.find(name) != channels_.end()) 289 if (channels_.find(name) != channels_.end())
284 callback.Run(owned_channel.Pass()); 290 callback.Run(owned_channel.Pass());
285 } 291 }
286 292
287 void FakeStreamChannelFactory::CancelChannelCreation(const std::string& name) { 293 void FakeStreamChannelFactory::CancelChannelCreation(const std::string& name) {
288 channels_.erase(name); 294 channels_.erase(name);
289 } 295 }
290 296
291 } // namespace protocol 297 } // namespace protocol
292 } // namespace remoting 298 } // namespace remoting
OLDNEW
« 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