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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host_request_info.h

Issue 1403001: Modifying the "dangerous download" algorithm. (Closed)
Patch Set: Adding .sys and .drv as Dangerous extensions Created 10 years 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: chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
index 032c4bdbc59ac37ed27c23bdedb6332c3b9ee898..ead2239a95027b21cf6d9c5c08010ccc36855834 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_request_info.h
@@ -42,6 +42,7 @@ class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
uint64 upload_size,
bool is_download,
bool allow_download,
+ bool has_user_gesture,
int host_renderer_id,
int host_render_view_id);
virtual ~ResourceDispatcherHostRequestInfo();
@@ -95,6 +96,8 @@ class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
// Downloads are allowed only as a top level request.
bool allow_download() const { return allow_download_; }
+ bool has_user_gesture() const { return has_user_gesture_; }
+
// Whether this is a download.
bool is_download() const { return is_download_; }
void set_is_download(bool download) { is_download_ = download; }
@@ -214,6 +217,7 @@ class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
int pending_data_count_;
bool is_download_;
bool allow_download_;
+ bool has_user_gesture_;
int pause_count_;
std::string frame_origin_;
std::string main_frame_origin_;

Powered by Google App Engine
This is Rietveld 408576698