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

Side by Side Diff: components/flags_ui/flags_state.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: Alexei's comment #5 + fix a bug 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
« no previous file with comments | « components/flags_ui/feature_entry.h ('k') | components/flags_ui/flags_state.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_FLAGS_STATE_H_ 5 #ifndef COMPONENTS_FLAGS_UI_FLAGS_STATE_H_
6 #define COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ 6 #define COMPONENTS_FLAGS_UI_FLAGS_STATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector>
13 14
14 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
15 #include "base/command_line.h" 16 #include "base/command_line.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 18
18 namespace base { 19 namespace base {
19 class FeatureList; 20 class FeatureList;
20 class ListValue; 21 class ListValue;
21 } 22 }
22 23
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const std::string& internal_name, 78 const std::string& internal_name,
78 bool enable); 79 bool enable);
79 void RemoveFlagsSwitches( 80 void RemoveFlagsSwitches(
80 std::map<std::string, base::CommandLine::StringType>* switch_list); 81 std::map<std::string, base::CommandLine::StringType>* switch_list);
81 void ResetAllFlags(FlagsStorage* flags_storage); 82 void ResetAllFlags(FlagsStorage* flags_storage);
82 void Reset(); 83 void Reset();
83 84
84 // Registers variations parameter values selected for features in about:flags. 85 // Registers variations parameter values selected for features in about:flags.
85 // The selected flags are retrieved from |flags_storage|, the registered 86 // The selected flags are retrieved from |flags_storage|, the registered
86 // variation parameters are connected to their corresponding features in 87 // variation parameters are connected to their corresponding features in
87 // |feature_list|. 88 // |feature_list|. Returns the (possibly empty) comma separated list of
88 void RegisterAllFeatureVariationParameters(FlagsStorage* flags_storage, 89 // additional variation ids to register in the MetricsService that come from
89 base::FeatureList* feature_list); 90 // variations selected using chrome://flags.
91 std::vector<std::string> RegisterAllFeatureVariationParameters(
92 FlagsStorage* flags_storage,
93 base::FeatureList* feature_list);
90 94
91 // Gets the list of feature entries. Entries that are available for the 95 // Gets the list of feature entries. Entries that are available for the
92 // current platform are appended to |supported_entries|; all other entries are 96 // current platform are appended to |supported_entries|; all other entries are
93 // appended to |unsupported_entries|. 97 // appended to |unsupported_entries|.
94 void GetFlagFeatureEntries( 98 void GetFlagFeatureEntries(
95 FlagsStorage* flags_storage, 99 FlagsStorage* flags_storage,
96 FlagAccess access, 100 FlagAccess access,
97 base::ListValue* supported_entries, 101 base::ListValue* supported_entries,
98 base::ListValue* unsupported_entries, 102 base::ListValue* unsupported_entries,
99 base::Callback<bool(const FeatureEntry&)> skip_feature_entry); 103 base::Callback<bool(const FeatureEntry&)> skip_feature_entry);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Map from switch name to a set of string, that keeps track which strings 180 // Map from switch name to a set of string, that keeps track which strings
177 // were appended to existing (list value) switches. 181 // were appended to existing (list value) switches.
178 std::map<std::string, std::set<std::string>> appended_switches_; 182 std::map<std::string, std::set<std::string>> appended_switches_;
179 183
180 DISALLOW_COPY_AND_ASSIGN(FlagsState); 184 DISALLOW_COPY_AND_ASSIGN(FlagsState);
181 }; 185 };
182 186
183 } // namespace flags_ui 187 } // namespace flags_ui
184 188
185 #endif // COMPONENTS_FLAGS_UI_FLAGS_STATE_H_ 189 #endif // COMPONENTS_FLAGS_UI_FLAGS_STATE_H_
OLDNEW
« no previous file with comments | « components/flags_ui/feature_entry.h ('k') | components/flags_ui/flags_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698