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

Unified Diff: chrome/browser/google_apis/test_util.cc

Issue 17315016: Use base::RunLoop instead of directly using MessageLoop in Drive related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded #include Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/google_apis/test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/test_util.cc
diff --git a/chrome/browser/google_apis/test_util.cc b/chrome/browser/google_apis/test_util.cc
index 84dab6cd709b89c39b0666bf9d1a65598972a382..2e09ea9dfc6ba3aad6f8490cb8cc2d54623f8cd5 100644
--- a/chrome/browser/google_apis/test_util.cc
+++ b/chrome/browser/google_apis/test_util.cc
@@ -11,6 +11,7 @@
#include "base/path_service.h"
#include "base/pending_task.h"
#include "base/rand_util.h"
+#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -79,16 +80,16 @@ void RunBlockingPoolTask() {
TaskObserver task_observer;
base::MessageLoop::current()->AddTaskObserver(&task_observer);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
base::MessageLoop::current()->RemoveTaskObserver(&task_observer);
if (!task_observer.posted())
break;
}
}
-void RunAndQuit(const base::Closure& closure) {
+void RunAndQuit(base::RunLoop* run_loop, const base::Closure& closure) {
closure.Run();
- base::MessageLoop::current()->Quit();
+ run_loop->Quit();
}
bool WriteStringToFile(const base::FilePath& file_path,
« no previous file with comments | « chrome/browser/google_apis/test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698