| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 #if defined(OS_MACOSX) | 498 #if defined(OS_MACOSX) |
| 499 const Experiment::Choice kEnableAVFoundationChoices[] = { | 499 const Experiment::Choice kEnableAVFoundationChoices[] = { |
| 500 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 500 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 501 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""}, | 501 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""}, |
| 502 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""} | 502 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""} |
| 503 }; | 503 }; |
| 504 #endif | 504 #endif |
| 505 | 505 |
| 506 const Experiment::Choice kAutofillSyncCredentialChoices[] = { |
| 507 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, |
| 508 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 509 password_manager::switches::kAllowAutofillSyncCredential, ""}, |
| 510 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH, |
| 511 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""}, |
| 512 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL, |
| 513 password_manager::switches::kDisallowAutofillSyncCredential, ""}, |
| 514 }; |
| 515 |
| 506 // RECORDING USER METRICS FOR FLAGS: | 516 // RECORDING USER METRICS FOR FLAGS: |
| 507 // ----------------------------------------------------------------------------- | 517 // ----------------------------------------------------------------------------- |
| 508 // The first line of the experiment is the internal name. If you'd like to | 518 // The first line of the experiment is the internal name. If you'd like to |
| 509 // gather statistics about the usage of your flag, you should append a marker | 519 // gather statistics about the usage of your flag, you should append a marker |
| 510 // comment to the end of the feature name, like so: | 520 // comment to the end of the feature name, like so: |
| 511 // "my-special-feature", // FLAGS:RECORD_UMA | 521 // "my-special-feature", // FLAGS:RECORD_UMA |
| 512 // | 522 // |
| 513 // After doing that, run | 523 // After doing that, run |
| 514 // tools/metrics/actions/extract_actions.py | 524 // tools/metrics/actions/extract_actions.py |
| 515 // to add the metric to actions.xml (which will enable UMA to record your | 525 // to add the metric to actions.xml (which will enable UMA to record your |
| (...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1932 kOsAll, | 1942 kOsAll, |
| 1933 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) | 1943 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices) |
| 1934 }, | 1944 }, |
| 1935 { | 1945 { |
| 1936 "enable-extension-action-redesign", | 1946 "enable-extension-action-redesign", |
| 1937 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, | 1947 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME, |
| 1938 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION, | 1948 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION, |
| 1939 kOsWin | kOsLinux | kOsCrOS, | 1949 kOsWin | kOsLinux | kOsCrOS, |
| 1940 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) | 1950 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign) |
| 1941 }, | 1951 }, |
| 1952 { |
| 1953 "autofill-sync-credential", |
| 1954 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME, |
| 1955 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION, |
| 1956 kOsAll, |
| 1957 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices) |
| 1958 }, |
| 1942 // NOTE: Adding new command-line switches requires adding corresponding | 1959 // NOTE: Adding new command-line switches requires adding corresponding |
| 1943 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 1960 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 1944 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 1961 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 1945 }; | 1962 }; |
| 1946 | 1963 |
| 1947 const Experiment* experiments = kExperiments; | 1964 const Experiment* experiments = kExperiments; |
| 1948 size_t num_experiments = arraysize(kExperiments); | 1965 size_t num_experiments = arraysize(kExperiments); |
| 1949 | 1966 |
| 1950 // Stores and encapsulates the little state that about:flags has. | 1967 // Stores and encapsulates the little state that about:flags has. |
| 1951 class FlagsState { | 1968 class FlagsState { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 } | 2528 } |
| 2512 | 2529 |
| 2513 const Experiment* GetExperiments(size_t* count) { | 2530 const Experiment* GetExperiments(size_t* count) { |
| 2514 *count = num_experiments; | 2531 *count = num_experiments; |
| 2515 return experiments; | 2532 return experiments; |
| 2516 } | 2533 } |
| 2517 | 2534 |
| 2518 } // namespace testing | 2535 } // namespace testing |
| 2519 | 2536 |
| 2520 } // namespace about_flags | 2537 } // namespace about_flags |
| OLD | NEW |