explicit denial to fetch (#1106)
This commit is contained in:
parent
54302084f1
commit
ce1a039537
1 changed files with 11 additions and 53 deletions
|
@ -3,60 +3,9 @@ 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(-)
|
||||
.../variations/service/variations_service.cc | 14 ++------------
|
||||
1 file changed, 2 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git 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
|
||||
--- 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
|
||||
@@ -123,9 +123,7 @@ public abstract class ChromeFeatureList {
|
||||
* the specified parameter does not exist.
|
||||
*/
|
||||
public static String getFieldTrialParamByFeature(String featureName, String paramName) {
|
||||
- if (FeatureList.hasTestFeatures()) return "";
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeature(featureName, paramName);
|
||||
+ return "";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,10 +140,7 @@ public abstract class ChromeFeatureList {
|
||||
*/
|
||||
public static int getFieldTrialParamByFeatureAsInt(
|
||||
String featureName, String paramName, int defaultValue) {
|
||||
- if (FeatureList.hasTestFeatures()) return defaultValue;
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsInt(
|
||||
- featureName, paramName, defaultValue);
|
||||
+ return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,10 +157,7 @@ public abstract class ChromeFeatureList {
|
||||
*/
|
||||
public static double getFieldTrialParamByFeatureAsDouble(
|
||||
String featureName, String paramName, double defaultValue) {
|
||||
- if (FeatureList.hasTestFeatures()) return defaultValue;
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsDouble(
|
||||
- featureName, paramName, defaultValue);
|
||||
+ return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,10 +188,7 @@ public abstract class ChromeFeatureList {
|
||||
*/
|
||||
public static boolean getFieldTrialParamByFeatureAsBoolean(
|
||||
String featureName, String paramName, boolean defaultValue) {
|
||||
- if (FeatureList.hasTestFeatures()) return defaultValue;
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsBoolean(
|
||||
- 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
|
||||
|
@ -79,6 +28,15 @@ diff --git a/components/variations/service/variations_service.cc b/components/va
|
|||
}
|
||||
|
||||
std::unique_ptr<SeedResponse> MaybeImportFirstRunSeed(
|
||||
@@ -608,7 +598,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) {
|
||||
// debugger or if the machine was suspended) and OnURLFetchComplete() hasn't
|
||||
// had a chance to run yet from the previous request. In this case, don't
|
||||
// start a new request and just let the previous one finish.
|
||||
- if (pending_seed_request_)
|
||||
+ if ((true) || pending_seed_request_)
|
||||
return false;
|
||||
|
||||
last_request_was_http_retry_ = is_http_retry;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue