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

Unified Diff: chrome/browser/download/download_state_info.cc

Issue 7065015: For downloads requiring a user gesture, also require... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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: chrome/browser/download/download_state_info.cc
===================================================================
--- chrome/browser/download/download_state_info.cc (revision 86341)
+++ chrome/browser/download/download_state_info.cc (working copy)
@@ -12,7 +12,8 @@
has_user_gesture(false),
prompt_user_for_save_location(false),
is_dangerous_file(false),
- is_dangerous_url(false),
+ is_dangerous_url(UNKNOWN),
+ visited_referrer_before(UNKNOWN),
is_extension_install(false) {
}
@@ -23,7 +24,8 @@
has_user_gesture(has_user_gesture),
prompt_user_for_save_location(prompt_user_for_save_location),
is_dangerous_file(false),
- is_dangerous_url(false),
+ is_dangerous_url(UNKNOWN),
+ visited_referrer_before(UNKNOWN),
is_extension_install(false) {
}
@@ -34,7 +36,8 @@
bool prompt_user_for_save_location,
int uniquifier,
bool dangerous_file,
- bool dangerous_url,
+ Tristate dangerous_url,
+ Tristate visited_referrer_before,
bool extension_install)
: target_name(target),
path_uniquifier(uniquifier),
@@ -42,10 +45,11 @@
prompt_user_for_save_location(prompt_user_for_save_location),
is_dangerous_file(dangerous_file),
is_dangerous_url(dangerous_url),
+ visited_referrer_before(visited_referrer_before),
is_extension_install(extension_install),
force_file_name(forced_name) {
}
bool DownloadStateInfo::IsDangerous() const {
- return is_dangerous_url || is_dangerous_file;
+ return (is_dangerous_url == YES) || is_dangerous_file;
}

Powered by Google App Engine
This is Rietveld 408576698