1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# NOTE: Modified to remove usage of compiler #if macros
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 8 Jul 2018 18:16:34 +0200
Subject: Disable fetching of all field trials
---
.../browser/flags/ChromeFeatureList.java | 19 ++++---------------
.../variations/service/variations_service.cc | 12 +-----------
2 files changed, 5 insertions(+), 26 deletions(-)
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -105,11 +105,7 @@ public abstract class ChromeFeatureList
* the specified parameter does not exist.
*/
public static String getFieldTrialParamByFeature(String featureName, String paramName) {
- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
- if (testValue != null) return testValue;
- if (FeatureList.hasTestFeatures()) return "";
- assert FeatureList.isInitialized();
- return ChromeFeatureListJni.get().getFieldTrialParamByFeature(featureName, paramName);
+ return "";
}
/**
@@ -126,12 +122,7 @@ public abstract class ChromeFeatureList
*/
public static int getFieldTrialParamByFeatureAsInt(
String featureName, String paramName, int defaultValue) {
- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
- if (testValue != null) return Integer.valueOf(testValue);
- if (FeatureList.hasTestFeatures()) return defaultValue;
- assert FeatureList.isInitialized();
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsInt(
- featureName, paramName, defaultValue);
+ return defaultValue;
}
/**
@@ -148,12 +139,7 @@ public abstract class ChromeFeatureList
*/
public static double getFieldTrialParamByFeatureAsDouble(
String featureName, String paramName, double defaultValue) {
- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
- if (testValue != null) return Double.valueOf(testValue);
- if (FeatureList.hasTestFeatures()) return defaultValue;
- assert FeatureList.isInitialized();
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsDouble(
- featureName, paramName, defaultValue);
+ return defaultValue;
}
/**
@@ -184,12 +170,7 @@ public abstract class ChromeFeatureList
*/
public static boolean getFieldTrialParamByFeatureAsBoolean(
String featureName, String paramName, boolean defaultValue) {
- String testValue = FeatureList.getTestValueForFieldTrialParam(featureName, paramName);
- if (testValue != null) return Boolean.valueOf(testValue);
- if (FeatureList.hasTestFeatures()) return defaultValue;
- assert FeatureList.isInitialized();
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsBoolean(
- featureName, paramName, defaultValue);
+ return defaultValue;
}
/* Alphabetical: */
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
@@ -234,17 +234,7 @@ bool GetInstanceManipulations(const net:
// 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 !BUILDFLAG(GOOGLE_CHROME_BRANDING)
- 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(
|