Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1321)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java

Issue 2371003003: Remove non-elderberry herb flavors. (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
index 8597a67d13ef75661efbee31d30acbb228eb239d..30f202827eaae7016afc32b406925c72868585ed 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
@@ -154,8 +154,8 @@ public class FeatureUtilities {
}
/**
- * @return Which flavor of Herb is being tested. See {@link ChromeSwitches#HERB_FLAVOR_ANISE}
- * and its related switches.
+ * @return Which flavor of Herb is being tested.
+ * See {@link ChromeSwitches#HERB_FLAVOR_ELDERBERRY} and its related switches.
*/
public static String getHerbFlavor() {
Context context = ContextUtils.getApplicationContext();
@@ -203,33 +203,16 @@ public class FeatureUtilities {
// The first clause does the null checks so so we can freely use the startsWith() function.
String newFlavor = FieldTrialList.findFullName(HERB_EXPERIMENT_NAME);
Log.d(TAG, "Experiment flavor: " + newFlavor);
- if (TextUtils.isEmpty(newFlavor)
- || newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_CONTROL)
- || newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_DEFAULT)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_DISABLED;
- } else if (newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_ANISE)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_ANISE;
- } else if (newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_BASIL)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_BASIL;
- } else if (newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_CHIVE)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_CHIVE;
- } else if (newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_DILL)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_DILL;
- } else if (newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_ELDERBERRY)) {
+ if (!TextUtils.isEmpty(newFlavor)
+ && newFlavor.startsWith(ChromeSwitches.HERB_FLAVOR_ELDERBERRY)) {
newFlavor = ChromeSwitches.HERB_FLAVOR_ELDERBERRY;
+ } else {
+ newFlavor = ChromeSwitches.HERB_FLAVOR_DISABLED;
}
CommandLine instance = CommandLine.getInstance();
if (instance.hasSwitch(ChromeSwitches.HERB_FLAVOR_DISABLED_SWITCH)) {
newFlavor = ChromeSwitches.HERB_FLAVOR_DISABLED;
- } else if (instance.hasSwitch(ChromeSwitches.HERB_FLAVOR_ANISE_SWITCH)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_ANISE;
- } else if (instance.hasSwitch(ChromeSwitches.HERB_FLAVOR_BASIL_SWITCH)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_BASIL;
- } else if (instance.hasSwitch(ChromeSwitches.HERB_FLAVOR_CHIVE_SWITCH)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_CHIVE;
- } else if (instance.hasSwitch(ChromeSwitches.HERB_FLAVOR_DILL_SWITCH)) {
- newFlavor = ChromeSwitches.HERB_FLAVOR_DILL;
} else if (instance.hasSwitch(ChromeSwitches.HERB_FLAVOR_ELDERBERRY_SWITCH)) {
newFlavor = ChromeSwitches.HERB_FLAVOR_ELDERBERRY;
}

Powered by Google App Engine
This is Rietveld 408576698