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

Unified Diff: chrome/browser/download/download_item.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
« no previous file with comments | « chrome/browser/download/download_item.h ('k') | chrome/browser/download/download_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_item.cc
===================================================================
--- chrome/browser/download/download_item.cc (revision 86341)
+++ chrome/browser/download/download_item.cc (working copy)
@@ -149,8 +149,8 @@
bool is_otr)
: state_info_(info.original_name, info.save_info.file_path,
info.has_user_gesture, info.prompt_user_for_save_location,
- info.path_uniquifier, info.is_dangerous_file,
- info.is_dangerous_url, info.is_extension_install),
+ info.path_uniquifier, false, false,
+ info.is_extension_install),
process_handle_(info.process_handle),
download_id_(info.download_id),
full_path_(info.path),
@@ -170,8 +170,7 @@
download_manager_(download_manager),
is_paused_(false),
open_when_complete_(false),
- safety_state_(GetSafetyState(info.is_dangerous_file,
- info.is_dangerous_url)),
+ safety_state_(SAFE),
auto_opened_(false),
is_otr_(is_otr),
is_temporary_(!info.save_info.file_path.empty()),
@@ -541,8 +540,16 @@
return GetDangerType() != DownloadItem::NOT_DANGEROUS;
}
+void DownloadItem::MarkFileDangerous() {
+ state_info_.is_dangerous_file = true;
+ safety_state_ = GetSafetyState(state_info_.is_dangerous_file,
+ state_info_.is_dangerous_url);
+}
+
void DownloadItem::MarkUrlDangerous() {
state_info_.is_dangerous_url = true;
+ safety_state_ = GetSafetyState(state_info_.is_dangerous_file,
+ state_info_.is_dangerous_url);
}
DownloadHistoryInfo DownloadItem::GetHistoryInfo() const {
« no previous file with comments | « chrome/browser/download/download_item.h ('k') | chrome/browser/download/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698