From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Fri, 27 Oct 2017 15:53:37 +0200
Subject: Disable data saver

---
 .../java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java | 1 -
 .../chrome/browser/net/spdyproxy/DataReductionProxySettings.java        | 2 ++
 .../browser/preferences/datareduction/DataReductionPromoUtils.java      | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -140,7 +140,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa
         boolean notifyAdapter = false;
         // An optional Data Saver page.
         if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) {
-            mPages.add(new DataReductionProxyFirstRunFragment.Page());
             mFreProgressStates.add(FRE_PROGRESS_DATA_SAVER_SHOWN);
             notifyAdapter = true;
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
@@ -149,6 +149,7 @@ public class DataReductionProxySettings {
         // DataReductionProxySettings is a singleton that lives forever and there's no clean
         // shutdown of Chrome on Android
         mNativeDataReductionProxySettings = nativeInit();
+        nativeSetDataReductionProxyEnabled(mNativeDataReductionProxySettings, false);
     }
 
     /** Returns true if the SPDY proxy promo is allowed to be shown. */
@@ -171,6 +172,7 @@ public class DataReductionProxySettings {
      * data reduction statistics if this is the first time the SPDY proxy has been enabled.
      */
     public void setDataReductionProxyEnabled(Context context, boolean enabled) {
+        enabled = false;
         if (enabled
                 && ContextUtils.getAppSharedPreferences().getLong(
                            DATA_REDUCTION_FIRST_ENABLED_TIME, 0)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java
@@ -68,7 +68,7 @@ public class DataReductionPromoUtils {
         }
         if (DataReductionProxySettings.getInstance().isDataReductionProxyManaged()) return false;
         if (DataReductionProxySettings.getInstance().isDataReductionProxyEnabled()) return false;
-        return true;
+        return false;
     }
 
     /**
-- 
2.7.4

