| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 switches::kEnableWebFontsInterventionV2, | 637 switches::kEnableWebFontsInterventionV2, |
| 638 switches::kEnableWebFontsInterventionV2SwitchValueDisabled}, | 638 switches::kEnableWebFontsInterventionV2SwitchValueDisabled}, |
| 639 }; | 639 }; |
| 640 | 640 |
| 641 const FeatureEntry::Choice kSSLVersionMaxChoices[] = { | 641 const FeatureEntry::Choice kSSLVersionMaxChoices[] = { |
| 642 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 642 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 643 {IDS_FLAGS_SSL_VERSION_MAX_TLS12, switches::kSSLVersionMax, "tls1.2"}, | 643 {IDS_FLAGS_SSL_VERSION_MAX_TLS12, switches::kSSLVersionMax, "tls1.2"}, |
| 644 {IDS_FLAGS_SSL_VERSION_MAX_TLS13, switches::kSSLVersionMax, "tls1.3"}, | 644 {IDS_FLAGS_SSL_VERSION_MAX_TLS13, switches::kSSLVersionMax, "tls1.3"}, |
| 645 }; | 645 }; |
| 646 | 646 |
| 647 #if defined(OS_MACOSX) |
| 648 const FeatureEntry::Choice kSecurityVerboseChoices[] = { |
| 649 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DEFAULT, "", ""}, |
| 650 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_ANIMATED, |
| 651 switches::kMaterialSecurityVerbose, |
| 652 switches::kMaterialSecurityVerboseShowAllAnimated}, |
| 653 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_NONANIMATED, |
| 654 switches::kMaterialSecurityVerbose, |
| 655 switches::kMaterialSecurityVerboseShowAllNonAnimated}, |
| 656 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_ANIMATED, |
| 657 switches::kMaterialSecurityVerbose, |
| 658 switches::kMaterialSecurityVerboseShowNonSecureAnimated}, |
| 659 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_NONANIMATED, |
| 660 switches::kMaterialSecurityVerbose, |
| 661 switches::kMaterialSecurityVerboseShowNonSecureNonAnimated}, |
| 662 }; |
| 663 #endif // defined(OS_MACOSX) |
| 664 |
| 647 // RECORDING USER METRICS FOR FLAGS: | 665 // RECORDING USER METRICS FOR FLAGS: |
| 648 // ----------------------------------------------------------------------------- | 666 // ----------------------------------------------------------------------------- |
| 649 // The first line of the entry is the internal name. | 667 // The first line of the entry is the internal name. |
| 650 // | 668 // |
| 651 // To add a new entry, add to the end of kFeatureEntries. There are two | 669 // To add a new entry, add to the end of kFeatureEntries. There are two |
| 652 // distinct types of entries: | 670 // distinct types of entries: |
| 653 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE | 671 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE |
| 654 // macro for this type supplying the command line to the macro. | 672 // macro for this type supplying the command line to the macro. |
| 655 // . MULTI_VALUE: a list of choices, the first of which should correspond to a | 673 // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 656 // deactivated state for this lab (i.e. no command line option). To specify | 674 // deactivated state for this lab (i.e. no command line option). To specify |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 IDS_FLAGS_HISTORY_REQUIRES_USER_GESTURE_DESCRIPTION, kOsAll, | 763 IDS_FLAGS_HISTORY_REQUIRES_USER_GESTURE_DESCRIPTION, kOsAll, |
| 746 SINGLE_VALUE_TYPE(switches::kHistoryEntryRequiresUserGesture)}, | 764 SINGLE_VALUE_TYPE(switches::kHistoryEntryRequiresUserGesture)}, |
| 747 {"disable-hyperlink-auditing", IDS_FLAGS_HYPERLINK_AUDITING_NAME, | 765 {"disable-hyperlink-auditing", IDS_FLAGS_HYPERLINK_AUDITING_NAME, |
| 748 IDS_FLAGS_HYPERLINK_AUDITING_DESCRIPTION, kOsAll, | 766 IDS_FLAGS_HYPERLINK_AUDITING_DESCRIPTION, kOsAll, |
| 749 SINGLE_DISABLE_VALUE_TYPE(switches::kNoPings)}, | 767 SINGLE_DISABLE_VALUE_TYPE(switches::kNoPings)}, |
| 750 #if defined(OS_ANDROID) | 768 #if defined(OS_ANDROID) |
| 751 {"contextual-search", IDS_FLAGS_CONTEXTUAL_SEARCH, | 769 {"contextual-search", IDS_FLAGS_CONTEXTUAL_SEARCH, |
| 752 IDS_FLAGS_CONTEXTUAL_SEARCH_DESCRIPTION, kOsAndroid, | 770 IDS_FLAGS_CONTEXTUAL_SEARCH_DESCRIPTION, kOsAndroid, |
| 753 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, | 771 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch, |
| 754 switches::kDisableContextualSearch)}, | 772 switches::kDisableContextualSearch)}, |
| 755 {"cs-now-on-tap-bar-integration", | 773 {"cs-now-on-tap-bar-integration", |
| 756 IDS_FLAGS_CONTEXTUAL_SEARCH_NOW_ON_TAP_BAR_INTEGRATION, | 774 IDS_FLAGS_CONTEXTUAL_SEARCH_NOW_ON_TAP_BAR_INTEGRATION, |
| 757 IDS_FLAGS_CONTEXTUAL_SEARCH_NOW_ON_TAP_BAR_INTEGRATION_DESCRIPTION, | 775 IDS_FLAGS_CONTEXTUAL_SEARCH_NOW_ON_TAP_BAR_INTEGRATION_DESCRIPTION, |
| 758 kOsAndroid, | 776 kOsAndroid, SINGLE_VALUE_TYPE( |
| 759 SINGLE_VALUE_TYPE( | 777 switches::kEnableContextualSearchNowOnTapBarIntegration)}, |
| 760 switches::kEnableContextualSearchNowOnTapBarIntegration)}, | |
| 761 #endif | 778 #endif |
| 762 {"show-autofill-type-predictions", | 779 {"show-autofill-type-predictions", |
| 763 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, | 780 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 764 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, kOsAll, | 781 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, kOsAll, |
| 765 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)}, | 782 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)}, |
| 766 {"enable-credit-card-signin-promo", | 783 {"enable-credit-card-signin-promo", |
| 767 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_NAME, | 784 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_NAME, |
| 768 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_DESCRIPTION, kOsAll, | 785 IDS_FLAGS_ENABLE_AUTOFILL_CREDIT_CARD_SIGNIN_PROMO_DESCRIPTION, kOsAll, |
| 769 FEATURE_VALUE_TYPE(autofill::kAutofillCreditCardSigninPromo)}, | 786 FEATURE_VALUE_TYPE(autofill::kAutofillCreditCardSigninPromo)}, |
| 770 {"smooth-scrolling", IDS_FLAGS_SMOOTH_SCROLLING_NAME, | 787 {"smooth-scrolling", IDS_FLAGS_SMOOTH_SCROLLING_NAME, |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2023 FEATURE_VALUE_TYPE(features::kFramebustingNeedsSameOriginOrUserGesture)}, | 2040 FEATURE_VALUE_TYPE(features::kFramebustingNeedsSameOriginOrUserGesture)}, |
| 2024 #if defined(OS_ANDROID) | 2041 #if defined(OS_ANDROID) |
| 2025 {"enable-vr-shell", IDS_FLAGS_ENABLE_VR_SHELL_NAME, | 2042 {"enable-vr-shell", IDS_FLAGS_ENABLE_VR_SHELL_NAME, |
| 2026 IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, | 2043 IDS_FLAGS_ENABLE_VR_SHELL_DESCRIPTION, kOsAndroid, |
| 2027 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, | 2044 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableVrShell, |
| 2028 switches::kDisableVrShell)}, | 2045 switches::kDisableVrShell)}, |
| 2029 {"enable-android-pay-integration-v1", | 2046 {"enable-android-pay-integration-v1", |
| 2030 IDS_FLAGS_ENABLE_ANDROID_PAY_INTEGRATION_V1_NAME, | 2047 IDS_FLAGS_ENABLE_ANDROID_PAY_INTEGRATION_V1_NAME, |
| 2031 IDS_FLAGS_ENABLE_ANDROID_PAY_INTEGRATION_V1_DESCRIPTION, kOsAndroid, | 2048 IDS_FLAGS_ENABLE_ANDROID_PAY_INTEGRATION_V1_DESCRIPTION, kOsAndroid, |
| 2032 FEATURE_VALUE_TYPE(chrome::android::kAndroidPayIntegrationV1)}, | 2049 FEATURE_VALUE_TYPE(chrome::android::kAndroidPayIntegrationV1)}, |
| 2033 {"scan-cards-in-web-payments", | 2050 {"scan-cards-in-web-payments", IDS_FLAGS_SCAN_CARDS_IN_WEB_PAYMENTS_NAME, |
| 2034 IDS_FLAGS_SCAN_CARDS_IN_WEB_PAYMENTS_NAME, | |
| 2035 IDS_FLAGS_SCAN_CARDS_IN_WEB_PAYMENTS_DESCRIPTION, kOsAndroid, | 2051 IDS_FLAGS_SCAN_CARDS_IN_WEB_PAYMENTS_DESCRIPTION, kOsAndroid, |
| 2036 FEATURE_VALUE_TYPE(chrome::android::kScanCardsInWebPayments)}, | 2052 FEATURE_VALUE_TYPE(chrome::android::kScanCardsInWebPayments)}, |
| 2037 #endif | 2053 #endif |
| 2038 #if defined(OS_CHROMEOS) | 2054 #if defined(OS_CHROMEOS) |
| 2039 {"disable-eol-notification", IDS_FLAGS_EOL_NOTIFICATION_NAME, | 2055 {"disable-eol-notification", IDS_FLAGS_EOL_NOTIFICATION_NAME, |
| 2040 IDS_FLAGS_EOL_NOTIFICATION_DESCRIPTION, kOsCrOS, | 2056 IDS_FLAGS_EOL_NOTIFICATION_DESCRIPTION, kOsCrOS, |
| 2041 SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisableEolNotification)}, | 2057 SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisableEolNotification)}, |
| 2042 #endif // defined(OS_CHROMEOS) | 2058 #endif // defined(OS_CHROMEOS) |
| 2043 {"fill-on-account-select", IDS_FILL_ON_ACCOUNT_SELECT_NAME, | 2059 {"fill-on-account-select", IDS_FILL_ON_ACCOUNT_SELECT_NAME, |
| 2044 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION, kOsAll, | 2060 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION, kOsAll, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 IDS_FLAGS_ENABLE_EHV_INPUT_NAME, IDS_FLAGS_ENABLE_EHV_INPUT_DESCRIPTION, | 2094 IDS_FLAGS_ENABLE_EHV_INPUT_NAME, IDS_FLAGS_ENABLE_EHV_INPUT_DESCRIPTION, |
| 2079 kOsCrOS, FEATURE_VALUE_TYPE(features::kEHVInputOnImeMenu)}, | 2095 kOsCrOS, FEATURE_VALUE_TYPE(features::kEHVInputOnImeMenu)}, |
| 2080 #endif | 2096 #endif |
| 2081 {"enable-gamepad-extensions", IDS_FLAGS_GAMEPAD_EXTENSIONS_NAME, | 2097 {"enable-gamepad-extensions", IDS_FLAGS_GAMEPAD_EXTENSIONS_NAME, |
| 2082 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll, | 2098 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll, |
| 2083 FEATURE_VALUE_TYPE(features::kGamepadExtensions)}, | 2099 FEATURE_VALUE_TYPE(features::kGamepadExtensions)}, |
| 2084 #if defined(OS_CHROMEOS) | 2100 #if defined(OS_CHROMEOS) |
| 2085 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, | 2101 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, |
| 2086 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, | 2102 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, |
| 2087 SINGLE_VALUE_TYPE_AND_VALUE( | 2103 SINGLE_VALUE_TYPE_AND_VALUE( |
| 2088 chromeos::switches::kArcUseAuthEndpoint, | 2104 chromeos::switches::kArcUseAuthEndpoint, |
| 2089 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" \ | 2105 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" |
| 2090 "ExchangeToken")}, | 2106 "ExchangeToken")}, |
| 2107 #endif |
| 2108 #if defined(OS_MACOSX) |
| 2109 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME, |
| 2110 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsMac, |
| 2111 MULTI_VALUE_TYPE(kSecurityVerboseChoices)}, |
| 2091 #endif | 2112 #endif |
| 2092 // NOTE: Adding new command-line switches requires adding corresponding | 2113 // NOTE: Adding new command-line switches requires adding corresponding |
| 2093 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2114 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2094 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2115 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2095 }; | 2116 }; |
| 2096 | 2117 |
| 2097 class FlagsStateSingleton { | 2118 class FlagsStateSingleton { |
| 2098 public: | 2119 public: |
| 2099 FlagsStateSingleton() | 2120 FlagsStateSingleton() |
| 2100 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 2121 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2285 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 2265 | 2286 |
| 2266 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2287 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 2267 *count = arraysize(kFeatureEntries); | 2288 *count = arraysize(kFeatureEntries); |
| 2268 return kFeatureEntries; | 2289 return kFeatureEntries; |
| 2269 } | 2290 } |
| 2270 | 2291 |
| 2271 } // namespace testing | 2292 } // namespace testing |
| 2272 | 2293 |
| 2273 } // namespace about_flags | 2294 } // namespace about_flags |
| OLD | NEW |