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

Unified Diff: content/browser/browser_main_runner.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 - Jam's nits 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/startup_task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_runner.cc
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
index f50832af1b73afd49bf1bc7d03e45cc2e87ae2b8..cca1466d9bbe9b191748203a2b4182e43fcb20cf 100644
--- a/content/browser/browser_main_runner.cc
+++ b/content/browser/browser_main_runner.cc
@@ -29,11 +29,7 @@ namespace content {
class BrowserMainRunnerImpl : public BrowserMainRunner {
public:
- BrowserMainRunnerImpl()
- : is_initialized_(false),
- is_shutdown_(false),
- created_threads_(false) {
- }
+ BrowserMainRunnerImpl() : is_initialized_(false), is_shutdown_(false) {}
virtual ~BrowserMainRunnerImpl() {
if (is_initialized_ && !is_shutdown_)
@@ -102,11 +98,10 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
#endif
ui::InitializeInputMethod();
- main_loop_->CreateThreads();
+ main_loop_->CreateStartupTasks();
int result_code = main_loop_->GetResultCode();
if (result_code > 0)
return result_code;
- created_threads_ = true;
// Return -1 to indicate no early termination.
return -1;
@@ -124,8 +119,7 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
DCHECK(!is_shutdown_);
g_exited_main_message_loop = true;
- if (created_threads_)
- main_loop_->ShutdownThreadsAndCleanUp();
+ main_loop_->ShutdownThreadsAndCleanUp();
ui::ShutdownInputMethod();
#if defined(OS_WIN)
@@ -146,9 +140,6 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
// True if the runner has been shut down.
bool is_shutdown_;
- // True if the non-UI threads were created.
- bool created_threads_;
-
scoped_ptr<NotificationServiceImpl> notification_service_;
scoped_ptr<BrowserMainLoop> main_loop_;
#if defined(OS_WIN)
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/startup_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698