| 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 switches::kRememberCertErrorDecisions, | 492 switches::kRememberCertErrorDecisions, |
| 493 "604800" }, | 493 "604800" }, |
| 494 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, | 494 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH, |
| 495 switches::kRememberCertErrorDecisions, | 495 switches::kRememberCertErrorDecisions, |
| 496 "2592000" }, | 496 "2592000" }, |
| 497 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS, | 497 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS, |
| 498 switches::kRememberCertErrorDecisions, | 498 switches::kRememberCertErrorDecisions, |
| 499 "7776000" }, | 499 "7776000" }, |
| 500 }; | 500 }; |
| 501 | 501 |
| 502 const Experiment::Choice kEnableDropSyncCredentialChoices[] = { |
| 503 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 504 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 505 password_manager::switches::kEnableDropSyncCredential, "" }, |
| 506 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 507 password_manager::switches::kDisableDropSyncCredential, "" }, |
| 508 }; |
| 509 |
| 502 // RECORDING USER METRICS FOR FLAGS: | 510 // RECORDING USER METRICS FOR FLAGS: |
| 503 // ----------------------------------------------------------------------------- | 511 // ----------------------------------------------------------------------------- |
| 504 // The first line of the experiment is the internal name. If you'd like to | 512 // The first line of the experiment is the internal name. If you'd like to |
| 505 // gather statistics about the usage of your flag, you should append a marker | 513 // gather statistics about the usage of your flag, you should append a marker |
| 506 // comment to the end of the feature name, like so: | 514 // comment to the end of the feature name, like so: |
| 507 // "my-special-feature", // FLAGS:RECORD_UMA | 515 // "my-special-feature", // FLAGS:RECORD_UMA |
| 508 // | 516 // |
| 509 // After doing that, run | 517 // After doing that, run |
| 510 // tools/metrics/actions/extract_actions.py | 518 // tools/metrics/actions/extract_actions.py |
| 511 // to add the metric to actions.xml (which will enable UMA to record your | 519 // to add the metric to actions.xml (which will enable UMA to record your |
| (...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 kOsDesktop, | 1918 kOsDesktop, |
| 1911 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager) | 1919 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager) |
| 1912 }, | 1920 }, |
| 1913 { | 1921 { |
| 1914 "remember-cert-error-decisions", | 1922 "remember-cert-error-decisions", |
| 1915 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, | 1923 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME, |
| 1916 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, | 1924 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
| 1917 kOsAll, | 1925 kOsAll, |
| 1918 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) | 1926 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
| 1919 }, | 1927 }, |
| 1928 { |
| 1929 "enable-drop-sync-credential", |
| 1930 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, |
| 1931 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, |
| 1932 kOsAll, |
| 1933 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) |
| 1934 } |
| 1920 }; | 1935 }; |
| 1921 | 1936 |
| 1922 const Experiment* experiments = kExperiments; | 1937 const Experiment* experiments = kExperiments; |
| 1923 size_t num_experiments = arraysize(kExperiments); | 1938 size_t num_experiments = arraysize(kExperiments); |
| 1924 | 1939 |
| 1925 // Stores and encapsulates the little state that about:flags has. | 1940 // Stores and encapsulates the little state that about:flags has. |
| 1926 class FlagsState { | 1941 class FlagsState { |
| 1927 public: | 1942 public: |
| 1928 FlagsState() : needs_restart_(false) {} | 1943 FlagsState() : needs_restart_(false) {} |
| 1929 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 1944 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 } | 2453 } |
| 2439 | 2454 |
| 2440 const Experiment* GetExperiments(size_t* count) { | 2455 const Experiment* GetExperiments(size_t* count) { |
| 2441 *count = num_experiments; | 2456 *count = num_experiments; |
| 2442 return experiments; | 2457 return experiments; |
| 2443 } | 2458 } |
| 2444 | 2459 |
| 2445 } // namespace testing | 2460 } // namespace testing |
| 2446 | 2461 |
| 2447 } // namespace about_flags | 2462 } // namespace about_flags |
| OLD | NEW |