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

Unified Diff: content/browser/download/download_item.h

Issue 8468020: Propagate the SafeBrowsing download protection verdict to the DownloadItem. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add danger state to the download extension API. I couldn't find any static docs for that API. Created 9 years, 1 month 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/download/download_item.h
diff --git a/content/browser/download/download_item.h b/content/browser/download/download_item.h
index 3d3b0e7ace3a8b7454f1f7cc31088b3a2c5cc6e7..39e7740634dbaca59d6e3e700d85cb9bf9188012 100644
--- a/content/browser/download/download_item.h
+++ b/content/browser/download/download_item.h
@@ -84,9 +84,13 @@ class CONTENT_EXPORT DownloadItem {
// places other than gallery).
DANGEROUS_FILE,
- // Safebrowsing service shows this URL leads to malicious file download.
+ // Safebrowsing download service shows this URL leads to malicious file
+ // download.
DANGEROUS_URL,
+ // SafeBrowsing download service shows this file content as being malicious.
+ DANGEROUS_CONTENT,
+
// Memory space for histograms is determined by the max.
// ALWAYS ADD NEW VALUES BEFORE THIS ONE.
DANGEROUS_TYPE_MAX
@@ -301,12 +305,14 @@ class CONTENT_EXPORT DownloadItem {
bool IsDangerous() const;
void MarkFileDangerous();
void MarkUrlDangerous();
+ void MarkContentDangerous();
bool auto_opened() { return auto_opened_; }
const FilePath& target_name() const { return state_info_.target_name; }
bool prompt_user_for_save_location() const {
return state_info_.prompt_user_for_save_location;
}
+ bool needs_quarantine_file() { return state_info_.needs_quarantine_file; }
bool is_otr() const { return is_otr_; }
const FilePath& suggested_path() const { return state_info_.suggested_path; }
bool is_temporary() const { return is_temporary_; }

Powered by Google App Engine
This is Rietveld 408576698