| 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 ab2e70b3b1a833ff3fe4fbe4b9b29e94c95e112e..5bfc2bc4d502b698076f17c5160745a061895500 100644
|
| --- a/chrome/browser/predictors/resource_prefetch_predictor.h
|
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.h
|
| @@ -172,6 +172,9 @@ class ResourcePrefetchPredictor
|
| // in flight.
|
| void OnPrefetchingFinished(const GURL& main_frame_url);
|
|
|
| + // Returns true if prefetching data exists for the |main_frame_url|.
|
| + virtual bool IsUrlPrefetchable(const GURL& main_frame_url);
|
| +
|
| // Sets the |observer| to be notified when the resource prefetch predictor
|
| // data changes. Previously registered observer will be discarded. Call
|
| // this with nullptr parameter to de-register observer.
|
| @@ -257,15 +260,16 @@ class ResourcePrefetchPredictor
|
|
|
| // Returns true iff there is PrefetchData that can be used for a
|
| // |main_frame_url| and fills |urls| with resources that need to be
|
| - // prefetched.
|
| - bool GetPrefetchData(const GURL& main_frame_url, std::vector<GURL>* urls);
|
| + // prefetched. |urls| pointer may be equal nullptr to get return value only.
|
| + bool GetPrefetchData(const GURL& main_frame_url,
|
| + std::vector<GURL>* urls) const;
|
|
|
| // Returns true iff the |data_map| contains PrefetchData that can be used
|
| // for a |main_frame_key| and fills |urls| with resources that need to be
|
| - // prefetched.
|
| + // prefetched. |urls| pointer may be equal nullptr to get return value only.
|
| bool PopulatePrefetcherRequest(const std::string& main_frame_key,
|
| const PrefetchDataMap& data_map,
|
| - std::vector<GURL>* urls);
|
| + std::vector<GURL>* urls) const;
|
|
|
| // Callback for task to read predictor database. Takes ownership of
|
| // all arguments.
|
| @@ -320,11 +324,6 @@ class ResourcePrefetchPredictor
|
| size_t max_redirect_map_size,
|
| RedirectDataMap* redirect_map);
|
|
|
| - // Returns true iff the |data_map| contains PrefetchData that can be used
|
| - // for |main_frame_key| prefetching.
|
| - bool IsDataPrefetchable(const std::string& main_frame_key,
|
| - const PrefetchDataMap& data_map) const;
|
| -
|
| // Returns true iff |resource| has sufficient confidence level and required
|
| // number of hits.
|
| bool IsResourcePrefetchable(const ResourceData& resource) const;
|
|
|