| Index: chrome/browser/prerender/prerender_resource_throttle.cc
|
| diff --git a/chrome/browser/prerender/prerender_resource_throttle.cc b/chrome/browser/prerender/prerender_resource_throttle.cc
|
| index df57aa36620930cec613afaab18205b7a9c4355b..5b35b697df8aa6afb45357291f42cc607f422fcf 100644
|
| --- a/chrome/browser/prerender/prerender_resource_throttle.cc
|
| +++ b/chrome/browser/prerender/prerender_resource_throttle.cc
|
| @@ -179,13 +179,18 @@ void PrerenderResourceThrottle::WillStartRequestOnUI(
|
| cancel = true;
|
| } else if (!PrerenderManager::DoesSubresourceURLHaveValidScheme(url) &&
|
| resource_type != content::RESOURCE_TYPE_MAIN_FRAME) {
|
| - // Destroying the prerender for unsupported scheme only for non-main
|
| - // resource to allow chrome://crash to actually crash in the
|
| - // *RendererCrash tests instead of being intercepted here. The unsupported
|
| - // scheme for the main resource is checked in WillRedirectRequestOnUI()
|
| - // and PrerenderContents::CheckURL(). See http://crbug.com/673771.
|
| - prerender_contents->Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME);
|
| - ReportUnsupportedPrerenderScheme(url);
|
| + // For ORIGIN_OFFLINE, simply cancel this invalid request and continue.
|
| + // For other origins, fail the prerender here.
|
| + if (prerender_contents->origin() != ORIGIN_OFFLINE) {
|
| + // Destroying the prerender for unsupported scheme only for non-main
|
| + // resource to allow chrome://crash to actually crash in the
|
| + // *RendererCrash tests instead of being intercepted here. The
|
| + // unsupported
|
| + // scheme for the main resource is checked in WillRedirectRequestOnUI()
|
| + // and PrerenderContents::CheckURL(). See http://crbug.com/673771.
|
| + prerender_contents->Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME);
|
| + ReportUnsupportedPrerenderScheme(url);
|
| + }
|
| cancel = true;
|
| #if defined(OS_ANDROID)
|
| } else if (resource_type == content::RESOURCE_TYPE_FAVICON) {
|
|
|