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

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

Issue 205583011: [Draft] Fix canceling pin prompt causes host overload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last round of feedbacks Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/connection_to_host.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/connection_to_client.h" 5 #include "remoting/protocol/connection_to_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 DCHECK(CalledOnValidThread()); 105 DCHECK(CalledOnValidThread());
106 106
107 DCHECK(handler_); 107 DCHECK(handler_);
108 switch(state) { 108 switch(state) {
109 case Session::INITIALIZING: 109 case Session::INITIALIZING:
110 case Session::CONNECTING: 110 case Session::CONNECTING:
111 case Session::ACCEPTING: 111 case Session::ACCEPTING:
112 case Session::CONNECTED: 112 case Session::CONNECTED:
113 // Don't care about these events. 113 // Don't care about these events.
114 break; 114 break;
115 115 case Session::AUTHENTICATING:
116 handler_->OnConnectionAuthenticating(this);
117 break;
116 case Session::AUTHENTICATED: 118 case Session::AUTHENTICATED:
117 // Initialize channels. 119 // Initialize channels.
118 control_dispatcher_.reset(new HostControlDispatcher()); 120 control_dispatcher_.reset(new HostControlDispatcher());
119 control_dispatcher_->Init( 121 control_dispatcher_->Init(
120 session_.get(), session_->config().control_config(), 122 session_.get(), session_->config().control_config(),
121 base::Bind(&ConnectionToClient::OnChannelInitialized, 123 base::Bind(&ConnectionToClient::OnChannelInitialized,
122 base::Unretained(this))); 124 base::Unretained(this)));
123 control_dispatcher_->set_clipboard_stub(clipboard_stub_); 125 control_dispatcher_->set_clipboard_stub(clipboard_stub_);
124 control_dispatcher_->set_host_stub(host_stub_); 126 control_dispatcher_->set_host_stub(host_stub_);
125 127
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 202
201 void ConnectionToClient::CloseChannels() { 203 void ConnectionToClient::CloseChannels() {
202 control_dispatcher_.reset(); 204 control_dispatcher_.reset();
203 event_dispatcher_.reset(); 205 event_dispatcher_.reset();
204 video_writer_.reset(); 206 video_writer_.reset();
205 audio_writer_.reset(); 207 audio_writer_.reset();
206 } 208 }
207 209
208 } // namespace protocol 210 } // namespace protocol
209 } // namespace remoting 211 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698