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

Side by Side Diff: components/flags_ui/feature_entry.h

Issue 2707013002: [chrome://flags] Let features override params in the same trial (Closed)
Patch Set: Comments #1 Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/flags_ui/feature_entry_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_ 5 #ifndef COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_
6 #define COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_ 6 #define COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 const char* command_line_switch; 140 const char* command_line_switch;
141 141
142 // Simple switches that have no value should use "" for command_line_value. 142 // Simple switches that have no value should use "" for command_line_value.
143 const char* command_line_value; 143 const char* command_line_value;
144 144
145 // For ENABLE_DISABLE_VALUE, the command line switch and value to explicitly 145 // For ENABLE_DISABLE_VALUE, the command line switch and value to explicitly
146 // disable the feature. 146 // disable the feature.
147 const char* disable_command_line_switch; 147 const char* disable_command_line_switch;
148 const char* disable_command_line_value; 148 const char* disable_command_line_value;
149 149
150 // For FEATURE_VALUE, the base::Feature this entry corresponds to. 150 // For FEATURE_VALUE or FEATURE_WITH_VARIATIONS_VALUE, the base::Feature this
151 // entry corresponds to. The same feature must not be used in multiple
152 // FeatureEntries.
151 const base::Feature* feature; 153 const base::Feature* feature;
152 154
153 // Number of options to choose from. This is used if type is MULTI_VALUE, 155 // Number of options to choose from. This is used if type is MULTI_VALUE,
154 // ENABLE_DISABLE_VALUE, FEATURE_VALUE, or FEATURE_WITH_VARIATIONS_VALUE. 156 // ENABLE_DISABLE_VALUE, FEATURE_VALUE, or FEATURE_WITH_VARIATIONS_VALUE.
155 int num_options; 157 int num_options;
156 158
157 // This describes the options if type is MULTI_VALUE. 159 // This describes the options if type is MULTI_VALUE.
158 const Choice* choices; 160 const Choice* choices;
159 161
160 // This describes the options if type is FEATURE_WITH_VARIATIONS_VALUE. 162 // This describes the options if type is FEATURE_WITH_VARIATIONS_VALUE.
161 // The first variation is the default "Enabled" variation, its description_id 163 // The first variation is the default "Enabled" variation, its description_id
162 // is disregarded. 164 // is disregarded.
163 const FeatureVariation* feature_variations; 165 const FeatureVariation* feature_variations;
164 166
165 // The name of the FieldTrial in which the selected variation parameters 167 // The name of the FieldTrial in which the selected variation parameters
166 // should be registered. This is used if type is 168 // should be registered. Can be a nullptr if the parameters are accessed by
167 // FEATURE_WITH_VARIATIONS_VALUE. 169 // their feature and the trial name is thus irrelevant. This is used if type
Alexei Svitkine (slow) 2017/03/01 22:24:37 This comment change should reverted now, right?
jkrcal 2017/03/02 08:13:12 Done.
170 // is FEATURE_WITH_VARIATIONS_VALUE.
168 const char* feature_trial_name; 171 const char* feature_trial_name;
169 172
170 // Returns the name used in prefs for the option at the specified |index|. 173 // Returns the name used in prefs for the option at the specified |index|.
171 // Only used for types that use |num_options|. 174 // Only used for types that use |num_options|.
172 std::string NameForOption(int index) const; 175 std::string NameForOption(int index) const;
173 176
174 // Returns the human readable description for the option at |index|. 177 // Returns the human readable description for the option at |index|.
175 // Only used for types that use |num_options|. 178 // Only used for types that use |num_options|.
176 base::string16 DescriptionForOption(int index) const; 179 base::string16 DescriptionForOption(int index) const;
177 180
(...skipping 15 matching lines...) Expand all
193 196
194 // Separator used for multi values. Multi values are represented in prefs as 197 // Separator used for multi values. Multi values are represented in prefs as
195 // name-of-experiment + kMultiSeparator + selected_index. 198 // name-of-experiment + kMultiSeparator + selected_index.
196 extern const char kMultiSeparator[]; 199 extern const char kMultiSeparator[];
197 200
198 } // namespace 201 } // namespace
199 202
200 } // namespace flag_ui 203 } // namespace flag_ui
201 204
202 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_ 205 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/flags_ui/feature_entry_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698