MD Downloads: center "Open downloads folder" when there's no downloads
[chromium-blink-merge.git] / remoting / protocol / fake_session.cc
blobe21f932a4118da74b114ceb86cd60cb3b65c8d50
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
3 // found in the LICENSE file.
5 #include "remoting/protocol/fake_session.h"
7 namespace remoting {
8 namespace protocol {
10 const char kTestJid[] = "host1@gmail.com/chromoting123";
12 FakeSession::FakeSession()
13 : event_handler_(nullptr),
14 config_(SessionConfig::ForTest()),
15 jid_(kTestJid),
16 error_(OK),
17 closed_(false) {}
19 FakeSession::~FakeSession() {}
21 void FakeSession::SetEventHandler(EventHandler* event_handler) {
22 event_handler_ = event_handler;
25 ErrorCode FakeSession::error() {
26 return error_;
29 const std::string& FakeSession::jid() {
30 return jid_;
33 const SessionConfig& FakeSession::config() {
34 return *config_;
37 StreamChannelFactory* FakeSession::GetTransportChannelFactory() {
38 return &channel_factory_;
41 StreamChannelFactory* FakeSession::GetMultiplexedChannelFactory() {
42 return &channel_factory_;
45 StreamChannelFactory* FakeSession::GetQuicChannelFactory() {
46 return &channel_factory_;
49 void FakeSession::Close() {
50 closed_ = true;
53 } // namespace protocol
54 } // namespace remoting