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

Side by Side Diff: chrome/browser/about_flags.h

Issue 12276012: Add reset all button to flags page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ResetAllFlags throughout Created 7 years, 10 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/app/generated_resources.grd ('k') | 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Enables or disables the experiment with id |internal_name|. 98 // Enables or disables the experiment with id |internal_name|.
99 void SetExperimentEnabled( 99 void SetExperimentEnabled(
100 PrefService* prefs, const std::string& internal_name, bool enable); 100 PrefService* prefs, const std::string& internal_name, bool enable);
101 101
102 // Removes all switches that were added to a command line by a previous call to 102 // Removes all switches that were added to a command line by a previous call to
103 // |ConvertFlagsToSwitches()|. 103 // |ConvertFlagsToSwitches()|.
104 void RemoveFlagsSwitches( 104 void RemoveFlagsSwitches(
105 std::map<std::string, CommandLine::StringType>* switch_list); 105 std::map<std::string, CommandLine::StringType>* switch_list);
106 106
107 // Reset all flags to the default state by clearing all flags.
108 void ResetAllFlags(PrefService* prefs);
109
107 // Returns the value for the current platform. This is one of the values defined 110 // Returns the value for the current platform. This is one of the values defined
108 // by the OS enum above. 111 // by the OS enum above.
109 // This is exposed only for testing. 112 // This is exposed only for testing.
110 int GetCurrentPlatform(); 113 int GetCurrentPlatform();
111 114
112 // Sends UMA stats about experimental flag usage. This should be called once per 115 // Sends UMA stats about experimental flag usage. This should be called once per
113 // startup. 116 // startup.
114 void RecordUMAStatistics(const PrefService* prefs); 117 void RecordUMAStatistics(const PrefService* prefs);
115 118
116 namespace testing { 119 namespace testing {
117 // Clears internal global state, for unit tests. 120 // Clears internal global state, for unit tests.
118 void ClearState(); 121 void ClearState();
119 122
120 // Sets the list of experiments. Pass in NULL to use the default set. This does 123 // Sets the list of experiments. Pass in NULL to use the default set. This does
121 // NOT take ownership of the supplied Experiments. 124 // NOT take ownership of the supplied Experiments.
122 void SetExperiments(const Experiment* e, size_t count); 125 void SetExperiments(const Experiment* e, size_t count);
123 126
124 // Returns the current set of experiments. 127 // Returns the current set of experiments.
125 const Experiment* GetExperiments(size_t* count); 128 const Experiment* GetExperiments(size_t* count);
126 129
127 // Separator used for multi values. Multi values are represented in prefs as 130 // Separator used for multi values. Multi values are represented in prefs as
128 // name-of-experiment + kMultiSeparator + selected_index. 131 // name-of-experiment + kMultiSeparator + selected_index.
129 extern const char kMultiSeparator[]; 132 extern const char kMultiSeparator[];
130 133
131 } // namespace testing 134 } // namespace testing
132 135
133 } // namespace about_flags 136 } // namespace about_flags
134 137
135 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_ 138 #endif // CHROME_BROWSER_ABOUT_FLAGS_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698