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

Issue 22272006: Add support for multiple asynchronous browser startups. (Closed)

Created:
7 years, 4 months ago by nyquist
Modified:
7 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, Maria, haaawk
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add support for multiple asynchronous browser startups. This CL adds support for easily doing multiple asynchronous startups where every startup request can get their own callback executed. This makes the logic in at the caller very simple by for example extracting away usage of AndroidBrowserProcess and catching ProcessInitException. BrowserStartupConfig is renamed to BrowserStartupController, since it now does more than just keep the configuration. The BrowserStartupController is called from native when the native startup is complete. It keeps an ordered list of caller's callbacks which will all be called when initialization is finished. If initialization has already been completed before the async startup request is called, the callback is called immediately. The first users of this are content shell and chromium testshell. BUG=260574 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218562

Patch Set 1 #

Patch Set 2 : Removed synchronous methods, and added usage in chromium testshell #

Patch Set 3 : Removed unnecessary imports and method args. Fixed some strings. #

Total comments: 4

Patch Set 4 : Merged BrowserStartupConfig and BrowserStartupController. Rebased. Updated ContentShellActivity to … #

Total comments: 25

Patch Set 5 : Addressed all comments #

Total comments: 16

Patch Set 6 : Added support for only adding callback. Fixed ProcessInitException handling. Addressed all comments. #

Total comments: 5

Patch Set 7 : Removed instance lock #

Patch Set 8 : Fix last upload issue #

Patch Set 9 : Make dump render tree work like before #

Total comments: 3

Patch Set 10 : Updated tests to use assert messages. Cleaned some of them up a bit. Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+684 lines, -167 lines) Patch
M chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java View 1 2 3 4 5 7 3 chunks +21 lines, -26 lines 0 comments Download
M chrome/android/testshell/res/values/strings.xml View 1 2 3 4 5 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 1 2 3 7 2 chunks +2 lines, -2 lines 0 comments Download
D content/browser/android/browser_startup_config.h View 1 2 3 7 1 chunk +0 lines, -18 lines 0 comments Download
D content/browser/android/browser_startup_config.cc View 1 2 3 7 1 chunk +0 lines, -25 lines 0 comments Download
A + content/browser/android/browser_startup_controller.h View 1 2 3 7 2 chunks +4 lines, -4 lines 0 comments Download
A + content/browser/android/browser_startup_controller.cc View 1 2 3 7 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 7 1 chunk +2 lines, -2 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 7 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/AndroidBrowserProcess.java View 1 2 3 4 5 7 1 chunk +1 line, -0 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/BrowserStartupConfig.java View 1 2 3 7 1 chunk +0 lines, -43 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java View 1 2 3 4 5 6 7 1 chunk +235 lines, -0 lines 0 comments Download
A content/public/android/javatests/src/org/chromium/content/browser/BrowserStartupControllerTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +357 lines, -0 lines 0 comments Download
A + content/shell/android/shell_apk/res/values/strings.xml View 1 2 3 4 5 7 1 chunk +4 lines, -3 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 4 chunks +50 lines, -37 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
nyquist
bulach: PTAL The first user of this is Chromium Testshell. We will need this multiple ...
7 years, 4 months ago (2013-08-14 04:54:01 UTC) #1
bulach
+mariakhomenkom, aberent and haaawk FYI, I'll start reading this now.. thanks!
7 years, 4 months ago (2013-08-14 16:05:47 UTC) #2
bulach
thanks tommy! anthony was looking into a somewhat similar issue: https://codereview.chromium.org/22691002/ rather than having another ...
7 years, 4 months ago (2013-08-14 17:02:00 UTC) #3
nyquist
bulach: PTAL. Addressed comments. Basically merged BrowserStartupConfig and BrowserStartupController. Also had to change the content ...
7 years, 4 months ago (2013-08-15 07:07:03 UTC) #4
haaawk
On 2013/08/15 07:07:03, nyquist wrote: > bulach: PTAL. Addressed comments. > > Basically merged BrowserStartupConfig ...
7 years, 4 months ago (2013-08-15 09:22:48 UTC) #5
bulach
+peter for the DRT bits.. thanks Tommy! the "Controller" makes sense.. some nits and suggestions, ...
7 years, 4 months ago (2013-08-15 15:09:12 UTC) #6
nyquist
bulach: PTAL https://codereview.chromium.org/22272006/diff/19001/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java File content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java (right): https://codereview.chromium.org/22272006/diff/19001/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java#newcode22 content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java:22: * This class controls how C++ browser ...
7 years, 4 months ago (2013-08-16 02:01:01 UTC) #7
nyquist
haaawk: I will add that in the next round of the review.
7 years, 4 months ago (2013-08-16 07:26:22 UTC) #8
bulach
lgtm, thanks tommy! just some nits and suggestions below. since this will require a few ...
7 years, 4 months ago (2013-08-16 16:52:09 UTC) #9
nyquist
bulach: The changes to address the comments were big-ish, so I would be grateful if ...
7 years, 4 months ago (2013-08-16 20:28:59 UTC) #10
bulach
lgtm, thanks tommy! minor comments below, anthony is back today so hopefully we can get ...
7 years, 4 months ago (2013-08-19 10:27:45 UTC) #11
aberent
On 2013/08/19 10:27:45, bulach wrote: > lgtm, thanks tommy! minor comments below, anthony is back ...
7 years, 4 months ago (2013-08-19 14:46:31 UTC) #12
nyquist
jam: OWNERS for content/browser/browser_main_loop.cc and content/content_browser.gypi yfriedman: OWNERS for content/shell/android/shell_apk/ Naturally, feel free to take ...
7 years, 4 months ago (2013-08-19 17:19:12 UTC) #13
Peter Beverloo
Asynchronously starting the browser doesn't work for layout tests in Content Shell, which is why ...
7 years, 4 months ago (2013-08-19 17:35:40 UTC) #14
nyquist
On 2013/08/19 17:35:40, Peter Beverloo wrote: > Asynchronously starting the browser doesn't work for layout ...
7 years, 4 months ago (2013-08-19 17:43:46 UTC) #15
nyquist
beverloo: PTAL
7 years, 4 months ago (2013-08-20 04:56:29 UTC) #16
Yaron
lgtm https://codereview.chromium.org/22272006/diff/60002/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java File content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java (right): https://codereview.chromium.org/22272006/diff/60002/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java#newcode58 content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java:58: private static void setAsynchronousStartupConfig() { *sigh* It's a ...
7 years, 4 months ago (2013-08-20 05:58:58 UTC) #17
Peter Beverloo
This works fine for layout tests now. Thank you, Tommy!!
7 years, 4 months ago (2013-08-20 14:42:00 UTC) #18
nyquist
piman: PTAL for OWNERS for content/browser/browser_main_loop.cc content/content_browser.gypi
7 years, 4 months ago (2013-08-20 15:24:19 UTC) #19
piman
lgtm
7 years, 4 months ago (2013-08-20 17:04:44 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/22272006/74001
7 years, 4 months ago (2013-08-20 18:00:27 UTC) #21
commit-bot: I haz the power
7 years, 4 months ago (2013-08-20 22:55:56 UTC) #22
Message was sent while issue was closed.
Change committed as 218562

Powered by Google App Engine
This is Rietveld 408576698