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

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

Issue 1277093006: Enable QUIC support in chromoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quic_adapters
Patch Set: Created 5 years, 4 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
« no previous file with comments | « remoting/protocol/authenticator.h ('k') | remoting/protocol/content_description.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/channel_dispatcher_base.h" 5 #include "remoting/protocol/channel_dispatcher_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/protocol/p2p_stream_socket.h" 8 #include "remoting/protocol/p2p_stream_socket.h"
9 #include "remoting/protocol/session.h" 9 #include "remoting/protocol/session.h"
10 #include "remoting/protocol/session_config.h" 10 #include "remoting/protocol/session_config.h"
(...skipping 15 matching lines...) Expand all
26 26
27 void ChannelDispatcherBase::Init(Session* session, 27 void ChannelDispatcherBase::Init(Session* session,
28 const ChannelConfig& config, 28 const ChannelConfig& config,
29 EventHandler* event_handler) { 29 EventHandler* event_handler) {
30 DCHECK(session); 30 DCHECK(session);
31 switch (config.transport) { 31 switch (config.transport) {
32 case ChannelConfig::TRANSPORT_MUX_STREAM: 32 case ChannelConfig::TRANSPORT_MUX_STREAM:
33 channel_factory_ = session->GetMultiplexedChannelFactory(); 33 channel_factory_ = session->GetMultiplexedChannelFactory();
34 break; 34 break;
35 35
36 case ChannelConfig::TRANSPORT_QUIC_STREAM:
37 channel_factory_ = session->GetQuicChannelFactory();
38 break;
39
36 case ChannelConfig::TRANSPORT_STREAM: 40 case ChannelConfig::TRANSPORT_STREAM:
37 channel_factory_ = session->GetTransportChannelFactory(); 41 channel_factory_ = session->GetTransportChannelFactory();
38 break; 42 break;
39 43
40 default: 44 default:
41 LOG(FATAL) << "Unknown transport type: " << config.transport; 45 LOG(FATAL) << "Unknown transport type: " << config.transport;
42 } 46 }
43 47
44 event_handler_ = event_handler; 48 event_handler_ = event_handler;
45 49
(...skipping 20 matching lines...) Expand all
66 70
67 event_handler_->OnChannelInitialized(this); 71 event_handler_->OnChannelInitialized(this);
68 } 72 }
69 73
70 void ChannelDispatcherBase::OnReadWriteFailed(int error) { 74 void ChannelDispatcherBase::OnReadWriteFailed(int error) {
71 event_handler_->OnChannelError(this, CHANNEL_CONNECTION_ERROR); 75 event_handler_->OnChannelError(this, CHANNEL_CONNECTION_ERROR);
72 } 76 }
73 77
74 } // namespace protocol 78 } // namespace protocol
75 } // namespace remoting 79 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/authenticator.h ('k') | remoting/protocol/content_description.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698