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 27 matching lines...) Expand all Loading... |
38 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc
hes.h" | 38 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc
hes.h" |
39 #include "components/dom_distiller/core/dom_distiller_switches.h" | 39 #include "components/dom_distiller/core/dom_distiller_switches.h" |
40 #include "components/error_page/common/error_page_switches.h" | 40 #include "components/error_page/common/error_page_switches.h" |
41 #include "components/flags_ui/feature_entry_macros.h" | 41 #include "components/flags_ui/feature_entry_macros.h" |
42 #include "components/flags_ui/flags_storage.h" | 42 #include "components/flags_ui/flags_storage.h" |
43 #include "components/flags_ui/flags_ui_switches.h" | 43 #include "components/flags_ui/flags_ui_switches.h" |
44 #include "components/nacl/common/nacl_switches.h" | 44 #include "components/nacl/common/nacl_switches.h" |
45 #include "components/offline_pages/offline_page_switches.h" | 45 #include "components/offline_pages/offline_page_switches.h" |
46 #include "components/omnibox/browser/omnibox_switches.h" | 46 #include "components/omnibox/browser/omnibox_switches.h" |
47 #include "components/password_manager/core/common/password_manager_features.h" | 47 #include "components/password_manager/core/common/password_manager_features.h" |
48 #include "components/password_manager/core/common/password_manager_switches.h" | |
49 #include "components/proximity_auth/switches.h" | 48 #include "components/proximity_auth/switches.h" |
50 #include "components/search/search_switches.h" | 49 #include "components/search/search_switches.h" |
51 #include "components/security_state/switches.h" | 50 #include "components/security_state/switches.h" |
52 #include "components/signin/core/common/signin_switches.h" | 51 #include "components/signin/core/common/signin_switches.h" |
53 #include "components/sync_driver/sync_driver_switches.h" | 52 #include "components/sync_driver/sync_driver_switches.h" |
54 #include "components/tracing/tracing_switches.h" | 53 #include "components/tracing/tracing_switches.h" |
55 #include "components/version_info/version_info.h" | 54 #include "components/version_info/version_info.h" |
56 #include "content/public/browser/user_metrics.h" | 55 #include "content/public/browser/user_metrics.h" |
57 #include "content/public/common/content_features.h" | 56 #include "content/public/common/content_features.h" |
58 #include "content/public/common/content_switches.h" | 57 #include "content/public/common/content_switches.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 switches::kExtensionContentVerification, | 346 switches::kExtensionContentVerification, |
348 switches::kExtensionContentVerificationBootstrap }, | 347 switches::kExtensionContentVerificationBootstrap }, |
349 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, | 348 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, |
350 switches::kExtensionContentVerification, | 349 switches::kExtensionContentVerification, |
351 switches::kExtensionContentVerificationEnforce }, | 350 switches::kExtensionContentVerificationEnforce }, |
352 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, | 351 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, |
353 switches::kExtensionContentVerification, | 352 switches::kExtensionContentVerification, |
354 switches::kExtensionContentVerificationEnforceStrict }, | 353 switches::kExtensionContentVerificationEnforceStrict }, |
355 }; | 354 }; |
356 | 355 |
357 const FeatureEntry::Choice kAutofillSyncCredentialChoices[] = { | |
358 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | |
359 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, | |
360 password_manager::switches::kAllowAutofillSyncCredential, ""}, | |
361 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, | |
362 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, | |
363 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, | |
364 password_manager::switches::kDisallowAutofillSyncCredential, ""}, | |
365 }; | |
366 | |
367 const FeatureEntry::Choice kFillOnAccountSelectChoices[] = { | 356 const FeatureEntry::Choice kFillOnAccountSelectChoices[] = { |
368 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 357 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
369 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 358 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
370 autofill::switches::kDisableFillOnAccountSelect, "" }, | 359 autofill::switches::kDisableFillOnAccountSelect, "" }, |
371 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING, | 360 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING, |
372 autofill::switches::kEnableFillOnAccountSelect, "" }, | 361 autofill::switches::kEnableFillOnAccountSelect, "" }, |
373 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING, | 362 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING, |
374 autofill::switches::kEnableFillOnAccountSelectNoHighlighting, "" }, | 363 autofill::switches::kEnableFillOnAccountSelectNoHighlighting, "" }, |
375 }; | 364 }; |
376 | 365 |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 password_manager::features::kEnablePasswordForceSaving)}, | 923 password_manager::features::kEnablePasswordForceSaving)}, |
935 {"enable-manual-password-generation", | 924 {"enable-manual-password-generation", |
936 IDS_FLAGS_MANUAL_PASSWORD_GENERATION_NAME, | 925 IDS_FLAGS_MANUAL_PASSWORD_GENERATION_NAME, |
937 IDS_FLAGS_MANUAL_PASSWORD_GENERATION_DESCRIPTION, kOsAll, | 926 IDS_FLAGS_MANUAL_PASSWORD_GENERATION_DESCRIPTION, kOsAll, |
938 FEATURE_VALUE_TYPE( | 927 FEATURE_VALUE_TYPE( |
939 password_manager::features::kEnableManualPasswordGeneration)}, | 928 password_manager::features::kEnableManualPasswordGeneration)}, |
940 {"enable-affiliation-based-matching", | 929 {"enable-affiliation-based-matching", |
941 IDS_FLAGS_AFFILIATION_BASED_MATCHING_NAME, | 930 IDS_FLAGS_AFFILIATION_BASED_MATCHING_NAME, |
942 IDS_FLAGS_AFFILIATION_BASED_MATCHING_DESCRIPTION, | 931 IDS_FLAGS_AFFILIATION_BASED_MATCHING_DESCRIPTION, |
943 kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid, | 932 kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid, |
944 ENABLE_DISABLE_VALUE_TYPE( | 933 FEATURE_VALUE_TYPE(password_manager::features::kAffiliationBasedMatching)}, |
945 password_manager::switches::kEnableAffiliationBasedMatching, | |
946 password_manager::switches::kDisableAffiliationBasedMatching)}, | |
947 {"wallet-service-use-sandbox", IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, | 934 {"wallet-service-use-sandbox", IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, |
948 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, kOsAndroid | kOsDesktop, | 935 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, kOsAndroid | kOsDesktop, |
949 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( | 936 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
950 autofill::switches::kWalletServiceUseSandbox, | 937 autofill::switches::kWalletServiceUseSandbox, |
951 "1", | 938 "1", |
952 autofill::switches::kWalletServiceUseSandbox, | 939 autofill::switches::kWalletServiceUseSandbox, |
953 "0")}, | 940 "0")}, |
954 #if defined(USE_AURA) | 941 #if defined(USE_AURA) |
955 {"overscroll-history-navigation", | 942 {"overscroll-history-navigation", |
956 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, | 943 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 IDS_FLAGS_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, kOsDesktop, | 1336 IDS_FLAGS_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, kOsDesktop, |
1350 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions)}, | 1337 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions)}, |
1351 #endif | 1338 #endif |
1352 #if defined(USE_ASH) | 1339 #if defined(USE_ASH) |
1353 {"enable-web-app-frame", IDS_FLAGS_WEB_APP_FRAME_NAME, | 1340 {"enable-web-app-frame", IDS_FLAGS_WEB_APP_FRAME_NAME, |
1354 IDS_FLAGS_WEB_APP_FRAME_DESCRIPTION, kOsWin | kOsCrOS, | 1341 IDS_FLAGS_WEB_APP_FRAME_DESCRIPTION, kOsWin | kOsCrOS, |
1355 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame)}, | 1342 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame)}, |
1356 #endif | 1343 #endif |
1357 {"enable-drop-sync-credential", IDS_FLAGS_DROP_SYNC_CREDENTIAL_NAME, | 1344 {"enable-drop-sync-credential", IDS_FLAGS_DROP_SYNC_CREDENTIAL_NAME, |
1358 IDS_FLAGS_DROP_SYNC_CREDENTIAL_DESCRIPTION, kOsAll, | 1345 IDS_FLAGS_DROP_SYNC_CREDENTIAL_DESCRIPTION, kOsAll, |
1359 ENABLE_DISABLE_VALUE_TYPE( | 1346 FEATURE_VALUE_TYPE(password_manager::features::kDropSyncCredential)}, |
1360 password_manager::switches::kEnableDropSyncCredential, | |
1361 password_manager::switches::kDisableDropSyncCredential)}, | |
1362 #if defined(ENABLE_EXTENSIONS) | 1347 #if defined(ENABLE_EXTENSIONS) |
1363 {"enable-extension-action-redesign", | 1348 {"enable-extension-action-redesign", |
1364 IDS_FLAGS_EXTENSION_ACTION_REDESIGN_NAME, | 1349 IDS_FLAGS_EXTENSION_ACTION_REDESIGN_NAME, |
1365 IDS_FLAGS_EXTENSION_ACTION_REDESIGN_DESCRIPTION, kOsDesktop, | 1350 IDS_FLAGS_EXTENSION_ACTION_REDESIGN_DESCRIPTION, kOsDesktop, |
1366 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign)}, | 1351 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign)}, |
1367 #endif | 1352 #endif |
1368 {"autofill-sync-credential", IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, | |
1369 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, kOsAll, | |
1370 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices)}, | |
1371 #if !defined(OS_ANDROID) | 1353 #if !defined(OS_ANDROID) |
1372 {"enable-message-center-always-scroll-up-upon-notification-removal", | 1354 {"enable-message-center-always-scroll-up-upon-notification-removal", |
1373 IDS_FLAGS_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME, | 1355 IDS_FLAGS_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME, |
1374 IDS_FLAGS_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION, | 1356 IDS_FLAGS_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION, |
1375 kOsDesktop, | 1357 kOsDesktop, |
1376 SINGLE_VALUE_TYPE( | 1358 SINGLE_VALUE_TYPE( |
1377 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)}, | 1359 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)}, |
1378 #endif | 1360 #endif |
1379 {"enable-md-policy-page", IDS_FLAGS_ENABLE_MATERIAL_DESIGN_POLICY_PAGE_NAME, | 1361 {"enable-md-policy-page", IDS_FLAGS_ENABLE_MATERIAL_DESIGN_POLICY_PAGE_NAME, |
1380 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_POLICY_PAGE_DESCRIPTION, kOsDesktop, | 1362 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_POLICY_PAGE_DESCRIPTION, kOsDesktop, |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 FEATURE_VALUE_TYPE(features::kAutomaticTabDiscarding)}, | 1750 FEATURE_VALUE_TYPE(features::kAutomaticTabDiscarding)}, |
1769 #endif // OS_WIN || OS_MACOSX | 1751 #endif // OS_WIN || OS_MACOSX |
1770 {"enable-unsafe-es3-apis", IDS_FLAGS_WEBGL2_NAME, | 1752 {"enable-unsafe-es3-apis", IDS_FLAGS_WEBGL2_NAME, |
1771 IDS_FLAGS_WEBGL2_DESCRIPTION, kOsAll, | 1753 IDS_FLAGS_WEBGL2_DESCRIPTION, kOsAll, |
1772 SINGLE_VALUE_TYPE(switches::kEnableUnsafeES3APIs)}, | 1754 SINGLE_VALUE_TYPE(switches::kEnableUnsafeES3APIs)}, |
1773 {"enable-webfonts-intervention", | 1755 {"enable-webfonts-intervention", |
1774 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_NAME, | 1756 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_NAME, |
1775 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_DESCRIPTION, kOsAll, | 1757 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_DESCRIPTION, kOsAll, |
1776 FEATURE_VALUE_TYPE(features::kWebFontsIntervention)}, | 1758 FEATURE_VALUE_TYPE(features::kWebFontsIntervention)}, |
1777 {"enable-webfonts-intervention-trigger", | 1759 {"enable-webfonts-intervention-trigger", |
1778 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_TRIGGER_NAME, | 1760 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_TRIGGER_NAME, |
1779 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_TRIGGER_DESCRIPTION, kOsAll, | 1761 IDS_FLAGS_ENABLE_WEBFONTS_INTERVENTION_TRIGGER_DESCRIPTION, kOsAll, |
1780 SINGLE_VALUE_TYPE(switches::kEnableWebFontsInterventionTrigger)}, | 1762 SINGLE_VALUE_TYPE(switches::kEnableWebFontsInterventionTrigger)}, |
1781 {"enable-grouped-history", IDS_FLAGS_ENABLE_GROUPED_HISTORY_NAME, | 1763 {"enable-grouped-history", IDS_FLAGS_ENABLE_GROUPED_HISTORY_NAME, |
1782 IDS_FLAGS_ENABLE_GROUPED_HISTORY_DESCRIPTION, kOsDesktop, | 1764 IDS_FLAGS_ENABLE_GROUPED_HISTORY_DESCRIPTION, kOsDesktop, |
1783 SINGLE_VALUE_TYPE(switches::kHistoryEnableGroupByDomain)}, | 1765 SINGLE_VALUE_TYPE(switches::kHistoryEnableGroupByDomain)}, |
1784 {"enable-token-binding", IDS_FLAGS_ENABLE_TOKEN_BINDING_NAME, | 1766 {"enable-token-binding", IDS_FLAGS_ENABLE_TOKEN_BINDING_NAME, |
1785 IDS_FLAGS_ENABLE_TOKEN_BINDING_DESCRIPTION, kOsAll, | 1767 IDS_FLAGS_ENABLE_TOKEN_BINDING_DESCRIPTION, kOsAll, |
1786 FEATURE_VALUE_TYPE(features::kTokenBinding)}, | 1768 FEATURE_VALUE_TYPE(features::kTokenBinding)}, |
| 1769 {"enable-protect-sync-credential", IDS_FLAGS_PROTECT_SYNC_CREDENTIAL_NAME, |
| 1770 IDS_FLAGS_PROTECT_SYNC_CREDENTIAL_DESCRIPTION, kOsAll, |
| 1771 FEATURE_VALUE_TYPE(password_manager::features::kProtectSyncCredential)}, |
| 1772 {"enable-protect-sync-credential-on-reauth", |
| 1773 IDS_FLAGS_PROTECT_SYNC_CREDENTIAL_ON_REAUTH_NAME, |
| 1774 IDS_FLAGS_PROTECT_SYNC_CREDENTIAL_ON_REAUTH_DESCRIPTION, kOsAll, |
| 1775 FEATURE_VALUE_TYPE( |
| 1776 password_manager::features::kProtectSyncCredentialOnReauth)}, |
1787 // NOTE: Adding new command-line switches requires adding corresponding | 1777 // NOTE: Adding new command-line switches requires adding corresponding |
1788 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 1778 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
1789 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 1779 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
1790 }; | 1780 }; |
1791 | 1781 |
1792 class FlagsStateSingleton { | 1782 class FlagsStateSingleton { |
1793 public: | 1783 public: |
1794 FlagsStateSingleton() | 1784 FlagsStateSingleton() |
1795 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} | 1785 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} |
1796 ~FlagsStateSingleton() {} | 1786 ~FlagsStateSingleton() {} |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 1988 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
1999 | 1989 |
2000 const FeatureEntry* GetFeatureEntries(size_t* count) { | 1990 const FeatureEntry* GetFeatureEntries(size_t* count) { |
2001 *count = arraysize(kFeatureEntries); | 1991 *count = arraysize(kFeatureEntries); |
2002 return kFeatureEntries; | 1992 return kFeatureEntries; |
2003 } | 1993 } |
2004 | 1994 |
2005 } // namespace testing | 1995 } // namespace testing |
2006 | 1996 |
2007 } // namespace about_flags | 1997 } // namespace about_flags |
OLD | NEW |