| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |