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

Issue 2561163002: Fix snapshots from Downloads being deleted by last_n. (Closed)

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

Description

Fix snapshots from Downloads being deleted by last_n. Partially reverts the change that fixed good snapshots being deleted by failed ones in the context of last_n (https://codereview.chromium.org/2542833003/) because it created a new bug were pages offline-d through Downloas were being incorrectly erased (https://crbug.com/671955). The reverted fix will be solved again later using a different approach. The reason to make this revert only partial is to keep the test improvements made which are still useful and valid. One test that had to be disabled because of the fix being removed. A new test was also added to confirm the incorrect snapshot deletion issue and avoid future occurrences. BUG=655697, 671955 Committed: https://crrev.com/3d768b7fc9d17d2df1f6d6d2d46758944e3bf09a Cr-Commit-Position: refs/heads/master@{#438314}

Patch Set 1 #

Patch Set 2 : Reverted only the runtime code; kept test improvements; added new test for new bug. #

Patch Set 3 : Added missing test comments. #

Patch Set 4 : Disabled RequestCoordinator factory to fix SQL errors #

Total comments: 16

Patch Set 5 : RequestCoordinatorFactory is disabled by reusing existing mocking code (and a bit more). #

Total comments: 3

Patch Set 6 : Minor test simplification. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -47 lines) Patch
M chrome/browser/android/offline_pages/recent_tab_helper.h View 1 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper.cc View 1 4 chunks +1 line, -35 lines 0 comments Download
M chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc View 1 2 3 4 5 8 chunks +77 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 39 (22 generated)
carlosk
Created Revert of Failed offline snapshots won't erase a successful one from the same page ...
4 years ago (2016-12-08 19:19:27 UTC) #2
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/2561163002/1
4 years ago (2016-12-08 19:20:00 UTC) #3
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/320087) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-08 19:24:16 UTC) #5
dewittj
carlosk: looks like this never landed?
4 years ago (2016-12-09 22:32:47 UTC) #7
carlosk
On 2016/12/09 22:32:47, dewittj wrote: > carlosk: looks like this never landed? Yes, I am ...
4 years ago (2016-12-09 22:47:11 UTC) #8
carlosk
I converted this revert to be more of a regular patch. And that's why one ...
4 years ago (2016-12-13 00:19:38 UTC) #14
carlosk
I added a new patch because I forgot to add some comments in the test ...
4 years ago (2016-12-13 00:40:32 UTC) #15
Dmitry Titov
I think it fails because the ObserveAndDownloadCurrentPage creates an instance of RequestCoordinator and that one ...
4 years ago (2016-12-13 01:11:19 UTC) #16
carlosk
That was the problem indeed. Fixed in the latest patchset.
4 years ago (2016-12-13 02:07:25 UTC) #18
fgorski
https://codereview.chromium.org/2561163002/diff/150001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc File chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc (right): https://codereview.chromium.org/2561163002/diff/150001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc#newcode201 chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc:201: ChromeRenderViewHostTestHarness::TearDown(); per my other comment you don't need this ...
4 years ago (2016-12-13 17:17:38 UTC) #23
carlosk
Thanks! https://codereview.chromium.org/2561163002/diff/150001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc File chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc (right): https://codereview.chromium.org/2561163002/diff/150001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc#newcode201 chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc:201: ChromeRenderViewHostTestHarness::TearDown(); On 2016/12/13 17:17:38, fgorski wrote: > per ...
4 years ago (2016-12-13 20:04:20 UTC) #26
Dmitry Titov
lgtm
4 years ago (2016-12-13 21:16:07 UTC) #29
fgorski
lgtm with one more change suggestion. https://codereview.chromium.org/2561163002/diff/170001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc File chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc (right): https://codereview.chromium.org/2561163002/diff/170001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc#newcode478 chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc:478: ASSERT_NE(second_offline_id, first_offline_id); Since ...
4 years ago (2016-12-13 21:24:17 UTC) #30
carlosk
https://codereview.chromium.org/2561163002/diff/170001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc File chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc (right): https://codereview.chromium.org/2561163002/diff/170001/chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc#newcode478 chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc:478: ASSERT_NE(second_offline_id, first_offline_id); On 2016/12/13 21:24:17, fgorski wrote: > Since ...
4 years ago (2016-12-13 21:51:05 UTC) #31
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/2561163002/190001
4 years ago (2016-12-13 21:51:43 UTC) #34
commit-bot: I haz the power
Committed patchset #6 (id:190001)
4 years ago (2016-12-13 22:30:40 UTC) #37
commit-bot: I haz the power
4 years ago (2016-12-13 22:32:15 UTC) #39
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3d768b7fc9d17d2df1f6d6d2d46758944e3bf09a
Cr-Commit-Position: refs/heads/master@{#438314}

Powered by Google App Engine
This is Rietveld 408576698