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

Unified Diff: chrome/browser/download/download_danger_prompt.cc

Issue 1979153002: Use FileTypePolicies for is_archive and is_supported classifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_by_platform
Patch Set: Fix comment, per asanka's review Created 4 years, 7 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/browser_resources.grd ('k') | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_danger_prompt.cc
diff --git a/chrome/browser/download/download_danger_prompt.cc b/chrome/browser/download/download_danger_prompt.cc
index 15deee40f679817c3481afd9af2dc3e54a0b8ff3..8ed6be4ec610755ad217b9c9e95791812edea507 100644
--- a/chrome/browser/download/download_danger_prompt.cc
+++ b/chrome/browser/download/download_danger_prompt.cc
@@ -10,14 +10,12 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/safe_browsing/csd.pb.h"
-#include "chrome/common/safe_browsing/download_protection_util.h"
+#include "chrome/common/safe_browsing/file_type_policies.h"
#include "content/public/browser/download_danger_type.h"
#include "content/public/browser/download_item.h"
using safe_browsing::ClientDownloadResponse;
using safe_browsing::ClientSafeBrowsingReportRequest;
-using safe_browsing::download_protection_util::
- GetSBClientDownloadExtensionValueForUMA;
namespace {
@@ -88,18 +86,19 @@ void DownloadDangerPrompt::SendSafeBrowsingDownloadRecoveryReport(
void DownloadDangerPrompt::RecordDownloadDangerPrompt(
bool did_proceed,
const content::DownloadItem& download) {
- int dangerous_file_type =
- GetSBClientDownloadExtensionValueForUMA(download.GetTargetFilePath());
+ int64_t file_type_uma_value =
+ safe_browsing::FileTypePolicies::GetInstance()->UmaValueForFile(
+ download.GetTargetFilePath());
content::DownloadDangerType danger_type = download.GetDangerType();
UMA_HISTOGRAM_SPARSE_SLOWLY(
base::StringPrintf("%s.%s.Shown", kDownloadDangerPromptPrefix,
GetDangerTypeString(danger_type)),
- dangerous_file_type);
+ file_type_uma_value);
if (did_proceed) {
UMA_HISTOGRAM_SPARSE_SLOWLY(
base::StringPrintf("%s.%s.Proceed", kDownloadDangerPromptPrefix,
GetDangerTypeString(danger_type)),
- dangerous_file_type);
+ file_type_uma_value);
}
}
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698