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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.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/ui/views/download/download_item_view.cc ('k') | chrome/browser/ui/webui/downloads_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 124b278084b02757b18d296904bb554ce45957ae..72245e1d558de5a35ad28e25569f0ef465efbe7d 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -99,6 +99,8 @@ const char* GetDangerTypeString(content::DownloadDangerType danger_type) {
return "UNCOMMON_CONTENT";
case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST:
return "DANGEROUS_HOST";
+ case content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED:
+ return "POTENTIALLY_UNWANTED";
default:
// Don't return a danger type string if it is NOT_DANGEROUS or
// MAYBE_DANGEROUS_CONTENT.
@@ -161,7 +163,9 @@ DictionaryValue* CreateDownloadItemValue(
download_item->GetDangerType() ==
content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT ||
download_item->GetDangerType() ==
- content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST);
+ content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST ||
+ download_item->GetDangerType() ==
+ content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED);
const char* danger_type_value =
GetDangerTypeString(download_item->GetDangerType());
file_value->SetString("danger_type", danger_type_value);
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | chrome/browser/ui/webui/downloads_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698