From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 8 Jul 2018 18:16:34 +0200
Subject: Disable fetching of all field trials

---
 .../src/org/chromium/chrome/browser/ChromeFeatureList.java   | 12 +++---------
 components/variations/service/variations_service.cc          | 12 +-----------
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
@@ -106,9 +106,7 @@ public abstract class ChromeFeatureList {
      */
     public static int getFieldTrialParamByFeatureAsInt(
             String featureName, String paramName, int defaultValue) {
-        if (sTestFeatures != null) return defaultValue;
-        assert isInitialized();
-        return nativeGetFieldTrialParamByFeatureAsInt(featureName, paramName, defaultValue);
+        return defaultValue;
     }
 
     /**
@@ -125,9 +123,7 @@ public abstract class ChromeFeatureList {
      */
     public static double getFieldTrialParamByFeatureAsDouble(
             String featureName, String paramName, double defaultValue) {
-        if (sTestFeatures != null) return defaultValue;
-        assert isInitialized();
-        return nativeGetFieldTrialParamByFeatureAsDouble(featureName, paramName, defaultValue);
+        return defaultValue;
     }
 
     /**
@@ -144,9 +140,7 @@ public abstract class ChromeFeatureList {
      */
     public static boolean getFieldTrialParamByFeatureAsBoolean(
             String featureName, String paramName, boolean defaultValue) {
-        if (sTestFeatures != null) return defaultValue;
-        assert isInitialized();
-        return nativeGetFieldTrialParamByFeatureAsBoolean(featureName, paramName, defaultValue);
+        return defaultValue;
     }
 
     // Alphabetical:
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
@@ -240,17 +240,7 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers,
 // Variations seed fetching is only enabled in official Chrome builds, if a URL
 // is specified on the command line, and for testing.
 bool IsFetchingEnabled() {
-#if !defined(GOOGLE_CHROME_BUILD)
-  if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kVariationsServerURL) &&
-      !g_should_fetch_for_testing) {
-    DVLOG(1)
-        << "Not performing repeated fetching in unofficial build without --"
-        << switches::kVariationsServerURL << " specified.";
-    return false;
-  }
-#endif
-  return true;
+  return false;
 }
 
 std::unique_ptr<SeedResponse> MaybeImportFirstRunSeed(
-- 
2.11.0

