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

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

Issue 7466004: Message validation in message dispatchers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 5 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/client/chromoting_client.h ('k') | remoting/host/client_session.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 "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "remoting/base/logger.h" 9 #include "remoting/base/logger.h"
10 #include "remoting/base/tracer.h" 10 #include "remoting/base/tracer.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 // Initialize the decoder. 260 // Initialize the decoder.
261 rectangle_decoder_->Initialize(config); 261 rectangle_decoder_->Initialize(config);
262 262
263 // Schedule the input handler to process the event queue. 263 // Schedule the input handler to process the event queue.
264 input_handler_->Initialize(); 264 input_handler_->Initialize();
265 } 265 }
266 266
267 //////////////////////////////////////////////////////////////////////////// 267 ////////////////////////////////////////////////////////////////////////////
268 // ClientStub control channel interface. 268 // ClientStub control channel interface.
269 void ChromotingClient::NotifyResolution(
270 const protocol::NotifyResolutionRequest* msg, Task* done) {
271 logger_->Log(logging::LOG_INFO, "NotifyResolution change");
272 NOTIMPLEMENTED();
273 done->Run();
274 delete done;
275 }
276
277 void ChromotingClient::BeginSessionResponse( 269 void ChromotingClient::BeginSessionResponse(
278 const protocol::LocalLoginStatus* msg, Task* done) { 270 const protocol::LocalLoginStatus* msg, Task* done) {
279 if (message_loop() != MessageLoop::current()) { 271 if (message_loop() != MessageLoop::current()) {
280 message_loop()->PostTask( 272 message_loop()->PostTask(
281 FROM_HERE, 273 FROM_HERE,
282 NewRunnableMethod(this, &ChromotingClient::BeginSessionResponse, 274 NewRunnableMethod(this, &ChromotingClient::BeginSessionResponse,
283 msg, done)); 275 msg, done));
284 return; 276 return;
285 } 277 }
286 278
287 logger_->Log(logging::LOG_INFO, "BeginSessionResponse received"); 279 logger_->Log(logging::LOG_INFO, "BeginSessionResponse received");
288 280
289 // Inform the connection that the client has been authenticated. This will 281 // Inform the connection that the client has been authenticated. This will
290 // enable the communication channels. 282 // enable the communication channels.
291 if (msg->success()) { 283 if (msg->success()) {
292 connection_->OnClientAuthenticated(); 284 connection_->OnClientAuthenticated();
293 } 285 }
294 286
295 view_->UpdateLoginStatus(msg->success(), msg->error_info()); 287 view_->UpdateLoginStatus(msg->success(), msg->error_info());
296 done->Run(); 288 done->Run();
297 delete done; 289 delete done;
298 } 290 }
299 291
300 } // namespace remoting 292 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/host/client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698