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

Unified Diff: chrome/browser/predictors/resource_prefetcher_manager.h

Issue 2365613002: predictors: Refactor the prefetcher in resource_prefetch_predictor. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/predictors/resource_prefetcher_manager.h
diff --git a/chrome/browser/predictors/resource_prefetcher_manager.h b/chrome/browser/predictors/resource_prefetcher_manager.h
index d706df37e0fb878dd1d19f9c6157c41224839c10..6b21feed48a6dd73906efb74bfc8037a55c993a5 100644
--- a/chrome/browser/predictors/resource_prefetcher_manager.h
+++ b/chrome/browser/predictors/resource_prefetcher_manager.h
@@ -46,19 +46,16 @@ class ResourcePrefetcherManager
// Will create a new ResourcePrefetcher for the main frame url of the input
// navigation if there isn't one already for the same URL or host (for host
// based).
- void MaybeAddPrefetch(
- const NavigationID& navigation_id,
- PrefetchKeyType key_type,
- std::unique_ptr<ResourcePrefetcher::RequestVector> requests);
+ void MaybeAddPrefetch(const NavigationID& navigation_id,
+ PrefetchKeyType key_type,
+ const std::vector<GURL>& urls);
// Stops the ResourcePrefetcher for the input navigation, if one was in
// progress.
void MaybeRemovePrefetch(const NavigationID& navigation_id);
// ResourcePrefetcher::Delegate methods.
- void ResourcePrefetcherFinished(
- ResourcePrefetcher* prefetcher,
- ResourcePrefetcher::RequestVector* requests) override;
+ void ResourcePrefetcherFinished(ResourcePrefetcher* prefetcher) override;
net::URLRequestContext* GetURLRequestContext() override;
private:
@@ -69,12 +66,6 @@ class ResourcePrefetcherManager
~ResourcePrefetcherManager() override;
- // UI Thread. |predictor_| needs to be called on the UI thread.
- void ResourcePrefetcherFinishedOnUI(
- const NavigationID& navigation_id,
- PrefetchKeyType key_type,
- std::unique_ptr<ResourcePrefetcher::RequestVector> requests);
-
ResourcePrefetchPredictor* predictor_;
const ResourcePrefetchPredictorConfig config_;
net::URLRequestContextGetter* const context_getter_;

Powered by Google App Engine
This is Rietveld 408576698