Index: chrome/browser/renderer_host/resource_dispatcher_host.cc |
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc |
index 2515b3b0e7570387a90e74d0869516bb09f41046..d5bf2463c9b8265a6f02238821df7fad3ff880ed 100644 |
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc |
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc |
@@ -31,6 +31,7 @@ |
#include "chrome/browser/net/chrome_url_request_context.h" |
#include "chrome/browser/net/url_request_tracking.h" |
#include "chrome/browser/plugin_service.h" |
+#include "chrome/browser/prerender/prerender_resource_handler.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/renderer_host/async_resource_handler.h" |
#include "chrome/browser/renderer_host/buffered_resource_handler.h" |
@@ -443,6 +444,16 @@ void ResourceDispatcherHost::BeginRequest( |
upload_size = request_data.upload_data->GetContentLength(); |
} |
+ // Install a PrerenderResourceHandler if the requested URL could |
+ // be prerendered. This should be in front of the [a]syncResourceHandler, |
+ // but after the BufferedResourceHandler since it depends on the MIME |
+ // sniffing capabilities in the BufferedResourceHandler. |
+ if (context && context->prerender_manager() && |
+ PrerenderResourceHandler::CouldPrerender(request)) { |
+ handler = new PrerenderResourceHandler(handler, |
+ context->prerender_manager()); |
gavinp
2010/12/17 16:15:33
An idea, not sure if it's the right thing: how abo
cbentzel
2010/12/17 16:23:21
I'm not sure I understand what you are asking for
|
+ } |
+ |
// Install a CrossSiteResourceHandler if this request is coming from a |
// RenderViewHost with a pending cross-site request. We only check this for |
// MAIN_FRAME requests. Unblock requests only come from a blocked page, do |