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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java

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: 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/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
index f40f06814b3dd827d959c12698db556e5ea99a3d..37da4fa7c83cc9ee9a542fb6c348c49446dce3e3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
@@ -140,14 +140,18 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
mDelegate.onSaveToClipboard(MailTo.parse(params.getLinkUrl()).getTo(), false);
} else if (itemId == R.id.contextmenu_copy_link_text) {
mDelegate.onSaveToClipboard(params.getLinkText(), false);
- } else if (itemId == R.id.contextmenu_save_image
- || itemId == R.id.contextmenu_save_video) {
+ } else if (itemId == R.id.contextmenu_save_image) {
if (mDelegate.startDownload(params.getSrcUrl(), false)) {
- helper.startContextMenuDownload(false);
+ helper.startContextMenuDownload(
+ false, mDelegate.isDataReductionProxyEnabledForURL(params.getSrcUrl()));
+ }
+ } else if (itemId == R.id.contextmenu_save_video) {
+ if (mDelegate.startDownload(params.getSrcUrl(), false)) {
+ helper.startContextMenuDownload(false, false);
}
} else if (itemId == R.id.contextmenu_save_link_as) {
if (mDelegate.startDownload(params.getUnfilteredLinkUrl(), true)) {
- helper.startContextMenuDownload(true);
+ helper.startContextMenuDownload(true, false);
}
} else if (itemId == R.id.contextmenu_search_by_image) {
mDelegate.onSearchByImageInNewTab();

Powered by Google App Engine
This is Rietveld 408576698