| 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 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 SINGLE_VALUE_TYPE(chromeos::switches::kEnableOkGoogleVoiceSearch) | 1985 SINGLE_VALUE_TYPE(chromeos::switches::kEnableOkGoogleVoiceSearch) |
| 1962 }, | 1986 }, |
| 1963 #endif | 1987 #endif |
| 1964 { | 1988 { |
| 1965 "enable-embedded-extension-options", | 1989 "enable-embedded-extension-options", |
| 1966 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, | 1990 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME, |
| 1967 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, | 1991 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION, |
| 1968 kOsDesktop, | 1992 kOsDesktop, |
| 1969 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) | 1993 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions) |
| 1970 }, | 1994 }, |
| 1995 { |
| 1996 "remember-cert-error-decisions", |
| 1997 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 1998 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 1999 kOsAll, |
| 2000 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 2001 }, |
| 1971 }; | 2002 }; |
| 1972 | 2003 |
| 1973 const Experiment* experiments = kExperiments; | 2004 const Experiment* experiments = kExperiments; |
| 1974 size_t num_experiments = arraysize(kExperiments); | 2005 size_t num_experiments = arraysize(kExperiments); |
| 1975 | 2006 |
| 1976 // Stores and encapsulates the little state that about:flags has. | 2007 // Stores and encapsulates the little state that about:flags has. |
| 1977 class FlagsState { | 2008 class FlagsState { |
| 1978 public: | 2009 public: |
| 1979 FlagsState() : needs_restart_(false) {} | 2010 FlagsState() : needs_restart_(false) {} |
| 1980 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 2011 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2489 } | 2520 } |
| 2490 | 2521 |
| 2491 const Experiment* GetExperiments(size_t* count) { | 2522 const Experiment* GetExperiments(size_t* count) { |
| 2492 *count = num_experiments; | 2523 *count = num_experiments; |
| 2493 return experiments; | 2524 return experiments; |
| 2494 } | 2525 } |
| 2495 | 2526 |
| 2496 } // namespace testing | 2527 } // namespace testing |
| 2497 | 2528 |
| 2498 } // namespace about_flags | 2529 } // namespace about_flags |
| OLD | NEW |