| 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 69741423da156ba4563034f603d35d7a2657c0ed..e5b154e6e53b382bacb1063dd2b58f5affa8947b 100644
|
| --- a/content/browser/loader/buffered_resource_handler.cc
|
| +++ b/content/browser/loader/buffered_resource_handler.cc
|
| @@ -15,7 +15,12 @@
|
| #include "content/browser/loader/certificate_resource_handler.h"
|
| #include "content/browser/loader/resource_dispatcher_host_impl.h"
|
| #include "content/browser/loader/resource_request_info_impl.h"
|
| +#include "content/browser/loader/stream_resource_handler.h"
|
| #include "content/browser/plugin_service_impl.h"
|
| +#include "content/browser/resource_context_impl.h"
|
| +#include "content/browser/streams/stream.h"
|
| +#include "content/browser/streams/stream_context.h"
|
| +#include "content/browser/streams/stream_registry.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/download_id.h"
|
| #include "content/public/browser/download_save_info.h"
|
| @@ -320,6 +325,32 @@ bool BufferedResourceHandler::SelectNextHandler(bool* defer) {
|
| if (net::IsSupportedMimeType(mime_type))
|
| return true;
|
|
|
| + GURL security_origin;
|
| + if (host_->delegate() &&
|
| + host_->delegate()->ShouldCreateStream(info->GetContext(),
|
| + request_->url(),
|
| + mime_type,
|
| + &security_origin)) {
|
| + StreamContext* stream_context =
|
| + GetStreamContextForResourceContext(info->GetContext());
|
| +
|
| + scoped_ptr<StreamResourceHandler> handler(
|
| + new StreamResourceHandler(request_,
|
| + stream_context->registry(),
|
| + security_origin));
|
| +
|
| + info->set_is_stream(true);
|
| + host_->delegate()->OnStreamCreated(
|
| + info->GetContext(),
|
| + info->GetChildID(),
|
| + info->GetRouteID(),
|
| + handler->stream()->url(),
|
| + mime_type,
|
| + request_->url());
|
| + return UseAlternateNextHandler(
|
| + (scoped_ptr<ResourceHandler>(handler.release())).Pass());
|
| + }
|
| +
|
| #if defined(ENABLE_PLUGINS)
|
| bool stale;
|
| bool has_plugin = HasSupportingPlugin(&stale);
|
|
|