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

Issue 1867543002: Enable deep-linking from notifications for recently used web apps on the Android home screen. (Closed)

Created:
4 years, 8 months ago by dominickn
Modified:
4 years, 8 months ago
Reviewers:
Ilya Sherman, gone
CC:
chromium-reviews, asvitkine+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bulk-webappdatastorage
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable deep-linking from notifications for recently used web apps on the Android home screen. This CL permits notifications pointing to a recently used, standalone-capable web app on the Android home screen to open in the standalone web frame. The web app must be added to home screen, capable of opening in standalone mode, and have been opened from the home screen within the last ten days. If any of these conditions are not met, the notification will fall back to the existing behaviour. The search for a matching web app is conducted by comparing the URL which the notification is asking to be opened with the scope of all web apps known to Chromium. The scope for a web app is its URL, minus the final component of its path, any query parameters, and any fragments. A future CL will implement the manifest scope property, which will replace this estimated scope. The web app with the longest scope that matches the URL to be opened is chosen. Additional tests for the scoped search are added in this CL. A new shortcut source is added to indicate launches from a notification, and the WebappRegistry is updated to not change the last updated time of web app data which has not been opened from the home screen. This is necessary to ensure web apps cannot spam the user with notifications to update their last used time and hence how long Chromium will cache their app data. BUG=541711, 594872 R=dfalcantara Committed: https://crrev.com/1ce7d2f020a7452bd0399dd50e4580981deeb4dd Cr-Commit-Position: refs/heads/master@{#385967}

Patch Set 1 #

Patch Set 2 : UI thread strikes again #

Total comments: 25

Patch Set 3 : Addressing reviewer comments #

Total comments: 4

Patch Set 4 : Address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+515 lines, -88 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java View 1 2 3 2 chunks +64 lines, -19 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java View 2 chunks +14 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java View 1 2 8 chunks +69 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java View 1 2 2 chunks +10 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java View 1 2 chunks +34 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java View 1 2 4 chunks +86 lines, -2 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java View 1 2 3 14 chunks +214 lines, -51 lines 0 comments Download
M chrome/browser/android/shortcut_info.h View 1 chunk +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +3 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 17 (7 generated)
dominickn
And here's number 3. PTAL, thanks! https://codereview.chromium.org/1867543002/diff/20001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java File chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java (left): https://codereview.chromium.org/1867543002/diff/20001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java#oldcode120 chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java:120: long before = ...
4 years, 8 months ago (2016-04-06 13:07:02 UTC) #1
gone
lgtm Not seeing any red flags, anyway. https://chromiumcodereview.appspot.com/1867543002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java (right): https://chromiumcodereview.appspot.com/1867543002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java:43: new WebappRegistry.FetchWebappDataStorageCallback() ...
4 years, 8 months ago (2016-04-07 19:10:45 UTC) #2
dominickn
Thanks! +isherman: PTAL at the minor change in histograms.xml (adding a new enum value and ...
4 years, 8 months ago (2016-04-07 23:01:43 UTC) #5
Ilya Sherman
histograms.xml lgtm
4 years, 8 months ago (2016-04-07 23:37:41 UTC) #6
dominickn
Thanks! https://codereview.chromium.org/1867543002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java (right): https://codereview.chromium.org/1867543002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java:43: new WebappRegistry.FetchWebappDataStorageCallback() { On 2016/04/07 19:10:44, dfalcantara wrote: ...
4 years, 8 months ago (2016-04-08 01:10:46 UTC) #8
gone
re-lgtm % nits https://codereview.chromium.org/1867543002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java (right): https://codereview.chromium.org/1867543002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java#newcode73 chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java:73: // The URL is within the ...
4 years, 8 months ago (2016-04-08 01:14:07 UTC) #9
dominickn
Thanks! https://codereview.chromium.org/1867543002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java File chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java (right): https://codereview.chromium.org/1867543002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java#newcode73 chrome/android/java/src/org/chromium/chrome/browser/ChromeServiceTabLauncher.java:73: // The URL is within the scope of ...
4 years, 8 months ago (2016-04-08 02:58:45 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1867543002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1867543002/60001
4 years, 8 months ago (2016-04-08 02:59:41 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 8 months ago (2016-04-08 03:10:15 UTC) #15
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 03:12:04 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1ce7d2f020a7452bd0399dd50e4580981deeb4dd
Cr-Commit-Position: refs/heads/master@{#385967}

Powered by Google App Engine
This is Rietveld 408576698