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

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: Make requested changes; rebase 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
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(ConnectionAttempts* out) const {
248 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
249 out->clear();
250 }
251
247 FakeStreamChannelFactory::FakeStreamChannelFactory() 252 FakeStreamChannelFactory::FakeStreamChannelFactory()
248 : task_runner_(base::ThreadTaskRunnerHandle::Get()), 253 : task_runner_(base::ThreadTaskRunnerHandle::Get()),
249 asynchronous_create_(false), 254 asynchronous_create_(false),
250 fail_create_(false), 255 fail_create_(false),
251 weak_factory_(this) { 256 weak_factory_(this) {
252 } 257 }
253 258
254 FakeStreamChannelFactory::~FakeStreamChannelFactory() {} 259 FakeStreamChannelFactory::~FakeStreamChannelFactory() {}
255 260
256 FakeStreamSocket* FakeStreamChannelFactory::GetFakeChannel( 261 FakeStreamSocket* FakeStreamChannelFactory::GetFakeChannel(
(...skipping 26 matching lines...) Expand all
283 if (channels_.find(name) != channels_.end()) 288 if (channels_.find(name) != channels_.end())
284 callback.Run(owned_channel.Pass()); 289 callback.Run(owned_channel.Pass());
285 } 290 }
286 291
287 void FakeStreamChannelFactory::CancelChannelCreation(const std::string& name) { 292 void FakeStreamChannelFactory::CancelChannelCreation(const std::string& name) {
288 channels_.erase(name); 293 channels_.erase(name);
289 } 294 }
290 295
291 } // namespace protocol 296 } // namespace protocol
292 } // namespace remoting 297 } // namespace remoting
OLDNEW
« net/socket/stream_socket.h ('K') | « remoting/protocol/fake_stream_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698