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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "components/flags_ui/flags_storage.h" | 45 #include "components/flags_ui/flags_storage.h" |
46 #include "components/flags_ui/flags_ui_switches.h" | 46 #include "components/flags_ui/flags_ui_switches.h" |
47 #include "components/nacl/common/nacl_switches.h" | 47 #include "components/nacl/common/nacl_switches.h" |
48 #include "components/ntp_snippets/features.h" | 48 #include "components/ntp_snippets/features.h" |
49 #include "components/ntp_snippets/ntp_snippets_constants.h" | 49 #include "components/ntp_snippets/ntp_snippets_constants.h" |
50 #include "components/ntp_tiles/switches.h" | 50 #include "components/ntp_tiles/switches.h" |
51 #include "components/offline_pages/core/offline_page_feature.h" | 51 #include "components/offline_pages/core/offline_page_feature.h" |
52 #include "components/omnibox/browser/omnibox_switches.h" | 52 #include "components/omnibox/browser/omnibox_switches.h" |
53 #include "components/password_manager/core/common/password_manager_features.h" | 53 #include "components/password_manager/core/common/password_manager_features.h" |
54 #include "components/proximity_auth/switches.h" | 54 #include "components/proximity_auth/switches.h" |
| 55 #include "components/security_state/core/security_state.h" |
55 #include "components/security_state/core/switches.h" | 56 #include "components/security_state/core/switches.h" |
56 #include "components/signin/core/common/signin_switches.h" | 57 #include "components/signin/core/common/signin_switches.h" |
57 #include "components/spellcheck/common/spellcheck_features.h" | 58 #include "components/spellcheck/common/spellcheck_features.h" |
58 #include "components/spellcheck/common/spellcheck_switches.h" | 59 #include "components/spellcheck/common/spellcheck_switches.h" |
59 #include "components/spellcheck/spellcheck_build_features.h" | 60 #include "components/spellcheck/spellcheck_build_features.h" |
60 #include "components/ssl_config/ssl_config_switches.h" | 61 #include "components/ssl_config/ssl_config_switches.h" |
61 #include "components/strings/grit/components_strings.h" | 62 #include "components/strings/grit/components_strings.h" |
62 #include "components/sync/driver/sync_driver_switches.h" | 63 #include "components/sync/driver/sync_driver_switches.h" |
63 #include "components/tracing/common/tracing_switches.h" | 64 #include "components/tracing/common/tracing_switches.h" |
64 #include "components/translate/core/browser/translate_manager.h" | 65 #include "components/translate/core/browser/translate_manager.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 }; | 204 }; |
204 | 205 |
205 const FeatureEntry::Choice kMarkHttpAsChoices[] = { | 206 const FeatureEntry::Choice kMarkHttpAsChoices[] = { |
206 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | 207 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
207 {IDS_MARK_HTTP_AS_NEUTRAL, security_state::switches::kMarkHttpAs, | 208 {IDS_MARK_HTTP_AS_NEUTRAL, security_state::switches::kMarkHttpAs, |
208 security_state::switches::kMarkHttpAsNeutral}, | 209 security_state::switches::kMarkHttpAsNeutral}, |
209 {IDS_MARK_HTTP_AS_DANGEROUS, security_state::switches::kMarkHttpAs, | 210 {IDS_MARK_HTTP_AS_DANGEROUS, security_state::switches::kMarkHttpAs, |
210 security_state::switches::kMarkHttpAsDangerous}, | 211 security_state::switches::kMarkHttpAsDangerous}, |
211 {IDS_MARK_HTTP_WITH_PASSWORDS_OR_CC_WITH_CHIP, | 212 {IDS_MARK_HTTP_WITH_PASSWORDS_OR_CC_WITH_CHIP, |
212 security_state::switches::kMarkHttpAs, | 213 security_state::switches::kMarkHttpAs, |
213 security_state::switches::kMarkHttpWithPasswordsOrCcWithChip}, | 214 security_state::switches::kMarkHttpWithPasswordsOrCcWithChip}}; |
214 {IDS_MARK_HTTP_WITH_PASSWORDS_OR_CC_WITH_CHIP_AND_FORM_WARNING, | |
215 security_state::switches::kMarkHttpAs, | |
216 security_state::switches:: | |
217 kMarkHttpWithPasswordsOrCcWithChipAndFormWarning}}; | |
218 | 215 |
219 const FeatureEntry::Choice kDataReductionProxyLoFiChoices[] = { | 216 const FeatureEntry::Choice kDataReductionProxyLoFiChoices[] = { |
220 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
221 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON, | 218 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON, |
222 data_reduction_proxy::switches::kDataReductionProxyLoFi, | 219 data_reduction_proxy::switches::kDataReductionProxyLoFi, |
223 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn}, | 220 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn}, |
224 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY, | 221 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY, |
225 data_reduction_proxy::switches::kDataReductionProxyLoFi, | 222 data_reduction_proxy::switches::kDataReductionProxyLoFi, |
226 data_reduction_proxy::switches:: | 223 data_reduction_proxy::switches:: |
227 kDataReductionProxyLoFiValueCellularOnly}, | 224 kDataReductionProxyLoFiValueCellularOnly}, |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 {"enable-wifi-credential-sync", IDS_FLAGS_WIFI_CREDENTIAL_SYNC_NAME, | 1488 {"enable-wifi-credential-sync", IDS_FLAGS_WIFI_CREDENTIAL_SYNC_NAME, |
1492 IDS_FLAGS_WIFI_CREDENTIAL_SYNC_DESCRIPTION, kOsCrOS, | 1489 IDS_FLAGS_WIFI_CREDENTIAL_SYNC_DESCRIPTION, kOsCrOS, |
1493 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync)}, | 1490 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync)}, |
1494 {"enable-potentially-annoying-security-features", | 1491 {"enable-potentially-annoying-security-features", |
1495 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME, | 1492 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME, |
1496 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION, kOsAll, | 1493 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION, kOsAll, |
1497 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures)}, | 1494 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures)}, |
1498 #endif // OS_CHROMEOS | 1495 #endif // OS_CHROMEOS |
1499 {"mark-non-secure-as", IDS_MARK_HTTP_AS_NAME, IDS_MARK_HTTP_AS_DESCRIPTION, | 1496 {"mark-non-secure-as", IDS_MARK_HTTP_AS_NAME, IDS_MARK_HTTP_AS_DESCRIPTION, |
1500 kOsAll, MULTI_VALUE_TYPE(kMarkHttpAsChoices)}, | 1497 kOsAll, MULTI_VALUE_TYPE(kMarkHttpAsChoices)}, |
| 1498 {"enable-http-form-warning", IDS_ENABLE_HTTP_FORM_WARNING_NAME, |
| 1499 IDS_ENABLE_HTTP_FORM_WARNING_DESCRIPTION, kOsAll, |
| 1500 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)}, |
1501 {"enable-site-per-process", IDS_FLAGS_SITE_PER_PROCESS_NAME, | 1501 {"enable-site-per-process", IDS_FLAGS_SITE_PER_PROCESS_NAME, |
1502 IDS_FLAGS_SITE_PER_PROCESS_DESCRIPTION, kOsAll, | 1502 IDS_FLAGS_SITE_PER_PROCESS_DESCRIPTION, kOsAll, |
1503 SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, | 1503 SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, |
1504 {"enable-top-document-isolation", IDS_FLAGS_TOP_DOCUMENT_ISOLATION_NAME, | 1504 {"enable-top-document-isolation", IDS_FLAGS_TOP_DOCUMENT_ISOLATION_NAME, |
1505 IDS_FLAGS_TOP_DOCUMENT_ISOLATION_DESCRIPTION, kOsAll, | 1505 IDS_FLAGS_TOP_DOCUMENT_ISOLATION_DESCRIPTION, kOsAll, |
1506 SINGLE_VALUE_TYPE(switches::kTopDocumentIsolation)}, | 1506 SINGLE_VALUE_TYPE(switches::kTopDocumentIsolation)}, |
1507 {"enable-use-zoom-for-dsf", IDS_FLAGS_ENABLE_USE_ZOOM_FOR_DSF_NAME, | 1507 {"enable-use-zoom-for-dsf", IDS_FLAGS_ENABLE_USE_ZOOM_FOR_DSF_NAME, |
1508 IDS_FLAGS_ENABLE_USE_ZOOM_FOR_DSF_DESCRIPTION, kOsAll, | 1508 IDS_FLAGS_ENABLE_USE_ZOOM_FOR_DSF_DESCRIPTION, kOsAll, |
1509 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)}, | 1509 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)}, |
1510 #if defined(OS_MACOSX) | 1510 #if defined(OS_MACOSX) |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 {"enable-android-wallpapers-app", | 2135 {"enable-android-wallpapers-app", |
2136 IDS_FLAGS_ENABLE_ANDROID_WALLPAPERS_APP_NAME, | 2136 IDS_FLAGS_ENABLE_ANDROID_WALLPAPERS_APP_NAME, |
2137 IDS_FLAGS_ENABLE_ANDROID_WALLPAPERS_APP_DESCRIPTION, kOsCrOS, | 2137 IDS_FLAGS_ENABLE_ANDROID_WALLPAPERS_APP_DESCRIPTION, kOsCrOS, |
2138 SINGLE_VALUE_TYPE(chromeos::switches::kEnableAndroidWallpapersApp)}, | 2138 SINGLE_VALUE_TYPE(chromeos::switches::kEnableAndroidWallpapersApp)}, |
2139 #endif // defined(OS_CHROMEOS) | 2139 #endif // defined(OS_CHROMEOS) |
2140 | 2140 |
2141 #if defined(OS_ANDROID) | 2141 #if defined(OS_ANDROID) |
2142 {"enable-expanded-autofill-credit-card-popup", | 2142 {"enable-expanded-autofill-credit-card-popup", |
2143 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT, | 2143 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT, |
2144 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT_DESCRIPTION, | 2144 IDS_FLAGS_ENABLE_EXPANDED_AUTOFILL_CREDIT_CARD_POPUP_LAYOUT_DESCRIPTION, |
2145 kOsAndroid, | 2145 kOsAndroid, FEATURE_WITH_VARIATIONS_VALUE_TYPE( |
2146 FEATURE_WITH_VARIATIONS_VALUE_TYPE( | 2146 autofill::kAutofillCreditCardPopupLayout, |
2147 autofill::kAutofillCreditCardPopupLayout, | 2147 kAutofillCreditCardPopupLayoutFeatureVariations, |
2148 kAutofillCreditCardPopupLayoutFeatureVariations, | 2148 "AutofillCreditCardPopupLayout")}, |
2149 "AutofillCreditCardPopupLayout")}, | 2149 {"native-android-history-manager", IDS_NATIVE_ANDROID_HISTORY_MANAGER, |
2150 {"native-android-history-manager", IDS_NATIVE_ANDROID_HISTORY_MANAGER, | 2150 IDS_NATIVE_ANDROID_HISTORY_MANAGER_DESCRIPTION, kOsAndroid, |
2151 IDS_NATIVE_ANDROID_HISTORY_MANAGER_DESCRIPTION, kOsAndroid, | 2151 FEATURE_VALUE_TYPE(chrome::android::kNativeAndroidHistoryManager)}, |
2152 FEATURE_VALUE_TYPE(chrome::android::kNativeAndroidHistoryManager)}, | |
2153 #endif // OS_ANDROID | 2152 #endif // OS_ANDROID |
2154 {"enable-faster-location-reload", IDS_FLAGS_FASTER_LOCATION_RELOAD_NAME, | 2153 {"enable-faster-location-reload", IDS_FLAGS_FASTER_LOCATION_RELOAD_NAME, |
2155 IDS_FLAGS_FASTER_LOCATION_RELOAD_DESCRIPTION, kOsAll, | 2154 IDS_FLAGS_FASTER_LOCATION_RELOAD_DESCRIPTION, kOsAll, |
2156 FEATURE_VALUE_TYPE(features::kFasterLocationReload)} | 2155 FEATURE_VALUE_TYPE(features::kFasterLocationReload)} |
2157 | 2156 |
2158 // NOTE: Adding new command-line switches requires adding corresponding | 2157 // NOTE: Adding new command-line switches requires adding corresponding |
2159 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2158 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2160 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2159 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2161 }; | 2160 }; |
2162 | 2161 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 2355 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
2357 | 2356 |
2358 const FeatureEntry* GetFeatureEntries(size_t* count) { | 2357 const FeatureEntry* GetFeatureEntries(size_t* count) { |
2359 *count = arraysize(kFeatureEntries); | 2358 *count = arraysize(kFeatureEntries); |
2360 return kFeatureEntries; | 2359 return kFeatureEntries; |
2361 } | 2360 } |
2362 | 2361 |
2363 } // namespace testing | 2362 } // namespace testing |
2364 | 2363 |
2365 } // namespace about_flags | 2364 } // namespace about_flags |
OLD | NEW |