| 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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 flags_ui::SentinelsMode sentinels) { | 2051 flags_ui::SentinelsMode sentinels) { |
| 2052 if (command_line->HasSwitch(switches::kNoExperiments)) | 2052 if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2053 return; | 2053 return; |
| 2054 | 2054 |
| 2055 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( | 2055 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( |
| 2056 flags_storage, command_line, sentinels, switches::kEnableFeatures, | 2056 flags_storage, command_line, sentinels, switches::kEnableFeatures, |
| 2057 switches::kDisableFeatures); | 2057 switches::kDisableFeatures); |
| 2058 } | 2058 } |
| 2059 | 2059 |
| 2060 void RegisterAllFeatureVariationParameters( | 2060 void RegisterAllFeatureVariationParameters( |
| 2061 flags_ui::FlagsStorage* flags_storage) { | 2061 flags_ui::FlagsStorage* flags_storage, |
| 2062 base::FeatureList* feature_list) { |
| 2062 FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters( | 2063 FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters( |
| 2063 flags_storage); | 2064 flags_storage, feature_list); |
| 2064 } | 2065 } |
| 2065 | 2066 |
| 2066 bool AreSwitchesIdenticalToCurrentCommandLine( | 2067 bool AreSwitchesIdenticalToCurrentCommandLine( |
| 2067 const base::CommandLine& new_cmdline, | 2068 const base::CommandLine& new_cmdline, |
| 2068 const base::CommandLine& active_cmdline, | 2069 const base::CommandLine& active_cmdline, |
| 2069 std::set<base::CommandLine::StringType>* out_difference) { | 2070 std::set<base::CommandLine::StringType>* out_difference) { |
| 2070 const char* extra_flag_sentinel_begin_flag_name = nullptr; | 2071 const char* extra_flag_sentinel_begin_flag_name = nullptr; |
| 2071 const char* extra_flag_sentinel_end_flag_name = nullptr; | 2072 const char* extra_flag_sentinel_end_flag_name = nullptr; |
| 2072 #if defined(OS_CHROMEOS) | 2073 #if defined(OS_CHROMEOS) |
| 2073 // Put the flags between --policy-switches--begin and --policy-switches-end on | 2074 // Put the flags between --policy-switches--begin and --policy-switches-end on |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2162 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2162 | 2163 |
| 2163 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2164 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2164 *count = arraysize(kFeatureEntries); | 2165 *count = arraysize(kFeatureEntries); |
| 2165 return kFeatureEntries; | 2166 return kFeatureEntries; |
| 2166 } | 2167 } |
| 2167 | 2168 |
| 2168 } // namespace testing | 2169 } // namespace testing |
| 2169 | 2170 |
| 2170 } // namespace about_flags | 2171 } // namespace about_flags |
| OLD | NEW |