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

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

Issue 2336423002: [Material][Mac] Flag and clean for the Security State Decoration (Closed)
Patch Set: comments Created 4 years, 3 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll, 2100 IDS_FLAGS_GAMEPAD_EXTENSIONS_DESCRIPTION, kOsAll,
2083 FEATURE_VALUE_TYPE(features::kGamepadExtensions)}, 2101 FEATURE_VALUE_TYPE(features::kGamepadExtensions)},
2084 #if defined(OS_CHROMEOS) 2102 #if defined(OS_CHROMEOS)
2085 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME, 2103 {"arc-use-auth-endpoint", IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_NAME,
2086 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS, 2104 IDS_FLAGS_ARC_USE_AUTH_ENDPOINT_DESCRIPTION, kOsCrOS,
2087 SINGLE_VALUE_TYPE_AND_VALUE( 2105 SINGLE_VALUE_TYPE_AND_VALUE(
2088 chromeos::switches::kArcUseAuthEndpoint, 2106 chromeos::switches::kArcUseAuthEndpoint,
2089 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" \ 2107 "https://www-googleapis-staging.sandbox.google.com/oauth2/v4/" \
2090 "ExchangeToken")}, 2108 "ExchangeToken")},
2091 #endif 2109 #endif
2110 #if defined(OS_MACOSX)
2111 {"material-security-verbose", IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_NAME,
2112 IDS_FLAGS_MATERIAL_SECURITY_VERBOSE_DESCRIPTION, kOsMac,
2113 MULTI_VALUE_TYPE(kSecurityVerboseChoices)},
2114 #endif
2092 // NOTE: Adding new command-line switches requires adding corresponding 2115 // NOTE: Adding new command-line switches requires adding corresponding
2093 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2116 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2094 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2117 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2095 }; 2118 };
2096 2119
2097 class FlagsStateSingleton { 2120 class FlagsStateSingleton {
2098 public: 2121 public:
2099 FlagsStateSingleton() 2122 FlagsStateSingleton()
2100 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 2123 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
2101 ~FlagsStateSingleton() {} 2124 ~FlagsStateSingleton() {}
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2287 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2265 2288
2266 const FeatureEntry* GetFeatureEntries(size_t* count) { 2289 const FeatureEntry* GetFeatureEntries(size_t* count) {
2267 *count = arraysize(kFeatureEntries); 2290 *count = arraysize(kFeatureEntries);
2268 return kFeatureEntries; 2291 return kFeatureEntries;
2269 } 2292 }
2270 2293
2271 } // namespace testing 2294 } // namespace testing
2272 2295
2273 } // namespace about_flags 2296 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698