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

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

Issue 2377643002: predictors: Make the resource_prefetch_predictor accessible from Java. (Closed)
Patch Set: Address comments. Created 4 years, 2 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_prefetch_predictor.h
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h
index 969cfb8e0bee26ed363047e4eb18bcf3435d2b31..0dae5a31a1fbd69fd3b99fc0525e15e22b1b73e2 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -240,24 +240,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
+ // |urls| with resources that need to be prefetched.
+ 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();
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698