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

Side by Side Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_test_utils.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/users/wallpaper/wallpaper_manager_test_u tils.h" 5 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_test_u tils.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 ~TestWallpaperObserverPendingListEmpty() override { 36 ~TestWallpaperObserverPendingListEmpty() override {
37 wallpaper_manager_->RemoveObserver(this); 37 wallpaper_manager_->RemoveObserver(this);
38 } 38 }
39 39
40 void OnWallpaperAnimationFinished(const std::string& user_id) override {} 40 void OnWallpaperAnimationFinished(const std::string& user_id) override {}
41 41
42 void OnPendingListEmptyForTesting() override { 42 void OnPendingListEmptyForTesting() override {
43 empty_ = true; 43 empty_ = true;
44 base::MessageLoop::current()->Quit(); 44 base::MessageLoop::current()->QuitWhenIdle();
45 } 45 }
46 46
47 void WaitForPendingListEmpty() { 47 void WaitForPendingListEmpty() {
48 if (wallpaper_manager_->GetPendingListSizeForTesting() == 0) { 48 if (wallpaper_manager_->GetPendingListSizeForTesting() == 0) {
49 empty_ = true; 49 empty_ = true;
50 return; 50 return;
51 } 51 }
52 while (!empty_) 52 while (!empty_)
53 base::RunLoop().Run(); 53 base::RunLoop().Run();
54 } 54 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 kWallpaperSize, 222 kWallpaperSize,
223 kLargeChildWallpaperColor)); 223 kLargeChildWallpaperColor));
224 224
225 command_line->reset(new base::CommandLine(options)); 225 command_line->reset(new base::CommandLine(options));
226 WallpaperManager::Get()->SetCommandLineForTesting(command_line->get()); 226 WallpaperManager::Get()->SetCommandLineForTesting(command_line->get());
227 } 227 }
228 228
229 } // namespace wallpaper_manager_test_utils 229 } // namespace wallpaper_manager_test_utils
230 230
231 } // namespace chromeos 231 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698