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: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 // LoginDisplayHostImpl, private 906 // LoginDisplayHostImpl, private
907 907
908 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) { 908 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) {
909 if (shutting_down_) 909 if (shutting_down_)
910 return; 910 return;
911 911
912 shutting_down_ = true; 912 shutting_down_ = true;
913 registrar_.RemoveAll(); 913 registrar_.RemoveAll();
914 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 914 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
915 if (post_quit_task) 915 if (post_quit_task)
916 base::MessageLoop::current()->Quit(); 916 base::MessageLoop::current()->QuitWhenIdle();
917 917
918 if (!completion_callback_.is_null()) 918 if (!completion_callback_.is_null())
919 base::MessageLoop::current()->PostTask(FROM_HERE, completion_callback_); 919 base::MessageLoop::current()->PostTask(FROM_HERE, completion_callback_);
920 } 920 }
921 921
922 void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() { 922 void LoginDisplayHostImpl::ScheduleWorkspaceAnimation() {
923 if (ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), 923 if (ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
924 ash::kShellWindowId_DesktopBackgroundContainer) 924 ash::kShellWindowId_DesktopBackgroundContainer)
925 ->children() 925 ->children()
926 .empty()) { 926 .empty()) {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 1256
1257 locale_util::SwitchLanguageCallback callback( 1257 locale_util::SwitchLanguageCallback callback(
1258 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); 1258 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())));
1259 1259
1260 // Load locale keyboards here. Hardware layout would be automatically enabled. 1260 // Load locale keyboards here. Hardware layout would be automatically enabled.
1261 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, 1261 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */,
1262 callback, ProfileManager::GetActiveUserProfile()); 1262 callback, ProfileManager::GetActiveUserProfile());
1263 } 1263 }
1264 1264
1265 } // namespace chromeos 1265 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698