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

Issue 1749603002: Store URLs in WebappDataStorage, and purge them when history is cleared. (Closed)

Created:
4 years, 9 months ago by dominickn
Modified:
4 years, 9 months ago
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, markusheintz_
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Store URLs in WebappDataStorage, and purge them when history is cleared. Sites which have been added to homescreen on Android should be allowed to open in standalone mode in response to push notifications. As Chromium cannot detect what sites are on the homescreen after they have been added, the heuristic is sites which have been launched from homescreen within the last ten days will be opened in standalone from a tap on a notification. This CL lays the groundwork for this feature by storing webapp URLs in WebappDataStorage. This is needed to be able to look up the last used time, which is currently persisted in WebappDataStorage. The last used time and webapp URL combined are history, so this CL also resets both pieces of data when the user clears their history. This requires further changes to allow null values in these fields. The last used time is set appropriately when the app is next launched from homescreen; the URL is reset if it is empty when the app is launched. Additional tests for the behaviour introduced in this CL are added. BUG=541711, 570579 Committed: https://crrev.com/6e400421b116644b4e8b23c29fd2e0c3886af3af Cr-Commit-Position: refs/heads/master@{#383223}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Add @VisibleForTesting to address test failures #

Total comments: 33

Patch Set 3 : Addressing reviewer comments. Add dependency patchset for unit test hanging #

Total comments: 6

Patch Set 4 : Addressing reviewer comments #

Total comments: 9

Patch Set 5 : Addressing reviewer comments, renaming methods #

Total comments: 2

Patch Set 6 : Rename URL to scope #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+549 lines, -114 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java View 1 2 3 4 5 3 chunks +9 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java View 1 2 3 4 5 8 chunks +120 lines, -47 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java View 1 2 3 4 5 6 chunks +47 lines, -9 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java View 1 2 3 4 5 6 3 chunks +101 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestBase.java View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java View 1 2 3 4 5 4 chunks +54 lines, -8 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java View 1 2 3 4 5 11 chunks +139 lines, -34 lines 0 comments Download
M chrome/browser/android/banners/app_banner_data_fetcher_android.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/shortcut_helper.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/android/shortcut_helper.cc View 1 2 3 4 5 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/webapps/webapp_registry.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/android/webapps/webapp_registry.cc View 1 2 2 chunks +20 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 1 2 3 4 5 6 4 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 38 (11 generated)
dominickn
PTAL. This ended up being a pretty large patch. 1. Sites which have launched from ...
4 years, 9 months ago (2016-02-29 07:49:15 UTC) #2
dominickn
On 2016/02/29 07:49:15, dominickn wrote: > PTAL. This ended up being a pretty large patch. ...
4 years, 9 months ago (2016-03-01 01:08:27 UTC) #4
dominickn
+mlamouri: FYI, PTAL. Update on test failures: I can reproduce the failure by building on ...
4 years, 9 months ago (2016-03-02 03:12:49 UTC) #6
dominickn
Update: Fixed the NoSuchMethodError. Now the browsing data remover unit tests are timing out. The ...
4 years, 9 months ago (2016-03-08 04:48:57 UTC) #7
gone
On 2016/03/08 04:48:57, dominickn wrote: > Update: Fixed the NoSuchMethodError. Now the browsing data remover ...
4 years, 9 months ago (2016-03-08 19:25:56 UTC) #8
gone
Still going through the tests, but here's an initial set. https://chromiumcodereview.appspot.com/1749603002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1749603002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode38 ...
4 years, 9 months ago (2016-03-08 22:40:39 UTC) #9
gone
https://chromiumcodereview.appspot.com/1749603002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java (right): https://chromiumcodereview.appspot.com/1749603002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java#newcode148 chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java:148: // The webapp should still exist in the registry. ...
4 years, 9 months ago (2016-03-08 23:03:52 UTC) #10
AlvarezD.AA11
4 years, 9 months ago (2016-03-08 23:07:35 UTC) #12
dominickn
PTAL, thanks! This CL now depends on http://crrev.com/1776903002, which refactors WebappRegistry so it's mockable in ...
4 years, 9 months ago (2016-03-09 08:18:33 UTC) #14
gone
I don't think I saw anything egregious here, but I'll take another pass. https://chromiumcodereview.appspot.com/1749603002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File ...
4 years, 9 months ago (2016-03-10 23:27:22 UTC) #15
gone
Er, lgtm % my comments and Mounir's review
4 years, 9 months ago (2016-03-10 23:30:23 UTC) #16
dominickn
Thanks! ping @mlamouri - PTAL. I'll need to follow up with dfalcantara about how much ...
4 years, 9 months ago (2016-03-11 05:14:43 UTC) #17
dominickn
+mkwst - PTAL at the BDR. Thanks!
4 years, 9 months ago (2016-03-11 05:17:38 UTC) #19
Mike West
The browsing data remover change LGTM. That said, have you talked with the privacy team ...
4 years, 9 months ago (2016-03-11 15:45:29 UTC) #20
dominickn
On 2016/03/11 15:45:29, Mike West wrote: > The browsing data remover change LGTM. > > ...
4 years, 9 months ago (2016-03-11 22:41:23 UTC) #21
Mike West
On 2016/03/11 at 22:41:23, dominickn wrote: > On 2016/03/11 15:45:29, Mike West wrote: > > ...
4 years, 9 months ago (2016-03-14 10:39:39 UTC) #22
mlamouri (slow - plz ping)
FYI, I will have a look at this tomorrow.
4 years, 9 months ago (2016-03-14 17:09:20 UTC) #23
mlamouri (slow - plz ping)
Looks good in general but I would like to see if you could do better ...
4 years, 9 months ago (2016-03-16 13:34:28 UTC) #24
dominickn
@mlamouri: Thanks! @mlamouri, @dfalcantara: PTAnL. I've renamed "origin" to "url", and also made it so ...
4 years, 9 months ago (2016-03-17 04:31:27 UTC) #26
gone
still lgtm on my end. https://chromiumcodereview.appspot.com/1749603002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1749603002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode120 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:120: * already a URL ...
4 years, 9 months ago (2016-03-18 17:52:21 UTC) #27
mlamouri (slow - plz ping)
Now I'm confused. If you save `url`, aren't you basically starting implementing bug 594872 because ...
4 years, 9 months ago (2016-03-21 15:01:52 UTC) #28
dominickn
On 2016/03/21 15:01:52, Mounir Lamouri wrote: > Now I'm confused. If you save `url`, aren't ...
4 years, 9 months ago (2016-03-21 21:27:23 UTC) #29
dominickn
@mlamouri: ping?
4 years, 9 months ago (2016-03-24 04:23:04 UTC) #30
mlamouri (slow - plz ping)
Sorry about the delay. Because I wrote a comment, it was no longer in my ...
4 years, 9 months ago (2016-03-24 10:36:42 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1749603002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1749603002/120001
4 years, 9 months ago (2016-03-25 01:56:36 UTC) #34
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 9 months ago (2016-03-25 02:03:04 UTC) #36
commit-bot: I haz the power
4 years, 9 months ago (2016-03-25 02:04:01 UTC) #38
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/6e400421b116644b4e8b23c29fd2e0c3886af3af
Cr-Commit-Position: refs/heads/master@{#383223}

Powered by Google App Engine
This is Rietveld 408576698