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

Issue 2049843004: Upstream: Renderers are running in WebAPKs. (Closed)

Created:
4 years, 6 months ago by Xi Han
Modified:
4 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, Peter Wen, Jinsuk Kim
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Upstream: Renderers are running in WebAPKs. This Cl includes the following things: 1. Introduce WebApkSandboxedProcessService which works the same as Chrome's ChildProcessService, but loads Chrome's code via Chrome's ClassLoader. 2. Move most of the functionality from ChildProcessService to ChildProcessServiceImpl, so we could let WebApkSandboxedProcessService load the ChildProcessServiceImpl class and create an Impl object which loads Chrome's native libraries and creates renderer process. The ChildProcessService can't be loaded directly through the same way, it might because this class extends the Android Service class and complicates things. 3. Rename child_process_service.h(.cc) to child_process_service_impl.h(.cc) and updates the JNI register. 4. Pass in the class name of WebApkSandboxedProcessService via ChildProcessCreationParams in WebApkActivity. So ChildProcessLauncher knows the class name of the service to connect. BUG=609122 Committed: https://crrev.com/3f9d474841d96c1cf75186190d20379b074eb8fb Cr-Commit-Position: refs/heads/master@{#402026}

Patch Set 1 : #

Total comments: 40

Patch Set 2 : pkotwicz@'s comments. #

Total comments: 15

Patch Set 3 : Nits. #

Total comments: 26

Patch Set 4 : Clean up. #

Total comments: 3

Patch Set 5 : Rebase. #

Patch Set 6 : Update comments. #

Total comments: 18

Patch Set 7 : Maria's comments and rebase. #

Total comments: 4

Patch Set 8 : Add a check. #

Total comments: 6

Patch Set 9 : Maria's comments. #

Total comments: 4

Patch Set 10 : Add SANDBOXED_SERVICES_NAME in WebAPK's AndroidManifest.xml. #

Patch Set 11 #

Total comments: 6

Patch Set 12 : Always check command line flags in getNum(Class)ofService(). #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -715 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java View 1 2 3 4 5 6 7 1 chunk +8 lines, -1 line 2 comments Download
M chrome/android/webapk/libs/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java View 1 2 3 4 5 6 7 8 1 chunk +78 lines, -0 lines 0 comments Download
A + chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService0.java View 1 chunk +3 lines, -3 lines 0 comments Download
A + chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService1.java View 1 chunk +3 lines, -3 lines 0 comments Download
A + chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService2.java View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/android/webapk/shell_apk/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -0 lines 0 comments Download
M content/app/BUILD.gn View 1 chunk +2 lines, -2 lines 0 comments Download
M content/app/android/app_jni_registrar.cc View 1 chunk +2 lines, -2 lines 0 comments Download
D content/app/android/child_process_service.h View 1 chunk +0 lines, -14 lines 0 comments Download
D content/app/android/child_process_service.cc View 1 chunk +0 lines, -189 lines 0 comments Download
A + content/app/android/child_process_service_impl.h View 1 chunk +4 lines, -4 lines 0 comments Download
A + content/app/android/child_process_service_impl.cc View 9 chunks +33 lines, -33 lines 0 comments Download
M content/content_app.gypi View 1 chunk +2 lines, -2 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/app/ChildProcessService.java View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -379 lines 0 comments Download
A + content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java View 1 2 3 4 5 6 11 chunks +35 lines, -43 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java View 4 chunks +3 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +76 lines, -33 lines 2 comments Download

Messages

Total messages: 68 (29 generated)
Xi Han
Hi Peter, could you please take a look? Thanks!
4 years, 6 months ago (2016-06-10 14:47:24 UTC) #11
pkotwicz
Thank you for figuring out how to use the ChildProcessService via reflection for WebAPKs If ...
4 years, 6 months ago (2016-06-10 21:29:48 UTC) #13
Xi Han
Hi Peter, could you please take another look? Thanks! https://codereview.chromium.org/2049843004/diff/60001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java File chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java (right): https://codereview.chromium.org/2049843004/diff/60001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode55 chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java:55: ...
4 years, 6 months ago (2016-06-13 20:04:11 UTC) #14
pkotwicz
Thank you for addressing all of my comments. Generally looks good https://codereview.chromium.org/2049843004/diff/60001/chrome/android/webapk/shell_apk/AndroidManifest.xml File chrome/android/webapk/shell_apk/AndroidManifest.xml (right): ...
4 years, 6 months ago (2016-06-14 01:19:48 UTC) #18
Xi Han
Hi Peter, PTAL, thanks! https://codereview.chromium.org/2049843004/diff/60001/chrome/android/webapk/shell_apk/AndroidManifest.xml File chrome/android/webapk/shell_apk/AndroidManifest.xml (right): https://codereview.chromium.org/2049843004/diff/60001/chrome/android/webapk/shell_apk/AndroidManifest.xml#newcode48 chrome/android/webapk/shell_apk/AndroidManifest.xml:48: android:exported="true"/> On 2016/06/14 01:19:48, pkotwicz ...
4 years, 6 months ago (2016-06-14 21:55:04 UTC) #21
pkotwicz
Some final comments, then L-G-T-M https://codereview.chromium.org/2049843004/diff/80001/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java File content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java (right): https://codereview.chromium.org/2049843004/diff/80001/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java#newcode102 content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java:102: /* package */ static ...
4 years, 6 months ago (2016-06-15 14:13:51 UTC) #22
Xi Han
Hi Peter, PTAL, thanks! https://codereview.chromium.org/2049843004/diff/140001/chrome/android/webapk/libs/common/BUILD.gn File chrome/android/webapk/libs/common/BUILD.gn (right): https://codereview.chromium.org/2049843004/diff/140001/chrome/android/webapk/libs/common/BUILD.gn#newcode10 chrome/android/webapk/libs/common/BUILD.gn:10: "src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java", On 2016/06/15 14:13:50, pkotwicz ...
4 years, 6 months ago (2016-06-15 17:10:40 UTC) #25
pkotwicz
LGTM! https://codereview.chromium.org/2049843004/diff/140001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java File chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java (right): https://codereview.chromium.org/2049843004/diff/140001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode55 chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java:55: try { Thank you for making this change! ...
4 years, 6 months ago (2016-06-15 17:51:01 UTC) #26
Xi Han
Hi Maria, could you please take a look? Thanks! https://codereview.chromium.org/2049843004/diff/200001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java File chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java (right): https://codereview.chromium.org/2049843004/diff/200001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode18 chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java:18: ...
4 years, 6 months ago (2016-06-15 18:11:48 UTC) #28
Xi Han
+michaelbai@ Hi Maria and Tao, since both of you review Peter's and my CLs for ...
4 years, 6 months ago (2016-06-16 17:38:35 UTC) #30
Maria
https://codereview.chromium.org/2049843004/diff/240001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java File chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java (right): https://codereview.chromium.org/2049843004/diff/240001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode26 chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java:26: private Object mChildProcessServiceImplInstance; final on both objects above? https://codereview.chromium.org/2049843004/diff/240001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode37 ...
4 years, 6 months ago (2016-06-17 17:09:25 UTC) #31
Xi Han
Hi Maria, could you please take another look? Thanks! https://codereview.chromium.org/2049843004/diff/240001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java File chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java (right): https://codereview.chromium.org/2049843004/diff/240001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode26 chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java:26: ...
4 years, 6 months ago (2016-06-17 18:35:20 UTC) #34
michaelbai
I didn't look through the patch yet, could you help me to understand what prevent ...
4 years, 6 months ago (2016-06-20 17:58:46 UTC) #35
Xi Han
We want to keep WebAPK (gn target is shell_apk) small, so it doesn't include any ...
4 years, 6 months ago (2016-06-20 18:18:45 UTC) #36
Maria
lgtm https://codereview.chromium.org/2049843004/diff/320001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java File chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java (right): https://codereview.chromium.org/2049843004/diff/320001/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java#newcode22 chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkSandboxedProcessService.java:22: "org.chromium.content.app.ChildProcessServiceImpl"; I think you may want to add ...
4 years, 6 months ago (2016-06-20 18:49:22 UTC) #37
michaelbai
torne@ would you like take a look? it might relate to WebView Zygote, multiple process, ...
4 years, 6 months ago (2016-06-20 19:06:57 UTC) #39
Xi Han
https://codereview.chromium.org/2049843004/diff/300001/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java File chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java (right): https://codereview.chromium.org/2049843004/diff/300001/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java#newcode320 chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java:320: if (creationParams != null) { On 2016/06/20 17:58:46, michaelbai ...
4 years, 6 months ago (2016-06-20 19:12:34 UTC) #40
Torne
On 2016/06/20 19:06:57, michaelbai wrote: > torne@ would you like take a look? it might ...
4 years, 6 months ago (2016-06-21 10:51:00 UTC) #41
Torne
On 2016/06/20 19:06:57, michaelbai wrote: > torne@ would you like take a look? it might ...
4 years, 6 months ago (2016-06-21 10:51:01 UTC) #42
chromium-reviews
Richard, please feel free to add a meeting on my calendar. WebApk side will be ...
4 years, 6 months ago (2016-06-21 12:42:19 UTC) #43
Torne
On 2016/06/21 12:42:19, chromium-reviews wrote: > Richard, please feel free to add a meeting on ...
4 years, 6 months ago (2016-06-21 12:53:48 UTC) #44
no sievers
https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java (right): https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java#newcode135 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java:135: WebApkSandboxedProcessService.class); Would it also be possible to override through ...
4 years, 6 months ago (2016-06-23 17:18:51 UTC) #46
Xi Han
https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java (right): https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java#newcode135 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java:135: WebApkSandboxedProcessService.class); On 2016/06/23 17:18:50, sievers wrote: > Would it ...
4 years, 6 months ago (2016-06-23 17:34:56 UTC) #47
no sievers
https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java (right): https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java#newcode135 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java:135: WebApkSandboxedProcessService.class); On 2016/06/23 17:34:56, Xi Han wrote: > On ...
4 years, 6 months ago (2016-06-23 17:45:34 UTC) #48
Xi Han
https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java (right): https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java#newcode135 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java:135: WebApkSandboxedProcessService.class); On 2016/06/23 17:45:33, sievers wrote: > On 2016/06/23 ...
4 years, 6 months ago (2016-06-23 18:00:26 UTC) #49
no sievers
On 2016/06/23 18:00:26, Xi Han wrote: > https://codereview.chromium.org/2049843004/diff/340001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java > File > chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java > (right): > ...
4 years, 6 months ago (2016-06-23 20:24:04 UTC) #50
Xi Han
On 2016/06/23 20:24:04, sievers wrote: > On 2016/06/23 18:00:26, Xi Han wrote: > > > ...
4 years, 6 months ago (2016-06-23 20:42:03 UTC) #51
no sievers
On 2016/06/23 20:42:03, Xi Han wrote: > On 2016/06/23 20:24:04, sievers wrote: > > On ...
4 years, 6 months ago (2016-06-23 21:38:57 UTC) #52
Xi Han
On 2016/06/23 21:38:57, sievers wrote: > On 2016/06/23 20:42:03, Xi Han wrote: > > On ...
4 years, 6 months ago (2016-06-23 23:07:34 UTC) #53
no sievers
On 2016/06/23 23:07:34, Xi Han wrote: > On 2016/06/23 21:38:57, sievers wrote: > > On ...
4 years, 6 months ago (2016-06-23 23:39:28 UTC) #54
no sievers
On 2016/06/23 23:39:28, sievers wrote: > On 2016/06/23 23:07:34, Xi Han wrote: > > On ...
4 years, 6 months ago (2016-06-23 23:40:47 UTC) #55
Xi Han
I introduce the SANDBOXED_SERVICES_NAME in AndroidManifest.xml, and the getClassOfService() returns the service class if exists ...
4 years, 5 months ago (2016-06-24 15:24:28 UTC) #56
no sievers
https://codereview.chromium.org/2049843004/diff/380001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/2049843004/diff/380001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode295 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:295: return SandboxedProcessService.class; Should this throw an exception since it's ...
4 years, 5 months ago (2016-06-24 19:54:32 UTC) #57
Xi Han
Hi Daniel, I updated the logic in getNum(Class)OfService to prevent tests failures when passing an ...
4 years, 5 months ago (2016-06-24 20:57:48 UTC) #59
no sievers
lgtm https://codereview.chromium.org/2049843004/diff/420001/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java File chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java (right): https://codereview.chromium.org/2049843004/diff/420001/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java#newcode321 chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java:321: ChildProcessCreationParams.set(creationParams); Is this still needed? https://codereview.chromium.org/2049843004/diff/420001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java ...
4 years, 5 months ago (2016-06-24 21:33:41 UTC) #60
Xi Han
https://codereview.chromium.org/2049843004/diff/420001/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java File chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java (right): https://codereview.chromium.org/2049843004/diff/420001/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java#newcode321 chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java:321: ChildProcessCreationParams.set(creationParams); On 2016/06/24 21:33:40, sievers wrote: > Is this ...
4 years, 5 months ago (2016-06-24 21:57:07 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2049843004/420001
4 years, 5 months ago (2016-06-24 23:30:07 UTC) #64
commit-bot: I haz the power
Committed patchset #12 (id:420001)
4 years, 5 months ago (2016-06-25 00:28:51 UTC) #66
commit-bot: I haz the power
4 years, 5 months ago (2016-06-25 00:31:31 UTC) #68
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/3f9d474841d96c1cf75186190d20379b074eb8fb
Cr-Commit-Position: refs/heads/master@{#402026}

Powered by Google App Engine
This is Rietveld 408576698