|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by pkotwicz Modified:
3 years, 11 months ago Reviewers:
dominickn 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. |
DescriptionLaunch WebAPK in regular browser if user disables WebAPKs in chrome://flags
WebAPKs can be disabled via:
- chrome://flags
- variations
When a user tries to launch a WebAPK (that the user installed while WebAPKs
were enabled) when WebAPKs are disabled, this CL makes the WebAPK launch in a
regular browser tab. Previously nothing would occur when the user taps on the
homescreen shortcut.
BUG=682524
Review-Url: https://codereview.chromium.org/2643853004
Cr-Commit-Position: refs/heads/master@{#444622}
Committed: https://chromium.googlesource.com/chromium/src/+/e7c168f910ca1d4b565f16abe25e6fdf0352f7a3
Patch Set 1 #
Total comments: 2
Patch Set 2 : Merge branch 'master' into webapk_disabled #Messages
Total messages: 17 (7 generated)
Description was changed from ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=webappUrl ========== to ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=webappUrl ==========
Description was changed from ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=webappUrl ========== to ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK (that the user installed while WebAPKs were enabled) when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=webappUrl ==========
Description was changed from ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK (that the user installed while WebAPKs were enabled) when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=webappUrl ========== to ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK (that the user installed while WebAPKs were enabled) when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=682524 ==========
pkotwicz@chromium.org changed reviewers: + dominickn@chromium.org
Dominick, can you please take a look?
If we're still able to pull a URL out of the intent, does it have any other data in it? Would it be possible to fall back to regular webapp mode here?
Forgot to publish drafts https://codereview.chromium.org/2643853004/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java (right): https://codereview.chromium.org/2643853004/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java:66: String url = IntentUtils.safeGetStringExtra(intent, ShortcutHelper.EXTRA_URL); We should at least verify that the url isn't empty before launching in a tab. https://codereview.chromium.org/2643853004/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java:94: private void launchRegularBrowser(String webappUrl, int webappSource) { Nit: call this method launchInTab
Dominick, can you please take another look? It might be possible to launch a WebAPK as a webapp when WebAPKs are disabled but it is not straightforward. WebAPKs don't have a mac. I guess we could bypass the mac check if the WebAPK is valid but WebAPKs are disabled. I am not sure what else we would need to do
lgtm If we have to disable WebAPKs, it's a huge downgrade to have PWAs open in the browser tab. If there's any chance at all that we'd have to turn off WebAPKs or something like that, I think it's worth investigating storing exactly the same information for a WebAPK as we do for regular web apps (such as the MAC), so that it's a perfect fallback.
The CQ bit was checked by pkotwicz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Its not possible to store a mac for WebAPKs because the Mac is a random number and the server wants to be able to vend the same WebAPK to multiple clients. Perhaps we can launch WebAPKs in webapp mode even if they don't have a Mac
Dominick, what do you think?
On 2017/01/19 02:54:38, pkotwicz wrote: > Dominick, what do you think? Hmm, the purpose of the MAC is to make sure that the incoming intent was generated by Chrome. All we have in WebappLauncherActivity is an intent - is there any way to securely verify that it came from a WebAPK? I'm not sure if that's possible. When a WebAPK is vended and sent to Chrome, is there any way that Chrome could inject the MAC? I'm sorry I'm not a big expert on that phase :)
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1484794311760610,
"parent_rev": "c083c885f19967daef65cce687ab0b0d695adf69", "commit_rev":
"e7c168f910ca1d4b565f16abe25e6fdf0352f7a3"}
Message was sent while issue was closed.
Description was changed from ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK (that the user installed while WebAPKs were enabled) when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=682524 ========== to ========== Launch WebAPK in regular browser if user disables WebAPKs in chrome://flags WebAPKs can be disabled via: - chrome://flags - variations When a user tries to launch a WebAPK (that the user installed while WebAPKs were enabled) when WebAPKs are disabled, this CL makes the WebAPK launch in a regular browser tab. Previously nothing would occur when the user taps on the homescreen shortcut. BUG=682524 Review-Url: https://codereview.chromium.org/2643853004 Cr-Commit-Position: refs/heads/master@{#444622} Committed: https://chromium.googlesource.com/chromium/src/+/e7c168f910ca1d4b565f16abe25e... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/e7c168f910ca1d4b565f16abe25e... |
