OLD | NEW |
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/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
18 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 18 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
19 #include "chrome/common/chrome_content_client.h" | 19 #include "chrome/common/chrome_content_client.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "content/browser/user_metrics.h" | 22 #include "content/browser/user_metrics.h" |
| 23 #include "content/common/content_switches.h" |
23 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
24 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
25 #include "ui/gfx/gl/gl_switches.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) \ |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 kOsAll, | 161 kOsAll, |
161 SINGLE_VALUE_TYPE(switches::kShowFPSCounter) | 162 SINGLE_VALUE_TYPE(switches::kShowFPSCounter) |
162 }, | 163 }, |
163 { | 164 { |
164 "disable-gpu-vsync", | 165 "disable-gpu-vsync", |
165 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME, | 166 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME, |
166 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION, | 167 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION, |
167 kOsAll, | 168 kOsAll, |
168 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync) | 169 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync) |
169 }, | 170 }, |
| 171 { |
| 172 "disable-webgl", |
| 173 IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 174 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
| 175 kOsAll, |
| 176 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 177 }, |
170 // Exposed on all platforms until there is a workaround for easy access to | 178 // Exposed on all platforms until there is a workaround for easy access to |
171 // the native print dialog for users that need it. Once that's done, revert | 179 // the native print dialog for users that need it. Once that's done, revert |
172 // back to: | 180 // back to: |
173 // Only expose this for Chromium builds where users may not have the PDF | 181 // Only expose this for Chromium builds where users may not have the PDF |
174 // plugin. Do not give Google Chrome users the option to disable it here. | 182 // plugin. Do not give Google Chrome users the option to disable it here. |
175 // Also expose it for Chrome OS where print preview is still experimental. | 183 // Also expose it for Chrome OS where print preview is still experimental. |
176 { | 184 { |
177 "print-preview", // FLAGS:RECORD_UMA | 185 "print-preview", // FLAGS:RECORD_UMA |
178 IDS_FLAGS_PRINT_PREVIEW_NAME, | 186 IDS_FLAGS_PRINT_PREVIEW_NAME, |
179 IDS_FLAGS_PRINT_PREVIEW_DESCRIPTION, | 187 IDS_FLAGS_PRINT_PREVIEW_DESCRIPTION, |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 } | 843 } |
836 | 844 |
837 const Experiment* GetExperiments(size_t* count) { | 845 const Experiment* GetExperiments(size_t* count) { |
838 *count = num_experiments; | 846 *count = num_experiments; |
839 return experiments; | 847 return experiments; |
840 } | 848 } |
841 | 849 |
842 } // namespace testing | 850 } // namespace testing |
843 | 851 |
844 } // namespace about_flags | 852 } // namespace about_flags |
OLD | NEW |