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

Unified Diff: content/public/browser/resource_dispatcher_host.h

Issue 10381122: Add flag to specify if explicitly requested download is from web. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/public/browser/resource_dispatcher_host.h
diff --git a/content/public/browser/resource_dispatcher_host.h b/content/public/browser/resource_dispatcher_host.h
index 1eb4c44593a08ef8dec55ce93bbef63d01005951..7bb8dbf73be18bc2d0d6a4e0728852eb655ec099 100644
--- a/content/public/browser/resource_dispatcher_host.h
+++ b/content/public/browser/resource_dispatcher_host.h
@@ -37,9 +37,12 @@ class CONTENT_EXPORT ResourceDispatcherHost {
// Initiates a download by explicit request of the renderer, e.g. due to
// alt-clicking a link. If the download is started, |started_callback| will
// be called on the UI thread with the DownloadId; otherwise an error code
- // will be returned.
+ // will be returned. |from_web| is used to indicate that the request
+ // was generated from a web page, and hence may not be as trustworthy
+ // as a browser generated request.
virtual net::Error BeginDownload(
scoped_ptr<net::URLRequest> request,
+ bool from_web,
ResourceContext* context,
int child_id,
int route_id,

Powered by Google App Engine
This is Rietveld 408576698