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 92def35ac179459a90e16e00121884a1c5744e10..999b2d32a8d0b15deb21396272993d8071c0a7f8 100644 |
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc |
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc |
@@ -19,7 +19,6 @@ |
#include "chrome/browser/instant/instant_loader.h" |
#include "chrome/browser/net/load_timing_observer.h" |
#include "chrome/browser/prerender/prerender_manager.h" |
-#include "chrome/browser/prerender/prerender_manager_factory.h" |
#include "chrome/browser/prerender/prerender_tracker.h" |
#include "chrome/browser/profiles/profile_io_data.h" |
#include "chrome/browser/renderer_host/chrome_url_request_user_data.h" |
@@ -37,17 +36,12 @@ |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/render_view_host.h" |
-#include "content/public/browser/render_view_host_delegate.h" |
-#include "content/public/browser/render_widget_host_view.h" |
#include "content/public/browser/resource_context.h" |
#include "content/public/browser/resource_dispatcher_host.h" |
#include "content/public/browser/resource_request_info.h" |
-#include "content/public/browser/web_contents.h" |
-#include "content/public/browser/web_contents_view.h" |
#include "net/base/load_flags.h" |
#include "net/base/ssl_config_service.h" |
#include "net/url_request/url_request.h" |
-#include "ui/gfx/size.h" |
#include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
// TODO(oshima): Enable this for other platforms. |
@@ -62,32 +56,6 @@ using content::ResourceRequestInfo; |
namespace { |
-// TODO(gavinp): Remove this after https://bugs.webkit.org/show_bug.cgi?id=85005 |
-// lands in WebKit. |
-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; |
- |
- RenderViewHost* render_view_host = |
- RenderViewHost::FromID(render_process_id, render_view_id); |
- if (!render_view_host) |
- return; |
- gfx::Rect tab_bounds; |
- if (content::WebContents* source_wc = |
- render_view_host->GetDelegate()->GetAsWebContents()) |
- source_wc->GetView()->GetContainerBounds(&tab_bounds); |
- gfx::Size view_size = tab_bounds.size(); |
- if (view_size.IsEmpty()) |
- view_size = prerender_manager->config().default_tab_bounds.size(); |
- prerender_manager->AddPrerenderFromLinkRelPrerender( |
- render_process_id, render_view_id, url, referrer, view_size); |
-} |
- |
void NotifyDownloadInitiatedOnUI(int render_process_id, int render_view_id) { |
RenderViewHost* rvh = RenderViewHost::FromID(render_process_id, |
render_view_id); |
@@ -136,17 +104,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)) { |