Chromium Code Reviews| 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 | |
| 504 | |
|
Joao da Silva
2014/10/22 10:49:57
single newline
Thiemo Nagel
2014/10/22 16:30:54
Thanks. Done.
| |
| 480 // RECORDING USER METRICS FOR FLAGS: | 505 // RECORDING USER METRICS FOR FLAGS: |
| 481 // ----------------------------------------------------------------------------- | 506 // ----------------------------------------------------------------------------- |
| 482 // The first line of the experiment is the internal name. If you'd like to | 507 // 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 | 508 // gather statistics about the usage of your flag, you should append a marker |
| 484 // comment to the end of the feature name, like so: | 509 // comment to the end of the feature name, like so: |
| 485 // "my-special-feature", // FLAGS:RECORD_UMA | 510 // "my-special-feature", // FLAGS:RECORD_UMA |
| 486 // | 511 // |
| 487 // After doing that, run | 512 // After doing that, run |
| 488 // tools/metrics/actions/extract_actions.py | 513 // tools/metrics/actions/extract_actions.py |
| 489 // to add the metric to actions.xml (which will enable UMA to record your | 514 // 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 | 1986 #endif |
| 1962 #if defined(OS_CHROMEOS) | 1987 #if defined(OS_CHROMEOS) |
| 1963 { | 1988 { |
| 1964 "enable-remote-assistance", | 1989 "enable-remote-assistance", |
| 1965 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_NAME, | 1990 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_NAME, |
| 1966 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_DESCRIPTION, | 1991 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_DESCRIPTION, |
| 1967 kOsCrOS, | 1992 kOsCrOS, |
| 1968 SINGLE_VALUE_TYPE(extensions::switches::kEnableRemoteAssistance) | 1993 SINGLE_VALUE_TYPE(extensions::switches::kEnableRemoteAssistance) |
| 1969 }, | 1994 }, |
| 1970 #endif // defined(OS_CHROMEOS) | 1995 #endif // defined(OS_CHROMEOS) |
| 1996 { | |
| 1997 "ssl-version-min", | |
| 1998 IDS_FLAGS_SSL_VERSION_MIN_NAME, | |
| 1999 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION, | |
| 2000 kOsAll, | |
| 2001 MULTI_VALUE_TYPE(kSSLVersionMinChoices) | |
| 2002 }, | |
| 2003 { | |
| 2004 "ssl-version-fallback-min", | |
| 2005 IDS_FLAGS_SSL_VERSION_FALLBACK_MIN_NAME, | |
| 2006 IDS_FLAGS_SSL_VERSION_FALLBACK_MIN_DESCRIPTION, | |
| 2007 kOsAll, | |
| 2008 MULTI_VALUE_TYPE(kSSLVersionFallbackMinChoices) | |
| 2009 } | |
| 1971 // NOTE: Adding new command-line switches requires adding corresponding | 2010 // NOTE: Adding new command-line switches requires adding corresponding |
| 1972 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2011 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1973 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2012 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
|
Joao da Silva
2014/10/22 10:49:57
What about this?
Thiemo Nagel
2014/10/22 16:30:54
Good catch. I had interpreted that as "upon addin
| |
| 1974 }; | 2013 }; |
| 1975 | 2014 |
| 1976 const Experiment* experiments = kExperiments; | 2015 const Experiment* experiments = kExperiments; |
| 1977 size_t num_experiments = arraysize(kExperiments); | 2016 size_t num_experiments = arraysize(kExperiments); |
| 1978 | 2017 |
| 1979 // Stores and encapsulates the little state that about:flags has. | 2018 // Stores and encapsulates the little state that about:flags has. |
| 1980 class FlagsState { | 2019 class FlagsState { |
| 1981 public: | 2020 public: |
| 1982 FlagsState() : needs_restart_(false) {} | 2021 FlagsState() : needs_restart_(false) {} |
| 1983 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 2022 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2557 } | 2596 } |
| 2558 | 2597 |
| 2559 const Experiment* GetExperiments(size_t* count) { | 2598 const Experiment* GetExperiments(size_t* count) { |
| 2560 *count = num_experiments; | 2599 *count = num_experiments; |
| 2561 return experiments; | 2600 return experiments; |
| 2562 } | 2601 } |
| 2563 | 2602 |
| 2564 } // namespace testing | 2603 } // namespace testing |
| 2565 | 2604 |
| 2566 } // namespace about_flags | 2605 } // namespace about_flags |
| OLD | NEW |