Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java |
| index d818e820b990ba20d604deaa0ce4e626244480ba..8694482c209cabb12da514035bb0bac61d5552be 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java |
| @@ -20,6 +20,9 @@ import org.chromium.content.browser.ContentViewCore; |
| * A helper class that handles generating context menus for {@link ContentViewCore}s. |
| */ |
| public class ContextMenuHelper implements OnCreateContextMenuListener, OnMenuItemClickListener { |
| + private static final String DATA_REDUCTION_PROXY_PASSTHROUGH_HEADER = |
| + "Chrome-Proxy: pass-through"; |
| + |
| private long mNativeContextMenuHelper; |
| private ContextMenuPopulator mPopulator; |
| @@ -75,8 +78,9 @@ public class ContextMenuHelper implements OnCreateContextMenuListener, OnMenuIte |
| * Starts a download based on the current {@link ContextMenuParams}. |
| * @param isLink Whether or not the download target is a link. |
| */ |
| - public void startContextMenuDownload(boolean isLink) { |
| - if (mNativeContextMenuHelper != 0) nativeOnStartDownload(mNativeContextMenuHelper, isLink); |
| + public void startContextMenuDownload(boolean isLink, boolean isDataReductionProxyEnabled) { |
| + if (mNativeContextMenuHelper != 0) nativeOnStartDownload(mNativeContextMenuHelper, isLink, |
|
Ted C
2015/06/22 20:40:49
braces required since it's more than one line now
megjablon
2015/06/22 23:21:02
Done.
|
| + isDataReductionProxyEnabled ? DATA_REDUCTION_PROXY_PASSTHROUGH_HEADER : null); |
| } |
| @Override |
| @@ -108,5 +112,6 @@ public class ContextMenuHelper implements OnCreateContextMenuListener, OnMenuIte |
| return (mPopulator != null && mPopulator.shouldShowContextMenu(params)); |
| } |
| - private native void nativeOnStartDownload(long nativeContextMenuHelper, boolean isLink); |
| + private native void nativeOnStartDownload( |
| + long nativeContextMenuHelper, boolean isLink, String headers); |
| } |