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

Issue 2409483002: Read the bare minimum of data from the WebAPK launch intent. (Closed)

Created:
4 years, 2 months ago by pkotwicz
Modified:
4 years, 2 months ago
Reviewers:
dominickn, gone
CC:
chromium-reviews, dominickn+watch_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Read the bare minimum of data from the WebAPK launch intent. The launch intent for WebappLauncherActivity may be sent by any app, not necessarily Chrome or a WebAPK. For WebAPKs (unlike non-WebAPK web apps) the id is predictable. For WebAPKs we verify that the package name in the intent matches an installed WebAPK and that the start URL falls within the WebAPK's scope. We do not validate any of the other data in the launch intent. Prior to this CL, by customizing the launch intent a third party APK was able to launch a WebAPK with an arbirtrary name and icon on the splash screen. This CL reduces the amount of data we extract from the WebappLauncherActivity launch intent to the minimum possible. We still read from the launch intent the following data: - WebAPK package name - URL to navigate the WebAPK to. We cannot use the WebAPK's start URL because the WebAPK can be launched at any URL within the WebAPK scope via deep linking. We do verify that the URL in the intent is within the WebAPK scope. - The reason the WebAPK got launched (e.g. launched from a notification). This is used for UMA only. BUG=651640 Committed: https://crrev.com/0b7c2979c1f64fbfb6ce5967a1424890b86579f1 Cr-Commit-Position: refs/heads/master@{#425093}

Patch Set 1 : Merge branch 'startup_crash' into security #

Total comments: 7

Patch Set 2 : Merge branch 'startup_crash0' into security #

Patch Set 3 : Merge branch 'startup_crash0' into security #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+325 lines, -317 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/webapps/ManifestUpgradeDetector.java View 2 chunks +2 lines, -19 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java View 1 1 chunk +152 lines, -0 lines 1 comment Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java View 4 chunks +5 lines, -55 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java View 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java View 1 1 chunk +8 lines, -52 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtilsTest.java View 1 chunk +117 lines, -0 lines 0 comments Download
M chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkConstants.java View 1 chunk +0 lines, -17 lines 0 comments Download
M chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkMetaDataKeys.java View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/webapk/libs/runtime_library/BUILD.gn View 1 chunk +2 lines, -7 lines 0 comments Download
D chrome/android/webapk/libs/runtime_library/src/org/chromium/webapk/lib/runtime_library/HostBrowserLauncher.java View 1 chunk +0 lines, -146 lines 0 comments Download
M chrome/android/webapk/shell_apk/AndroidManifest.xml View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/MainActivity.java View 4 chunks +20 lines, -21 lines 0 comments Download

Messages

Total messages: 25 (12 generated)
pkotwicz
Dominick, can you please take a look?
4 years, 2 months ago (2016-10-09 18:00:25 UTC) #3
dominickn
Please reformat the CL description so that it's 74 characters wide. https://codereview.chromium.org/2409483002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java (right): ...
4 years, 2 months ago (2016-10-11 05:54:52 UTC) #5
pkotwicz
Dominick, can you please take another look? I thought the guideline was to wrap the ...
4 years, 2 months ago (2016-10-12 05:05:47 UTC) #8
dominickn
lgtm 80 characters is fine - I think I had 74 in my head because ...
4 years, 2 months ago (2016-10-12 05:26:48 UTC) #9
pkotwicz
https://codereview.chromium.org/2409483002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java (right): https://codereview.chromium.org/2409483002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java#newcode83 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java:83: if (isValidWebApk || isValidMacForUrl(webappUrl, webappMac) Ok, I see your ...
4 years, 2 months ago (2016-10-12 18:52:57 UTC) #10
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/2409483002/80001
4 years, 2 months ago (2016-10-12 18:53:38 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/279530)
4 years, 2 months ago (2016-10-12 19:05:16 UTC) #15
pkotwicz
dfalcantara@ for WebApkMetaDataUtils.java
4 years, 2 months ago (2016-10-12 20:58:52 UTC) #17
gone
WebApkMetaDataUtils.java lgtm https://chromiumcodereview.appspot.com/2409483002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java (right): https://chromiumcodereview.appspot.com/2409483002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java#newcode59 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkMetaDataUtils.java:59: Resources resources; Does it make sense to ...
4 years, 2 months ago (2016-10-13 18:07:31 UTC) #18
pkotwicz
> Does it make sense to just combine these two try / catch blocks? This ...
4 years, 2 months ago (2016-10-13 18:12:19 UTC) #19
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/2409483002/80001
4 years, 2 months ago (2016-10-13 18:13:05 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years, 2 months ago (2016-10-13 18:20:35 UTC) #23
commit-bot: I haz the power
4 years, 2 months ago (2016-10-13 18:23:06 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0b7c2979c1f64fbfb6ce5967a1424890b86579f1
Cr-Commit-Position: refs/heads/master@{#425093}

Powered by Google App Engine
This is Rietveld 408576698