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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_helper_browsertest.h

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 (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 // Contains code shared by all browsing data browsertests. 5 // Contains code shared by all browsing data browsertests.
6 6
7 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_HELPER_BROWSERTEST_H_ 7 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_HELPER_BROWSERTEST_H_
8 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_HELPER_BROWSERTEST_H_ 8 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_HELPER_BROWSERTEST_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 12 matching lines...) Expand all
23 23
24 const std::list<T>& result() { 24 const std::list<T>& result() {
25 base::MessageLoop::current()->Run(); 25 base::MessageLoop::current()->Run();
26 DCHECK(has_result_); 26 DCHECK(has_result_);
27 return result_; 27 return result_;
28 } 28 }
29 29
30 void callback(const std::list<T>& info) { 30 void callback(const std::list<T>& info) {
31 result_ = info; 31 result_ = info;
32 has_result_ = true; 32 has_result_ = true;
33 base::MessageLoop::current()->Quit(); 33 base::MessageLoop::current()->QuitWhenIdle();
34 } 34 }
35 35
36 private: 36 private:
37 bool has_result_ = false; 37 bool has_result_ = false;
38 std::list<T> result_; 38 std::list<T> result_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(BrowsingDataHelperCallback); 40 DISALLOW_COPY_AND_ASSIGN(BrowsingDataHelperCallback);
41 }; 41 };
42 42
43 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_HELPER_BROWSERTEST_H_ 43 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_HELPER_BROWSERTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698