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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: phajdan feedback Created 8 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/automation/automation_provider_win.cc ('k') | chrome/browser/referrer_policy_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index bf106a47120b7a422e22863a561bf22af2bea345..54f308b8406510c7dad867377d0c3a1c8072969c 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -19,6 +19,7 @@
#include "base/path_service.h"
#include "base/process_info.h"
#include "base/process_util.h"
+#include "base/run_loop.h"
#include "base/string_number_conversions.h"
#include "base/string_piece.h"
#include "base/string_split.h"
@@ -1900,16 +1901,14 @@ bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
// UI thread message loop as possible to get a stable measurement
// across versions.
RecordBrowserStartupTime();
-#if defined(USE_AURA)
- MessageLoopForUI::current()->Run();
-#elif defined(TOOLKIT_VIEWS)
+ DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
+#if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
views::AcceleratorHandler accelerator_handler;
- MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler);
-#elif defined(USE_X11)
- MessageLoopForUI::current()->RunWithDispatcher(NULL);
-#elif defined(OS_POSIX)
- MessageLoopForUI::current()->Run();
+ base::RunLoop run_loop(&accelerator_handler);
+#else
+ base::RunLoop run_loop;
#endif
+ run_loop.Run();
return true;
}
« no previous file with comments | « chrome/browser/automation/automation_provider_win.cc ('k') | chrome/browser/referrer_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698