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

Unified Diff: chrome/browser/safe_browsing/unverified_download_policy.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/safe_browsing/unverified_download_field_trial_unittest.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/unverified_download_policy.cc
diff --git a/chrome/browser/safe_browsing/unverified_download_policy.cc b/chrome/browser/safe_browsing/unverified_download_policy.cc
index d24a5ac39f601e49767a8fb43248268bd8934163..e6a3d9adfb5e782f5834d0e3cbac06d6a1a3cf0b 100644
--- a/chrome/browser/safe_browsing/unverified_download_policy.cc
+++ b/chrome/browser/safe_browsing/unverified_download_policy.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/unverified_download_field_trial.h"
-#include "chrome/common/safe_browsing/download_protection_util.h"
+#include "chrome/common/safe_browsing/file_type_policies.h"
#include "components/rappor/rappor_service.h"
#include "components/rappor/rappor_utils.h"
#include "components/safe_browsing_db/database_manager.h"
@@ -52,8 +52,8 @@ void RespondWithPolicy(
const UnverifiedDownloadCheckCompletionCallback& callback,
const GURL& requestor,
UnverifiedDownloadPolicy policy) {
- int uma_file_type =
- download_protection_util::GetSBClientDownloadExtensionValueForUMA(file);
+ int64_t uma_file_type =
+ FileTypePolicies::GetInstance()->UmaValueForFile(file);
if (policy == UnverifiedDownloadPolicy::ALLOWED) {
RecordPolicyMetric("SafeBrowsing.UnverifiedDownloads.Allowed",
uma_file_type, requestor);
@@ -96,8 +96,8 @@ void CheckWhitelistOnIOThread(
const std::vector<base::FilePath::StringType>& alternate_extensions,
const UnverifiedDownloadCheckCompletionCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- int uma_file_type =
- download_protection_util::GetSBClientDownloadExtensionValueForUMA(file);
+ int64_t uma_file_type =
+ FileTypePolicies::GetInstance()->UmaValueForFile(file);
if (!service || !service->enabled()) {
// If the SafeBrowsing service was disabled, don't try to check against the
« no previous file with comments | « chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698