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

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

Issue 2437623003: Use native implementation of dangerous download infobar (Closed)
Patch Set: nits Created 4 years, 2 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
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 974663c8e9682cfacd171b069e0420ab8f132a36..8979f55395a903ce1e9761788964f6589ae40226 100644
--- a/chrome/browser/android/download/chrome_download_delegate.cc
+++ b/chrome/browser/android/download/chrome_download_delegate.cc
@@ -51,20 +51,6 @@ static jboolean IsDownloadDangerous(JNIEnv* env,
path) != safe_browsing::DownloadFileType::NOT_DANGEROUS;
}
-// Called when a dangerous download is validated.
-static void DangerousDownloadValidated(
- JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- const JavaParamRef<jobject>& tab,
- const JavaParamRef<jstring>& jdownload_guid,
- jboolean accept) {
- std::string download_guid =
- base::android::ConvertJavaStringToUTF8(env, jdownload_guid);
- TabAndroid* tab_android = TabAndroid::GetNativeTab(env, tab);
- DownloadControllerBase::Get()->DangerousDownloadValidated(
- tab_android->web_contents(), download_guid, accept);
-}
-
// static
bool ChromeDownloadDelegate::EnqueueDownloadManagerRequest(
jobject chrome_download_delegate,
@@ -149,16 +135,6 @@ void ChromeDownloadDelegate::OnDownloadStarted(const std::string& filename) {
Java_ChromeDownloadDelegate_onDownloadStarted(env, java_ref_, jfilename);
}
-void ChromeDownloadDelegate::OnDangerousDownload(const std::string& filename,
- const std::string& guid) {
- JNIEnv* env = base::android::AttachCurrentThread();
- ScopedJavaLocalRef<jstring> jfilename = ConvertUTF8ToJavaString(
- env, filename);
- ScopedJavaLocalRef<jstring> jguid = ConvertUTF8ToJavaString(env, guid);
- Java_ChromeDownloadDelegate_onDangerousDownload(env, java_ref_, jfilename,
- jguid);
-}
-
void ChromeDownloadDelegate::RequestFileAccess(intptr_t callback_id) {
JNIEnv* env = base::android::AttachCurrentThread();
Java_ChromeDownloadDelegate_requestFileAccess(

Powered by Google App Engine
This is Rietveld 408576698