| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_session.h" | 5 #include "remoting/protocol/fake_session.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 callback.Run(channel); | 235 callback.Run(channel); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void FakeSession::CreateDatagramChannel( | 238 void FakeSession::CreateDatagramChannel( |
| 239 const std::string& name, const DatagramChannelCallback& callback) { | 239 const std::string& name, const DatagramChannelCallback& callback) { |
| 240 FakeUdpSocket* channel = new FakeUdpSocket(); | 240 FakeUdpSocket* channel = new FakeUdpSocket(); |
| 241 datagram_channels_[name] = channel; | 241 datagram_channels_[name] = channel; |
| 242 callback.Run(channel); | 242 callback.Run(channel); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void FakeSession::CancelChannelCreation(const std::string& name) { |
| 246 } |
| 247 |
| 245 FakeSocket* FakeSession::control_channel() { | 248 FakeSocket* FakeSession::control_channel() { |
| 246 return &control_channel_; | 249 return &control_channel_; |
| 247 } | 250 } |
| 248 | 251 |
| 249 FakeSocket* FakeSession::event_channel() { | 252 FakeSocket* FakeSession::event_channel() { |
| 250 return &event_channel_; | 253 return &event_channel_; |
| 251 } | 254 } |
| 252 | 255 |
| 253 const std::string& FakeSession::jid() { | 256 const std::string& FakeSession::jid() { |
| 254 return jid_; | 257 return jid_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 const std::string& FakeSession::shared_secret() { | 292 const std::string& FakeSession::shared_secret() { |
| 290 return shared_secret_; | 293 return shared_secret_; |
| 291 } | 294 } |
| 292 | 295 |
| 293 void FakeSession::Close() { | 296 void FakeSession::Close() { |
| 294 closed_ = true; | 297 closed_ = true; |
| 295 } | 298 } |
| 296 | 299 |
| 297 } // namespace protocol | 300 } // namespace protocol |
| 298 } // namespace remoting | 301 } // namespace remoting |
| OLD | NEW |