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

Side by Side Diff: ios/chrome/browser/about_flags.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Implementation of about_flags for iOS that sets flags based on experimental 5 // Implementation of about_flags for iOS that sets flags based on experimental
6 // settings. 6 // settings.
7 7
8 #ifndef IOS_CHROME_BROWSER_ABOUT_FLAGS_H_ 8 #ifndef IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
9 #define IOS_CHROME_BROWSER_ABOUT_FLAGS_H_ 9 #define IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
10 10
11 #include <stddef.h> 11 #include <stddef.h>
12 #include <string>
13 #include <vector>
12 14
13 #include "components/flags_ui/flags_state.h" 15 #include "components/flags_ui/flags_state.h"
14 16
15 namespace base { 17 namespace base {
16 class CommandLine; 18 class CommandLine;
17 class ListValue; 19 class ListValue;
18 } 20 }
19 21
20 namespace flags_ui { 22 namespace flags_ui {
21 class FlagsStorage; 23 class FlagsStorage;
22 } 24 }
23 25
24 // Reads the state from |flags_storage| and adds the command line flags 26 // Reads the state from |flags_storage| and adds the command line flags
25 // belonging to the active feature entries to |command_line| in addition 27 // belonging to the active feature entries to |command_line| in addition
26 // to the flags from experimental settings. 28 // to the flags from experimental settings.
27 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, 29 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
28 base::CommandLine* command_line); 30 base::CommandLine* command_line);
29 31
32 // Registers variations parameter values selected for features in about:flags.
33 // The selected flags are retrieved from |flags_storage|, the registered
34 // variation parameters are connected to their corresponding features in
35 // |feature_list|. Returns the (possibly empty) list of additional variation ids
36 // to register in the MetricsService that come from variations selected using
37 // chrome://flags.
38 std::vector<std::string> RegisterAllFeatureVariationParameters(
39 flags_ui::FlagsStorage* flags_storage,
40 base::FeatureList* feature_list);
41
30 // Gets the list of feature entries. Entries that are available for the current 42 // Gets the list of feature entries. Entries that are available for the current
31 // platform are appended to |supported_entries|; all other entries are appended 43 // platform are appended to |supported_entries|; all other entries are appended
32 // to |unsupported_entries|. 44 // to |unsupported_entries|.
33 void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage, 45 void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
34 flags_ui::FlagAccess access, 46 flags_ui::FlagAccess access,
35 base::ListValue* supported_entries, 47 base::ListValue* supported_entries,
36 base::ListValue* unsupported_entries); 48 base::ListValue* unsupported_entries);
37 49
38 // Enables or disables the current with id |internal_name|. 50 // Enables or disables the current with id |internal_name|.
39 void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage, 51 void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
40 const std::string& internal_name, 52 const std::string& internal_name,
41 bool enable); 53 bool enable);
42 54
43 // Reset all flags to the default state by clearing all flags. 55 // Reset all flags to the default state by clearing all flags.
44 void ResetAllFlags(flags_ui::FlagsStorage* flags_storage); 56 void ResetAllFlags(flags_ui::FlagsStorage* flags_storage);
45 57
46 namespace testing { 58 namespace testing {
47 59
48 // Returns the global set of feature entries. 60 // Returns the global set of feature entries.
49 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count); 61 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count);
50 62
51 } // namespace testing 63 } // namespace testing
52 64
53 #endif // IOS_CHROME_BROWSER_ABOUT_FLAGS_H_ 65 #endif // IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
OLDNEW
« no previous file with comments | « components/variations/variations_http_header_provider_unittest.cc ('k') | ios/chrome/browser/about_flags.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698