| Index: content/browser/loader/buffered_resource_handler.cc
|
| diff --git a/content/browser/loader/buffered_resource_handler.cc b/content/browser/loader/buffered_resource_handler.cc
|
| index f96b5506d8c455f1526a89b3917d5e65bb3d82dd..c80b8cb72671f942acfcf375f583aa0708c8608a 100644
|
| --- a/content/browser/loader/buffered_resource_handler.cc
|
| +++ b/content/browser/loader/buffered_resource_handler.cc
|
| @@ -312,9 +312,27 @@ bool BufferedResourceHandler::SelectNextHandler(bool* defer) {
|
| return UseAlternateNextHandler(handler.Pass(), std::string());
|
| }
|
|
|
| + // Allow requests for object/embed tags to be intercepted as streams.
|
| + if (info->GetResourceType() == content::RESOURCE_TYPE_OBJECT) {
|
| + DCHECK(!info->allow_download());
|
| + std::string payload;
|
| + scoped_ptr<ResourceHandler> handler(
|
| + host_->MaybeInterceptAsStream(request(), response_.get(), &payload));
|
| + if (handler) {
|
| + DCHECK(!net::IsSupportedMimeType(mime_type));
|
| + return UseAlternateNextHandler(handler.Pass(), payload);
|
| + }
|
| + }
|
| +
|
| if (!info->allow_download())
|
| return true;
|
|
|
| + // info->allow_download() == true implies
|
| + // info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME or
|
| + // info->GetResourceType() == RESOURCE_TYPE_SUB_FRAME.
|
| + DCHECK(info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME ||
|
| + info->GetResourceType() == RESOURCE_TYPE_SUB_FRAME);
|
| +
|
| bool must_download = MustDownload();
|
| if (!must_download) {
|
| if (net::IsSupportedMimeType(mime_type))
|
|
|