predictors: Preconnect to a main frame

Desktop / Chromium - Alexandr Ilin [chromium.org] - 12 October 2017 10:30 EDT

This CL adds two new things:
- Puts a main frame origin on top of a preconnect list. It's done inside of SortOrigins() function.
- Adds a URL passed in PrepareForPageLoad function to a preconnect list if it is not on top of the list already. It may happen in two cases:
- The preconnect list is empty, i.e. the database doesn't have data for the current host.
- The predictor thinks that a navigation will be redirected to a different host.

Bug: 699080 Change-Id: Iabebe0fb31b2dbfdc5b67f9c973e10909905bcca Reviewed-on: https://chromium-review.googlesource.com/712934 Commit-Queue: Alexandr Ilin

8833d9a predictors: Preconnect to a main frame
.../browser/predictors/loading_data_collector.cc | 11 ++-
.../predictors/loading_data_collector_unittest.cc | 8 +-
chrome/browser/predictors/loading_predictor.cc | 24 ++++++
.../predictors/loading_predictor_unittest.cc | 85 ++++++++++++++++++++--
.../predictors/loading_stats_collector_unittest.cc | 14 ++--
chrome/browser/predictors/loading_test_util.cc | 1 +
.../predictors/resource_prefetch_predictor.cc | 7 +-
.../predictors/resource_prefetch_predictor.h | 3 +-
.../resource_prefetch_predictor_tables.cc | 16 +++-
.../resource_prefetch_predictor_tables.h | 6 +-
.../resource_prefetch_predictor_unittest.cc | 24 ++++--
11 files changed, 164 insertions(+), 35 deletions(-)

Upstream: git.chromium.org


  • Share