Chromium Code Reviews| Index: chrome/browser/predictors/resource_prefetch_predictor.h |
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h |
| index 969cfb8e0bee26ed363047e4eb18bcf3435d2b31..3ef941334aa99e1ca59deb1337741c8db1c49e11 100644 |
| --- a/chrome/browser/predictors/resource_prefetch_predictor.h |
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.h |
| @@ -103,7 +103,6 @@ class ResourcePrefetchPredictor |
| ResourcePrefetchPredictor(const ResourcePrefetchPredictorConfig& config, |
| Profile* profile); |
| ~ResourcePrefetchPredictor() override; |
| - |
|
pasko
2016/10/04 12:19:47
nit: this empty line was nicely separating the com
Benoit L
2016/10/05 08:36:22
Done.
|
| // Thread safe. |
| static bool ShouldRecordRequest(net::URLRequest* request, |
| content::ResourceType resource_type); |
| @@ -240,24 +239,23 @@ class ResourcePrefetchPredictor |
| // this point are the only ones considered for prefetching. |
| void OnNavigationComplete(const NavigationID& nav_id_without_timing_info); |
| - // Returns true if there is PrefetchData that can be used for the |
| - // navigation and fills in the |prefetch_data| to resources that need to be |
| - // prefetched. |
| - bool GetPrefetchData(const NavigationID& navigation_id, |
| - std::vector<GURL>* urls, |
| - PrefetchKeyType* key_type); |
| + // Returns true if there is PrefetchData that can be used for a URL and fills |
| + // in the |prefetch_data| to resources that need to be prefetched. |
|
gone
2016/10/04 17:49:16
|prefetch_data| is no longer a variable here.
Benoit L
2016/10/05 08:36:22
Done.
|
| + bool GetPrefetchData(const GURL& main_frame_url, std::vector<GURL>* urls); |
| // Converts a PrefetchData into a list of URLs. |
| void PopulatePrefetcherRequest(const PrefetchData& data, |
| std::vector<GURL>* urls); |
| + public: |
| // Starts prefetching if it is enabled and prefetching data exists for the |
| // NavigationID either at the URL or at the host level. |
| - void StartPrefetching(const NavigationID& navigation_id); |
| + void StartPrefetching(const GURL& main_frame_url); |
| // Stops prefetching that may be in progress corresponding to |navigation_id|. |
| - void StopPrefetching(const NavigationID& navigation_id); |
| + void StopPrefetching(const GURL& main_frame_url); |
| + private: |
| // Starts initialization by posting a task to the DB thread to read the |
| // predictor database. |
| void StartInitialization(); |