Chromium Code Reviews| 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 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1914 {"enable-font-cache-scaling", | 1914 {"enable-font-cache-scaling", |
| 1915 IDS_FLAGS_FONT_CACHE_SCALING_NAME, | 1915 IDS_FLAGS_FONT_CACHE_SCALING_NAME, |
| 1916 IDS_FLAGS_FONT_CACHE_SCALING_DESCRIPTION, kOsAll, | 1916 IDS_FLAGS_FONT_CACHE_SCALING_DESCRIPTION, kOsAll, |
| 1917 FEATURE_VALUE_TYPE(features::kFontCacheScaling)}, | 1917 FEATURE_VALUE_TYPE(features::kFontCacheScaling)}, |
| 1918 #if defined(OS_ANDROID) | 1918 #if defined(OS_ANDROID) |
| 1919 {"enable-vr-shell", | 1919 {"enable-vr-shell", |
| 1920 IDS_FLAGS_ENABLE_VR_SHELL_NAME, | 1920 IDS_FLAGS_ENABLE_VR_SHELL_NAME, |
| 1921 IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, | 1921 IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, |
| 1922 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, | 1922 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, |
| 1923 switches::kDisableVrShell)}, | 1923 switches::kDisableVrShell)}, |
| 1924 #endif | 1924 #endif |
|
Alexei Svitkine (slow)
2016/06/16 09:40:57
Seems like you both rebased and also addressed com
jkrcal
2016/06/16 14:49:17
You are right, I am sorry about it!
| |
| 1925 | 1925 |
| 1926 {"enable-weak-memorycache", | 1926 {"enable-weak-memorycache", |
| 1927 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, | 1927 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, |
| 1928 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll, | 1928 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll, |
| 1929 FEATURE_VALUE_TYPE(features::kWeakMemoryCache)}, | 1929 FEATURE_VALUE_TYPE(features::kWeakMemoryCache)}, |
| 1930 // NOTE: Adding new command-line switches requires adding corresponding | 1930 // NOTE: Adding new command-line switches requires adding corresponding |
| 1931 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 1931 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1932 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 1932 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 1933 }; | 1933 }; |
| 1934 | 1934 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2014 base::CommandLine* command_line, | 2014 base::CommandLine* command_line, |
| 2015 flags_ui::SentinelsMode sentinels) { | 2015 flags_ui::SentinelsMode sentinels) { |
| 2016 if (command_line->HasSwitch(switches::kNoExperiments)) | 2016 if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2017 return; | 2017 return; |
| 2018 | 2018 |
| 2019 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( | 2019 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( |
| 2020 flags_storage, command_line, sentinels, switches::kEnableFeatures, | 2020 flags_storage, command_line, sentinels, switches::kEnableFeatures, |
| 2021 switches::kDisableFeatures); | 2021 switches::kDisableFeatures); |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 void RegisterAllFeatureVariationParameters( | |
| 2025 flags_ui::FlagsStorage* flags_storage) { | |
| 2026 FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters( | |
| 2027 flags_storage); | |
| 2028 } | |
| 2029 | |
| 2024 bool AreSwitchesIdenticalToCurrentCommandLine( | 2030 bool AreSwitchesIdenticalToCurrentCommandLine( |
| 2025 const base::CommandLine& new_cmdline, | 2031 const base::CommandLine& new_cmdline, |
| 2026 const base::CommandLine& active_cmdline, | 2032 const base::CommandLine& active_cmdline, |
| 2027 std::set<base::CommandLine::StringType>* out_difference) { | 2033 std::set<base::CommandLine::StringType>* out_difference) { |
| 2028 const char* extra_flag_sentinel_begin_flag_name = nullptr; | 2034 const char* extra_flag_sentinel_begin_flag_name = nullptr; |
| 2029 const char* extra_flag_sentinel_end_flag_name = nullptr; | 2035 const char* extra_flag_sentinel_end_flag_name = nullptr; |
| 2030 #if defined(OS_CHROMEOS) | 2036 #if defined(OS_CHROMEOS) |
| 2031 // Put the flags between --policy-switches--begin and --policy-switches-end on | 2037 // Put the flags between --policy-switches--begin and --policy-switches-end on |
| 2032 // ChromeOS. | 2038 // ChromeOS. |
| 2033 extra_flag_sentinel_begin_flag_name = | 2039 extra_flag_sentinel_begin_flag_name = |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2119 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2125 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2120 | 2126 |
| 2121 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2127 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2122 *count = arraysize(kFeatureEntries); | 2128 *count = arraysize(kFeatureEntries); |
| 2123 return kFeatureEntries; | 2129 return kFeatureEntries; |
| 2124 } | 2130 } |
| 2125 | 2131 |
| 2126 } // namespace testing | 2132 } // namespace testing |
| 2127 | 2133 |
| 2128 } // namespace about_flags | 2134 } // namespace about_flags |
| OLD | NEW |