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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 "online-check-only" } | 539 "online-check-only" } |
540 }; | 540 }; |
541 | 541 |
542 const Experiment::Choice kV8CacheOptionsChoices[] = { | 542 const Experiment::Choice kV8CacheOptionsChoices[] = { |
543 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 543 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
544 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kV8CacheOptions, "none" }, | 544 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kV8CacheOptions, "none" }, |
545 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE, switches::kV8CacheOptions, "parse" }, | 545 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE, switches::kV8CacheOptions, "parse" }, |
546 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE, switches::kV8CacheOptions, "code" }, | 546 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE, switches::kV8CacheOptions, "code" }, |
547 }; | 547 }; |
548 | 548 |
| 549 #if defined(OS_ANDROID) |
| 550 const Experiment::Choice kProgressBarAnimationChoices[] = { |
| 551 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 552 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 553 switches::kProgressBarAnimation, "disabled" }, |
| 554 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_SMOOTH, |
| 555 switches::kProgressBarAnimation, "smooth" }, |
| 556 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_FAST_START, |
| 557 switches::kProgressBarAnimation, "fast-start" }, |
| 558 }; |
| 559 #endif // defined(OS_ANDROID) |
| 560 |
549 // RECORDING USER METRICS FOR FLAGS: | 561 // RECORDING USER METRICS FOR FLAGS: |
550 // ----------------------------------------------------------------------------- | 562 // ----------------------------------------------------------------------------- |
551 // The first line of the experiment is the internal name. If you'd like to | 563 // The first line of the experiment is the internal name. If you'd like to |
552 // gather statistics about the usage of your flag, you should append a marker | 564 // gather statistics about the usage of your flag, you should append a marker |
553 // comment to the end of the feature name, like so: | 565 // comment to the end of the feature name, like so: |
554 // "my-special-feature", // FLAGS:RECORD_UMA | 566 // "my-special-feature", // FLAGS:RECORD_UMA |
555 // | 567 // |
556 // After doing that, run | 568 // After doing that, run |
557 // tools/metrics/actions/extract_actions.py | 569 // tools/metrics/actions/extract_actions.py |
558 // to add the metric to actions.xml (which will enable UMA to record your | 570 // to add the metric to actions.xml (which will enable UMA to record your |
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager) | 2084 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager) |
2073 }, | 2085 }, |
2074 #endif // defined(ENABLE_TASK_MANAGER) | 2086 #endif // defined(ENABLE_TASK_MANAGER) |
2075 {"simplified-fullscreen-ui", | 2087 {"simplified-fullscreen-ui", |
2076 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME, | 2088 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME, |
2077 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION, | 2089 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION, |
2078 kOsDesktop, | 2090 kOsDesktop, |
2079 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI, | 2091 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI, |
2080 switches::kDisableSimplifiedFullscreenUI) | 2092 switches::kDisableSimplifiedFullscreenUI) |
2081 }, | 2093 }, |
| 2094 #if defined(OS_ANDROID) |
| 2095 {"progress-bar-animation", |
| 2096 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME, |
| 2097 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION, |
| 2098 kOsAndroid, |
| 2099 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)}, |
| 2100 #endif // defined(OS_ANDROID) |
| 2101 |
2082 // NOTE: Adding new command-line switches requires adding corresponding | 2102 // NOTE: Adding new command-line switches requires adding corresponding |
2083 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2103 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2084 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2104 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2085 }; | 2105 }; |
2086 | 2106 |
2087 const Experiment* experiments = kExperiments; | 2107 const Experiment* experiments = kExperiments; |
2088 size_t num_experiments = arraysize(kExperiments); | 2108 size_t num_experiments = arraysize(kExperiments); |
2089 | 2109 |
2090 // Stores and encapsulates the little state that about:flags has. | 2110 // Stores and encapsulates the little state that about:flags has. |
2091 class FlagsState { | 2111 class FlagsState { |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2714 } | 2734 } |
2715 | 2735 |
2716 const Experiment* GetExperiments(size_t* count) { | 2736 const Experiment* GetExperiments(size_t* count) { |
2717 *count = num_experiments; | 2737 *count = num_experiments; |
2718 return experiments; | 2738 return experiments; |
2719 } | 2739 } |
2720 | 2740 |
2721 } // namespace testing | 2741 } // namespace testing |
2722 | 2742 |
2723 } // namespace about_flags | 2743 } // namespace about_flags |
OLD | NEW |