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

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

Issue 7067041: Add disable-gpu-vsync to about:flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/plugin_updater.h" 17 #include "chrome/browser/plugin_updater.h"
18 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/prefs/scoped_user_pref_update.h" 19 #include "chrome/browser/prefs/scoped_user_pref_update.h"
20 #include "chrome/common/chrome_content_client.h" 20 #include "chrome/common/chrome_content_client.h"
21 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
22 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "content/browser/user_metrics.h" 23 #include "content/browser/user_metrics.h"
24 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
25 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/gfx/gl/gl_switches.h"
26 27
27 namespace about_flags { 28 namespace about_flags {
28 29
29 // Macros to simplify specifying the type. 30 // Macros to simplify specifying the type.
30 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ 31 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
31 Experiment::SINGLE_VALUE, command_line_switch, switch_value, NULL, 0 32 Experiment::SINGLE_VALUE, command_line_switch, switch_value, NULL, 0
32 #define SINGLE_VALUE_TYPE(command_line_switch) \ 33 #define SINGLE_VALUE_TYPE(command_line_switch) \
33 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") 34 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
34 #define MULTI_VALUE_TYPE(choices) \ 35 #define MULTI_VALUE_TYPE(choices) \
35 Experiment::MULTI_VALUE, "", "", choices, arraysize(choices) 36 Experiment::MULTI_VALUE, "", "", choices, arraysize(choices)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 kOsAll, 154 kOsAll,
154 SINGLE_VALUE_TYPE(switches::kShowCompositedLayerBorders) 155 SINGLE_VALUE_TYPE(switches::kShowCompositedLayerBorders)
155 }, 156 },
156 { 157 {
157 "show-fps-counter", 158 "show-fps-counter",
158 IDS_FLAGS_SHOW_FPS_COUNTER, 159 IDS_FLAGS_SHOW_FPS_COUNTER,
159 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, 160 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
160 kOsAll, 161 kOsAll,
161 SINGLE_VALUE_TYPE(switches::kShowFPSCounter) 162 SINGLE_VALUE_TYPE(switches::kShowFPSCounter)
162 }, 163 },
164 {
165 "disable-gpu-vsync",
166 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
167 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
168 kOsAll,
169 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
170 },
163 #if !defined(GOOGLE_CHROME_BUILD) 171 #if !defined(GOOGLE_CHROME_BUILD)
164 // Only expose this for Chromium builds where users may not have the PDF 172 // Only expose this for Chromium builds where users may not have the PDF
165 // plugin. Do not give Google Chrome users the option to disable it here. 173 // plugin. Do not give Google Chrome users the option to disable it here.
166 { 174 {
167 "print-preview", // FLAGS:RECORD_UMA 175 "print-preview", // FLAGS:RECORD_UMA
168 IDS_FLAGS_PRINT_PREVIEW_NAME, 176 IDS_FLAGS_PRINT_PREVIEW_NAME,
169 IDS_FLAGS_PRINT_PREVIEW_DESCRIPTION, 177 IDS_FLAGS_PRINT_PREVIEW_DESCRIPTION,
170 kOsMac | kOsWin | kOsLinux, // This switch is not available in CrOS. 178 kOsMac | kOsWin | kOsLinux, // This switch is not available in CrOS.
171 SINGLE_VALUE_TYPE(switches::kEnablePrintPreview) 179 SINGLE_VALUE_TYPE(switches::kEnablePrintPreview)
172 }, 180 },
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 761 }
754 762
755 const Experiment* GetExperiments(size_t* count) { 763 const Experiment* GetExperiments(size_t* count) {
756 *count = num_experiments; 764 *count = num_experiments;
757 return experiments; 765 return experiments;
758 } 766 }
759 767
760 } // namespace testing 768 } // namespace testing
761 769
762 } // namespace about_flags 770 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698