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

Issue 2614473002: [NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE (Closed)

Created:
3 years, 11 months ago by droger
Modified:
3 years, 11 months ago
Reviewers:
pasko, mattcary
CC:
chromium-reviews, tburkard+watch_chromium.org, gavinp+prer_chromium.org, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NoStatePrefetch] Cancel repeated prefetches with FINAL_STATUS_DUPLICATE As opposed to a full prerender, a prefetch could be repeated relatively soon. This CL prevent this by detecting repeated prefetches and cancelling them with FINAL_STATUS_DUPLICATE. The threshold used is net::HttpCache::kPrefetchReuseMins (5 minutes), which should roughly match what is happening for full prerenders. Committed: https://crrev.com/fc6a827302dc5a72dddedaab32fe6e48e6a58dfe Cr-Commit-Position: refs/heads/master@{#441397}

Patch Set 1 #

Patch Set 2 : handle null prefetch age #

Patch Set 3 : add unittest #

Patch Set 4 : more comments #

Total comments: 3

Patch Set 5 : fix origin bug #

Patch Set 6 : Update test to use kPrefetchReuseMins #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -7 lines) Patch
M chrome/browser/prerender/prerender_manager.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 chunks +22 lines, -7 lines 0 comments Download
M chrome/browser/prerender/prerender_unittest.cc View 1 2 3 4 5 2 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (27 generated)
droger
3 years, 11 months ago (2017-01-04 14:09:03 UTC) #13
droger
It may also make sense to use net::HttpCache::kPrefetchReuseMins instead of time_to_live. That would mean that ...
3 years, 11 months ago (2017-01-04 14:17:40 UTC) #15
mattcary
On 2017/01/04 14:17:40, droger wrote: > It may also make sense to use net::HttpCache::kPrefetchReuseMins instead ...
3 years, 11 months ago (2017-01-04 14:22:29 UTC) #16
mattcary
lgtm
3 years, 11 months ago (2017-01-04 14:22:34 UTC) #17
pasko
overall looks good https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerender/prerender_manager.cc#newcode946 chrome/browser/prerender/prerender_manager.cc:946: Origin origin; overriding |origin| in this ...
3 years, 11 months ago (2017-01-04 15:00:46 UTC) #18
droger
Thanks. Fixed the bug and used net::HttpCache::kPrefetchReuseMins. Please take a look. https://codereview.chromium.org/2614473002/diff/80001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): ...
3 years, 11 months ago (2017-01-04 15:14:48 UTC) #21
pasko
lgtm, thank you!
3 years, 11 months ago (2017-01-04 15:51:59 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/2614473002/100001
3 years, 11 months ago (2017-01-04 16:03:01 UTC) #29
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/2614473002/120001
3 years, 11 months ago (2017-01-04 16:09:35 UTC) #33
commit-bot: I haz the power
Committed patchset #6 (id:120001)
3 years, 11 months ago (2017-01-04 16:51:30 UTC) #36
commit-bot: I haz the power
3 years, 11 months ago (2017-01-04 16:53:43 UTC) #38
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/fc6a827302dc5a72dddedaab32fe6e48e6a58dfe
Cr-Commit-Position: refs/heads/master@{#441397}

Powered by Google App Engine
This is Rietveld 408576698