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

Unified Diff: chrome/browser/android/download/chrome_download_delegate.cc

Issue 1982723002: Use FileTypePolicies for download danger classifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_policies
Patch Set: Fix bad rebase 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 | « no previous file | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/download/chrome_download_delegate.cc
diff --git a/chrome/browser/android/download/chrome_download_delegate.cc b/chrome/browser/android/download/chrome_download_delegate.cc
index 4fd12132fe924074ec1537a7380eaac849a7a5cf..00943c8802eb02a1e2c41020569d425e5a73698b 100644
--- a/chrome/browser/android/download/chrome_download_delegate.cc
+++ b/chrome/browser/android/download/chrome_download_delegate.cc
@@ -18,9 +18,9 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.h"
#include "chrome/browser/android/tab_android.h"
-#include "chrome/browser/download/download_extensions.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/permissions/permission_update_infobar_delegate_android.h"
+#include "chrome/common/safe_browsing/file_type_policies.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/android/download_controller_android.h"
@@ -45,8 +45,8 @@ static jboolean IsDownloadDangerous(JNIEnv* env,
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jstring>& filename) {
base::FilePath path(base::android::ConvertJavaStringToUTF8(env, filename));
- return download_util::GetFileDangerLevel(path) !=
- download_util::NOT_DANGEROUS;
+ return safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel(
+ path) != safe_browsing::DownloadFileType::NOT_DANGEROUS;
}
// Called when a dangerous download is validated.
« no previous file with comments | « no previous file | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698