Chromium Code Reviews| Index: chrome/browser/about_flags.cc |
| diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
| index f0ade212558075a897dd75445079875d2d3e9953..90c607ad552f5741212c7df294a146b0fbed67c8 100644 |
| --- a/chrome/browser/about_flags.cc |
| +++ b/chrome/browser/about_flags.cc |
| @@ -1293,6 +1293,7 @@ class FlagsState { |
| PrefService* prefs, const std::string& internal_name, bool enable); |
| void RemoveFlagsSwitches( |
| std::map<std::string, CommandLine::StringType>* switch_list); |
| + void RemoveAllFlags(PrefService* prefs); |
| void reset(); |
| // Returns the singleton instance of this class |
| @@ -1514,6 +1515,10 @@ void RemoveFlagsSwitches( |
| FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
| } |
| +void ResetAllExperiments(PrefService* prefs) { |
|
James Hawkins
2013/02/19 20:49:54
Why is this called ResetAllExperiments but the int
jryans
2013/02/19 21:28:28
Generally there seems be a mixture of "experiment"
James Hawkins
2013/02/19 21:38:43
I'd go with Flags for both.
|
| + FlagsState::GetInstance()->RemoveAllFlags(prefs); |
| +} |
| + |
| int GetCurrentPlatform() { |
| #if defined(OS_MACOSX) |
| return kOsMac; |
| @@ -1679,6 +1684,13 @@ void FlagsState::RemoveFlagsSwitches( |
| } |
| } |
| +void FlagsState::RemoveAllFlags(PrefService* prefs) { |
| + needs_restart_ = true; |
| + |
| + std::set<std::string> no_experiments; |
| + SetEnabledFlags(prefs, no_experiments); |
| +} |
| + |
| void FlagsState::reset() { |
| needs_restart_ = false; |
| flags_switches_.clear(); |