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

Issue 2355273002: Redirect handling in the resource_prefetch_predictor. (Closed)

Created:
4 years, 3 months ago by alexilin
Modified:
4 years, 2 months ago
CC:
chromium-reviews, shishir+watch_chromium.org, asvitkine+watch_chromium.org, eugenis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Redirect handling in the resource_prefetch_predictor. Collect and save information about enpoints in redirect chains that prefetch predictor can start to prefetch subresources before it reaches last redirect hop. Information about redirects is stored in the database keyed by url (or host) of first hop in redirect chain. One row (RedirectData proto message) contains collection of all previously seen urls (or hosts) appearing as endpoints of redirect chain (RedirectStat proto message). This CL depends on https://codereview.chromium.org/2357593002 BUG=631966 Committed: https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46 Cr-Commit-Position: refs/heads/master@{#421520}

Patch Set 1 #

Patch Set 2 : Fix tests + bug in database #

Patch Set 3 : Minor changes #

Total comments: 50

Patch Set 4 : rebase and nits #

Total comments: 1

Patch Set 5 : Reusable DeleteDataHelper #

Total comments: 20

Patch Set 6 : Minor changes. #

Total comments: 21

Patch Set 7 : More nits. #

Total comments: 7

Patch Set 8 : Renaming refactoring. #

Patch Set 9 : Revert table names, delete sensitive data, refactor. #

Total comments: 33

Patch Set 10 : Comments and enums (and rebase). #

Total comments: 4

Patch Set 11 : Very tiny nit. #

Patch Set 12 : Rebase. #

Patch Set 13 : Rename TableOperationType::DELETE because of win macro. #

Patch Set 14 : Fix compilation complaints. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1413 lines, -392 lines) Patch
M chrome/browser/predictors/resource_prefetch_predictor.h View 1 2 3 4 5 6 7 8 9 7 chunks +74 lines, -11 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 19 chunks +244 lines, -104 lines 1 comment Download
M chrome/browser/predictors/resource_prefetch_predictor.proto View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_tables.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +71 lines, -32 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_tables.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 20 chunks +259 lines, -103 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_tables_unittest.cc View 1 2 3 4 5 6 7 8 9 14 chunks +274 lines, -31 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_test_util.h View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -2 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_test_util.cc View 1 2 3 4 5 6 7 8 3 chunks +63 lines, -11 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_unittest.cc View 1 2 3 4 5 6 7 8 23 chunks +393 lines, -96 lines 0 comments Download

Messages

Total messages: 50 (23 generated)
alexilin
Hi guys, Please take a look at this CL. It is more or less similar ...
4 years, 3 months ago (2016-09-22 13:17:30 UTC) #3
pasko
Overall looks quite reasonable! Suggestions about headers, proto, histograms. I haven't looked at the implementation, ...
4 years, 3 months ago (2016-09-22 14:27:09 UTC) #4
alexilin
https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc File chrome/browser/predictors/resource_prefetch_predictor.cc (right): https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc#newcode491 chrome/browser/predictors/resource_prefetch_predictor.cc:491: navigation.reset(new Navigation(response.navigation_id.main_frame_url)); On 2016/09/22 14:27:09, pasko wrote: > why ...
4 years, 3 months ago (2016-09-22 16:48:19 UTC) #5
alexilin
https://codereview.chromium.org/2355273002/diff/60001/chrome/browser/predictors/resource_prefetch_predictor_tables.h File chrome/browser/predictors/resource_prefetch_predictor_tables.h (right): https://codereview.chromium.org/2355273002/diff/60001/chrome/browser/predictors/resource_prefetch_predictor_tables.h#newcode32 chrome/browser/predictors/resource_prefetch_predictor_tables.h:32: using chrome_browser_predictors::RedirectData::RedirectStat; Woops, it won't be compiled
4 years, 3 months ago (2016-09-23 15:29:15 UTC) #6
Benoit L
Hi, sorry about the delay. Here is a first batch of (old) comments, based on ...
4 years, 2 months ago (2016-09-26 11:18:36 UTC) #7
alexilin
Hi Benoit, Here is answers on your previous comments. https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc File chrome/browser/predictors/resource_prefetch_predictor.cc (right): https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc#newcode489 chrome/browser/predictors/resource_prefetch_predictor.cc:489: ...
4 years, 2 months ago (2016-09-26 12:14:54 UTC) #8
pasko
just respoding to responses to decide on naming earlier, I may send a few more ...
4 years, 2 months ago (2016-09-26 12:28:15 UTC) #9
Benoit L
A few more comments, I haven't looked at the tests yet. Looks fine overall, even ...
4 years, 2 months ago (2016-09-26 12:51:15 UTC) #10
pasko
https://codereview.chromium.org/2355273002/diff/80001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc File chrome/browser/predictors/resource_prefetch_predictor_tables.cc (right): https://codereview.chromium.org/2355273002/diff/80001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc#newcode440 chrome/browser/predictors/resource_prefetch_predictor_tables.cc:440: ? GetHostRedirectUpdateStatement() On 2016/09/26 12:51:14, Benoit L wrote: > ...
4 years, 2 months ago (2016-09-26 14:18:24 UTC) #11
alexilin
Hi guys, I've fixed some nits and non-nits, but that's not all. Anyway, I'd like ...
4 years, 2 months ago (2016-09-26 15:38:29 UTC) #12
pasko
some responses to some of your answers :) https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc File chrome/browser/predictors/resource_prefetch_predictor.cc (right): https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc#newcode491 chrome/browser/predictors/resource_prefetch_predictor.cc:491: navigation.reset(new ...
4 years, 2 months ago (2016-09-26 15:58:22 UTC) #13
pasko
https://codereview.chromium.org/2355273002/diff/80001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc File chrome/browser/predictors/resource_prefetch_predictor_tables.cc (right): https://codereview.chromium.org/2355273002/diff/80001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc#newcode440 chrome/browser/predictors/resource_prefetch_predictor_tables.cc:440: ? GetHostRedirectUpdateStatement() On 2016/09/26 15:38:28, alexilin wrote: > On ...
4 years, 2 months ago (2016-09-26 16:44:06 UTC) #14
Benoit L
Only small comments remaining, I'm happy with the code. Looking at the tests now. https://codereview.chromium.org/2355273002/diff/40001/chrome/browser/predictors/resource_prefetch_predictor.cc ...
4 years, 2 months ago (2016-09-27 09:55:06 UTC) #15
Benoit L
On 2016/09/27 09:55:06, Benoit L wrote: > Only small comments remaining, I'm happy with the ...
4 years, 2 months ago (2016-09-27 14:35:27 UTC) #16
alexilin
Hi Egor, Benoit, Following things were changed: - Made renaming: * Navigation -> PageRequestSummary * ...
4 years, 2 months ago (2016-09-27 14:52:46 UTC) #17
Benoit L
Thanks, a few comments below. https://codereview.chromium.org/2355273002/diff/160001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc File chrome/browser/predictors/resource_prefetch_predictor_tables.cc (right): https://codereview.chromium.org/2355273002/diff/160001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc#newcode663 chrome/browser/predictors/resource_prefetch_predictor_tables.cc:663: default: This is un-necessary. ...
4 years, 2 months ago (2016-09-27 15:19:34 UTC) #18
pasko
Almost there. Quite a few comments in this pass, but most of them require only ...
4 years, 2 months ago (2016-09-27 16:21:27 UTC) #19
alexilin
Hi folks, I answered all the comments, you could check this. Changes in code: - ...
4 years, 2 months ago (2016-09-27 18:11:09 UTC) #20
Benoit L
still lgtm, thank you. https://codereview.chromium.org/2355273002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc File chrome/browser/predictors/resource_prefetch_predictor_tables.cc (right): https://codereview.chromium.org/2355273002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc#newcode240 chrome/browser/predictors/resource_prefetch_predictor_tables.cc:240: if (!hosts.empty()) { nit: no ...
4 years, 2 months ago (2016-09-28 09:19:35 UTC) #21
alexilin
https://codereview.chromium.org/2355273002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc File chrome/browser/predictors/resource_prefetch_predictor_tables.cc (right): https://codereview.chromium.org/2355273002/diff/180001/chrome/browser/predictors/resource_prefetch_predictor_tables.cc#newcode240 chrome/browser/predictors/resource_prefetch_predictor_tables.cc:240: if (!hosts.empty()) { On 2016/09/28 09:19:35, Benoit L wrote: ...
4 years, 2 months ago (2016-09-28 09:30:31 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/2355273002/260001
4 years, 2 months ago (2016-09-28 14:55:38 UTC) #41
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 2 months ago (2016-09-28 15:00:26 UTC) #43
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/43b2f02a9eb2bc50e849d6120caa1de84abcbe46 Cr-Commit-Position: refs/heads/master@{#421520}
4 years, 2 months ago (2016-09-28 15:02:32 UTC) #45
pasko
LGTM https://codereview.chromium.org/2355273002/diff/160001/chrome/browser/predictors/resource_prefetch_predictor.h File chrome/browser/predictors/resource_prefetch_predictor.h (right): https://codereview.chromium.org/2355273002/diff/160001/chrome/browser/predictors/resource_prefetch_predictor.h#newcode178 chrome/browser/predictors/resource_prefetch_predictor.h:178: class GetUrlVisitCountTask : public history::HistoryDBTask { On 2016/09/27 ...
4 years, 2 months ago (2016-09-29 18:08:54 UTC) #46
pasko
https://codereview.chromium.org/2355273002/diff/160001/chrome/browser/predictors/resource_prefetch_predictor.h File chrome/browser/predictors/resource_prefetch_predictor.h (right): https://codereview.chromium.org/2355273002/diff/160001/chrome/browser/predictors/resource_prefetch_predictor.h#newcode178 chrome/browser/predictors/resource_prefetch_predictor.h:178: class GetUrlVisitCountTask : public history::HistoryDBTask { On 2016/09/27 18:11:08, ...
4 years, 2 months ago (2016-09-29 18:25:55 UTC) #47
Reid Kleckner
Many tests in ResourcePrefetchPredictorTest have been failing on the Clang ToT bots since this change ...
4 years, 2 months ago (2016-09-29 22:12:55 UTC) #49
Reid Kleckner
4 years, 2 months ago (2016-09-29 23:42:23 UTC) #50
Message was sent while issue was closed.
https://codereview.chromium.org/2355273002/diff/260001/chrome/browser/predict...
File chrome/browser/predictors/resource_prefetch_predictor.cc (left):

https://codereview.chromium.org/2355273002/diff/260001/chrome/browser/predict...
chrome/browser/predictors/resource_prefetch_predictor.cc:592: PrefetchDataMap*
host_data_ptr = host_data_map.get();
Removing the raw pointer local variables here is what broke the tests. Function
call argument evaluation order is not defined. In particular, it's right-to-left
on Windows at least, and Clang does better copy elision than MSVC, so Clang
evaluates the base::Passed calls below first, and then you end up passing null
pointer in the first bind callback. CL incoming.

Powered by Google App Engine
This is Rietveld 408576698