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

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

Issue 2228003002: predictors: Fix duplicate content type detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 15768ecf565f81f3dc87005b2053d29eea206b67..afad9b830432c9936f565ceec66b75f9a131abb7 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -91,6 +91,10 @@ class ResourcePrefetchPredictor
std::string mime_type;
bool was_cached;
GURL redirect_url; // Empty unless request was redirected to a valid url.
+
+ // Initializes a |URLRequestSummary| from a |URLRequest| response.
+ static bool SummarizeResponse(const net::URLRequest* request,
pasko 2016/08/09 17:08:54 const net::URLRequest& (yes, the const pointer is
Benoit L 2016/08/09 17:22:56 Unfortunately, it is: CONTENT_EXPORT static const
pasko 2016/08/10 09:08:46 Why would it be inconvenient to do the following?
Benoit L 2016/08/10 14:08:47 Done.
+ URLRequestSummary* summary);
pasko 2016/08/09 17:08:54 Just returning a unique_ptr (instead of, ugh, outp
Benoit L 2016/08/09 17:22:56 The rest of the code uses URLRequestSummary by val
};
ResourcePrefetchPredictor(const ResourcePrefetchPredictorConfig& config,

Powered by Google App Engine
This is Rietveld 408576698