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

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

Issue 1413813006: Revert of Add TransportSession interface to prepare for WebRTC-based transport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_session.h ('k') | remoting/protocol/ice_transport_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 namespace remoting { 7 namespace remoting {
8 namespace protocol { 8 namespace protocol {
9 9
10 const char kTestJid[] = "host1@gmail.com/chromoting123"; 10 const char kTestJid[] = "host1@gmail.com/chromoting123";
11 11
12 FakeTransportSession::FakeTransportSession() {}
13 FakeTransportSession::~FakeTransportSession() {}
14
15 void FakeTransportSession::Start(EventHandler* event_handler,
16 Authenticator* authenticator) {
17 NOTREACHED();
18 }
19
20 bool FakeTransportSession::ProcessTransportInfo(
21 buzz::XmlElement* transport_info) {
22 NOTREACHED();
23 return true;
24 }
25
26 DatagramChannelFactory* FakeTransportSession::GetDatagramChannelFactory() {
27 NOTIMPLEMENTED();
28 return nullptr;
29 }
30
31 FakeStreamChannelFactory* FakeTransportSession::GetStreamChannelFactory() {
32 return &channel_factory_;
33 }
34
35 FakeStreamChannelFactory* FakeTransportSession::GetMultiplexedChannelFactory() {
36 return &channel_factory_;
37 }
38
39 FakeSession::FakeSession() 12 FakeSession::FakeSession()
40 : event_handler_(nullptr), 13 : event_handler_(nullptr),
41 config_(SessionConfig::ForTest()), 14 config_(SessionConfig::ForTest()),
42 jid_(kTestJid), 15 jid_(kTestJid),
43 error_(OK), 16 error_(OK),
44 closed_(false) {} 17 closed_(false) {}
45 18
46 FakeSession::~FakeSession() {} 19 FakeSession::~FakeSession() {}
47 20
48 void FakeSession::SetEventHandler(EventHandler* event_handler) { 21 void FakeSession::SetEventHandler(EventHandler* event_handler) {
49 event_handler_ = event_handler; 22 event_handler_ = event_handler;
50 } 23 }
51 24
52 ErrorCode FakeSession::error() { 25 ErrorCode FakeSession::error() {
53 return error_; 26 return error_;
54 } 27 }
55 28
56 const std::string& FakeSession::jid() { 29 const std::string& FakeSession::jid() {
57 return jid_; 30 return jid_;
58 } 31 }
59 32
60 const SessionConfig& FakeSession::config() { 33 const SessionConfig& FakeSession::config() {
61 return *config_; 34 return *config_;
62 } 35 }
63 36
64 FakeTransportSession* FakeSession::GetTransportSession() { 37 StreamChannelFactory* FakeSession::GetTransportChannelFactory() {
65 return &transport_session_; 38 return &channel_factory_;
66 } 39 }
67 40
68 FakeStreamChannelFactory* FakeSession::GetQuicChannelFactory() { 41 StreamChannelFactory* FakeSession::GetMultiplexedChannelFactory() {
69 return transport_session_.GetStreamChannelFactory(); 42 return &channel_factory_;
43 }
44
45 StreamChannelFactory* FakeSession::GetQuicChannelFactory() {
46 return &channel_factory_;
70 } 47 }
71 48
72 void FakeSession::Close() { 49 void FakeSession::Close() {
73 closed_ = true; 50 closed_ = true;
74 } 51 }
75 52
76 } // namespace protocol 53 } // namespace protocol
77 } // namespace remoting 54 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/ice_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698