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

Side by Side Diff: remoting/client/chromoting_client.cc

Issue 8351084: Remove old Authentication code that we don't use or need. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/client/chromoting_view.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) 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/client/chromoting_client.h" 5 #include "remoting/client/chromoting_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/client/chromoting_view.h" 8 #include "remoting/client/chromoting_view.h"
9 #include "remoting/client/client_context.h" 9 #include "remoting/client/client_context.h"
10 #include "remoting/client/input_handler.h" 10 #include "remoting/client/input_handler.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 rectangle_decoder_->DecodePacket( 148 rectangle_decoder_->DecodePacket(
149 packet, NewRunnableMethod(this, &ChromotingClient::OnPacketDone, 149 packet, NewRunnableMethod(this, &ChromotingClient::OnPacketDone,
150 last_packet, decode_start)); 150 last_packet, decode_start));
151 } 151 }
152 152
153 void ChromotingClient::OnConnectionState( 153 void ChromotingClient::OnConnectionState(
154 protocol::ConnectionToHost::State state, 154 protocol::ConnectionToHost::State state,
155 protocol::ConnectionToHost::Error error) { 155 protocol::ConnectionToHost::Error error) {
156 DCHECK(message_loop()->BelongsToCurrentThread()); 156 DCHECK(message_loop()->BelongsToCurrentThread());
157 VLOG(1) << "ChromotingClient::OnConnectionState(" << state << ")"; 157 VLOG(1) << "ChromotingClient::OnConnectionState(" << state << ")";
158 if (state == protocol::ConnectionToHost::CONNECTED) 158 if (state == protocol::ConnectionToHost::CONNECTED ||
159 state == protocol::ConnectionToHost::AUTHENTICATED)
159 Initialize(); 160 Initialize();
160 view_->SetConnectionState(state, error); 161 view_->SetConnectionState(state, error);
161 } 162 }
162 163
163 base::MessageLoopProxy* ChromotingClient::message_loop() { 164 base::MessageLoopProxy* ChromotingClient::message_loop() {
164 return context_->network_message_loop(); 165 return context_->network_message_loop();
165 } 166 }
166 167
167 void ChromotingClient::OnPacketDone(bool last_packet, 168 void ChromotingClient::OnPacketDone(bool last_packet,
168 base::Time decode_start) { 169 base::Time decode_start) {
(...skipping 27 matching lines...) Expand all
196 return; 197 return;
197 } 198 }
198 199
199 // Initialize the decoder. 200 // Initialize the decoder.
200 rectangle_decoder_->Initialize(connection_->config()); 201 rectangle_decoder_->Initialize(connection_->config());
201 202
202 // Schedule the input handler to process the event queue. 203 // Schedule the input handler to process the event queue.
203 input_handler_->Initialize(); 204 input_handler_->Initialize();
204 } 205 }
205 206
206 ////////////////////////////////////////////////////////////////////////////
207 // ClientStub control channel interface.
208 void ChromotingClient::BeginSessionResponse(
209 const protocol::LocalLoginStatus* msg, const base::Closure& done) {
210 if (!message_loop()->BelongsToCurrentThread()) {
211 thread_proxy_.PostTask(FROM_HERE, base::Bind(
212 &ChromotingClient::BeginSessionResponse, base::Unretained(this),
213 msg, done));
214 return;
215 }
216
217 VLOG(1) << "BeginSessionResponse received";
218
219 // Inform the connection that the client has been authenticated. This will
220 // enable the communication channels.
221 if (msg->success()) {
222 connection_->OnClientAuthenticated();
223 }
224
225 view_->UpdateLoginStatus(msg->success(), msg->error_info());
226 done.Run();
227 }
228
229 } // namespace remoting 207 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/client/chromoting_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698