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

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

Issue 1164073006: Make the logic for stream interception by MimeHandlerViews consistent with starting the plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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.h
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index b454955737e87a5d1d4a42baf7d4531d4052ce86..41e388dcc86cd66a30a3548c181dbff0bb5ff132 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -45,6 +45,10 @@
class ResourceHandler;
struct ResourceHostMsg_Request;
+namespace base {
+class FilePath;
+}
+
namespace net {
class URLRequestJobFactory;
}
@@ -233,12 +237,20 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
scoped_ptr<DownloadSaveInfo> save_info,
const DownloadUrlParameters::OnStartedCallback& started_cb);
- // Must be called after the ResourceRequestInfo has been created
- // and associated with the request. If |payload| is set to a non-empty value,
- // the value will be sent to the old resource handler instead of canceling
- // it, except on HTTP errors. This is marked virtual so it can be overriden in
- // testing.
+ // Called to determine whether the response to |request| should be intercepted
+ // and handled as a stream. Streams are used to pass direct access to a
+ // resource response to another application (e.g. a web page) without being
+ // handled by the browser itself. If the request should be intercepted as a
+ // stream, a StreamResourceHandler is returned which provides access to the
+ // response. |plugin_path| is the path to the plugin which is handling the
+ // URL request. This may be empty if there is no plugin handling the request.
+ //
+ // This function must be called after the ResourceRequestInfo has been created
+ // and associated with the request. If |payload| is set to a non-empty value,
+ // the caller must send it to the old resource handler instead of cancelling
+ // it.
virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
+ const base::FilePath& plugin_path,
net::URLRequest* request,
ResourceResponse* response,
std::string* payload);
« no previous file with comments | « content/browser/loader/mime_type_resource_handler_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698