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

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: 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/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 82e96a4a68e23c250cedfc8f4610f5ddefc25d0d..8dd8de02d5fad469bef65af22e3c131f338c28ab 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
@@ -164,14 +164,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