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

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

Issue 2896713003: Create LoadingDataCollector class and have observers rely on it instead of ResourcePrefetchPredictor (Closed)
Patch Set: Move some logic into new class. Created 3 years, 7 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 2cd3c950895ace6aabeb4aa0cf8d2067fa9263e0..327482d9bc918b13ccaea2ee4708a5d1618a1867 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -204,12 +204,6 @@ class ResourcePrefetchPredictor
void StartInitialization();
void Shutdown();
- // Thread safe.
- static bool ShouldRecordRequest(net::URLRequest* request,
- content::ResourceType resource_type);
- static bool ShouldRecordResponse(net::URLRequest* response);
- static bool ShouldRecordRedirect(net::URLRequest* response);
-
// Determines the resource type from the declared one, falling back to MIME
// type detection when it is not explicit.
static content::ResourceType GetResourceType(
@@ -323,22 +317,9 @@ class ResourcePrefetchPredictor
typedef std::map<NavigationID, std::unique_ptr<PageRequestSummary>>
NavigationMap;
- // Returns true if the main page request is supported for prediction.
- static bool IsHandledMainPage(net::URLRequest* request);
-
- // Returns true if the subresource request is supported for prediction.
- static bool IsHandledSubresource(net::URLRequest* request,
- content::ResourceType resource_type);
-
- // Returns true if the subresource has a supported type.
- static bool IsHandledResourceType(content::ResourceType resource_type,
- const std::string& mime_type);
-
// Returns true if the request (should have a response in it) is "no-store".
static bool IsNoStore(const net::URLRequest& request);
- static void SetAllowPortInUrlsForTesting(bool state);
-
// Functions called on different network events pertaining to the loading of
// main frame resource or sub resources.
void OnMainFrameRequest(const URLRequestSummary& request);

Powered by Google App Engine
This is Rietveld 408576698