Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: chrome/browser/about_flags.cc

Issue 2378623007: [Material] Update Material Security Verbose Decoration Flag (Closed)
Patch Set: removed extra line and fixed histogram.xml Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 switches::kEnableWebFontsInterventionV2, 612 switches::kEnableWebFontsInterventionV2,
613 switches::kEnableWebFontsInterventionV2SwitchValueDisabled}, 613 switches::kEnableWebFontsInterventionV2SwitchValueDisabled},
614 }; 614 };
615 615
616 const FeatureEntry::Choice kSSLVersionMaxChoices[] = { 616 const FeatureEntry::Choice kSSLVersionMaxChoices[] = {
617 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 617 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
618 {IDS_FLAGS_SSL_VERSION_MAX_TLS12, switches::kSSLVersionMax, "tls1.2"}, 618 {IDS_FLAGS_SSL_VERSION_MAX_TLS12, switches::kSSLVersionMax, "tls1.2"},
619 {IDS_FLAGS_SSL_VERSION_MAX_TLS13, switches::kSSLVersionMax, "tls1.3"}, 619 {IDS_FLAGS_SSL_VERSION_MAX_TLS13, switches::kSSLVersionMax, "tls1.3"},
620 }; 620 };
621 621
622 const FeatureEntry::Choice kSecurityVerboseChoices[] = { 622 const FeatureEntry::Choice kSecurityChipChoices[] = {
623 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DEFAULT, "", ""}, 623 {IDS_FLAGS_SECURITY_CHIP_DEFAULT, "", ""},
624 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_ANIMATED, 624 {IDS_FLAGS_SECURITY_CHIP_SHOW_NONSECURE_ONLY, switches::kSecurityChip,
625 switches::kMaterialSecurityVerbose, 625 switches::kSecurityChipShowNonSecureOnly},
626 switches::kMaterialSecurityVerboseShowAllAnimated}, 626 {IDS_FLAGS_SECURITY_CHIP_SHOW_ALL, switches::kSecurityChip,
627 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_ALL_NONANIMATED, 627 switches::kSecurityChipShowAll},
628 switches::kMaterialSecurityVerbose, 628 };
629 switches::kMaterialSecurityVerboseShowAllNonAnimated}, 629
630 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_ANIMATED, 630 const FeatureEntry::Choice kSecurityChipAnimationChoices[] = {
631 switches::kMaterialSecurityVerbose, 631 {IDS_FLAGS_SECURITY_CHIP_ANIMATION_DEFAULT, "", ""},
632 switches::kMaterialSecurityVerboseShowNonSecureAnimated}, 632 {IDS_FLAGS_SECURITY_CHIP_ANIMATION_NONE, switches::kSecurityChipAnimation,
633 {IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_SHOW_NONSECURE_NONANIMATED, 633 switches::kSecurityChipAnimationNone},
634 switches::kMaterialSecurityVerbose, 634 {IDS_FLAGS_SECURITY_CHIP_ANIMATION_NONSECURE_ONLY,
635 switches::kMaterialSecurityVerboseShowNonSecureNonAnimated}, 635 switches::kSecurityChipAnimation,
636 switches::kSecurityChipAnimationNonSecureOnly},
637 {IDS_FLAGS_SECURITY_CHIP_ANIMATION_ALL, switches::kSecurityChipAnimation,
638 switches::kSecurityChipAnimationAll},
636 }; 639 };
637 640
638 // RECORDING USER METRICS FOR FLAGS: 641 // RECORDING USER METRICS FOR FLAGS:
639 // ----------------------------------------------------------------------------- 642 // -----------------------------------------------------------------------------
640 // The first line of the entry is the internal name. 643 // The first line of the entry is the internal name.
641 // 644 //
642 // To add a new entry, add to the end of kFeatureEntries. There are two 645 // To add a new entry, add to the end of kFeatureEntries. There are two
643 // distinct types of entries: 646 // distinct types of entries:
644 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE 647 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE
645 // macro for this type supplying the command line to the macro. 648 // macro for this type supplying the command line to the macro.
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 IDS_FLAGS_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME, 1514 IDS_FLAGS_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME,
1512 IDS_FLAGS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION, kOsCrOS, 1515 IDS_FLAGS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION, kOsCrOS,
1513 SINGLE_DISABLE_VALUE_TYPE( 1516 SINGLE_DISABLE_VALUE_TYPE(
1514 chromeos::switches::kDisableTimeZoneTrackingOption)}, 1517 chromeos::switches::kDisableTimeZoneTrackingOption)},
1515 #endif // OS_CHROMEOS 1518 #endif // OS_CHROMEOS
1516 {"data-reduction-proxy-lo-fi", IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME, 1519 {"data-reduction-proxy-lo-fi", IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME,
1517 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION, kOsAll, 1520 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION, kOsAll,
1518 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices)}, 1521 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices)},
1519 {"enable-data-reduction-proxy-lite-page", 1522 {"enable-data-reduction-proxy-lite-page",
1520 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LITE_PAGE_NAME, 1523 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LITE_PAGE_NAME,
1521 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LITE_PAGE_DESCRIPTION, 1524 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LITE_PAGE_DESCRIPTION, kOsAll,
1522 kOsAll, SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: 1525 SINGLE_VALUE_TYPE(
1523 kEnableDataReductionProxyLitePage)}, 1526 data_reduction_proxy::switches::kEnableDataReductionProxyLitePage)},
1524 {"clear-data-reduction-proxy-data-savings", 1527 {"clear-data-reduction-proxy-data-savings",
1525 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME, 1528 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME,
1526 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION, kOsAll, 1529 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION, kOsAll,
1527 SINGLE_VALUE_TYPE( 1530 SINGLE_VALUE_TYPE(
1528 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings)}, 1531 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings)},
1529 {"allow-insecure-localhost", IDS_ALLOW_INSECURE_LOCALHOST, 1532 {"allow-insecure-localhost", IDS_ALLOW_INSECURE_LOCALHOST,
1530 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION, kOsAll, 1533 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION, kOsAll,
1531 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost)}, 1534 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost)},
1532 {"enable-add-to-shelf", IDS_FLAGS_ADD_TO_SHELF_NAME, 1535 {"enable-add-to-shelf", IDS_FLAGS_ADD_TO_SHELF_NAME,
1533 IDS_FLAGS_ADD_TO_SHELF_DESCRIPTION, kOsDesktop, 1536 IDS_FLAGS_ADD_TO_SHELF_DESCRIPTION, kOsDesktop,
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll, 2047 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll,
2045 FEATURE_VALUE_TYPE(features::kGamepadExtensions)}, 2048 FEATURE_VALUE_TYPE(features::kGamepadExtensions)},
2046 #if defined(OS_CHROMEOS) 2049 #if defined(OS_CHROMEOS)
2047 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, 2050 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME,
2048 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, 2051 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS,
2049 SINGLE_VALUE_TYPE_AND_VALUE( 2052 SINGLE_VALUE_TYPE_AND_VALUE(
2050 chromeos::switches::kArcUseAuthEndpoint, 2053 chromeos::switches::kArcUseAuthEndpoint,
2051 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" 2054 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/"
2052 "ExchangeToken")}, 2055 "ExchangeToken")},
2053 #endif // OS_CHROMEOS 2056 #endif // OS_CHROMEOS
2054 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME,
2055 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsDesktop,
2056 MULTI_VALUE_TYPE(kSecurityVerboseChoices)},
2057 #if defined(OS_CHROMEOS) 2057 #if defined(OS_CHROMEOS)
2058 {"arc-boot-completed-broadcast", 2058 {"arc-boot-completed-broadcast", IDS_FLAGS_ARC_BOOT_COMPLETED,
2059 IDS_FLAGS_ARC_BOOT_COMPLETED,
2060 IDS_FLAGS_ARC_BOOT_COMPLETED_DESCRIPTION, kOsCrOS, 2059 IDS_FLAGS_ARC_BOOT_COMPLETED_DESCRIPTION, kOsCrOS,
2061 FEATURE_VALUE_TYPE(arc::kBootCompletedBroadcastFeature)}, 2060 FEATURE_VALUE_TYPE(arc::kBootCompletedBroadcastFeature)},
2062 #endif 2061 #endif
2063 #if defined(OS_WIN) 2062 #if defined(OS_WIN)
2064 {"disable-winrt-midi-api", IDS_FLAGS_DISABLE_WINRT_MIDI_API_NAME, 2063 {"disable-winrt-midi-api", IDS_FLAGS_DISABLE_WINRT_MIDI_API_NAME,
2065 IDS_FLAGS_DISABLE_WINRT_MIDI_API_DESCRIPTION, kOsWin, 2064 IDS_FLAGS_DISABLE_WINRT_MIDI_API_DESCRIPTION, kOsWin,
2066 SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWinrtMidiApi)}, 2065 SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWinrtMidiApi)},
2067 #endif // OS_WIN 2066 #endif // OS_WIN
2067 {"security-chip", IDS_FLAGS_SECURITY_CHIP_NAME,
2068 IDS_FLAGS_SECURITY_CHIP_DESCRIPTION, kOsDesktop,
2069 MULTI_VALUE_TYPE(kSecurityChipChoices)},
2070 {"security-chip-animation", IDS_FLAGS_SECURITY_CHIP_ANIMATION_NAME,
2071 IDS_FLAGS_SECURITY_CHIP_ANIMATION_DESCRIPTION, kOsDesktop,
2072 MULTI_VALUE_TYPE(kSecurityChipAnimationChoices)},
2068 // NOTE: Adding new command-line switches requires adding corresponding 2073 // NOTE: Adding new command-line switches requires adding corresponding
2069 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2074 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2070 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2075 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2071 }; 2076 };
2072 2077
2073 class FlagsStateSingleton { 2078 class FlagsStateSingleton {
2074 public: 2079 public:
2075 FlagsStateSingleton() 2080 FlagsStateSingleton()
2076 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 2081 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
2077 ~FlagsStateSingleton() {} 2082 ~FlagsStateSingleton() {}
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2271 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2267 2272
2268 const FeatureEntry* GetFeatureEntries(size_t* count) { 2273 const FeatureEntry* GetFeatureEntries(size_t* count) {
2269 *count = arraysize(kFeatureEntries); 2274 *count = arraysize(kFeatureEntries);
2270 return kFeatureEntries; 2275 return kFeatureEntries;
2271 } 2276 }
2272 2277
2273 } // namespace testing 2278 } // namespace testing
2274 2279
2275 } // namespace about_flags 2280 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698