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

Issue 2824623002: Last_n: Delete previously saved snapshot when navigating. (Closed)

Created:
3 years, 8 months ago by carlosk
Modified:
3 years, 8 months ago
Reviewers:
agrieve, dewittj
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, Dmitry Titov
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Last_n: Delete previously saved snapshot when navigating. After the switch that made last_n use tab hidden events to trigger the creation of snapshots a privacy bug was introduced. Saved pages were deleted along with the creation of a new snapshot, what happened only on the next hide event. If that never happened before the device would go offline, navigating back would eventually present the last snapshotted page, potentially from many history steps ago. This change fixes this bug by storing information about the last successful last_n snapshot (just like it's already done for downloads requests) and using the offline_id of the previous saved page to delete it upon new navigations. Unit tests were updated to comply with this behavior change and new integration tests were added to enforce the privacy requirements IRT snapshot deletion. BUG=711770 Review-Url: https://codereview.chromium.org/2824623002 Cr-Commit-Position: refs/heads/master@{#465459} Committed: https://chromium.googlesource.com/chromium/src/+/0540bc797b12c1ee7d6f648b1502a8a61dc30b8c

Patch Set 1 #

Total comments: 2

Patch Set 2 : Stop last_n for POST navigations; merge instrumentation tests from another CL. #

Total comments: 7

Patch Set 3 : Annotated method with @MainThread; comment updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -28 lines) Patch
M chrome/android/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java View 1 2 8 chunks +134 lines, -7 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.h View 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.cc View 1 4 chunks +29 lines, -6 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc View 6 chunks +16 lines, -14 lines 0 comments Download

Messages

Total messages: 30 (17 generated)
carlosk
dewittj@: PTAL. dimich@: FYI.
3 years, 8 months ago (2017-04-15 00:14:11 UTC) #4
dewittj
https://codereview.chromium.org/2824623002/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (right): https://codereview.chromium.org/2824623002/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc#newcode216 chrome/browser/android/offline_pages/recent_tab_helper.cc:216: if (last_n_latest_saved_snapshot_info_) { This is an interesting strategy, I ...
3 years, 8 months ago (2017-04-17 21:17:42 UTC) #7
dewittj
On 2017/04/17 21:17:42, dewittj wrote: > (last_n_latest_saved_snapshot_info_) { > This is an interesting strategy, I ...
3 years, 8 months ago (2017-04-18 17:22:30 UTC) #13
carlosk
I just hadn't hit send yet. :) https://codereview.chromium.org/2824623002/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc File chrome/browser/android/offline_pages/recent_tab_helper.cc (right): https://codereview.chromium.org/2824623002/diff/1/chrome/browser/android/offline_pages/recent_tab_helper.cc#newcode216 chrome/browser/android/offline_pages/recent_tab_helper.cc:216: if (last_n_latest_saved_snapshot_info_) ...
3 years, 8 months ago (2017-04-18 17:56:19 UTC) #14
dewittj
lgtm https://codereview.chromium.org/2824623002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java (right): https://codereview.chromium.org/2824623002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java#newcode187 chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java:187: * requirement for last_n. On 2017/04/18 17:56:19, carlosk ...
3 years, 8 months ago (2017-04-18 18:09:16 UTC) #15
carlosk
Thanks. https://codereview.chromium.org/2824623002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java (right): https://codereview.chromium.org/2824623002/diff/20001/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java#newcode187 chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/RecentTabsTest.java:187: * requirement for last_n. On 2017/04/18 18:09:16, dewittj ...
3 years, 8 months ago (2017-04-18 22:13:27 UTC) #16
carlosk
agrieve@: PTAL at BUILD.gn.
3 years, 8 months ago (2017-04-18 22:15:27 UTC) #21
agrieve
On 2017/04/18 22:15:27, carlosk wrote: > agrieve@: PTAL at BUILD.gn. BUILD lgtm
3 years, 8 months ago (2017-04-19 00:21:57 UTC) #22
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/2824623002/40001
3 years, 8 months ago (2017-04-19 00:24:04 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/0540bc797b12c1ee7d6f648b1502a8a61dc30b8c
3 years, 8 months ago (2017-04-19 01:31:49 UTC) #27
aboxhall
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2825973002/ by aboxhall@chromium.org. ...
3 years, 8 months ago (2017-04-19 05:40:01 UTC) #28
lijeffrey
On 2017/04/19 05:40:01, aboxhall wrote: > A revert of this CL (patchset #3 id:40001) has ...
3 years, 8 months ago (2017-04-19 18:36:08 UTC) #29
carlosk
3 years, 8 months ago (2017-04-21 02:12:37 UTC) #30
Message was sent while issue was closed.
On 2017/04/19 18:36:08, lijeffrey wrote:
> On 2017/04/19 05:40:01, aboxhall wrote:
> > A revert of this CL (patchset #3 id:40001) has been created in
> > https://codereview.chromium.org/2825973002/ by mailto:aboxhall@chromium.org.
> > 
> > The reason for reverting is: This test has been crashing:
> >
>
https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Test...
> >
>
https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Test...
> > .
> 
> Findit's analysis suggest this the newly-added test is flaky according to
>
https://findit-for-me.appspot.com/waterfall/flake?key=ag9zfmZpbmRpdC1mb3ItbWV...
> 
> Can someone please help confirm?
> 
> Thanks,
> Jeff on behalf of Findit team

I being to think my tests are not the actual culprit of this flakyness. The logs
shown what seems to me to be an unrelated DCHECK causing the crashes that I
can't repro locally. There is an open issue on it: https://crbug.com/592961
(restricted view).

Powered by Google App Engine
This is Rietveld 408576698