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

Unified Diff: chrome/browser/history/download_database.cc

Issue 19863005: Warn users about potentially unwanted downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a "Learn more" URL for unwanted downloads. Created 7 years, 5 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/history/download_database.h ('k') | chrome/browser/resources/downloads/downloads.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/download_database.cc
diff --git a/chrome/browser/history/download_database.cc b/chrome/browser/history/download_database.cc
index 5a0dc26c79d02b1db77889a28bfbb58847d45d76..6f7865cc4d04a8baba668957b5138e7454c4e762 100644
--- a/chrome/browser/history/download_database.cc
+++ b/chrome/browser/history/download_database.cc
@@ -111,6 +111,7 @@ const int DownloadDatabase::kDangerTypeMaybeDangerousContent = 4;
const int DownloadDatabase::kDangerTypeUncommonContent = 5;
const int DownloadDatabase::kDangerTypeUserValidated = 6;
const int DownloadDatabase::kDangerTypeDangerousHost = 7;
+const int DownloadDatabase::kDangerTypePotentiallyUnwanted = 8;
int DownloadDatabase::StateToInt(DownloadItem::DownloadState state) {
switch (state) {
@@ -156,6 +157,8 @@ int DownloadDatabase::DangerTypeToInt(content::DownloadDangerType danger_type) {
return DownloadDatabase::kDangerTypeUserValidated;
case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST:
return DownloadDatabase::kDangerTypeDangerousHost;
+ case content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED:
+ return DownloadDatabase::kDangerTypePotentiallyUnwanted;
case content::DOWNLOAD_DANGER_TYPE_MAX:
NOTREACHED();
return DownloadDatabase::kDangerTypeInvalid;
@@ -182,6 +185,8 @@ content::DownloadDangerType DownloadDatabase::IntToDangerType(int danger_type) {
return content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED;
case DownloadDatabase::kDangerTypeDangerousHost:
return content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST;
+ case DownloadDatabase::kDangerTypePotentiallyUnwanted:
+ return content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED;
default:
return content::DOWNLOAD_DANGER_TYPE_MAX;
}
« no previous file with comments | « chrome/browser/history/download_database.h ('k') | chrome/browser/resources/downloads/downloads.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698