OLD | NEW |
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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 FROM_HERE, | 376 FROM_HERE, |
377 NewRunnableMethod(this, &ChromotingHost::LocalLoginSucceeded)); | 377 NewRunnableMethod(this, &ChromotingHost::LocalLoginSucceeded)); |
378 return; | 378 return; |
379 } | 379 } |
380 | 380 |
381 protocol::LocalLoginStatus* status = new protocol::LocalLoginStatus(); | 381 protocol::LocalLoginStatus* status = new protocol::LocalLoginStatus(); |
382 status->set_success(true); | 382 status->set_success(true); |
383 connection_->client_stub()->BeginSessionResponse( | 383 connection_->client_stub()->BeginSessionResponse( |
384 status, new DeleteTask<protocol::LocalLoginStatus>(status)); | 384 status, new DeleteTask<protocol::LocalLoginStatus>(status)); |
385 | 385 |
| 386 connection_->OnClientAuthenticated(); |
386 recorder_->Start(); | 387 recorder_->Start(); |
387 } | 388 } |
388 | 389 |
389 void ChromotingHost::LocalLoginFailed() { | 390 void ChromotingHost::LocalLoginFailed() { |
390 if (MessageLoop::current() != context_->main_message_loop()) { | 391 if (MessageLoop::current() != context_->main_message_loop()) { |
391 context_->main_message_loop()->PostTask( | 392 context_->main_message_loop()->PostTask( |
392 FROM_HERE, | 393 FROM_HERE, |
393 NewRunnableMethod(this, &ChromotingHost::LocalLoginFailed)); | 394 NewRunnableMethod(this, &ChromotingHost::LocalLoginFailed)); |
394 return; | 395 return; |
395 } | 396 } |
396 | 397 |
397 protocol::LocalLoginStatus* status = new protocol::LocalLoginStatus(); | 398 protocol::LocalLoginStatus* status = new protocol::LocalLoginStatus(); |
398 status->set_success(false); | 399 status->set_success(false); |
399 connection_->client_stub()->BeginSessionResponse( | 400 connection_->client_stub()->BeginSessionResponse( |
400 status, new DeleteTask<protocol::LocalLoginStatus>(status)); | 401 status, new DeleteTask<protocol::LocalLoginStatus>(status)); |
401 } | 402 } |
402 | 403 |
403 } // namespace remoting | 404 } // namespace remoting |
OLD | NEW |