| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 #endif | 317 #endif |
| 318 | 318 |
| 319 const Experiment::Choice kNumRasterThreadsChoices[] = { | 319 const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 320 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 320 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 321 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, | 321 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 322 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, | 322 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 323 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, | 323 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 324 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } | 324 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
| 325 }; | 325 }; |
| 326 | 326 |
| 327 const Experiment::Choice kRasterizationSiteChoices[] = { |
| 328 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 329 { IDS_FLAGS_CPU_RASTERIZATION, |
| 330 cc::switches::kRasterizationSite, "cpu" }, |
| 331 { IDS_FLAGS_HYBRID_RASTERIZATION, |
| 332 cc::switches::kRasterizationSite, "hybrid" }, |
| 333 { IDS_FLAGS_GPU_RASTERIZATION, |
| 334 cc::switches::kRasterizationSite, "gpu" }, |
| 335 }; |
| 336 |
| 327 // We're using independent flags here (as opposed to a common flag with | 337 // We're using independent flags here (as opposed to a common flag with |
| 328 // different values) to be able to enable/disable the entire experience | 338 // different values) to be able to enable/disable the entire experience |
| 329 // associated with this feature server-side from the FieldTrial (the complete | 339 // associated with this feature server-side from the FieldTrial (the complete |
| 330 // experience includes other flag changes as well). It is not currently possible | 340 // experience includes other flag changes as well). It is not currently possible |
| 331 // to do that with "flag=value" flags. | 341 // to do that with "flag=value" flags. |
| 332 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { | 342 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { |
| 333 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 343 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 334 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 344 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 335 switches::kDisableSearchButtonInOmnibox, ""}, | 345 switches::kDisableSearchButtonInOmnibox, ""}, |
| 336 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, | 346 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, | 879 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 870 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, | 880 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 871 #if defined(ENABLE_SWIFTSHADER) | 881 #if defined(ENABLE_SWIFTSHADER) |
| 872 kOsAll, | 882 kOsAll, |
| 873 #else | 883 #else |
| 874 0, | 884 0, |
| 875 #endif | 885 #endif |
| 876 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) | 886 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 877 }, | 887 }, |
| 878 { | 888 { |
| 879 "enable-gpu-rasterization", | 889 "rasterization-site", |
| 880 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, | 890 IDS_FLAGS_RASTERIZATION_SITE_NAME, |
| 881 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, | 891 IDS_FLAGS_RASTERIZATION_SITE_DESCRIPTION, |
| 882 kOsAndroid, | 892 kOsAndroid, |
| 883 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization) | 893 MULTI_VALUE_TYPE(kRasterizationSiteChoices) |
| 884 }, | 894 }, |
| 885 { | 895 { |
| 886 "enable-experimental-web-platform-features", | 896 "enable-experimental-web-platform-features", |
| 887 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, | 897 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 888 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, | 898 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
| 889 kOsAll, | 899 kOsAll, |
| 890 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) | 900 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
| 891 }, | 901 }, |
| 892 { | 902 { |
| 893 "disable-ntp-other-sessions-menu", | 903 "disable-ntp-other-sessions-menu", |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2420 } | 2430 } |
| 2421 | 2431 |
| 2422 const Experiment* GetExperiments(size_t* count) { | 2432 const Experiment* GetExperiments(size_t* count) { |
| 2423 *count = num_experiments; | 2433 *count = num_experiments; |
| 2424 return experiments; | 2434 return experiments; |
| 2425 } | 2435 } |
| 2426 | 2436 |
| 2427 } // namespace testing | 2437 } // namespace testing |
| 2428 | 2438 |
| 2429 } // namespace about_flags | 2439 } // namespace about_flags |
| OLD | NEW |