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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 const Experiment::Choice kTouchOptimizedUIChoices[] = { | 124 const Experiment::Choice kTouchOptimizedUIChoices[] = { |
125 { IDS_FLAGS_TOUCH_OPTIMIZED_UI_AUTOMATIC, "", "" }, | 125 { IDS_FLAGS_TOUCH_OPTIMIZED_UI_AUTOMATIC, "", "" }, |
126 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 126 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
127 switches::kTouchOptimizedUI, | 127 switches::kTouchOptimizedUI, |
128 switches::kTouchOptimizedUIEnabled }, | 128 switches::kTouchOptimizedUIEnabled }, |
129 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 129 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
130 switches::kTouchOptimizedUI, | 130 switches::kTouchOptimizedUI, |
131 switches::kTouchOptimizedUIDisabled } | 131 switches::kTouchOptimizedUIDisabled } |
132 }; | 132 }; |
133 | 133 |
| 134 const Experiment::Choice kPointerLockUIChoices[] = { |
| 135 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 136 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 137 switches::kEnablePointerLock, ""}, |
| 138 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 139 switches::kDisablePointerLock, ""} |
| 140 }; |
| 141 |
134 | 142 |
135 // RECORDING USER METRICS FOR FLAGS: | 143 // RECORDING USER METRICS FOR FLAGS: |
136 // ----------------------------------------------------------------------------- | 144 // ----------------------------------------------------------------------------- |
137 // The first line of the experiment is the internal name. If you'd like to | 145 // The first line of the experiment is the internal name. If you'd like to |
138 // gather statistics about the usage of your flag, you should append a marker | 146 // gather statistics about the usage of your flag, you should append a marker |
139 // comment to the end of the feature name, like so: | 147 // comment to the end of the feature name, like so: |
140 // "my-special-feature", // FLAGS:RECORD_UMA | 148 // "my-special-feature", // FLAGS:RECORD_UMA |
141 // | 149 // |
142 // After doing that, run //chrome/tools/extract_actions.py (see instructions at | 150 // After doing that, run //chrome/tools/extract_actions.py (see instructions at |
143 // the top of that file for details) to update the chromeactions.txt file, which | 151 // the top of that file for details) to update the chromeactions.txt file, which |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME, | 526 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME, |
519 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION, | 527 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
520 kOsAll, | 528 kOsAll, |
521 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia) | 529 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia) |
522 }, | 530 }, |
523 { | 531 { |
524 "enable-pointer-lock", | 532 "enable-pointer-lock", |
525 IDS_FLAGS_ENABLE_POINTER_LOCK_NAME, | 533 IDS_FLAGS_ENABLE_POINTER_LOCK_NAME, |
526 IDS_FLAGS_ENABLE_POINTER_LOCK_DESCRIPTION, | 534 IDS_FLAGS_ENABLE_POINTER_LOCK_DESCRIPTION, |
527 kOsAll, | 535 kOsAll, |
528 SINGLE_VALUE_TYPE(switches::kEnablePointerLock) | 536 MULTI_VALUE_TYPE(kPointerLockUIChoices) |
529 }, | 537 }, |
530 #if defined(USE_ASH) | 538 #if defined(USE_ASH) |
531 { | 539 { |
532 "aura-google-dialog-frames", | 540 "aura-google-dialog-frames", |
533 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_NAME, | 541 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_NAME, |
534 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_DESCRIPTION, | 542 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_DESCRIPTION, |
535 kOsWin | kOsLinux | kOsCrOS, | 543 kOsWin | kOsLinux | kOsCrOS, |
536 SINGLE_VALUE_TYPE(ash::switches::kAuraGoogleDialogFrames) | 544 SINGLE_VALUE_TYPE(ash::switches::kAuraGoogleDialogFrames) |
537 }, | 545 }, |
538 #endif | 546 #endif |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 } | 1275 } |
1268 | 1276 |
1269 const Experiment* GetExperiments(size_t* count) { | 1277 const Experiment* GetExperiments(size_t* count) { |
1270 *count = num_experiments; | 1278 *count = num_experiments; |
1271 return experiments; | 1279 return experiments; |
1272 } | 1280 } |
1273 | 1281 |
1274 } // namespace testing | 1282 } // namespace testing |
1275 | 1283 |
1276 } // namespace about_flags | 1284 } // namespace about_flags |
OLD | NEW |