| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // the PNaCl translator and secure shell is substituted elsewhere. | 194 // the PNaCl translator and secure shell is substituted elsewhere. |
| 195 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, | 195 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 196 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, | 196 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
| 197 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, | 197 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 198 switches::kNaClDebugMask, "*://*/*debug.nmf" } | 198 switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 const Experiment::Choice kImplSidePaintingChoices[] = { | 201 const Experiment::Choice kImplSidePaintingChoices[] = { |
| 202 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 202 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 203 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 203 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 204 cc::switches::kEnableImplSidePainting, ""}, | 204 switches::kEnableImplSidePainting, ""}, |
| 205 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 205 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 206 cc::switches::kDisableImplSidePainting, ""} | 206 switches::kDisableImplSidePainting, ""} |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 const Experiment::Choice kLCDTextChoices[] = { | 209 const Experiment::Choice kLCDTextChoices[] = { |
| 210 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 210 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 211 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""}, | 211 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""}, |
| 212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""} | 212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""} |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 const Experiment::Choice kDelegatedRendererChoices[] = { | 215 const Experiment::Choice kDelegatedRendererChoices[] = { |
| 216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 217 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 217 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 218 switches::kEnableDelegatedRenderer, ""}, | 218 switches::kEnableDelegatedRenderer, ""}, |
| 219 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 219 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 220 switches::kDisableDelegatedRenderer, ""} | 220 switches::kDisableDelegatedRenderer, ""} |
| 221 }; | 221 }; |
| 222 | 222 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 292 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 293 switches::kEnableOverlayScrollbar, ""}, | 293 switches::kEnableOverlayScrollbar, ""}, |
| 294 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 294 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 295 switches::kDisableOverlayScrollbar, ""} | 295 switches::kDisableOverlayScrollbar, ""} |
| 296 }; | 296 }; |
| 297 #endif | 297 #endif |
| 298 | 298 |
| 299 const Experiment::Choice kMapImageChoices[] = { | 299 const Experiment::Choice kMapImageChoices[] = { |
| 300 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 300 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 301 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, | 301 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 302 cc::switches::kEnableMapImage, ""}, | 302 switches::kEnableMapImage, ""}, |
| 303 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 303 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 304 cc::switches::kDisableMapImage, ""} | 304 switches::kDisableMapImage, ""} |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 #if defined(OS_ANDROID) | 307 #if defined(OS_ANDROID) |
| 308 const Experiment::Choice kZeroSuggestExperimentsChoices[] = { | 308 const Experiment::Choice kZeroSuggestExperimentsChoices[] = { |
| 309 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 309 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 310 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, | 310 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, |
| 311 switches::kEnableZeroSuggestMostVisited, ""}, | 311 switches::kEnableZeroSuggestMostVisited, ""}, |
| 312 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, | 312 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, |
| 313 switches::kEnableZeroSuggestEtherSerp, ""}, | 313 switches::kEnableZeroSuggestEtherSerp, ""}, |
| 314 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, | 314 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, |
| 315 switches::kEnableZeroSuggestEtherNoSerp, ""}, | 315 switches::kEnableZeroSuggestEtherNoSerp, ""}, |
| 316 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 316 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 317 switches::kDisableZeroSuggest, ""} | 317 switches::kDisableZeroSuggest, ""} |
| 318 }; | 318 }; |
| 319 #endif | 319 #endif |
| 320 | 320 |
| 321 const Experiment::Choice kNumRasterThreadsChoices[] = { | 321 const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 322 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 322 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 323 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, | 323 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 324 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, | 324 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 325 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, | 325 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 326 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } | 326 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
| 327 }; | 327 }; |
| 328 | 328 |
| 329 const Experiment::Choice kEnableGpuRasterizationChoices[] = { |
| 330 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 331 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 332 switches::kEnableGpuRasterization, "" }, |
| 333 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 334 switches::kDisableGpuRasterization, "" }, |
| 335 { IDS_FLAGS_FORCE_GPU_RASTERIZATION, |
| 336 switches::kForceGpuRasterization, "" }, |
| 337 }; |
| 338 |
| 329 // We're using independent flags here (as opposed to a common flag with | 339 // We're using independent flags here (as opposed to a common flag with |
| 330 // different values) to be able to enable/disable the entire experience | 340 // different values) to be able to enable/disable the entire experience |
| 331 // associated with this feature server-side from the FieldTrial (the complete | 341 // associated with this feature server-side from the FieldTrial (the complete |
| 332 // experience includes other flag changes as well). It is not currently possible | 342 // experience includes other flag changes as well). It is not currently possible |
| 333 // to do that with "flag=value" flags. | 343 // to do that with "flag=value" flags. |
| 334 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { | 344 const Experiment::Choice kSearchButtonInOmniboxChoices[] = { |
| 335 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, | 345 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 336 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, | 346 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 337 switches::kDisableSearchButtonInOmnibox, ""}, | 347 switches::kDisableSearchButtonInOmnibox, ""}, |
| 338 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, | 348 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 #else | 857 #else |
| 848 0, | 858 0, |
| 849 #endif | 859 #endif |
| 850 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) | 860 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 851 }, | 861 }, |
| 852 { | 862 { |
| 853 "enable-gpu-rasterization", | 863 "enable-gpu-rasterization", |
| 854 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, | 864 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, |
| 855 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, | 865 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, |
| 856 kOsAndroid, | 866 kOsAndroid, |
| 857 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization) | 867 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices) |
| 858 }, | 868 }, |
| 859 { | 869 { |
| 860 "enable-experimental-web-platform-features", | 870 "enable-experimental-web-platform-features", |
| 861 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, | 871 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 862 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, | 872 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
| 863 kOsAll, | 873 kOsAll, |
| 864 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) | 874 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
| 865 }, | 875 }, |
| 866 { | 876 { |
| 867 "disable-ntp-other-sessions-menu", | 877 "disable-ntp-other-sessions-menu", |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2394 } | 2404 } |
| 2395 | 2405 |
| 2396 const Experiment* GetExperiments(size_t* count) { | 2406 const Experiment* GetExperiments(size_t* count) { |
| 2397 *count = num_experiments; | 2407 *count = num_experiments; |
| 2398 return experiments; | 2408 return experiments; |
| 2399 } | 2409 } |
| 2400 | 2410 |
| 2401 } // namespace testing | 2411 } // namespace testing |
| 2402 | 2412 |
| 2403 } // namespace about_flags | 2413 } // namespace about_flags |
| OLD | NEW |