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

Issue 2887133003: predictors: Refactor resource_prefetch_predictor triggering. (Closed)

Created:
3 years, 7 months ago by Benoit L
Modified:
3 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, speed-metrics-reviews_chromium.org, Randy Smith (Not in Mondays), loading-reviews+metrics_chromium.org, net-reviews_chromium.org, csharrison+watch_chromium.org, loading-reviews_chromium.org, mmenke
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

predictors: Refactor resource_prefetch_predictor triggering. Triggering and policy move to LoadingPredictor, instead of being in ResourcePrefetchPredictor. As a consequence, rename ResourcePrefetchPredictorObserver. BUG=715525 Review-Url: https://codereview.chromium.org/2887133003 Cr-Commit-Position: refs/heads/master@{#476313} Committed: https://chromium.googlesource.com/chromium/src/+/46c85c0e2c60c88ed671ea707bebd3d35bc4f28b

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Add tests. #

Patch Set 4 : . #

Patch Set 5 : . #

Total comments: 20

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Total comments: 40

Patch Set 9 : Address comments. #

Patch Set 10 : . #

Patch Set 11 : Rebase. #

Total comments: 7

Patch Set 12 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+529 lines, -547 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc View 1 2 4 chunks +7 lines, -7 lines 0 comments Download
A + chrome/browser/net/loading_predictor_observer.h View 3 chunks +11 lines, -11 lines 0 comments Download
A + chrome/browser/net/loading_predictor_observer.cc View 1 2 3 4 5 6 7 8 9 12 chunks +34 lines, -33 lines 0 comments Download
D chrome/browser/net/resource_prefetch_predictor_observer.h View 1 chunk +0 lines, -82 lines 0 comments Download
D chrome/browser/net/resource_prefetch_predictor_observer.cc View 1 chunk +0 lines, -237 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/resource_prefetch_predictor_page_load_metrics_observer_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/predictors/loading_predictor.h View 1 2 3 4 5 6 7 8 3 chunks +45 lines, -0 lines 0 comments Download
M chrome/browser/predictors/loading_predictor.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +102 lines, -6 lines 0 comments Download
A chrome/browser/predictors/loading_predictor_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +219 lines, -0 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +15 lines, -10 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +42 lines, -91 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_test_util.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_test_util.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_predictor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 12 chunks +17 lines, -51 lines 0 comments Download
M chrome/browser/predictors/resource_prefetcher_manager.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 4 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 54 (39 generated)
Benoit L
3 years, 7 months ago (2017-05-23 09:14:21 UTC) #16
alexilin
Thanks! I have a couple of comments. https://codereview.chromium.org/2887133003/diff/80001/chrome/browser/net/loading_predictor_observer.h File chrome/browser/net/loading_predictor_observer.h (right): https://codereview.chromium.org/2887133003/diff/80001/chrome/browser/net/loading_predictor_observer.h#newcode34 chrome/browser/net/loading_predictor_observer.h:34: explicit LoadingPredictorObserver(predictors::LoadingPredictor* ...
3 years, 7 months ago (2017-05-23 11:01:39 UTC) #19
Benoit L
Thanks! I moved more of the triggering logic out of ResourcePrefetchPredictor. More will follow, to ...
3 years, 6 months ago (2017-05-29 16:45:14 UTC) #26
alexilin
https://codereview.chromium.org/2887133003/diff/80001/chrome/browser/predictors/resource_prefetch_predictor.cc File chrome/browser/predictors/resource_prefetch_predictor.cc (right): https://codereview.chromium.org/2887133003/diff/80001/chrome/browser/predictors/resource_prefetch_predictor.cc#newcode732 chrome/browser/predictors/resource_prefetch_predictor.cc:732: StopPrefetching(nav_it->second->initial_url); On 2017/05/29 16:45:14, Benoit L wrote: > On ...
3 years, 6 months ago (2017-05-30 11:55:27 UTC) #29
alexilin
Discussed offline: LoadingPredictor has to know about current navigations for various reasons. For example, it ...
3 years, 6 months ago (2017-05-30 15:06:00 UTC) #30
alexilin
Discussed offline the second time: We want to give LoadingPredictor a power to decide when ...
3 years, 6 months ago (2017-05-30 16:19:15 UTC) #31
Benoit L
Thanks! All done. https://codereview.chromium.org/2887133003/diff/140001/chrome/browser/net/loading_predictor_observer.cc File chrome/browser/net/loading_predictor_observer.cc (right): https://codereview.chromium.org/2887133003/diff/140001/chrome/browser/net/loading_predictor_observer.cc#newcode203 chrome/browser/net/loading_predictor_observer.cc:203: predictor_->OnMainFrameRequest(*summary); On 2017/05/30 16:19:14, alexilin wrote: ...
3 years, 6 months ago (2017-05-31 14:34:42 UTC) #34
alexilin
lgtm, thank you! Just a few comments and nits. https://codereview.chromium.org/2887133003/diff/140001/chrome/browser/predictors/loading_predictor.cc File chrome/browser/predictors/loading_predictor.cc (right): https://codereview.chromium.org/2887133003/diff/140001/chrome/browser/predictors/loading_predictor.cc#newcode69 chrome/browser/predictors/loading_predictor.cc:69: ...
3 years, 6 months ago (2017-05-31 16:02:04 UTC) #35
Benoit L
jkarlin@: Please review changes in chrome/browser/net and chrome/browser/page_load_metrics, thanks! It's mostly a rename in these ...
3 years, 6 months ago (2017-06-01 08:32:50 UTC) #41
jkarlin
chrome/browser/net and chrome/browser/page_load_metrics lgtm
3 years, 6 months ago (2017-06-01 12:16:39 UTC) #44
Benoit L
+msarda: PTAL chrome/browser/profiles +csharrison: PTAL chrome/browser/loader Thanks!
3 years, 6 months ago (2017-06-01 12:29:27 UTC) #46
Charlie Harrison
c/b/l lgtm
3 years, 6 months ago (2017-06-01 12:38:41 UTC) #47
msarda
chrome/browser/profiles/* LGTM.
3 years, 6 months ago (2017-06-01 15:55:54 UTC) #48
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/2887133003/220001
3 years, 6 months ago (2017-06-01 15:59:07 UTC) #51
commit-bot: I haz the power
3 years, 6 months ago (2017-06-01 16:02:49 UTC) #54
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/46c85c0e2c60c88ed671ea707beb...

Powered by Google App Engine
This is Rietveld 408576698