| OLD | NEW |
| 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 #include "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 base::CommandLine* command_line, | 2005 base::CommandLine* command_line, |
| 2006 flags_ui::SentinelsMode sentinels) { | 2006 flags_ui::SentinelsMode sentinels) { |
| 2007 if (command_line->HasSwitch(switches::kNoExperiments)) | 2007 if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2008 return; | 2008 return; |
| 2009 | 2009 |
| 2010 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( | 2010 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( |
| 2011 flags_storage, command_line, sentinels, switches::kEnableFeatures, | 2011 flags_storage, command_line, sentinels, switches::kEnableFeatures, |
| 2012 switches::kDisableFeatures); | 2012 switches::kDisableFeatures); |
| 2013 } | 2013 } |
| 2014 | 2014 |
| 2015 void RegisterFeatureVariationParameters(flags_ui::FlagsStorage* flags_storage) { |
| 2016 FlagsStateSingleton::GetFlagsState()->RegisterFeatureVariationParameters( |
| 2017 flags_storage); |
| 2018 } |
| 2019 |
| 2015 bool AreSwitchesIdenticalToCurrentCommandLine( | 2020 bool AreSwitchesIdenticalToCurrentCommandLine( |
| 2016 const base::CommandLine& new_cmdline, | 2021 const base::CommandLine& new_cmdline, |
| 2017 const base::CommandLine& active_cmdline, | 2022 const base::CommandLine& active_cmdline, |
| 2018 std::set<base::CommandLine::StringType>* out_difference) { | 2023 std::set<base::CommandLine::StringType>* out_difference) { |
| 2019 const char* extra_flag_sentinel_begin_flag_name = nullptr; | 2024 const char* extra_flag_sentinel_begin_flag_name = nullptr; |
| 2020 const char* extra_flag_sentinel_end_flag_name = nullptr; | 2025 const char* extra_flag_sentinel_end_flag_name = nullptr; |
| 2021 #if defined(OS_CHROMEOS) | 2026 #if defined(OS_CHROMEOS) |
| 2022 // Put the flags between --policy-switches--begin and --policy-switches-end on | 2027 // Put the flags between --policy-switches--begin and --policy-switches-end on |
| 2023 // ChromeOS. | 2028 // ChromeOS. |
| 2024 extra_flag_sentinel_begin_flag_name = | 2029 extra_flag_sentinel_begin_flag_name = |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2115 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2111 | 2116 |
| 2112 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2117 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2113 *count = arraysize(kFeatureEntries); | 2118 *count = arraysize(kFeatureEntries); |
| 2114 return kFeatureEntries; | 2119 return kFeatureEntries; |
| 2115 } | 2120 } |
| 2116 | 2121 |
| 2117 } // namespace testing | 2122 } // namespace testing |
| 2118 | 2123 |
| 2119 } // namespace about_flags | 2124 } // namespace about_flags |
| OLD | NEW |