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

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

Issue 2186803004: predictors: Remove the HTTP restriction for speculative prefetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetch_predictor.cc
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc
index bc941c5aac1b7634eed995e551f030cc298cefda..a2550a3e96b9af1a6cd39ad0aa9c381457c967c0 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -43,8 +43,8 @@ namespace {
// For reporting whether a subresource is handled or not, and for what reasons.
enum ResourceStatus {
RESOURCE_STATUS_HANDLED = 0,
- RESOURCE_STATUS_NOT_HTTP_PAGE = 1,
- RESOURCE_STATUS_NOT_HTTP_RESOURCE = 2,
+ RESERVED_1 = 1,
+ RESERVED_2 = 2,
RESOURCE_STATUS_UNSUPPORTED_MIME_TYPE = 4,
RESOURCE_STATUS_NOT_GET = 8,
RESOURCE_STATUS_URL_TOO_LONG = 16,
@@ -232,18 +232,13 @@ bool ResourcePrefetchPredictor::ShouldRecordRedirect(
// static
bool ResourcePrefetchPredictor::IsHandledMainPage(net::URLRequest* request) {
- return request->original_url().scheme() == url::kHttpScheme;
+ return true;
pasko 2016/07/27 14:06:24 we agreed offline that we should explicitly accept
Benoit L 2016/07/27 14:25:56 Done.
}
// static
bool ResourcePrefetchPredictor::IsHandledSubresource(
net::URLRequest* response) {
int resource_status = 0;
- if (response->first_party_for_cookies().scheme() != url::kHttpScheme)
- resource_status |= RESOURCE_STATUS_NOT_HTTP_PAGE;
-
- if (response->original_url().scheme() != url::kHttpScheme)
- resource_status |= RESOURCE_STATUS_NOT_HTTP_RESOURCE;
std::string mime_type;
response->GetMimeType(&mime_type);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698