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

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

Issue 2182553002: Add other variations (with ids) for NTPSnippets to chrome://flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unittest fix Created 4 years, 4 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 struct FeatureVariation { 92 struct FeatureVariation {
93 // Text that denotes the variation in chrome://flags. For each variation, 93 // Text that denotes the variation in chrome://flags. For each variation,
94 // the user is shown an option labeled "Enabled <description_text>" (with 94 // the user is shown an option labeled "Enabled <description_text>" (with
95 // the exception of the first option labeled "Enabled" to make clear it is 95 // the exception of the first option labeled "Enabled" to make clear it is
96 // the default one). No need for description_id, chrome://flags should not 96 // the default one). No need for description_id, chrome://flags should not
97 // get translated. The other parts here use ids for historical reasons and 97 // get translated. The other parts here use ids for historical reasons and
98 // can realistically also be moved to direct description_texts. 98 // can realistically also be moved to direct description_texts.
99 const char* description_text; 99 const char* description_text;
100 const FeatureParam* params; 100 const FeatureParam* params;
101 int num_params; 101 int num_params;
102 // A variation id number in the format of
103 // VariationsHttpHeaderProvider::SetDefaultVariationIds or an empty string
104 // if you do not need to set any variation_id for this feature variation.
Alexei Svitkine (slow) 2016/07/27 15:04:18 Why empty string and not nullptr?
jkrcal 2016/07/27 17:12:43 Done. (It was std::string originally, I did not no
105 const char* variation_id;
102 }; 106 };
103 107
104 // The internal name of the feature entry. This is never shown to the user. 108 // The internal name of the feature entry. This is never shown to the user.
105 // It _is_ however stored in the prefs file, so you shouldn't change the 109 // It _is_ however stored in the prefs file, so you shouldn't change the
106 // name of existing flags. 110 // name of existing flags.
107 const char* internal_name; 111 const char* internal_name;
108 112
109 // String id of the message containing the feature's name. 113 // String id of the message containing the feature's name.
110 int visible_name_id; 114 int visible_name_id;
111 115
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 183
180 // Separator used for multi values. Multi values are represented in prefs as 184 // Separator used for multi values. Multi values are represented in prefs as
181 // name-of-experiment + kMultiSeparator + selected_index. 185 // name-of-experiment + kMultiSeparator + selected_index.
182 extern const char kMultiSeparator[]; 186 extern const char kMultiSeparator[];
183 187
184 } // namespace 188 } // namespace
185 189
186 } // namespace flag_ui 190 } // namespace flag_ui
187 191
188 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_ 192 #endif // COMPONENTS_FLAGS_UI_FEATURE_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698