| 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 #endif | 484 #endif |
| 485 | 485 |
| 486 const Experiment::Choice kEnableSettingsWindowChoices[] = { | 486 const Experiment::Choice kEnableSettingsWindowChoices[] = { |
| 487 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 487 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 488 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 488 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 489 ::switches::kEnableSettingsWindow, "" }, | 489 ::switches::kEnableSettingsWindow, "" }, |
| 490 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 490 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 491 ::switches::kDisableSettingsWindow, "" }, | 491 ::switches::kDisableSettingsWindow, "" }, |
| 492 }; | 492 }; |
| 493 | 493 |
| 494 // Note that the value is specified in seconds (where 0 is equivalent to |
| 495 // disabled). |
| 496 const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = { |
| 497 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 498 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 499 switches::kRememberCertErrorDecisions, |
| 500 "0" }, |
| 501 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY, |
| 502 switches::kRememberCertErrorDecisions, |
| 503 "86400" }, |
| 504 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS, |
| 505 switches::kRememberCertErrorDecisions, |
| 506 "259200" }, |
| 507 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK, |
| 508 switches::kRememberCertErrorDecisions, |
| 509 "604800" }, |
| 510 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, |
| 511 switches::kRememberCertErrorDecisions, |
| 512 "2592000" }, |
| 513 }; |
| 514 |
| 494 // RECORDING USER METRICS FOR FLAGS: | 515 // RECORDING USER METRICS FOR FLAGS: |
| 495 // ----------------------------------------------------------------------------- | 516 // ----------------------------------------------------------------------------- |
| 496 // The first line of the experiment is the internal name. If you'd like to | 517 // The first line of the experiment is the internal name. If you'd like to |
| 497 // gather statistics about the usage of your flag, you should append a marker | 518 // gather statistics about the usage of your flag, you should append a marker |
| 498 // comment to the end of the feature name, like so: | 519 // comment to the end of the feature name, like so: |
| 499 // "my-special-feature", // FLAGS:RECORD_UMA | 520 // "my-special-feature", // FLAGS:RECORD_UMA |
| 500 // | 521 // |
| 501 // After doing that, run | 522 // After doing that, run |
| 502 // tools/metrics/actions/extract_actions.py | 523 // tools/metrics/actions/extract_actions.py |
| 503 // to add the metric to actions.xml (which will enable UMA to record your | 524 // to add the metric to actions.xml (which will enable UMA to record your |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 SINGLE_VALUE_TYPE(chromeos::switches::kEnableOkGoogleVoiceSearch) | 1989 SINGLE_VALUE_TYPE(chromeos::switches::kEnableOkGoogleVoiceSearch) |
| 1969 }, | 1990 }, |
| 1970 #endif | 1991 #endif |
| 1971 { | 1992 { |
| 1972 "enable-embedded-extension-options", | 1993 "enable-embedded-extension-options", |
| 1973 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, | 1994 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 1974 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, | 1995 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 1975 kOsDesktop, | 1996 kOsDesktop, |
| 1976 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) | 1997 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 1977 }, | 1998 }, |
| 1999 { |
| 2000 "remember-cert-error-decisions", |
| 2001 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 2002 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 2003 kOsAll, |
| 2004 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 2005 }, |
| 1978 }; | 2006 }; |
| 1979 | 2007 |
| 1980 const Experiment* experiments = kExperiments; | 2008 const Experiment* experiments = kExperiments; |
| 1981 size_t num_experiments = arraysize(kExperiments); | 2009 size_t num_experiments = arraysize(kExperiments); |
| 1982 | 2010 |
| 1983 // Stores and encapsulates the little state that about:flags has. | 2011 // Stores and encapsulates the little state that about:flags has. |
| 1984 class FlagsState { | 2012 class FlagsState { |
| 1985 public: | 2013 public: |
| 1986 FlagsState() : needs_restart_(false) {} | 2014 FlagsState() : needs_restart_(false) {} |
| 1987 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 2015 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 } | 2524 } |
| 2497 | 2525 |
| 2498 const Experiment* GetExperiments(size_t* count) { | 2526 const Experiment* GetExperiments(size_t* count) { |
| 2499 *count = num_experiments; | 2527 *count = num_experiments; |
| 2500 return experiments; | 2528 return experiments; |
| 2501 } | 2529 } |
| 2502 | 2530 |
| 2503 } // namespace testing | 2531 } // namespace testing |
| 2504 | 2532 |
| 2505 } // namespace about_flags | 2533 } // namespace about_flags |
| OLD | NEW |