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

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

Issue 9875026: **NOTFORLANDING** New link rel=prerender API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch sets 3-7 against trunk, for combined browsing Created 8 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/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index f54de5dbcdf2d980ebc79b460e5a4cd4bf0de7dc..d7d93182c2df963bd1fd60dde205cb438b3cdba8 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -50,21 +50,6 @@ using content::ResourceRequestInfo;
namespace {
-void AddPrerenderOnUI(
- int render_process_id, int render_view_id,
- const GURL& url, const content::Referrer& referrer) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- prerender::PrerenderManager* prerender_manager =
- prerender::FindPrerenderManagerUsingRenderProcessId(render_process_id);
- if (!prerender_manager)
- return;
-
- prerender_manager->AddPrerenderFromLinkRelPrerender(render_process_id,
- render_view_id,
- url,
- referrer);
-}
-
void NotifyDownloadInitiatedOnUI(int render_process_id, int render_view_id) {
RenderViewHost* rvh = RenderViewHost::FromID(render_process_id,
render_view_id);
@@ -112,17 +97,6 @@ bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest(
return false;
}
- // Handle a PRERENDER motivated request. Very similar to rel=prefetch, these
- // rel=prerender requests instead launch an early render of the entire page.
- if (resource_type == ResourceType::PRERENDER) {
- if (prerender::PrerenderManager::IsPrerenderingPossible()) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&AddPrerenderOnUI, child_id, route_id, url, referrer));
- }
- // Prerendering or not, this request should be aborted.
- return false;
- }
-
// Abort any prerenders that spawn requests that use invalid HTTP methods.
if (prerender_tracker_->IsPrerenderingOnIOThread(child_id, route_id) &&
!prerender::PrerenderManager::IsValidHttpMethod(method)) {

Powered by Google App Engine
This is Rietveld 408576698