OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 return; | 373 return; |
374 } | 374 } |
375 | 375 |
376 while (!clients_.empty()) { | 376 while (!clients_.empty()) { |
377 size_t size = clients_.size(); | 377 size_t size = clients_.size(); |
378 clients_.front()->Disconnect(); | 378 clients_.front()->Disconnect(); |
379 CHECK_EQ(clients_.size(), size - 1); | 379 CHECK_EQ(clients_.size(), size - 1); |
380 } | 380 } |
381 } | 381 } |
382 | 382 |
383 void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) { | |
384 DCHECK(network_task_runner_->BelongsToCurrentThread()); | |
385 DCHECK_EQ(state_, kInitial); | |
386 | |
387 ui_strings_ = ui_strings; | |
388 } | |
389 | |
390 void ChromotingHost::ShutdownFinish() { | 383 void ChromotingHost::ShutdownFinish() { |
391 DCHECK(network_task_runner_->BelongsToCurrentThread()); | 384 DCHECK(network_task_runner_->BelongsToCurrentThread()); |
392 DCHECK_EQ(state_, kStopping); | 385 DCHECK_EQ(state_, kStopping); |
393 | 386 |
394 state_ = kStopped; | 387 state_ = kStopped; |
395 | 388 |
396 // Destroy session manager. | 389 // Destroy session manager. |
397 session_manager_.reset(); | 390 session_manager_.reset(); |
398 | 391 |
399 // Clear |desktop_environment_factory_| and |signal_strategy_| to | 392 // Clear |desktop_environment_factory_| and |signal_strategy_| to |
(...skipping 10 matching lines...) Expand all Loading... |
410 OnShutdown()); | 403 OnShutdown()); |
411 | 404 |
412 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 405 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
413 it != shutdown_tasks_.end(); ++it) { | 406 it != shutdown_tasks_.end(); ++it) { |
414 it->Run(); | 407 it->Run(); |
415 } | 408 } |
416 shutdown_tasks_.clear(); | 409 shutdown_tasks_.clear(); |
417 } | 410 } |
418 | 411 |
419 } // namespace remoting | 412 } // namespace remoting |
OLD | NEW |