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

Side by Side Diff: 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
« no previous file with comments | « no previous file | chrome/browser/about_flags.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_ABOUT_FLAGS_H_ 5 #ifndef CHROME_BROWSER_ABOUT_FLAGS_H_
6 #define CHROME_BROWSER_ABOUT_FLAGS_H_ 6 #define CHROME_BROWSER_ABOUT_FLAGS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector>
14 15
15 #include "base/command_line.h" 16 #include "base/command_line.h"
16 #include "base/metrics/histogram_base.h" 17 #include "base/metrics/histogram_base.h"
17 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
18 #include "components/flags_ui/feature_entry.h" 19 #include "components/flags_ui/feature_entry.h"
19 #include "components/flags_ui/flags_state.h" 20 #include "components/flags_ui/flags_state.h"
20 21
21 namespace base { 22 namespace base {
22 class FeatureList; 23 class FeatureList;
23 class ListValue; 24 class ListValue;
24 } 25 }
25 26
26 namespace flags_ui { 27 namespace flags_ui {
27 class FlagsStorage; 28 class FlagsStorage;
28 } 29 }
29 30
30 namespace about_flags { 31 namespace about_flags {
31 32
32 // Reads the state from |flags_storage| and adds the command line flags 33 // Reads the state from |flags_storage| and adds the command line flags
33 // belonging to the active feature entries to |command_line|. 34 // belonging to the active feature entries to |command_line|.
34 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, 35 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
35 base::CommandLine* command_line, 36 base::CommandLine* command_line,
36 flags_ui::SentinelsMode sentinels); 37 flags_ui::SentinelsMode sentinels);
37 38
38 // Registers variations parameter values selected for features in about:flags. 39 // Registers variations parameter values selected for features in about:flags.
39 // The selected flags are retrieved from |flags_storage|, the registered 40 // The selected flags are retrieved from |flags_storage|, the registered
40 // variation parameters are connected to their corresponding features in 41 // variation parameters are connected to their corresponding features in
41 // |feature_list|. 42 // |feature_list|. Returns the (possibly empty) list of additional variation ids
42 void RegisterAllFeatureVariationParameters( 43 // to register in the MetricsService that come from variations selected using
44 // chrome://flags.
45 std::vector<std::string> RegisterAllFeatureVariationParameters(
43 flags_ui::FlagsStorage* flags_storage, 46 flags_ui::FlagsStorage* flags_storage,
44 base::FeatureList* feature_list); 47 base::FeatureList* feature_list);
45 48
46 // Compares a set of switches of the two provided command line objects and 49 // Compares a set of switches of the two provided command line objects and
47 // returns true if they are the same and false otherwise. 50 // returns true if they are the same and false otherwise.
48 // If |out_difference| is not NULL, it's filled with set_symmetric_difference 51 // If |out_difference| is not NULL, it's filled with set_symmetric_difference
49 // between sets. 52 // between sets.
50 bool AreSwitchesIdenticalToCurrentCommandLine( 53 bool AreSwitchesIdenticalToCurrentCommandLine(
51 const base::CommandLine& new_cmdline, 54 const base::CommandLine& new_cmdline,
52 const base::CommandLine& active_cmdline, 55 const base::CommandLine& active_cmdline,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 101
99 // This value is reported as switch histogram ID if switch name has unknown 102 // This value is reported as switch histogram ID if switch name has unknown
100 // format. 103 // format.
101 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId; 104 extern const base::HistogramBase::Sample kBadSwitchFormatHistogramId;
102 105
103 } // namespace testing 106 } // namespace testing
104 107
105 } // namespace about_flags 108 } // namespace about_flags
106 109
107 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ 110 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698