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

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

Issue 2146903002: Clean-up the code for default variations in chrome://flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS test crash fix? #2 Created 4 years, 5 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.cc » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // flags - for example via FieldTrials. 43 // flags - for example via FieldTrials.
44 ENABLE_DISABLE_VALUE, 44 ENABLE_DISABLE_VALUE,
45 45
46 // Corresponds to a base::Feature, per base/feature_list.h. The entry will 46 // Corresponds to a base::Feature, per base/feature_list.h. The entry will
47 // have three states: Default, Enabled, Disabled. When not specified or set 47 // have three states: Default, Enabled, Disabled. When not specified or set
48 // to Default, the normal default value of the feature is used. 48 // to Default, the normal default value of the feature is used.
49 FEATURE_VALUE, 49 FEATURE_VALUE,
50 50
51 // Corresponds to a base::Feature and additional options [O_1, ..., O_n] 51 // Corresponds to a base::Feature and additional options [O_1, ..., O_n]
52 // that specify variation parameters. Each of the options can specify a set 52 // that specify variation parameters. Each of the options can specify a set
53 // of variation parameters. The entry will have n+2 states: Default, 53 // of variation parameters. The entry will have n+3 states: Default,
54 // Enabled: V_1, ..., Enabled: V_n, Disabled. When not specified or set to 54 // Enabled, Enabled V_1, ..., Enabled: V_n, Disabled. When set to Default,
55 // Default, the normal default values of the feature and of the parameters 55 // the normal default values of the feature and of the parameters are used
56 // are used. 56 // (possibly passed from the server in a trial config). When set to Enabled,
57 // the feature is overriden to be enabled and empty set of parameters is
58 // used boiling down to the default behavior in the code.
57 FEATURE_WITH_VARIATIONS_VALUE, 59 FEATURE_WITH_VARIATIONS_VALUE,
58 }; 60 };
59 61
60 // Describes state of a feature. 62 // Describes state of a feature.
61 enum FeatureState { 63 enum FeatureState {
62 // The state of the feature is not overridden by the user. 64 // The state of the feature is not overridden by the user.
63 DEFAULT, 65 DEFAULT,
64 // The feature is enabled by the user. 66 // The feature is enabled by the user.
65 ENABLED, 67 ENABLED,
66 // The feature is disabled by the user. 68 // The feature is disabled by the user.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 179
178 // Separator used for multi values. Multi values are represented in prefs as 180 // Separator used for multi values. Multi values are represented in prefs as
179 // name-of-experiment + kMultiSeparator + selected_index. 181 // name-of-experiment + kMultiSeparator + selected_index.
180 extern const char kMultiSeparator[]; 182 extern const char kMultiSeparator[];
181 183
182 } // namespace 184 } // namespace
183 185
184 } // namespace flag_ui 186 } // namespace flag_ui
185 187
186 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_ 188 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/flags_ui/feature_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698