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

Issue 19957002: Run the later parts of startup as UI thread tasks (Closed)

Created:
7 years, 5 months ago by aberent
Modified:
7 years, 4 months ago
Reviewers:
joth, Yaron, jam, Anthony Berent
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, android-webview-reviews_chromium.org, jochen+watch_chromium.org, Andrew Hayden (chromium.org), Maria, bulach, stuartmorgan, leng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Run the later parts of startup as UI thread tasks This CL splits the later parts of startup, from thread creation onwards, into multiple UI thread tasks. Depending on the StartupTaskRunner passed to CreateThreads the tasks are all run immediately, or are queued one at a time on the UI thread. This, on platforms where the UI is already running, allows the UI to remain interactive while Chrome is initialized. BUG=231856 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215042

Patch Set 1 #

Total comments: 2

Patch Set 2 : Run the later parts of startup as UI thread tasks - minor comment fixes #

Total comments: 32

Patch Set 3 : Run the later parts of startup as UI thread tasks - patch for Joth's comments #

Total comments: 6

Patch Set 4 : Run the later parts of startup as UI thread tasks - patch for Yaron's comments #

Total comments: 16

Patch Set 5 : Run the later parts of startup as UI thread tasks - rethought configuration #

Patch Set 6 : Run the later parts of startup as UI thread tasks -test fixes #

Patch Set 7 : Run the later parts of startup as UI thread tasks - fix component build #

Total comments: 8

Patch Set 8 : Run the later parts of startup as UI thread tasks - Yaron's comments + Mac build fix #

Patch Set 9 : Run the later parts of startup as UI thread tasks - one more Mac fix #

Total comments: 12

Patch Set 10 : Run the later parts of startup as UI thread tasks - respond to Yaron's and jam's comments #

Total comments: 6

Patch Set 11 : Run the later parts of startup as UI thread tasks - fix jam@'s comments #

Total comments: 10

Patch Set 12 : Run the later parts of startup as UI thread tasks - Jam's nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+667 lines, -77 lines) Patch
M chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +24 lines, -3 lines 0 comments Download
M chrome/browser/chrome_browser_main.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -5 lines 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +32 lines, -31 lines 0 comments Download
A content/browser/android/browser_startup_config.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +18 lines, -0 lines 0 comments Download
A content/browser/android/browser_startup_config.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +25 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.h View 1 2 3 4 5 6 7 4 chunks +15 lines, -3 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +60 lines, -13 lines 0 comments Download
M content/browser/browser_main_runner.cc View 1 2 3 4 5 6 7 4 chunks +3 lines, -12 lines 0 comments Download
A content/browser/startup_task_runner.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +66 lines, -0 lines 0 comments Download
A content/browser/startup_task_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +63 lines, -0 lines 0 comments Download
A content/browser/startup_task_runner_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +281 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/BrowserStartupConfig.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +43 lines, -0 lines 0 comments Download
M content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +27 lines, -8 lines 0 comments Download
M content/shell/shell_browser_main_parts.h View 1 2 3 4 5 3 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
aberent
https://codereview.chromium.org/19957002/diff/1/content/browser/android/browser_jni_registrar.cc File content/browser/android/browser_jni_registrar.cc (right): https://codereview.chromium.org/19957002/diff/1/content/browser/android/browser_jni_registrar.cc#newcode66 content/browser/android/browser_jni_registrar.cc:66: content::AndroidStartupObserver::RegisterStartupObserver}, The only real change in this file. https://codereview.chromium.org/19957002/diff/1/content/browser/android/browser_jni_registrar.cc#newcode71 ...
7 years, 5 months ago (2013-07-22 15:47:34 UTC) #1
aberent
https://codereview.chromium.org/19957002/diff/2001/content/browser/android/browser_jni_registrar.cc File content/browser/android/browser_jni_registrar.cc (right): https://codereview.chromium.org/19957002/diff/2001/content/browser/android/browser_jni_registrar.cc#newcode66 content/browser/android/browser_jni_registrar.cc:66: content::AndroidStartupObserver::RegisterStartupObserver}, This is the only real change in this ...
7 years, 5 months ago (2013-07-22 15:48:14 UTC) #2
joth
PS2 - I just read aw/ and content/public/ Just realized though you didn't actually request ...
7 years, 5 months ago (2013-07-22 16:28:15 UTC) #3
aberent
Joth, many thanks for the early review, I was about to start working out who ...
7 years, 5 months ago (2013-07-22 19:37:40 UTC) #4
aberent
7 years, 5 months ago (2013-07-22 19:48:28 UTC) #5
Anthony Berent
The last message was very incomplete. It should have been something more like Reviewers: joth@chromium.org, ...
7 years, 5 months ago (2013-07-22 19:58:31 UTC) #6
jam
this is going to take a bit of time to review. in the meantime, can ...
7 years, 5 months ago (2013-07-22 23:34:15 UTC) #7
Yaron
https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc File chrome/app/android/chrome_main_delegate_android.cc (right): https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc#newcode38 chrome/app/android/chrome_main_delegate_android.cc:38: // For Chrome on android we want to run ...
7 years, 5 months ago (2013-07-23 02:14:03 UTC) #8
aberent
On 2013/07/22 23:34:15, jam wrote: > this is going to take a bit of time ...
7 years, 5 months ago (2013-07-23 11:57:46 UTC) #9
aberent
On 2013/07/23 11:57:46, aberent wrote: > On 2013/07/22 23:34:15, jam wrote: > > this is ...
7 years, 5 months ago (2013-07-23 12:01:58 UTC) #10
aberent
https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc File chrome/app/android/chrome_main_delegate_android.cc (right): https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc#newcode38 chrome/app/android/chrome_main_delegate_android.cc:38: // For Chrome on android we want to run ...
7 years, 5 months ago (2013-07-23 13:44:53 UTC) #11
jam
On 2013/07/23 13:44:53, aberent wrote: > https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc > File chrome/app/android/chrome_main_delegate_android.cc (right): > > https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc#newcode38 > ...
7 years, 5 months ago (2013-07-24 06:45:23 UTC) #12
aberent
On 2013/07/24 06:45:23, jam wrote: > On 2013/07/23 13:44:53, aberent wrote: > > > https://codereview.chromium.org/19957002/diff/17001/chrome/app/android/chrome_main_delegate_android.cc ...
7 years, 4 months ago (2013-07-24 09:52:31 UTC) #13
jam
On 2013/07/24 09:52:31, aberent wrote: > On 2013/07/24 06:45:23, jam wrote: > > On 2013/07/23 ...
7 years, 4 months ago (2013-07-24 19:15:00 UTC) #14
aberent
On 2013/07/24 19:15:00, jam wrote: > On 2013/07/24 09:52:31, aberent wrote: > > On 2013/07/24 ...
7 years, 4 months ago (2013-07-24 22:17:18 UTC) #15
aberent
https://codereview.chromium.org/19957002/diff/29001/content/public/common/startup_task_runner.h File content/public/common/startup_task_runner.h (right): https://codereview.chromium.org/19957002/diff/29001/content/public/common/startup_task_runner.h#newcode34 content/public/common/startup_task_runner.h:34: virtual void AllStartupTasksRan() = 0; On 2013/07/24 06:45:24, jam ...
7 years, 4 months ago (2013-07-24 22:18:30 UTC) #16
Yaron
https://codereview.chromium.org/19957002/diff/29001/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java File chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java (right): https://codereview.chromium.org/19957002/diff/29001/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java#newcode56 chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java:56: protected void onCreate(Bundle savedInstanceState) { If you make this ...
7 years, 4 months ago (2013-07-25 00:05:15 UTC) #17
aberent
On 2013/07/24 22:17:18, aberent wrote: > On 2013/07/24 19:15:00, jam wrote: > > On 2013/07/24 ...
7 years, 4 months ago (2013-07-26 20:36:29 UTC) #18
aberent
https://codereview.chromium.org/19957002/diff/2001/content/public/browser/browser_main_runner.h File content/public/browser/browser_main_runner.h (right): https://codereview.chromium.org/19957002/diff/2001/content/public/browser/browser_main_runner.h#newcode11 content/public/browser/browser_main_runner.h:11: #include "content/public/common/startup_task_runner.h" On 2013/07/22 16:28:15, joth wrote: > you ...
7 years, 4 months ago (2013-07-26 20:36:54 UTC) #19
Yaron
https://codereview.chromium.org/19957002/diff/88001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/19957002/diff/88001/content/browser/browser_main_loop.cc#newcode520 content/browser/browser_main_loop.cc:520: scoped_refptr<StartupTaskRunner> task_runner = Again, can't this be owned by ...
7 years, 4 months ago (2013-07-30 00:06:23 UTC) #20
aberent
New patch follows once I have rerun a few more tests https://codereview.chromium.org/19957002/diff/88001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): ...
7 years, 4 months ago (2013-07-30 15:01:54 UTC) #21
Yaron
lgtm I'm happy from an Android perspective. Some minor nits as suggestions for the test. ...
7 years, 4 months ago (2013-07-30 18:53:22 UTC) #22
jam
thanks, I really appreciate hiding this from the content api. just one small nit https://codereview.chromium.org/19957002/diff/106001/content/browser/browser_startup_configuration.cc ...
7 years, 4 months ago (2013-07-31 00:29:27 UTC) #23
aberent
New patch to follow soon. https://codereview.chromium.org/19957002/diff/106001/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java File chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java (right): https://codereview.chromium.org/19957002/diff/106001/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java#newcode63 chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java:63: @Override On 2013/07/30 18:53:22, ...
7 years, 4 months ago (2013-07-31 17:24:49 UTC) #24
jam
lgtm with nits and removing browser_startup_configuration.* https://codereview.chromium.org/19957002/diff/123001/content/browser/browser_startup_configuration.h File content/browser/browser_startup_configuration.h (right): https://codereview.chromium.org/19957002/diff/123001/content/browser/browser_startup_configuration.h#newcode1 content/browser/browser_startup_configuration.h:1: // Copyright 2013 ...
7 years, 4 months ago (2013-07-31 18:07:52 UTC) #25
aberent
https://codereview.chromium.org/19957002/diff/123001/content/browser/browser_startup_configuration.h File content/browser/browser_startup_configuration.h (right): https://codereview.chromium.org/19957002/diff/123001/content/browser/browser_startup_configuration.h#newcode1 content/browser/browser_startup_configuration.h:1: // Copyright 2013 The Chromium Authors. All rights reserved. ...
7 years, 4 months ago (2013-07-31 20:56:50 UTC) #26
jam
https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc File content/browser/startup_task_runner.cc (right): https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc#newcode15 content/browser/startup_task_runner.cc:15: void (*const startup_complete_callback)(int result), nit: use callbacks instead of ...
7 years, 4 months ago (2013-07-31 21:26:52 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aberent@chromium.org/19957002/134001
7 years, 4 months ago (2013-08-01 13:32:54 UTC) #28
aberent
https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc File content/browser/startup_task_runner.cc (right): https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc#newcode15 content/browser/startup_task_runner.cc:15: void (*const startup_complete_callback)(int result), On 2013/07/31 21:26:53, jam wrote: ...
7 years, 4 months ago (2013-08-01 13:56:37 UTC) #29
aberent
On 2013/08/01 13:56:37, aberent wrote: > https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc > File content/browser/startup_task_runner.cc (right): > > https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc#newcode15 > ...
7 years, 4 months ago (2013-08-01 14:57:20 UTC) #30
aberent
On 2013/08/01 14:57:20, aberent wrote: > On 2013/08/01 13:56:37, aberent wrote: > > > https://codereview.chromium.org/19957002/diff/117002/content/browser/startup_task_runner.cc ...
7 years, 4 months ago (2013-08-01 15:30:41 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aberent@chromium.org/19957002/134001
7 years, 4 months ago (2013-08-01 15:31:01 UTC) #32
commit-bot: I haz the power
7 years, 4 months ago (2013-08-01 16:01:53 UTC) #33
Message was sent while issue was closed.
Change committed as 215042

Powered by Google App Engine
This is Rietveld 408576698