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); |