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