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

Unified Diff: content/shell/shell_browser_main.cc

Issue 19957002: Run the later parts of startup as UI thread tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run the later parts of startup as UI thread tasks - patch for Yaron's comments Created 7 years, 5 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
Index: content/shell/shell_browser_main.cc
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index d4d65a33d6cc1348ecc3bc49b418dc9ea7cf9de9..140d4aeb8077e01e271c195af8b2729727ba3804 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -17,6 +17,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_main_runner.h"
+#include "content/public/common/startup_task_runner.h"
#include "content/shell/common/shell_switches.h"
#include "content/shell/common/webkit_test_helpers.h"
#include "content/shell/shell.h"
@@ -127,8 +128,11 @@ int ShellBrowserMain(
content::EnsureInitializeForAndroidLayoutTests();
#endif
}
+ scoped_refptr<content::StartupTaskRunner> startup_task_runner =
+ make_scoped_refptr(new content::StartupTaskRunner(
+ content::StartupTaskRunner::IMMEDIATE, NULL));
- int exit_code = main_runner->Initialize(parameters);
+ int exit_code = main_runner->Initialize(parameters, startup_task_runner);
DCHECK_LT(exit_code, 0)
<< "BrowserMainRunner::Initialize failed in ShellBrowserMain";

Powered by Google App Engine
This is Rietveld 408576698