summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch')
-rw-r--r--www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch88
1 files changed, 0 insertions, 88 deletions
diff --git a/www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch b/www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch
deleted file mode 100644
index ebb9aec..0000000
--- a/www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1# NOTE: Modified to remove usage of compiler #if macros
2From: csagan5 <32685696+csagan5@users.noreply.github.com>
3Date: Sun, 8 Jul 2018 18:16:34 +0200
4Subject: Disable fetching of all field trials
5
6---
7 .../browser/flags/ChromeFeatureList.java | 19 ++++---------------
8 .../variations/service/variations_service.cc | 12 +-----------
9 2 files changed, 5 insertions(+), 26 deletions(-)
10
11--- chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java.orig
12+++ chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
13@@ -105,11 +105,7 @@ public abstract class ChromeFeatureList
14 * the specified parameter does not exist.
15 */
16 public static String getFieldTrialParamByFeature(String featureName, String paramName) {
17- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
18- if (testValue != null) return testValue;
19- if (FeatureList.hasTestFeatures()) return "";
20- assert FeatureList.isInitialized();
21- return ChromeFeatureListJni.get().getFieldTrialParamByFeature(featureName, paramName);
22+ return "";
23 }
24
25 /**
26@@ -126,12 +122,7 @@ public abstract class ChromeFeatureList
27 */
28 public static int getFieldTrialParamByFeatureAsInt(
29 String featureName, String paramName, int defaultValue) {
30- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
31- if (testValue != null) return Integer.valueOf(testValue);
32- if (FeatureList.hasTestFeatures()) return defaultValue;
33- assert FeatureList.isInitialized();
34- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsInt(
35- featureName, paramName, defaultValue);
36+ return defaultValue;
37 }
38
39 /**
40@@ -148,12 +139,7 @@ public abstract class ChromeFeatureList
41 */
42 public static double getFieldTrialParamByFeatureAsDouble(
43 String featureName, String paramName, double defaultValue) {
44- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
45- if (testValue != null) return Double.valueOf(testValue);
46- if (FeatureList.hasTestFeatures()) return defaultValue;
47- assert FeatureList.isInitialized();
48- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsDouble(
49- featureName, paramName, defaultValue);
50+ return defaultValue;
51 }
52
53 /**
54@@ -184,12 +170,7 @@ public abstract class ChromeFeatureList
55 */
56 public static boolean getFieldTrialParamByFeatureAsBoolean(
57 String featureName, String paramName, boolean defaultValue) {
58- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
59- if (testValue != null) return Boolean.valueOf(testValue);
60- if (FeatureList.hasTestFeatures()) return defaultValue;
61- assert FeatureList.isInitialized();
62- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsBoolean(
63- featureName, paramName, defaultValue);
64+ return defaultValue;
65 }
66
67 /* Alphabetical: */
68--- components/variations/service/variations_service.cc.orig
69+++ components/variations/service/variations_service.cc
70@@ -238,17 +238,7 @@ bool GetInstanceManipulations(const net:
71 // Variations seed fetching is only enabled in official Chrome builds, if a URL
72 // is specified on the command line, and for testing.
73 bool IsFetchingEnabled() {
74-#if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
75- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
76- switches::kVariationsServerURL) &&
77- !g_should_fetch_for_testing) {
78- DVLOG(1)
79- << "Not performing repeated fetching in unofficial build without --"
80- << switches::kVariationsServerURL << " specified.";
81- return false;
82- }
83-#endif
84- return true;
85+ return false;
86 }
87
88 std::unique_ptr<SeedResponse> MaybeImportFirstRunSeed(