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

Unified Diff: chrome/browser/download/download_item_model.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_item_model.h
diff --git a/chrome/browser/download/download_item_model.h b/chrome/browser/download/download_item_model.h
index 367e9ef677d515ff83640d87146a4d508e1c58b0..68444ec7b4ec85fc4a61f85a7f04a9f7ef73dbb1 100644
--- a/chrome/browser/download/download_item_model.h
+++ b/chrome/browser/download/download_item_model.h
@@ -137,6 +137,16 @@ class DownloadItemModel {
// Change what's returned by ShouldPreferOpeningInBrowser to |preference|.
void SetShouldPreferOpeningInBrowser(bool preference);
+ // Mark that the download should be considered dangerous based on the file
+ // type. This value may differ from the download's danger type in cases where
+ // the SafeBrowsing service hasn't returned a verdict about the download. If
+ // SafeBrowsing fails to return a decision, then the download should be
+ // considered dangerous based on this flag. Defaults to false.
+ bool IsDangerousFileBasedOnType() const;
+
+ // Change what's returned by IsDangerousFileBasedOnType().
+ void SetIsDangerousFileBasedOnType(bool dangerous);
+
// Open the download using the platform handler for the download. The behavior
// of this method will be different from DownloadItem::OpenDownload() if
// ShouldPreferOpeningInBrowser().

Powered by Google App Engine
This is Rietveld 408576698