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..683b1c7abfb8788bd50521780e29d7fc3d286a02 100644 |
--- a/chrome/browser/download/download_danger_prompt.cc |
+++ b/chrome/browser/download/download_danger_prompt.cc |
@@ -10,14 +10,15 @@ |
#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 "chrome/grit/chromium_strings.h" |
+#include "chrome/grit/generated_resources.h" |
asanka
2016/05/18 18:47:54
Thanks for these.
|
+#include "content/public/browser/browser_context.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 +89,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::GlobalInstance()->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); |
} |
} |