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

Issue 2641973003: Implement server-suggested update check backoff (Closed)

Created:
3 years, 11 months ago by Xi Han
Modified:
3 years, 9 months ago
Reviewers:
dominickn, pkotwicz
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

Implement server-suggested update check backoff When updating a certified WebAPK whose Clank-fetched content no longer matches its Harpoon-fetched content on the server, server will return a certified WebAPK with resources from the Harpoon-fetched content, and set the filed "infrequent_updates" field in the Response proto as true to direct Clank to check for updates less frequently for this WebAPK. On the Clank, once we see such a flag during updates, we will cache it in the WebAppDataStorage to avoid frequently request updates, since Clank will always think the WebAPK's resources don't match its Web Manifest. BUG=680128 Review-Url: https://codereview.chromium.org/2641973003 Cr-Commit-Position: refs/heads/master@{#455636} Committed: https://chromium.googlesource.com/chromium/src/+/35d7ec71638671b99f9490e84612bbfddd7b67b7

Patch Set 1 #

Total comments: 10

Patch Set 2 : 2 #

Total comments: 46

Patch Set 3 : dominickn@ and pkotwicz@'s comments. #

Total comments: 7

Patch Set 4 : dominickn@'s comments. #

Patch Set 5 : Rebase. #

Total comments: 41

Patch Set 6 : Nits. #

Total comments: 8

Patch Set 7 : Nits and rebase. #

Total comments: 5

Patch Set 8 : Fix tests failure. #

Patch Set 9 : Nits. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -176 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java View 1 2 3 4 5 6 11 chunks +14 lines, -55 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java View 1 2 3 4 5 6 7 8 6 chunks +61 lines, -15 lines 2 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java View 1 2 3 4 5 6 7 8 17 chunks +27 lines, -91 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java View 1 2 3 4 5 6 7 8 5 chunks +90 lines, -0 lines 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/banners/app_banner_infobar_delegate_android.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/webapk/webapk.proto View 1 2 3 4 5 1 chunk +9 lines, -1 line 0 comments Download
M chrome/browser/android/webapk/webapk_install_service.h View 1 2 3 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/android/webapk/webapk_install_service.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/webapk/webapk_installer.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/android/webapk/webapk_installer.cc View 1 2 3 4 5 6 4 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/android/webapk/webapk_installer_unittest.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/android/webapk/webapk_update_manager.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/webapk/webapk_update_manager.cc View 1 2 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 56 (33 generated)
Xi Han
Hi Peter, this is a follow up CL for CL (https://codereview.chromium.org/2632243004/). Could you please take ...
3 years, 11 months ago (2017-01-24 18:19:13 UTC) #4
pkotwicz
Still looking at the CL. Some preliminary comments https://codereview.chromium.org/2641973003/diff/20001/chrome/browser/android/webapk/webapk_installer.cc File chrome/browser/android/webapk/webapk_installer.cc (right): https://codereview.chromium.org/2641973003/diff/20001/chrome/browser/android/webapk/webapk_installer.cc#newcode420 chrome/browser/android/webapk/webapk_installer.cc:420: We ...
3 years, 10 months ago (2017-02-10 02:51:22 UTC) #5
pkotwicz
I think that's it for comments for this round of review https://codereview.chromium.org/2641973003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java (right): ...
3 years, 10 months ago (2017-02-10 20:53:14 UTC) #6
pkotwicz
Your CL generally looks good
3 years, 10 months ago (2017-02-10 20:53:41 UTC) #7
Xi Han
PTAL, thanks! https://codereview.chromium.org/2641973003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java (right): https://codereview.chromium.org/2641973003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java#newcode255 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java:255: storage.updateInfrequentUpdates(isInfrequentUpdates.booleanValue()); On 2017/02/10 20:53:14, pkotwicz wrote: > ...
3 years, 10 months ago (2017-02-13 22:56:15 UTC) #9
pkotwicz
Dominick, can you please take a look? The C++ looks good to me. I am ...
3 years, 10 months ago (2017-02-14 00:15:13 UTC) #11
dominickn
https://codereview.chromium.org/2641973003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java (right): https://codereview.chromium.org/2641973003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java#newcode35 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java:35: public static final long FULL_CHECK_UPDATE_INTERVAL = TimeUnit.DAYS.toMillis(3L); Rename this ...
3 years, 10 months ago (2017-02-14 04:13:34 UTC) #12
Xi Han
I think I have addressed all the comments except moving the logic for updates to ...
3 years, 10 months ago (2017-02-14 22:25:47 UTC) #16
dominickn
https://codereview.chromium.org/2641973003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java (right): https://codereview.chromium.org/2641973003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java#newcode327 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java:327: boolean isInfrequentUpdates = storage.getInfrequentUpdates(); On 2017/02/14 22:25:46, Xi Han(OOO ...
3 years, 10 months ago (2017-02-15 05:58:32 UTC) #21
Xi Han
Hi Dominick, I have moved the logic of whether to update a WebAPK into WebappDataStorage ...
3 years, 9 months ago (2017-03-03 22:09:39 UTC) #30
pkotwicz
Just nits! https://codereview.chromium.org/2641973003/diff/180001/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://codereview.chromium.org/2641973003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode402 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:402: long getLastWebApkUpdateRequestCompletionTime() { Can you make some ...
3 years, 9 months ago (2017-03-04 00:20:48 UTC) #31
dominickn
https://codereview.chromium.org/2641973003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java (right): https://codereview.chromium.org/2641973003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java#newcode91 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java:91: mPreviousUpdateSucceeded = storage.didPreviousUpdateSucceed(); crrev.com/2725813004 makes the WebappDataStorage a member ...
3 years, 9 months ago (2017-03-06 02:28:36 UTC) #32
Xi Han
I think I have addressed all the comments. PTAL, thanks! https://codereview.chromium.org/2641973003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java (right): https://codereview.chromium.org/2641973003/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java#newcode91 ...
3 years, 9 months ago (2017-03-06 22:14:21 UTC) #34
dominickn
Mostly nits now https://codereview.chromium.org/2641973003/diff/220001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java File chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java (right): https://codereview.chromium.org/2641973003/diff/220001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java#newcode327 chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java:327: * The is-update-needed check is the ...
3 years, 9 months ago (2017-03-07 02:15:12 UTC) #35
Xi Han
I am not sure why the WebappRegisterTest failed on bot linux_android_rel_ng(https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/245906/steps/chrome_junit_tests%20%28with%20patch%29.chrome_junit_tests%20%28with%20patch%29/logs/stdio), but it looks like ...
3 years, 9 months ago (2017-03-07 22:47:02 UTC) #44
Xi Han
It seems my fix in patchset#8 doesn't work:(
3 years, 9 months ago (2017-03-07 22:48:47 UTC) #45
pkotwicz
LGTM with nits https://codereview.chromium.org/2641973003/diff/260001/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://codereview.chromium.org/2641973003/diff/260001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode54 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:54: static final String KEY_LAST_WEBAPK_UPDATE_REQUEST_COMPLETE_TIME = Nit: ...
3 years, 9 months ago (2017-03-07 23:00:37 UTC) #46
pkotwicz
https://codereview.chromium.org/2641973003/diff/260001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java File chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java (right): https://codereview.chromium.org/2641973003/diff/260001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java#newcode340 chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java:340: WebappDataStorage.setClockForTests(mClock); For the sake of our future sanity, can ...
3 years, 9 months ago (2017-03-07 23:41:34 UTC) #47
Xi Han
Hi Dominick, PTAL, thanks! https://codereview.chromium.org/2641973003/diff/260001/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://codereview.chromium.org/2641973003/diff/260001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode54 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:54: static final String KEY_LAST_WEBAPK_UPDATE_REQUEST_COMPLETE_TIME = ...
3 years, 9 months ago (2017-03-08 14:40:50 UTC) #49
pkotwicz
Still LGTM https://codereview.chromium.org/2641973003/diff/320001/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://codereview.chromium.org/2641973003/diff/320001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode400 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:400: long getLastWebApkUpdateRequestCompletionTime() { Fair enough
3 years, 9 months ago (2017-03-08 16:29:10 UTC) #50
dominickn
lgtm, thanks
3 years, 9 months ago (2017-03-08 23:21:25 UTC) #51
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/2641973003/320001
3 years, 9 months ago (2017-03-09 01:20:53 UTC) #53
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 01:59:10 UTC) #56
Message was sent while issue was closed.
Committed patchset #9 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/35d7ec71638671b99f9490e84612...

Powered by Google App Engine
This is Rietveld 408576698