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

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

Issue 2080263002: Change fill-on-account-select to use Features API, not a custom flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused GRD strings Created 4 years, 6 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 switches::kExtensionContentVerification, 350 switches::kExtensionContentVerification,
351 switches::kExtensionContentVerificationBootstrap }, 351 switches::kExtensionContentVerificationBootstrap },
352 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE, 352 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE,
353 switches::kExtensionContentVerification, 353 switches::kExtensionContentVerification,
354 switches::kExtensionContentVerificationEnforce }, 354 switches::kExtensionContentVerificationEnforce },
355 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT, 355 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT,
356 switches::kExtensionContentVerification, 356 switches::kExtensionContentVerification,
357 switches::kExtensionContentVerificationEnforceStrict }, 357 switches::kExtensionContentVerificationEnforceStrict },
358 }; 358 };
359 359
360 const FeatureEntry::Choice kFillOnAccountSelectChoices[] = {
361 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
362 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
363 autofill::switches::kDisableFillOnAccountSelect, "" },
364 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING,
365 autofill::switches::kEnableFillOnAccountSelect, "" },
366 };
367
368 const FeatureEntry::Choice kTopChromeMaterialDesignChoices[] = { 360 const FeatureEntry::Choice kTopChromeMaterialDesignChoices[] = {
369 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 361 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
370 { IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL, 362 { IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL,
371 switches::kTopChromeMD, 363 switches::kTopChromeMD,
372 switches::kTopChromeMDNonMaterial }, 364 switches::kTopChromeMDNonMaterial },
373 { IDS_FLAGS_TOP_CHROME_MD_MATERIAL, 365 { IDS_FLAGS_TOP_CHROME_MD_MATERIAL,
374 switches::kTopChromeMD, 366 switches::kTopChromeMD,
375 switches::kTopChromeMDMaterial }, 367 switches::kTopChromeMDMaterial },
376 { IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID, 368 { IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID,
377 switches::kTopChromeMD, 369 switches::kTopChromeMD,
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 #endif // defined(OS_CHROMEOS) 1415 #endif // defined(OS_CHROMEOS)
1424 #if defined(OS_ANDROID) 1416 #if defined(OS_ANDROID)
1425 {"enable-seccomp-sandbox-android", 1417 {"enable-seccomp-sandbox-android",
1426 IDS_FLAGS_SECCOMP_FILTER_SANDBOX_ANDROID_NAME, 1418 IDS_FLAGS_SECCOMP_FILTER_SANDBOX_ANDROID_NAME,
1427 IDS_FLAGS_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION, kOsAndroid, 1419 IDS_FLAGS_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION, kOsAndroid,
1428 FEATURE_VALUE_TYPE(features::kSeccompSandboxAndroid)}, 1420 FEATURE_VALUE_TYPE(features::kSeccompSandboxAndroid)},
1429 #endif 1421 #endif
1430 {"enable-touch-hover", IDS_FLAGS_TOUCH_HOVER_NAME, 1422 {"enable-touch-hover", IDS_FLAGS_TOUCH_HOVER_NAME,
1431 IDS_FLAGS_TOUCH_HOVER_DESCRIPTION, kOsAndroid, 1423 IDS_FLAGS_TOUCH_HOVER_DESCRIPTION, kOsAndroid,
1432 SINGLE_VALUE_TYPE("enable-touch-hover")}, 1424 SINGLE_VALUE_TYPE("enable-touch-hover")},
1433 {"enable-fill-on-account-select", IDS_FILL_ON_ACCOUNT_SELECT_NAME,
1434 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION, kOsAll,
1435 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices)},
1436 #if defined(OS_CHROMEOS) 1425 #if defined(OS_CHROMEOS)
1437 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA 1426 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA
1438 IDS_FLAGS_WIFI_CREDENTIAL_SYNC_NAME, 1427 IDS_FLAGS_WIFI_CREDENTIAL_SYNC_NAME,
1439 IDS_FLAGS_WIFI_CREDENTIAL_SYNC_DESCRIPTION, kOsCrOS, 1428 IDS_FLAGS_WIFI_CREDENTIAL_SYNC_DESCRIPTION, kOsCrOS,
1440 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync)}, 1429 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync)},
1441 {"enable-potentially-annoying-security-features", 1430 {"enable-potentially-annoying-security-features",
1442 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME, 1431 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME,
1443 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION, kOsAll, 1432 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION, kOsAll,
1444 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures)}, 1433 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures)},
1445 #endif 1434 #endif
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 #endif 1909 #endif
1921 {"enable-weak-memorycache", IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME, 1910 {"enable-weak-memorycache", IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_NAME,
1922 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll, 1911 IDS_FLAGS_ENABLE_WEAK_MEMORYCACHE_DESCRIPTION, kOsAll,
1923 FEATURE_VALUE_TYPE(features::kWeakMemoryCache)}, 1912 FEATURE_VALUE_TYPE(features::kWeakMemoryCache)},
1924 #if defined(OS_CHROMEOS) 1913 #if defined(OS_CHROMEOS)
1925 {"enable-eol-notification", IDS_FLAGS_ENABLE_EOL_NOTIFICATION_NAME, 1914 {"enable-eol-notification", IDS_FLAGS_ENABLE_EOL_NOTIFICATION_NAME,
1926 IDS_FLAGS_ENABLE_EOL_NOTIFICATION_DESCRIPTION, kOsCrOS, 1915 IDS_FLAGS_ENABLE_EOL_NOTIFICATION_DESCRIPTION, kOsCrOS,
1927 SINGLE_VALUE_TYPE(chromeos::switches::kEnableEolNotification)}, 1916 SINGLE_VALUE_TYPE(chromeos::switches::kEnableEolNotification)},
1928 #endif // defined(OS_CHROMEOS) 1917 #endif // defined(OS_CHROMEOS)
1929 1918
1919 {"fill-on-account-select", IDS_FILL_ON_ACCOUNT_SELECT_NAME,
1920 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION, kOsAll,
1921 FEATURE_VALUE_TYPE(password_manager::features::kFillOnAccountSelect)},
1930 // NOTE: Adding new command-line switches requires adding corresponding 1922 // NOTE: Adding new command-line switches requires adding corresponding
1931 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 1923 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
1932 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 1924 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
1933 }; 1925 };
1934 1926
1935 class FlagsStateSingleton { 1927 class FlagsStateSingleton {
1936 public: 1928 public:
1937 FlagsStateSingleton() 1929 FlagsStateSingleton()
1938 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {} 1930 : flags_state_(kFeatureEntries, arraysize(kFeatureEntries)) {}
1939 ~FlagsStateSingleton() {} 1931 ~FlagsStateSingleton() {}
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2117 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2126 2118
2127 const FeatureEntry* GetFeatureEntries(size_t* count) { 2119 const FeatureEntry* GetFeatureEntries(size_t* count) {
2128 *count = arraysize(kFeatureEntries); 2120 *count = arraysize(kFeatureEntries);
2129 return kFeatureEntries; 2121 return kFeatureEntries;
2130 } 2122 }
2131 2123
2132 } // namespace testing 2124 } // namespace testing
2133 2125
2134 } // namespace about_flags 2126 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698