| 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::kRememberCertErrorDecisionsDisable, |
| 500 "" }, |
| 501 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_DO_NOT_REMEMBER, |
| 502 switches::kRememberCertErrorDecisionsNone, |
| 503 "" }, |
| 504 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY, |
| 505 switches::kRememberCertErrorDecisionsOneDay, |
| 506 "" }, |
| 507 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS, |
| 508 switches::kRememberCertErrorDecisionsThreeDays, |
| 509 "" }, |
| 510 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK, |
| 511 switches::kRememberCertErrorDecisionsOneWeek, |
| 512 "" }, |
| 513 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, |
| 514 switches::kRememberCertErrorDecisionsOneMonth, |
| 515 "" }, |
| 516 }; |
| 517 |
| 494 // RECORDING USER METRICS FOR FLAGS: | 518 // RECORDING USER METRICS FOR FLAGS: |
| 495 // ----------------------------------------------------------------------------- | 519 // ----------------------------------------------------------------------------- |
| 496 // The first line of the experiment is the internal name. If you'd like to | 520 // 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 | 521 // gather statistics about the usage of your flag, you should append a marker |
| 498 // comment to the end of the feature name, like so: | 522 // comment to the end of the feature name, like so: |
| 499 // "my-special-feature", // FLAGS:RECORD_UMA | 523 // "my-special-feature", // FLAGS:RECORD_UMA |
| 500 // | 524 // |
| 501 // After doing that, run | 525 // After doing that, run |
| 502 // tools/metrics/actions/extract_actions.py | 526 // tools/metrics/actions/extract_actions.py |
| 503 // to add the metric to actions.xml (which will enable UMA to record your | 527 // 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) | 1992 SINGLE_VALUE_TYPE(chromeos::switches::kEnableOkGoogleVoiceSearch) |
| 1969 }, | 1993 }, |
| 1970 #endif | 1994 #endif |
| 1971 { | 1995 { |
| 1972 "enable-embedded-extension-options", | 1996 "enable-embedded-extension-options", |
| 1973 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, | 1997 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 1974 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, | 1998 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 1975 kOsDesktop, | 1999 kOsDesktop, |
| 1976 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) | 2000 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 1977 }, | 2001 }, |
| 2002 { |
| 2003 "remember-cert-error-decisions", |
| 2004 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 2005 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 2006 kOsAll, |
| 2007 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 2008 }, |
| 1978 }; | 2009 }; |
| 1979 | 2010 |
| 1980 const Experiment* experiments = kExperiments; | 2011 const Experiment* experiments = kExperiments; |
| 1981 size_t num_experiments = arraysize(kExperiments); | 2012 size_t num_experiments = arraysize(kExperiments); |
| 1982 | 2013 |
| 1983 // Stores and encapsulates the little state that about:flags has. | 2014 // Stores and encapsulates the little state that about:flags has. |
| 1984 class FlagsState { | 2015 class FlagsState { |
| 1985 public: | 2016 public: |
| 1986 FlagsState() : needs_restart_(false) {} | 2017 FlagsState() : needs_restart_(false) {} |
| 1987 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 2018 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 } | 2527 } |
| 2497 | 2528 |
| 2498 const Experiment* GetExperiments(size_t* count) { | 2529 const Experiment* GetExperiments(size_t* count) { |
| 2499 *count = num_experiments; | 2530 *count = num_experiments; |
| 2500 return experiments; | 2531 return experiments; |
| 2501 } | 2532 } |
| 2502 | 2533 |
| 2503 } // namespace testing | 2534 } // namespace testing |
| 2504 | 2535 |
| 2505 } // namespace about_flags | 2536 } // namespace about_flags |
| OLD | NEW |