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

Issue 2300703004: Fix precache issue with cancel and resume (Closed)

Created:
4 years, 3 months ago by Raj
Modified:
4 years, 3 months ago
Reviewers:
sclittle
CC:
chromium-reviews, wifiprefetch-reviews_google.com
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix precache issue with cancel and resume If precache cancel happens when all manifests are fetched (top_hosts_to_fetch_ is empty), CancelPrecaching() saves all the top hosts in unfinished work. In this case, unfinished work should not have top host. Also deletes the non-precached URLs in ClearAllForReferrerHost(). BUG=626463 Committed: https://crrev.com/c8f32980dd74319abb0aafb87cdaac4b5297df56 Cr-Commit-Position: refs/heads/master@{#420445}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added unittests #

Total comments: 6

Patch Set 3 : Addressed sclittle comments #

Total comments: 4

Patch Set 4 : Addressed sclittle comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -13 lines) Patch
M components/precache/core/precache_database_unittest.cc View 1 2 5 chunks +27 lines, -8 lines 0 comments Download
M components/precache/core/precache_fetcher.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M components/precache/core/precache_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/precache/core/precache_fetcher_unittest.cc View 1 2 3 1 chunk +97 lines, -0 lines 0 comments Download
M components/precache/core/precache_url_table.cc View 1 chunk +12 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
Raj
4 years, 3 months ago (2016-09-01 21:22:36 UTC) #2
sclittle
https://codereview.chromium.org/2300703004/diff/1/components/precache/core/precache_fetcher.cc File components/precache/core/precache_fetcher.cc (right): https://codereview.chromium.org/2300703004/diff/1/components/precache/core/precache_fetcher.cc#newcode412 components/precache/core/precache_fetcher.cc:412: if (unfinished_work_->has_config_settings()) { Could you add a test for ...
4 years, 3 months ago (2016-09-02 18:47:56 UTC) #3
Raj
4 years, 3 months ago (2016-09-11 18:28:53 UTC) #4
sclittle
https://codereview.chromium.org/2300703004/diff/20001/components/precache/core/precache_database_unittest.cc File components/precache/core/precache_database_unittest.cc (right): https://codereview.chromium.org/2300703004/diff/20001/components/precache/core/precache_database_unittest.cc#newcode630 components/precache/core/precache_database_unittest.cc:630: expected_url_table_map[GURL(resource.url)] = base::Time(); I'm not sure I understand. Everything ...
4 years, 3 months ago (2016-09-14 21:46:03 UTC) #5
Raj
https://codereview.chromium.org/2300703004/diff/1/components/precache/core/precache_fetcher.cc File components/precache/core/precache_fetcher.cc (right): https://codereview.chromium.org/2300703004/diff/1/components/precache/core/precache_fetcher.cc#newcode412 components/precache/core/precache_fetcher.cc:412: if (unfinished_work_->has_config_settings()) { On 2016/09/02 18:47:56, sclittle wrote: > ...
4 years, 3 months ago (2016-09-15 17:02:25 UTC) #6
sclittle
https://codereview.chromium.org/2300703004/diff/40001/components/precache/core/precache_fetcher_unittest.cc File components/precache/core/precache_fetcher_unittest.cc (right): https://codereview.chromium.org/2300703004/diff/40001/components/precache/core/precache_fetcher_unittest.cc#newcode387 components/precache/core/precache_fetcher_unittest.cc:387: PrecacheUnfinishedWork** cancelled_work) { nit: could this be a pointer ...
4 years, 3 months ago (2016-09-21 20:27:49 UTC) #7
Raj
https://codereview.chromium.org/2300703004/diff/40001/components/precache/core/precache_fetcher_unittest.cc File components/precache/core/precache_fetcher_unittest.cc (right): https://codereview.chromium.org/2300703004/diff/40001/components/precache/core/precache_fetcher_unittest.cc#newcode387 components/precache/core/precache_fetcher_unittest.cc:387: PrecacheUnfinishedWork** cancelled_work) { On 2016/09/21 20:27:49, sclittle wrote: > ...
4 years, 3 months ago (2016-09-21 21:22:38 UTC) #8
sclittle
lgtm
4 years, 3 months ago (2016-09-22 19:49:51 UTC) #9
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/2300703004/60001
4 years, 3 months ago (2016-09-22 19:56:25 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-22 20:37:22 UTC) #12
commit-bot: I haz the power
4 years, 3 months ago (2016-09-22 20:40:26 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c8f32980dd74319abb0aafb87cdaac4b5297df56
Cr-Commit-Position: refs/heads/master@{#420445}

Powered by Google App Engine
This is Rietveld 408576698