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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // whether the experiment is available on that platform. | 63 // whether the experiment is available on that platform. |
64 void AddOsStrings(unsigned bitmask, ListValue* list) { | 64 void AddOsStrings(unsigned bitmask, ListValue* list) { |
65 struct { | 65 struct { |
66 unsigned bit; | 66 unsigned bit; |
67 const char* const name; | 67 const char* const name; |
68 } kBitsToOs[] = { | 68 } kBitsToOs[] = { |
69 {kOsMac, "Mac"}, | 69 {kOsMac, "Mac"}, |
70 {kOsWin, "Windows"}, | 70 {kOsWin, "Windows"}, |
71 {kOsLinux, "Linux"}, | 71 {kOsLinux, "Linux"}, |
72 {kOsCrOS, "Chrome OS"}, | 72 {kOsCrOS, "Chrome OS"}, |
| 73 {kOsAndroid, "Android"}, |
73 }; | 74 }; |
74 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) | 75 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) |
75 if (bitmask & kBitsToOs[i].bit) | 76 if (bitmask & kBitsToOs[i].bit) |
76 list->Append(new StringValue(kBitsToOs[i].name)); | 77 list->Append(new StringValue(kBitsToOs[i].name)); |
77 } | 78 } |
78 | 79 |
79 const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = { | 80 const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = { |
80 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" }, | 81 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" }, |
81 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED, | 82 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED, |
82 switches::kOmniboxHistoryQuickProviderNewScoring, | 83 switches::kOmniboxHistoryQuickProviderNewScoring, |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters) | 366 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters) |
366 }, | 367 }, |
367 { | 368 { |
368 "disable-gpu-vsync", | 369 "disable-gpu-vsync", |
369 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME, | 370 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME, |
370 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION, | 371 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION, |
371 kOsAll, | 372 kOsAll, |
372 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync) | 373 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync) |
373 }, | 374 }, |
374 { | 375 { |
| 376 "enable-webgl", |
| 377 IDS_FLAGS_ENABLE_WEBGL_NAME, |
| 378 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION, |
| 379 kOsAndroid, |
| 380 #if defined(OS_ANDROID) |
| 381 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL) |
| 382 #else |
| 383 SINGLE_VALUE_TYPE("") |
| 384 #endif |
| 385 }, |
| 386 { |
375 "disable-webgl", | 387 "disable-webgl", |
376 IDS_FLAGS_DISABLE_WEBGL_NAME, | 388 IDS_FLAGS_DISABLE_WEBGL_NAME, |
377 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, | 389 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
378 kOsAll, | 390 kOsAll ^ kOsAndroid, |
| 391 #if defined(OS_ANDROID) |
| 392 SINGLE_VALUE_TYPE("") |
| 393 #else |
379 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) | 394 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 395 #endif |
380 }, | 396 }, |
381 { | 397 { |
382 "fixed-position-creates-stacking-context", | 398 "fixed-position-creates-stacking-context", |
383 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME, | 399 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME, |
384 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION, | 400 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION, |
385 kOsAll, | 401 kOsAll, |
386 MULTI_VALUE_TYPE(kFixedPositionCreatesStackingContextChoices) | 402 MULTI_VALUE_TYPE(kFixedPositionCreatesStackingContextChoices) |
387 }, | 403 }, |
388 // TODO(bbudge): When NaCl is on by default, remove this flag entry. | 404 // TODO(bbudge): When NaCl is on by default, remove this flag entry. |
389 { | 405 { |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 } | 1620 } |
1605 | 1621 |
1606 const Experiment* GetExperiments(size_t* count) { | 1622 const Experiment* GetExperiments(size_t* count) { |
1607 *count = num_experiments; | 1623 *count = num_experiments; |
1608 return experiments; | 1624 return experiments; |
1609 } | 1625 } |
1610 | 1626 |
1611 } // namespace testing | 1627 } // namespace testing |
1612 | 1628 |
1613 } // namespace about_flags | 1629 } // namespace about_flags |
OLD | NEW |