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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 }; | 490 }; |
491 | 491 |
492 #if defined(OS_MACOSX) | 492 #if defined(OS_MACOSX) |
493 const Experiment::Choice kEnableAVFoundationChoices[] = { | 493 const Experiment::Choice kEnableAVFoundationChoices[] = { |
494 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 494 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
495 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""}, | 495 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""}, |
496 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""} | 496 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""} |
497 }; | 497 }; |
498 #endif | 498 #endif |
499 | 499 |
| 500 const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 501 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 502 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 503 password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 504 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 505 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 506 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 507 password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 508 }; |
| 509 |
500 // RECORDING USER METRICS FOR FLAGS: | 510 // RECORDING USER METRICS FOR FLAGS: |
501 // ----------------------------------------------------------------------------- | 511 // ----------------------------------------------------------------------------- |
502 // 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 |
503 // 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 |
504 // comment to the end of the feature name, like so: | 514 // comment to the end of the feature name, like so: |
505 // "my-special-feature", // FLAGS:RECORD_UMA | 515 // "my-special-feature", // FLAGS:RECORD_UMA |
506 // | 516 // |
507 // After doing that, run | 517 // After doing that, run |
508 // tools/metrics/actions/extract_actions.py | 518 // tools/metrics/actions/extract_actions.py |
509 // 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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1914 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, | 1924 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION, |
1915 kOsAll, | 1925 kOsAll, |
1916 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) | 1926 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices) |
1917 }, | 1927 }, |
1918 { | 1928 { |
1919 "enable-drop-sync-credential", | 1929 "enable-drop-sync-credential", |
1920 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, | 1930 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME, |
1921 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, | 1931 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION, |
1922 kOsAll, | 1932 kOsAll, |
1923 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) | 1933 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) |
1924 } | 1934 }, |
| 1935 { |
| 1936 "autofill-sync-credential", |
| 1937 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, |
| 1938 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, |
| 1939 kOsAll, |
| 1940 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices) |
| 1941 }, |
1925 }; | 1942 }; |
1926 | 1943 |
1927 const Experiment* experiments = kExperiments; | 1944 const Experiment* experiments = kExperiments; |
1928 size_t num_experiments = arraysize(kExperiments); | 1945 size_t num_experiments = arraysize(kExperiments); |
1929 | 1946 |
1930 // Stores and encapsulates the little state that about:flags has. | 1947 // Stores and encapsulates the little state that about:flags has. |
1931 class FlagsState { | 1948 class FlagsState { |
1932 public: | 1949 public: |
1933 FlagsState() : needs_restart_(false) {} | 1950 FlagsState() : needs_restart_(false) {} |
1934 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 1951 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 } | 2460 } |
2444 | 2461 |
2445 const Experiment* GetExperiments(size_t* count) { | 2462 const Experiment* GetExperiments(size_t* count) { |
2446 *count = num_experiments; | 2463 *count = num_experiments; |
2447 return experiments; | 2464 return experiments; |
2448 } | 2465 } |
2449 | 2466 |
2450 } // namespace testing | 2467 } // namespace testing |
2451 | 2468 |
2452 } // namespace about_flags | 2469 } // namespace about_flags |
OLD | NEW |