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..f308b470529cf48586d02ecc52368d7ba21a46ae 100644 |
--- a/content/browser/loader/buffered_resource_handler.cc |
+++ b/content/browser/loader/buffered_resource_handler.cc |
@@ -312,6 +312,15 @@ 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) { |
Zachary Kuznia
2014/11/13 23:18:08
Why isn't this caught by line 333?
raymes
2014/11/13 23:42:10
Because in these cases |allow_download| is always
Zachary Kuznia
2014/11/13 23:48:42
It feels like we should share this call with the o
raymes
2014/11/14 20:55:29
I did try to share the code in a few different way
Zachary Kuznia
2014/11/14 22:01:45
Fair enough, I thought that might be the case.
|
+ DCHECK(!info->allow_download()); |
+ std::string payload; |
+ scoped_ptr<ResourceHandler> handler( |
+ host_->MaybeInterceptAsStream(request(), response_.get(), &payload)); |
+ return UseAlternateNextHandler(handler.Pass(), payload); |
Zachary Kuznia
2014/11/13 23:18:08
Is there a reason not to test that handler is set?
raymes
2014/11/13 23:42:10
There is one other place where requests are made o
Zachary Kuznia
2014/11/13 23:48:42
In that case, shouldn't we maintain the current be
raymes
2014/11/14 20:55:29
Yes, good catch! I added a test for this.
|
+ } |
+ |
if (!info->allow_download()) |
return true; |