| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 const Experiment::Choice kAutofillSyncCredentialChoices[] = { | 470 const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 471 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, | 471 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 472 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, | 472 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 473 password_manager::switches::kAllowAutofillSyncCredential, ""}, | 473 password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 474 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, | 474 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 475 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, | 475 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 476 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, | 476 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 477 password_manager::switches::kDisallowAutofillSyncCredential, ""}, | 477 password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 478 }; | 478 }; |
| 479 | 479 |
| 480 const Experiment::Choice kSSLVersionMinChoices[] = { |
| 481 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 482 { IDS_SSL_VERSION_MIN_SSL3, |
| 483 switches::kSSLVersionMin, "ssl3" }, |
| 484 { IDS_SSL_VERSION_MIN_TLS1, |
| 485 switches::kSSLVersionMin, "tls1" }, |
| 486 { IDS_SSL_VERSION_MIN_TLS1_1, |
| 487 switches::kSSLVersionMin, "tls1.1" }, |
| 488 { IDS_SSL_VERSION_MIN_TLS1_2, |
| 489 switches::kSSLVersionMin, "tls1.2" }, |
| 490 }; |
| 491 |
| 492 const Experiment::Choice kSSLVersionFallbackMinChoices[] = { |
| 493 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 494 { IDS_SSL_VERSION_MIN_SSL3, |
| 495 switches::kSSLVersionFallbackMin, "ssl3" }, |
| 496 { IDS_SSL_VERSION_MIN_TLS1, |
| 497 switches::kSSLVersionFallbackMin, "tls1" }, |
| 498 { IDS_SSL_VERSION_MIN_TLS1_1, |
| 499 switches::kSSLVersionFallbackMin, "tls1.1" }, |
| 500 { IDS_SSL_VERSION_MIN_TLS1_2, |
| 501 switches::kSSLVersionFallbackMin, "tls1.2" }, |
| 502 }; |
| 503 |
| 480 // RECORDING USER METRICS FOR FLAGS: | 504 // RECORDING USER METRICS FOR FLAGS: |
| 481 // ----------------------------------------------------------------------------- | 505 // ----------------------------------------------------------------------------- |
| 482 // The first line of the experiment is the internal name. If you'd like to | 506 // The first line of the experiment is the internal name. If you'd like to |
| 483 // gather statistics about the usage of your flag, you should append a marker | 507 // gather statistics about the usage of your flag, you should append a marker |
| 484 // comment to the end of the feature name, like so: | 508 // comment to the end of the feature name, like so: |
| 485 // "my-special-feature", // FLAGS:RECORD_UMA | 509 // "my-special-feature", // FLAGS:RECORD_UMA |
| 486 // | 510 // |
| 487 // After doing that, run | 511 // After doing that, run |
| 488 // tools/metrics/actions/extract_actions.py | 512 // tools/metrics/actions/extract_actions.py |
| 489 // to add the metric to actions.xml (which will enable UMA to record your | 513 // to add the metric to actions.xml (which will enable UMA to record your |
| (...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 #endif | 1985 #endif |
| 1962 #if defined(OS_CHROMEOS) | 1986 #if defined(OS_CHROMEOS) |
| 1963 { | 1987 { |
| 1964 "enable-remote-assistance", | 1988 "enable-remote-assistance", |
| 1965 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_NAME, | 1989 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_NAME, |
| 1966 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_DESCRIPTION, | 1990 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_DESCRIPTION, |
| 1967 kOsCrOS, | 1991 kOsCrOS, |
| 1968 SINGLE_VALUE_TYPE(extensions::switches::kEnableRemoteAssistance) | 1992 SINGLE_VALUE_TYPE(extensions::switches::kEnableRemoteAssistance) |
| 1969 }, | 1993 }, |
| 1970 #endif // defined(OS_CHROMEOS) | 1994 #endif // defined(OS_CHROMEOS) |
| 1995 { |
| 1996 "ssl-version-min", |
| 1997 IDS_FLAGS_SSL_VERSION_MIN_NAME, |
| 1998 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION, |
| 1999 kOsAll, |
| 2000 MULTI_VALUE_TYPE(kSSLVersionMinChoices) |
| 2001 }, |
| 2002 { |
| 2003 "ssl-version-fallback-min", |
| 2004 IDS_FLAGS_SSL_VERSION_FALLBACK_MIN_NAME, |
| 2005 IDS_FLAGS_SSL_VERSION_FALLBACK_MIN_DESCRIPTION, |
| 2006 kOsAll, |
| 2007 MULTI_VALUE_TYPE(kSSLVersionFallbackMinChoices) |
| 2008 } |
| 1971 // NOTE: Adding new command-line switches requires adding corresponding | 2009 // NOTE: Adding new command-line switches requires adding corresponding |
| 1972 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2010 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1973 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2011 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 1974 }; | 2012 }; |
| 1975 | 2013 |
| 1976 const Experiment* experiments = kExperiments; | 2014 const Experiment* experiments = kExperiments; |
| 1977 size_t num_experiments = arraysize(kExperiments); | 2015 size_t num_experiments = arraysize(kExperiments); |
| 1978 | 2016 |
| 1979 // Stores and encapsulates the little state that about:flags has. | 2017 // Stores and encapsulates the little state that about:flags has. |
| 1980 class FlagsState { | 2018 class FlagsState { |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2557 } | 2595 } |
| 2558 | 2596 |
| 2559 const Experiment* GetExperiments(size_t* count) { | 2597 const Experiment* GetExperiments(size_t* count) { |
| 2560 *count = num_experiments; | 2598 *count = num_experiments; |
| 2561 return experiments; | 2599 return experiments; |
| 2562 } | 2600 } |
| 2563 | 2601 |
| 2564 } // namespace testing | 2602 } // namespace testing |
| 2565 | 2603 |
| 2566 } // namespace about_flags | 2604 } // namespace about_flags |
| OLD | NEW |