| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 switches::kEnableWebFontsInterventionV2, | 641 switches::kEnableWebFontsInterventionV2, |
| 642 switches::kEnableWebFontsInterventionV2SwitchValueDisabled}, | 642 switches::kEnableWebFontsInterventionV2SwitchValueDisabled}, |
| 643 }; | 643 }; |
| 644 | 644 |
| 645 const FeatureEntry::Choice kSSLVersionMaxChoices[] = { | 645 const FeatureEntry::Choice kSSLVersionMaxChoices[] = { |
| 646 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 646 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 647 {IDS_FLAGS_SSL_VERSION_MAX_TLS12, switches::kSSLVersionMax, "tls1.2"}, | 647 {IDS_FLAGS_SSL_VERSION_MAX_TLS12, switches::kSSLVersionMax, "tls1.2"}, |
| 648 {IDS_FLAGS_SSL_VERSION_MAX_TLS13, switches::kSSLVersionMax, "tls1.3"}, | 648 {IDS_FLAGS_SSL_VERSION_MAX_TLS13, switches::kSSLVersionMax, "tls1.3"}, |
| 649 }; | 649 }; |
| 650 | 650 |
| 651 #if defined(OS_MACOSX) | |
| 652 const FeatureEntry::Choice kSecurityVerboseChoices[] = { | 651 const FeatureEntry::Choice kSecurityVerboseChoices[] = { |
| 653 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DEFAULT, "", ""}, | 652 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DEFAULT, "", ""}, |
| 654 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_ANIMATED, | 653 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_ANIMATED, |
| 655 switches::kMaterialSecurityVerbose, | 654 switches::kMaterialSecurityVerbose, |
| 656 switches::kMaterialSecurityVerboseShowAllAnimated}, | 655 switches::kMaterialSecurityVerboseShowAllAnimated}, |
| 657 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_NONANIMATED, | 656 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_NONANIMATED, |
| 658 switches::kMaterialSecurityVerbose, | 657 switches::kMaterialSecurityVerbose, |
| 659 switches::kMaterialSecurityVerboseShowAllNonAnimated}, | 658 switches::kMaterialSecurityVerboseShowAllNonAnimated}, |
| 660 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_ANIMATED, | 659 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_ANIMATED, |
| 661 switches::kMaterialSecurityVerbose, | 660 switches::kMaterialSecurityVerbose, |
| 662 switches::kMaterialSecurityVerboseShowNonSecureAnimated}, | 661 switches::kMaterialSecurityVerboseShowNonSecureAnimated}, |
| 663 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_NONANIMATED, | 662 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_NONANIMATED, |
| 664 switches::kMaterialSecurityVerbose, | 663 switches::kMaterialSecurityVerbose, |
| 665 switches::kMaterialSecurityVerboseShowNonSecureNonAnimated}, | 664 switches::kMaterialSecurityVerboseShowNonSecureNonAnimated}, |
| 666 }; | 665 }; |
| 667 #endif // defined(OS_MACOSX) | |
| 668 | 666 |
| 669 // RECORDING USER METRICS FOR FLAGS: | 667 // RECORDING USER METRICS FOR FLAGS: |
| 670 // ----------------------------------------------------------------------------- | 668 // ----------------------------------------------------------------------------- |
| 671 // The first line of the entry is the internal name. | 669 // The first line of the entry is the internal name. |
| 672 // | 670 // |
| 673 // To add a new entry, add to the end of kFeatureEntries. There are two | 671 // To add a new entry, add to the end of kFeatureEntries. There are two |
| 674 // distinct types of entries: | 672 // distinct types of entries: |
| 675 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE | 673 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE |
| 676 // macro for this type supplying the command line to the macro. | 674 // macro for this type supplying the command line to the macro. |
| 677 // . MULTI_VALUE: a list of choices, the first of which should correspond to a | 675 // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| (...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2094 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll, | 2092 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll, |
| 2095 FEATURE_VALUE_TYPE(features::kGamepadExtensions)}, | 2093 FEATURE_VALUE_TYPE(features::kGamepadExtensions)}, |
| 2096 #if defined(OS_CHROMEOS) | 2094 #if defined(OS_CHROMEOS) |
| 2097 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, | 2095 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, |
| 2098 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, | 2096 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, |
| 2099 SINGLE_VALUE_TYPE_AND_VALUE( | 2097 SINGLE_VALUE_TYPE_AND_VALUE( |
| 2100 chromeos::switches::kArcUseAuthEndpoint, | 2098 chromeos::switches::kArcUseAuthEndpoint, |
| 2101 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" | 2099 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" |
| 2102 "ExchangeToken")}, | 2100 "ExchangeToken")}, |
| 2103 #endif | 2101 #endif |
| 2104 #if defined(OS_MACOSX) | |
| 2105 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME, | 2102 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME, |
| 2106 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsMac, | 2103 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsDesktop, |
| 2107 MULTI_VALUE_TYPE(kSecurityVerboseChoices)}, | 2104 MULTI_VALUE_TYPE(kSecurityVerboseChoices)}, |
| 2108 #endif | |
| 2109 // NOTE: Adding new command-line switches requires adding corresponding | 2105 // NOTE: Adding new command-line switches requires adding corresponding |
| 2110 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2106 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2111 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2107 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2112 }; | 2108 }; |
| 2113 | 2109 |
| 2114 class FlagsStateSingleton { | 2110 class FlagsStateSingleton { |
| 2115 public: | 2111 public: |
| 2116 FlagsStateSingleton() | 2112 FlagsStateSingleton() |
| 2117 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2113 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| 2118 ~FlagsStateSingleton() {} | 2114 ~FlagsStateSingleton() {} |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2303 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2308 | 2304 |
| 2309 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2305 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2310 *count = arraysize(kFeatureEntries); | 2306 *count = arraysize(kFeatureEntries); |
| 2311 return kFeatureEntries; | 2307 return kFeatureEntries; |
| 2312 } | 2308 } |
| 2313 | 2309 |
| 2314 } // namespace testing | 2310 } // namespace testing |
| 2315 | 2311 |
| 2316 } // namespace about_flags | 2312 } // namespace about_flags |
| OLD | NEW |