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

Unified Diff: chrome/browser/ui/android/context_menu_helper.cc

Issue 1182293002: Save image should download the original image when Data Saver is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 6 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/ui/android/context_menu_helper.cc
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc
index fb7df2762d3996800e00beedf6b5ca56abf0d3f9..d53807d78b8373fa577e61d2ea7b6838ecbc237d 100644
--- a/chrome/browser/ui/android/context_menu_helper.cc
+++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -14,6 +14,7 @@
#include "jni/ContextMenuParams_jni.h"
#include "ui/gfx/geometry/point.h"
+using base::android::ConvertJavaStringToUTF8;
using base::android::ConvertUTF8ToJavaString;
using base::android::ConvertUTF16ToJavaString;
using base::android::ScopedJavaLocalRef;
@@ -96,11 +97,14 @@ ContextMenuHelper::CreateJavaContextMenuParams(
void ContextMenuHelper::OnStartDownload(JNIEnv* env,
jobject obj,
- jboolean jis_link) {
+ jboolean jis_link,
+ jstring jheaders) {
+ std::string headers(ConvertJavaStringToUTF8(env, jheaders));
content::DownloadControllerAndroid::Get()->StartContextMenuDownload(
context_menu_params_,
web_contents_,
- jis_link);
+ jis_link,
+ headers);
}
bool RegisterContextMenuHelper(JNIEnv* env) {
« no previous file with comments | « chrome/browser/ui/android/context_menu_helper.h ('k') | content/browser/android/download_controller_android_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698