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

Unified Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

Issue 2399973003: prerender: Don't set the priority to net::IDLE on Android. (Closed)
Patch Set: 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
« 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/loader/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
index 97cb50e63cb009c469b17f04e21d99a5de1ca62e..38daa2184b8b404ee5b0f09310c1a0da45e36058 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -421,6 +421,13 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
if (safe_browsing_.get())
safe_browsing_->OnResourceRequest(request);
+// The lowering of request priority causes issues with scheduling, since
+// content::ResourceScheduler uses it to delay and throttle requests. This is
+// disabled only on Android, as the prerenders are not likely to compete wuth
droger 2016/10/07 09:08:23 s/wuth/with/
Benoit L 2016/10/07 09:27:35 Done.
+// page loads there.
+// See https://crbug.com/652746 for details.
+// TODO(lizeb,droger): Remove this hack, and fix the issue on all platforms.
droger 2016/10/07 09:08:23 Nit: We're not quite sure that this is really a h
Benoit L 2016/10/07 09:27:35 Done.
+#if !defined(OS_ANDROID)
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
bool is_prerendering =
info->GetVisibilityState() == blink::WebPageVisibilityStatePrerender;
@@ -433,6 +440,7 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
request->SetPriority(net::IDLE);
}
}
+#endif // OS_ANDROID
ProfileIOData* io_data = ProfileIOData::FromResourceContext(
resource_context);
« 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