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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 }; | 222 }; |
223 | 223 |
224 const Experiment::Choice kSimpleCacheBackendChoices[] = { | 224 const Experiment::Choice kSimpleCacheBackendChoices[] = { |
225 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 225 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 226 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
227 switches::kUseSimpleCacheBackend, "off" }, | 227 switches::kUseSimpleCacheBackend, "off" }, |
228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
229 switches::kUseSimpleCacheBackend, "on"} | 229 switches::kUseSimpleCacheBackend, "on"} |
230 }; | 230 }; |
231 | 231 |
| 232 const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = { |
| 233 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 234 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 235 switches::kTabCaptureUpscaleQuality, "fast" }, |
| 236 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 237 switches::kTabCaptureUpscaleQuality, "good" }, |
| 238 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 239 switches::kTabCaptureUpscaleQuality, "best" }, |
| 240 }; |
| 241 |
| 242 const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = { |
| 243 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 244 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 245 switches::kTabCaptureDownscaleQuality, "fast" }, |
| 246 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 247 switches::kTabCaptureDownscaleQuality, "good" }, |
| 248 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 249 switches::kTabCaptureDownscaleQuality, "best" }, |
| 250 }; |
| 251 |
232 // RECORDING USER METRICS FOR FLAGS: | 252 // RECORDING USER METRICS FOR FLAGS: |
233 // ----------------------------------------------------------------------------- | 253 // ----------------------------------------------------------------------------- |
234 // The first line of the experiment is the internal name. If you'd like to | 254 // The first line of the experiment is the internal name. If you'd like to |
235 // gather statistics about the usage of your flag, you should append a marker | 255 // gather statistics about the usage of your flag, you should append a marker |
236 // comment to the end of the feature name, like so: | 256 // comment to the end of the feature name, like so: |
237 // "my-special-feature", // FLAGS:RECORD_UMA | 257 // "my-special-feature", // FLAGS:RECORD_UMA |
238 // | 258 // |
239 // After doing that, run //chrome/tools/extract_actions.py (see instructions at | 259 // After doing that, run //chrome/tools/extract_actions.py (see instructions at |
240 // the top of that file for details) to update the chromeactions.txt file, which | 260 // the top of that file for details) to update the chromeactions.txt file, which |
241 // will enable UMA to record your feature flag. | 261 // will enable UMA to record your feature flag. |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 #endif | 1500 #endif |
1481 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 1501 #if defined(OS_CHROMEOS) || defined(OS_WIN) |
1482 { | 1502 { |
1483 "enable-omnibox-auto-completion-for-ime", | 1503 "enable-omnibox-auto-completion-for-ime", |
1484 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME, | 1504 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME, |
1485 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION, | 1505 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION, |
1486 kOsCrOS, | 1506 kOsCrOS, |
1487 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme) | 1507 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme) |
1488 }, | 1508 }, |
1489 #endif | 1509 #endif |
| 1510 #if defined(USE_AURA) |
| 1511 { |
| 1512 "tab-capture-upscale-quality", |
| 1513 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME, |
| 1514 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION, |
| 1515 kOsAll, |
| 1516 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices) |
| 1517 }, |
| 1518 { |
| 1519 "tab-capture-downscale-quality", |
| 1520 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME, |
| 1521 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION, |
| 1522 kOsAll, |
| 1523 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices) |
| 1524 }, |
| 1525 #endif |
1490 }; | 1526 }; |
1491 | 1527 |
1492 const Experiment* experiments = kExperiments; | 1528 const Experiment* experiments = kExperiments; |
1493 size_t num_experiments = arraysize(kExperiments); | 1529 size_t num_experiments = arraysize(kExperiments); |
1494 | 1530 |
1495 // Stores and encapsulates the little state that about:flags has. | 1531 // Stores and encapsulates the little state that about:flags has. |
1496 class FlagsState { | 1532 class FlagsState { |
1497 public: | 1533 public: |
1498 FlagsState() : needs_restart_(false) {} | 1534 FlagsState() : needs_restart_(false) {} |
1499 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 1535 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 } | 2020 } |
1985 | 2021 |
1986 const Experiment* GetExperiments(size_t* count) { | 2022 const Experiment* GetExperiments(size_t* count) { |
1987 *count = num_experiments; | 2023 *count = num_experiments; |
1988 return experiments; | 2024 return experiments; |
1989 } | 2025 } |
1990 | 2026 |
1991 } // namespace testing | 2027 } // namespace testing |
1992 | 2028 |
1993 } // namespace about_flags | 2029 } // namespace about_flags |
OLD | NEW |