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

Unified Diff: chrome/browser/download/download_target_info.h

Issue 565053002: [Downloads] Gracefully handle SafeBrowsing check failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_target_info.h
diff --git a/chrome/browser/download/download_target_info.h b/chrome/browser/download/download_target_info.h
index 8cd75bc2a7afe616586e0e9130719da3b23936bb..7d181b665175f9d5066b707633f72aae24689196 100644
--- a/chrome/browser/download/download_target_info.h
+++ b/chrome/browser/download/download_target_info.h
@@ -26,6 +26,17 @@ struct DownloadTargetInfo {
// Danger type of the download.
content::DownloadDangerType danger_type;
+ // The danger type of the download could be set to MAYBE_DANGEROUS_CONTENT if
+ // the file type is handled by SafeBrowsing. However, if the SafeBrowsing
+ // service is unable to verify whether the file is safe or not, we are on our
+ // own. This flag indicates whether the download should be considered
+ // dangerous if SafeBrowsing returns an unknown verdict.
+ //
+ // Note that some downloads (e.g. "Save link as" on a link to a binary) would
+ // not be considered 'Dangerous' even if SafeBrowsing came back with an
+ // unknown verdict. So we can't always show a warning when SB fails.
+ bool is_dangerous_file;
+
// Suggested intermediate path. The downloaded bytes should be written to this
// path until all the bytes are available and the user has accepted a
// dangerous download. At that point, the download can be renamed to
« no previous file with comments | « chrome/browser/download/download_target_determiner.cc ('k') | chrome/browser/safe_browsing/download_protection_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698