Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: chrome/browser/about_flags.cc

Issue 11633020: Re-enable about:flags on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nilesh's comments Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/about_flags_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters) 373 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
373 }, 374 },
374 { 375 {
375 "disable-gpu-vsync", 376 "disable-gpu-vsync",
376 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME, 377 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
377 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION, 378 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
378 kOsAll, 379 kOsAll,
379 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync) 380 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
380 }, 381 },
381 { 382 {
383 "enable-webgl",
384 IDS_FLAGS_ENABLE_WEBGL_NAME,
385 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
386 kOsAndroid,
387 #if defined(OS_ANDROID)
388 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
389 #else
390 SINGLE_VALUE_TYPE("")
391 #endif
392 },
393 {
382 "disable-webgl", 394 "disable-webgl",
383 IDS_FLAGS_DISABLE_WEBGL_NAME, 395 IDS_FLAGS_DISABLE_WEBGL_NAME,
384 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, 396 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
385 kOsAll, 397 kOsAll ^ kOsAndroid,
398 #if defined(OS_ANDROID)
399 SINGLE_VALUE_TYPE("")
400 #else
386 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) 401 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
402 #endif
387 }, 403 },
388 { 404 {
389 "fixed-position-creates-stacking-context", 405 "fixed-position-creates-stacking-context",
390 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME, 406 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
391 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION, 407 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
392 kOsAll, 408 kOsAll,
393 MULTI_VALUE_TYPE(kFixedPositionCreatesStackingContextChoices) 409 MULTI_VALUE_TYPE(kFixedPositionCreatesStackingContextChoices)
394 }, 410 },
395 // TODO(bbudge): When NaCl is on by default, remove this flag entry. 411 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
396 { 412 {
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 } 1660 }
1645 1661
1646 const Experiment* GetExperiments(size_t* count) { 1662 const Experiment* GetExperiments(size_t* count) {
1647 *count = num_experiments; 1663 *count = num_experiments;
1648 return experiments; 1664 return experiments;
1649 } 1665 }
1650 1666
1651 } // namespace testing 1667 } // namespace testing
1652 1668
1653 } // namespace about_flags 1669 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/about_flags_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698