Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 263513004: Forward MIME types to BrowserPlugin when a viewer is specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittests Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 86d5e5fb1fff831c54dc35f149a56a55cb0979df..09644d64cce082426ca5c8ae0c9124d6d51b02ce 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -608,18 +608,17 @@ ResourceDispatcherHostImpl::CreateResourceHandlerForDownload(
scoped_ptr<ResourceHandler>
ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request,
- ResourceResponse* response) {
+ ResourceResponse* response,
+ std::string* payload) {
ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
const std::string& mime_type = response->head.mime_type;
GURL origin;
- std::string target_id;
if (!delegate_ ||
- !delegate_->ShouldInterceptResourceAsStream(info->GetContext(),
- request->url(),
+ !delegate_->ShouldInterceptResourceAsStream(request,
mime_type,
&origin,
- &target_id)) {
+ payload)) {
return scoped_ptr<ResourceHandler>();
}
@@ -633,15 +632,11 @@ ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request,
info->set_is_stream(true);
delegate_->OnStreamCreated(
- info->GetContext(),
- info->GetChildID(),
- info->GetRouteID(),
- target_id,
+ request,
handler->stream()->CreateHandle(
request->url(),
mime_type,
- response->head.headers),
- request->GetExpectedContentSize());
+ response->head.headers));
return handler.PassAs<ResourceHandler>();
}
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.h ('k') | content/public/browser/resource_dispatcher_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698