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