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

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..d5cae936eb9fcd15947f6ad44118d02dd5f546fd 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,19 @@ 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,
mmenke 2015/07/09 20:35:39 This makes it sound like the RDH sends the payload
raymes 2015/07/17 03:21:00 Done.
+ // the value will be sent to the old resource handler instead of canceling
mmenke 2015/07/09 20:35:39 "canceling" -> "canceling it."
mmenke 2015/07/09 20:35:39 "the value" -> "the value"
raymes 2015/07/17 03:21:01 Done.
raymes 2015/07/17 03:21:01 Done.
virtual scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
+ const base::FilePath& plugin_path,
net::URLRequest* request,
ResourceResponse* response,
std::string* payload);

Powered by Google App Engine
This is Rietveld 408576698