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