summaryrefslogtreecommitdiff
path: root/chromium/components/flags_ui/feature_entry.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-04 14:17:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-05 10:05:06 +0000
commit39d357e3248f80abea0159765ff39554affb40db (patch)
treeaba0e6bfb76de0244bba0f5fdbd64b830dd6e621 /chromium/components/flags_ui/feature_entry.cc
parent87778abf5a1f89266f37d1321b92a21851d8244d (diff)
downloadqtwebengine-chromium-39d357e3248f80abea0159765ff39554affb40db.tar.gz
BASELINE: Update Chromium to 55.0.2883.105
And updates ninja to 1.7.2 Change-Id: I20d43c737f82764d857ada9a55586901b18b9243 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/components/flags_ui/feature_entry.cc')
-rw-r--r--chromium/components/flags_ui/feature_entry.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chromium/components/flags_ui/feature_entry.cc b/chromium/components/flags_ui/feature_entry.cc
index 53a219c3d55..80ea2a72e3e 100644
--- a/chromium/components/flags_ui/feature_entry.cc
+++ b/chromium/components/flags_ui/feature_entry.cc
@@ -41,11 +41,10 @@ base::string16 FeatureEntry::DescriptionForOption(int index) const {
if (index == 0) {
description_id = IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT;
} else if (index == 1) {
- // Variation 1: the default enabled variation => "Enabled".
description_id = IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED;
} else if (index < num_options - 1) {
- // Variations 2 .. n => "Enabled <description_text>".
- int variation_index = index - 1;
+ // First two options do not have variations params.
+ int variation_index = index - 2;
return l10n_util::GetStringUTF16(IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED) +
base::ASCIIToUTF16(" ") +
base::ASCIIToUTF16(
@@ -86,11 +85,12 @@ const FeatureEntry::FeatureVariation* FeatureEntry::VariationForOption(
type == FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE);
DCHECK_LT(index, num_options);
- if (type == FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE && index > 0 &&
+ if (type == FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE && index > 1 &&
index < num_options - 1) {
// We have no variations for FEATURE_VALUE type. Option at |index|
- // corresponds to variation at |index| - 1 as the first option is "Default".
- return &feature_variations[index - 1];
+ // corresponds to variation at |index| - 2 as the list starts with "Default"
+ // and "Enabled" (with default parameters).
+ return &feature_variations[index - 2];
}
return nullptr;
}