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

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

Issue 2800783002: predictors: Several improvements for redirects database. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 7059ff2b1ccd461c11aaccb172fe02ad2d598cb5..242de6bca0d790734c4f5dc94ab5951d09c202bf 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -318,12 +318,6 @@ class ResourcePrefetchPredictor
// Returns true if the request (should have a response in it) is "no-store".
static bool IsNoStore(const net::URLRequest& request);
- // Returns true iff |redirect_data_map| contains confident redirect endpoint
- // for |entry_point| and assigns it to the |redirect_endpoint|.
- static bool GetRedirectEndpoint(const std::string& entry_point,
- const RedirectDataMap& redirect_data_map,
- std::string* redirect_endpoint);
-
static void SetAllowPortInUrlsForTesting(bool state);
// KeyedService methods override.
@@ -342,6 +336,16 @@ class ResourcePrefetchPredictor
// this point are the only ones considered for prefetching.
void OnNavigationComplete(const NavigationID& nav_id_without_timing_info);
+ // Returns true iff one of the following conditions is true
+ // * |redirect_data_map| contains confident redirect endpoint for
+ // |entry_point| and assigns it to the |redirect_endpoint|
+ //
+ // * |redirect_data_map| doens't contain an entry for |entry_point| and
+ // assings |entry_point| to the |redirect_endpoint|.
+ bool GetRedirectEndpoint(const std::string& entry_point,
+ const RedirectDataMap& redirect_data_map,
+ std::string* redirect_endpoint) const;
+
// Returns true iff there is PrefetchData that can be used for a
// |main_frame_url| and fills |prediction| with resources that need to be
// prefetched. |prediction| pointer may be equal nullptr to get return value
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_common.cc ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698