blob: 152a0724b04f7a68f05fdd16a4205c5eacbc3512 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5715#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0317#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3820#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
23#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0526#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0227#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0228#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1729#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5930#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4831#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2732#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2433#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5634#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2435#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5636
[email protected]dc04be7c2012-03-15 23:57:4937#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3138#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4939#endif
40
[email protected]badba1ad2012-11-16 17:21:4641#if defined(OS_CHROMEOS)
42#include "chromeos/chromeos_switches.h"
43#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]128dc6c2012-06-22 20:30:3588const Experiment::Choice
89 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
90 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
91 "",
92 "" },
93 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
94 switches::kOmniboxHistoryQuickProviderReorderForInlining,
95 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
96 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
97 switches::kOmniboxHistoryQuickProviderReorderForInlining,
98 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
99};
100
[email protected]032d5e6c2012-02-17 17:53:55101const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
102 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
103 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
104 switches::kOmniboxInlineHistoryQuickProvider,
105 switches::kOmniboxInlineHistoryQuickProviderAllowed },
106 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
107 switches::kOmniboxInlineHistoryQuickProvider,
108 switches::kOmniboxInlineHistoryQuickProviderProhibited }
109};
110
[email protected]fb854192013-02-06 01:30:04111const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
112 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
113 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
114 switches::kEnableCompositingForFixedPosition, ""},
115 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
116 switches::kDisableCompositingForFixedPosition, ""},
117 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
118 switches::kEnableHighDpiCompositingForFixedPosition, ""}
119};
120
[email protected]d8221b22013-05-23 05:35:43121const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
122 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
123 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
124 switches::kEnableCompositingForTransition, ""},
125 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
126 switches::kDisableCompositingForTransition, ""},
127};
128
[email protected]8b1c3c72013-01-25 01:48:43129const Experiment::Choice kGDIPresentChoices[] = {
130 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
131 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
132 switches::kDoFirstShowPresentWithGDI, ""},
133 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
134 switches::kDoAllShowPresentWithGDI, ""}
135};
136
[email protected]d7932532012-11-21 21:10:31137const Experiment::Choice kTouchEventsChoices[] = {
138 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
139 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
140 switches::kTouchEvents,
141 switches::kTouchEventsEnabled },
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
143 switches::kTouchEvents,
144 switches::kTouchEventsDisabled }
145};
146
[email protected]347a0c72012-05-14 20:28:06147const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31148 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20149 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06150 switches::kTouchOptimizedUI,
151 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20152 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06153 switches::kTouchOptimizedUI,
154 switches::kTouchOptimizedUIDisabled }
155};
156
[email protected]66f409c2012-10-04 20:59:04157const Experiment::Choice kNaClDebugMaskChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
159 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
160 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
161 // an option to switch off its debugging.
162 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
163 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
164 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
165 switches::kNaClDebugMask, "*://*/*debug.nmf" }
166};
167
[email protected]ea2f3342012-09-21 21:13:36168#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02169
170const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24171 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02172 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24173 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19174 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24175 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02176};
[email protected]a78c7432013-03-13 06:22:43177
[email protected]ea2f3342012-09-21 21:13:36178#endif
179
[email protected]9323fdd12013-02-23 00:31:36180const Experiment::Choice kImplSidePaintingChoices[] = {
181 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
182 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
183 cc::switches::kEnableImplSidePainting, ""},
184 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
185 cc::switches::kDisableImplSidePainting, ""}
186};
187
[email protected]a42c85f2013-04-04 18:15:12188const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
190 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
191 cc::switches::kMaxTilesForInterestArea, "64"},
192 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
193 cc::switches::kMaxTilesForInterestArea, "128"},
194 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
195 cc::switches::kMaxTilesForInterestArea, "256"},
196 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
197 cc::switches::kMaxTilesForInterestArea, "512"}
198};
199
[email protected]a3618122013-04-26 21:15:34200const Experiment::Choice kDefaultTileWidthChoices[] = {
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
202 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
203 switches::kDefaultTileWidth, "128"},
204 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
205 switches::kDefaultTileWidth, "256"},
206 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
207 switches::kDefaultTileWidth, "512"},
208 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
209 switches::kDefaultTileWidth, "1024"}
210};
211
212const Experiment::Choice kDefaultTileHeightChoices[] = {
213 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
214 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
215 switches::kDefaultTileHeight, "128"},
216 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
217 switches::kDefaultTileHeight, "256"},
218 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
219 switches::kDefaultTileHeight, "512"},
220 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
221 switches::kDefaultTileHeight, "1024"}
222};
223
[email protected]38484df12013-04-10 16:42:03224const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21225 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
227 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
229 switches::kUseSimpleCacheBackend, "on"}
230};
231
[email protected]910ecfe2013-06-03 23:38:14232const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
234 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
235 switches::kTabCaptureUpscaleQuality, "fast" },
236 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
237 switches::kTabCaptureUpscaleQuality, "good" },
238 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
239 switches::kTabCaptureUpscaleQuality, "best" },
240};
241
242const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
243 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
244 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
245 switches::kTabCaptureDownscaleQuality, "fast" },
246 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
247 switches::kTabCaptureDownscaleQuality, "good" },
248 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
249 switches::kTabCaptureDownscaleQuality, "best" },
250};
251
[email protected]4bc5050c2010-11-18 17:55:54252// RECORDING USER METRICS FOR FLAGS:
253// -----------------------------------------------------------------------------
254// The first line of the experiment is the internal name. If you'd like to
255// gather statistics about the usage of your flag, you should append a marker
256// comment to the end of the feature name, like so:
257// "my-special-feature", // FLAGS:RECORD_UMA
258//
259// After doing that, run //chrome/tools/extract_actions.py (see instructions at
260// the top of that file for details) to update the chromeactions.txt file, which
261// will enable UMA to record your feature flag.
262//
[email protected]783d5bb2012-10-24 03:47:14263// After your feature has shipped under a flag, you can locate the metrics under
264// the action name AboutFlags_internal-action-name. Actions are recorded once
265// per startup, so you should divide this number by AboutFlags_StartupTick to
266// get a sense of usage. Note that this will not be the same as number of users
267// with a given feature enabled because users can quit and relaunch the
268// application multiple times over a given time interval. The dashboard also
269// shows you how many (metrics reporting) users have enabled the flag over the
270// last seven days. However, note that this is not the same as the number of
271// users who have the flag enabled, since enabling the flag happens once,
272// whereas running with the flag enabled happens until the user flips the flag
273// again.
[email protected]4bc5050c2010-11-18 17:55:54274
[email protected]8a6ff28d2010-12-02 16:35:19275// To add a new experiment add to the end of kExperiments. There are two
276// distinct types of experiments:
277// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
278// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22279// . MULTI_VALUE: a list of choices, the first of which should correspond to a
280// deactivated state for this lab (i.e. no command line option). To specify
281// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
282// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19283// See the documentation of Experiment for details on the fields.
284//
285// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05286const Experiment kExperiments[] = {
287 {
[email protected]aac169d2011-03-18 19:53:03288 "expose-for-tabs", // FLAGS:RECORD_UMA
289 IDS_FLAGS_TABPOSE_NAME,
290 IDS_FLAGS_TABPOSE_DESCRIPTION,
291 kOsMac,
292#if defined(OS_MACOSX)
293 // The switch exists only on OS X.
294 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
295#else
296 SINGLE_VALUE_TYPE("")
297#endif
298 },
299 {
[email protected]4bc5050c2010-11-18 17:55:54300 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05301 IDS_FLAGS_CONFLICTS_CHECK_NAME,
302 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
303 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19304 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05305 },
306 {
[email protected]96c6f4c2011-05-18 19:36:22307 "ignore-gpu-blacklist",
308 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
309 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
310 kOsAll,
311 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
312 },
313 {
[email protected]0110cf112011-07-02 00:39:43314 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22315 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
316 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23317 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44318 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
319 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22320 },
321 {
[email protected]72787e392012-03-23 05:55:43322 "threaded-compositing-mode",
323 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
324 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58325 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44326 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
327 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59328 },
329 {
[email protected]17e27692013-02-06 17:02:09330 "force-accelerated-composited-scrolling",
331 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
332 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
333 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44334 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
335 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09336 },
337 {
[email protected]8b1c3c72013-01-25 01:48:43338 "present-with-GDI",
339 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
340 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
341 kOsWin,
342 MULTI_VALUE_TYPE(kGDIPresentChoices)
343 },
344 {
[email protected]2b608752013-05-01 03:34:36345 "enable-experimental-canvas-features",
346 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
347 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
348 kOsAll,
349 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
350 },
351 {
[email protected]81c64af62012-06-06 20:15:52352 "disable-accelerated-2d-canvas",
353 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
354 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
355 kOsAll,
356 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
357 },
358 {
[email protected]efcde132012-05-30 01:05:18359 "disable-threaded-animation",
360 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
361 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59362 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37363 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59364 },
365 {
[email protected]5963b772011-02-09 22:55:38366 "composited-layer-borders",
367 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
368 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
369 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57370 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38371 },
372 {
[email protected]a8f1eaa2011-03-07 19:00:58373 "show-fps-counter",
374 IDS_FLAGS_SHOW_FPS_COUNTER,
375 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
376 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57377 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58378 },
[email protected]8ff7f342011-05-25 01:49:47379 {
[email protected]70c98a332011-12-21 20:51:52380 "accelerated-filters",
381 IDS_FLAGS_ACCELERATED_FILTERS,
382 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
383 kOsAll,
384 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
385 },
386 {
[email protected]8ff7f342011-05-25 01:49:47387 "disable-gpu-vsync",
388 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
389 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56390 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47391 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
392 },
[email protected]deaba6d52011-09-23 14:47:12393 {
[email protected]4052d832013-01-16 05:31:01394 "enable-webgl",
395 IDS_FLAGS_ENABLE_WEBGL_NAME,
396 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
397 kOsAndroid,
398#if defined(OS_ANDROID)
399 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
400#else
401 SINGLE_VALUE_TYPE("")
402#endif
403 },
404 {
[email protected]deaba6d52011-09-23 14:47:12405 "disable-webgl",
406 IDS_FLAGS_DISABLE_WEBGL_NAME,
407 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56408 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01409#if defined(OS_ANDROID)
410 SINGLE_VALUE_TYPE("")
411#else
[email protected]deaba6d52011-09-23 14:47:12412 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01413#endif
[email protected]deaba6d52011-09-23 14:47:12414 },
[email protected]09096e02012-05-24 11:12:04415 {
[email protected]ce585bf2013-03-14 16:25:16416 "disable-webrtc",
417 IDS_FLAGS_DISABLE_WEBRTC_NAME,
418 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05419 kOsAndroid,
420#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16421 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05422#else
423 SINGLE_VALUE_TYPE("")
424#endif
425 },
[email protected]5e2bc8c2013-05-28 22:59:57426#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30427 {
428 "enable-sctp-data-channels",
429 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
430 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
431 kOsAll,
432 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
433 },
[email protected]5e2bc8c2013-05-28 22:59:57434#endif
[email protected]34cb5292013-04-15 06:06:31435#if defined(OS_ANDROID)
436 {
437 "enable-webaudio",
438 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
439 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
440 kOsAndroid,
441 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
442 },
443#endif
[email protected]d9da9582013-01-31 04:59:05444 {
[email protected]96bcdc102012-05-24 23:42:10445 "fixed-position-creates-stacking-context",
446 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
447 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
448 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44449 ENABLE_DISABLE_VALUE_TYPE(
450 switches::kEnableFixedPositionCreatesStackingContext,
451 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10452 },
[email protected]fb854192013-02-06 01:30:04453 {
454 "enable-compositing-for-fixed-position",
455 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
456 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
457 kOsAll,
458 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
459 },
[email protected]d8221b22013-05-23 05:35:43460 {
461 "enable-compositing-for-transition",
462 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
463 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
464 kOsAll,
465 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
466 },
[email protected]a7640ef22012-10-06 00:52:08467 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53468 {
[email protected]e3791ce92011-08-09 01:03:32469 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40470 IDS_FLAGS_ENABLE_NACL_NAME,
471 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56472 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19473 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40474 },
475 {
[email protected]9addd1c2012-09-15 14:28:24476 "enable-nacl-debug", // FLAGS:RECORD_UMA
477 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
478 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56479 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24480 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13481 },
482 {
[email protected]66f409c2012-10-04 20:59:04483 "nacl-debug-mask", // FLAGS:RECORD_UMA
484 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
485 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56486 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04487 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
488 },
489 {
[email protected]7babd1c2012-08-08 20:35:29490 "enable-pnacl", // FLAGS:RECORD_UMA
491 IDS_FLAGS_ENABLE_PNACL_NAME,
492 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56493 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29494 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
495 },
496 {
[email protected]4bc5050c2010-11-18 17:55:54497 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32498 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
499 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56500 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19501 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32502 },
[email protected]3627b06d2010-11-12 16:36:16503 {
[email protected]ac2e2acd2013-03-21 12:57:29504 "extensions-on-chrome-urls",
505 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
506 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
507 kOsAll,
508 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
509 },
510 {
[email protected]e9cddd52013-03-23 17:37:53511 "enable-adview",
512 IDS_FLAGS_ENABLE_ADVIEW_NAME,
513 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
514 kOsDesktop,
515 SINGLE_VALUE_TYPE(switches::kEnableAdview)
516 },
517 {
518 "enable-adview-src-attribute",
519 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
520 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
521 kOsDesktop,
522 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
523 },
524 {
[email protected]544471a2012-10-13 05:27:09525 "action-box",
[email protected]cab18ef2012-04-27 07:22:03526 IDS_FLAGS_ACTION_BOX_NAME,
527 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56528 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44529 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
530 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03531 },
532 {
[email protected]3a362432012-06-18 20:39:51533 "script-badges",
534 IDS_FLAGS_SCRIPT_BADGES_NAME,
535 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56536 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09537 SINGLE_VALUE_TYPE(switches::kScriptBadges)
538 },
539 {
540 "script-bubble",
541 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
542 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56543 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44544 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
545 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51546 },
547 {
[email protected]cbe224d2011-08-04 22:12:49548 "apps-new-install-bubble",
549 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
550 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56551 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49552 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
553 },
554 {
[email protected]80bd24e2010-11-30 09:34:38555 "disable-hyperlink-auditing",
556 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
557 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
558 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19559 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51560 },
561 {
562 "experimental-location-features", // FLAGS:RECORD_UMA
563 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
564 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
565 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19566 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
567 },
568 {
[email protected]5aea1862011-03-23 23:55:39569 "tab-groups-context-menu",
570 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
571 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
572 kOsWin,
573 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
574 },
[email protected]c94cebd2012-06-21 00:55:28575 {
576 "enable-instant-extended-api",
577 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
578 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56579 kOsDesktop,
[email protected]73444382013-02-26 19:31:51580 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
581 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28582 },
[email protected]e9bf9d92011-03-31 20:57:15583 {
[email protected]8cc9e532013-05-06 21:01:47584 "enable-local-first-load-ntp",
585 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
586 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
587 kOsDesktop,
588 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
589 switches::kDisableLocalFirstLoadNTP)
590 },
591 {
[email protected]07fd48a2013-04-13 02:53:27592 "enable-local-only-instant-extended-api",
593 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
594 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
595 kOsDesktop,
596 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
597 switches::kDisableLocalOnlyInstantExtendedAPI)
598 },
599 {
[email protected]354e33b2011-06-15 00:29:10600 "static-ip-config",
601 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
602 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
603 kOsCrOS,
604#if defined(OS_CHROMEOS)
605 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24606 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10607#else
608 SINGLE_VALUE_TYPE("")
609#endif
610 },
[email protected]3eb5728c2011-06-20 22:32:24611 {
612 "show-autofill-type-predictions",
613 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
614 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
615 kOsAll,
[email protected]e217c5632013-04-12 19:11:48616 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24617 },
[email protected]bff4d3e2011-06-21 23:58:52618 {
[email protected]a5e9faa2013-03-19 09:58:38619 "enable-sync-favicons",
620 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
621 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55622 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38623 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55624 },
625 {
[email protected]5d90a0a2012-11-15 02:43:40626 "sync-keystore-encryption",
627 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
628 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
629 kOsAll,
630 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
631 },
632 {
[email protected]e755a382012-09-13 17:16:35633 "enable-gesture-tap-highlight",
634 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
635 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
636 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47637 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
638 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35639 },
640 {
[email protected]a22ebd812011-06-23 00:05:39641 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
642 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
643 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
644 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40645 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25646 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39647 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
648 },
[email protected]81a6b0b2011-06-24 17:55:40649 {
[email protected]128dc6c2012-06-22 20:30:35650 "omnibox-history-quick-provider-reorder-for-inlining",
651 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
652 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
653 kOsAll,
654 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
655 },
656 {
[email protected]032d5e6c2012-02-17 17:53:55657 "omnibox-inline-history-quick-provider",
658 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
659 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
660 kOsAll,
661 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
662 },
663 {
[email protected]7e7a28092011-12-09 22:24:55664 "enable-panels",
665 IDS_FLAGS_ENABLE_PANELS_NAME,
666 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56667 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55668 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54669 },
[email protected]e3749d12011-07-25 22:22:12670 {
[email protected]27c14f02012-06-22 17:29:58671 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27672 "save-page-as-mhtml", // FLAGS:RECORD_UMA
673 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
674 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
675 kOsMac | kOsWin | kOsLinux,
676 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
677 },
678 {
[email protected]b7bb44f2011-09-01 05:17:03679 "enable-autologin",
680 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
681 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
682 kOsMac | kOsWin | kOsLinux,
683 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
684 },
[email protected]b9841172011-09-26 23:36:09685 {
[email protected]903e63382013-06-01 00:40:58686 "enable-quic",
687 IDS_FLAGS_ENABLE_QUIC_NAME,
688 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
689 kOsAll,
690 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
691 switches::kDisableQuic)
692 },
693 {
[email protected]27b3fe92012-03-21 05:35:06694 "enable-async-dns",
695 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
696 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46697 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44698 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
699 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06700 },
[email protected]85dd7ca2013-05-30 23:53:00701#if defined(ANDROID) && !defined(GOOGLE_TV)
702 {
703 "enable-media-source",
704 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
705 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
706 kOsAll,
707 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
708 },
709#else
[email protected]27b3fe92012-03-21 05:35:06710 {
[email protected]1eb93802012-09-11 18:57:56711 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31712 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
713 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32714 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31715 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44716 },
[email protected]85dd7ca2013-05-30 23:53:00717#endif
[email protected]e4e68dbb2011-11-18 01:50:22718 {
[email protected]16c242d2013-05-31 23:56:47719 "enable-encrypted-media",
720 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
721 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56722 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47723 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
724 },
725 {
726 "disable-encrypted-media",
727 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
728 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
729 kOsDesktop,
730 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03731 },
[email protected]f88628792012-12-18 07:07:50732 {
733 "enable-opus-playback",
734 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
735 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56736 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50737 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
738 },
[email protected]ca6eaa5a2013-01-24 16:16:04739 {
[email protected]c54e1aa2013-01-25 09:26:17740 "enable-vp9-playback",
741 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
742 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
743 kOsDesktop,
744 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
745 },
746 {
[email protected]6ac955b2013-04-19 23:43:32747 "enable-vp8-alpha-playback",
748 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
749 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
750 kOsDesktop,
751 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
752 },
753 {
[email protected]ca6eaa5a2013-01-24 16:16:04754 "enable-managed-users",
755 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
756 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58757 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04758 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
759 },
[email protected]dc04be7c2012-03-15 23:57:49760#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50761 {
[email protected]2a13a9a2013-04-19 04:00:21762 "ash-disable-auto-maximizing",
763 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
764 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
765 kOsWin | kOsLinux | kOsCrOS,
766 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
767 },
768 {
[email protected]cda278d2012-10-30 20:31:40769 "ash-disable-auto-window-placement",
770 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
771 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
772 kOsWin | kOsLinux | kOsCrOS,
773 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
774 },
[email protected]b4e4ec42012-11-29 21:42:40775 {
[email protected]16f55a22013-02-13 23:47:34776 "ash-disable-per-app-launcher",
777 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
778 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40779 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34780 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40781 },
[email protected]dc04be7c2012-03-15 23:57:49782#endif
[email protected]eaae8b462012-01-20 22:20:39783 {
[email protected]db543d322011-12-15 20:40:15784 "per-tile-painting",
785 IDS_FLAGS_PER_TILE_PAINTING_NAME,
786 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37787 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37788 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15789 },
[email protected]bf88c032011-12-22 19:05:47790 {
791 "enable-javascript-harmony",
792 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
793 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
794 kOsAll,
795 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
796 },
[email protected]7e7f378a2012-01-05 14:35:37797 {
[email protected]85646172012-01-09 22:45:54798 "enable-tab-browser-dragging",
799 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
800 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
801 kOsWin,
802 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
803 },
804 {
[email protected]068b7b52012-02-27 12:41:44805 "disable-restore-session-state",
806 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
807 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37808 kOsAll,
[email protected]068b7b52012-02-27 12:41:44809 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37810 },
[email protected]88864db2012-01-18 20:56:35811 {
812 "disable-software-rasterizer",
813 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
814 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
815#if defined(ENABLE_SWIFTSHADER)
816 kOsAll,
817#else
818 0,
819#endif
820 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
821 },
[email protected]15a5d722012-01-23 09:11:14822 {
[email protected]ff7b6dd2012-09-15 20:20:03823 "enable-experimental-webkit-features",
824 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
825 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16826 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03827 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49828 },
829 {
[email protected]0f95a252012-09-13 22:30:04830 "enable-css-shaders",
831 IDS_FLAGS_CSS_SHADERS_NAME,
832 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
833 kOsAll,
834 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
835 },
836 {
[email protected]3e8befc2012-03-13 01:17:03837 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16838 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
839 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56840 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03841 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16842 },
[email protected]dc04be7c2012-03-15 23:57:49843#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01844 {
[email protected]3cd198a22012-03-12 20:38:01845 "enable-ash-oak",
846 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
847 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
848 kOsAll,
849 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
850 },
[email protected]31cf1c52012-02-29 20:55:01851#endif
[email protected]184ec592012-03-01 11:54:28852 {
853 "enable-devtools-experiments",
854 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
855 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56856 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28857 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
858 },
[email protected]76d1854e2012-03-02 23:57:44859 {
[email protected]2fefdb32013-02-26 14:28:10860 "silent-debugger-extension-api",
861 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
862 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
863 kOsDesktop,
864 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
865 },
866 {
[email protected]76d1854e2012-03-02 23:57:44867 "enable-suggestions-ntp",
868 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
869 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56870 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44871 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
872 },
[email protected]a3d54252012-04-05 20:04:13873 {
[email protected]1dbaf5e2012-11-30 05:51:32874 "spellcheck-autocorrect",
875 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
876 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
877 kOsWin | kOsLinux | kOsCrOS,
878 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
879 },
880 {
[email protected]d7932532012-11-21 21:10:31881 "touch-events",
882 IDS_TOUCH_EVENTS_NAME,
883 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56884 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31885 MULTI_VALUE_TYPE(kTouchEventsChoices)
886 },
887 {
[email protected]c9c73ad42012-04-18 03:35:59888 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06889 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
890 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55891 kOsWin,
[email protected]347a0c72012-05-14 20:28:06892 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59893 },
[email protected]8a6aaa72012-04-20 20:53:58894 {
[email protected]b9c96ff2012-11-26 22:24:40895 "disable-touch-adjustment",
896 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
897 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
898 kOsWin | kOsLinux | kOsCrOS,
899 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
900 },
901 {
[email protected]0b9383a2012-10-26 00:58:16902 "enable-tab-capture",
903 IDS_ENABLE_TAB_CAPTURE_NAME,
904 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25905 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44906 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
907 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16908 },
[email protected]0b60afa2012-04-19 17:36:39909#if defined(OS_CHROMEOS)
910 {
[email protected]7c4a9bc2012-09-11 22:10:05911 "enable-background-loader",
912 IDS_ENABLE_BACKLOADER_NAME,
913 IDS_ENABLE_BACKLOADER_DESCRIPTION,
914 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24915 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05916 },
917 {
[email protected]c5667b282012-08-31 00:32:50918 "enable-bezel-touch",
919 IDS_ENABLE_BEZEL_TOUCH_NAME,
920 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47921 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50922 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47923 },
924 {
[email protected]3f4181a2013-02-01 21:31:07925 "enable-screensaver-extension",
926 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
927 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
928 kOsCrOS,
929 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
930 },
931 {
[email protected]0b60afa2012-04-19 17:36:39932 "no-discard-tabs",
933 IDS_FLAGS_NO_DISCARD_TABS_NAME,
934 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
935 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24936 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39937 },
938#endif
[email protected]79be6d32012-04-24 20:47:44939 {
[email protected]8d68a3e02013-01-12 15:57:10940 "enable-download-resumption",
941 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
942 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56943 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10944 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
945 },
946 {
[email protected]9a5940d2012-04-27 19:16:23947 "allow-nacl-socket-api",
948 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
949 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56950 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23951 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
952 },
[email protected]85333732012-05-01 19:02:24953 {
[email protected]60673ad72012-05-02 06:16:33954 "stacked-tab-strip",
955 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
956 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
957 kOsWin,
958 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
959 },
960 {
[email protected]4bd20202012-06-14 17:35:01961 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24962 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
963 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
964 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01965 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24966 },
[email protected]190349fd2012-05-02 00:10:47967#if defined(OS_CHROMEOS)
968 {
969 "allow-touchpad-three-finger-click",
970 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
971 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
972 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24973 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47974 },
[email protected]fbc176b62012-10-27 02:19:58975 {
976 "allow-touchpad-three-finger-swipe",
977 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
978 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
979 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24980 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:58981 },
[email protected]190349fd2012-05-02 00:10:47982#endif
[email protected]1992a2f42012-10-23 18:32:21983 {
[email protected]8ee02242012-12-04 15:23:32984 "enable-desktop-guest-mode",
985 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
986 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
987 kOsMac | kOsWin | kOsLinux,
988 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
989 },
[email protected]53520b1b2012-05-07 21:43:37990#if defined(USE_ASH)
991 {
[email protected]8257d382013-03-26 13:08:42992 "show-launcher-alignment-menu",
993 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
994 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42995 kOsAll,
[email protected]8257d382013-03-26 13:08:42996 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42997 },
998 {
[email protected]2ddf37b2013-04-20 01:15:58999 "disable-minimize-on-second-launcher-item-click",
1000 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1001 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1002 kOsAll,
1003 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1004 },
1005 {
[email protected]73074742012-05-17 01:44:411006 "show-touch-hud",
1007 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1008 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1009 kOsAll,
1010 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1011 },
1012 {
[email protected]9f0940b62012-05-23 22:56:351013 "enable-pinch",
1014 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1015 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061016 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381017 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1018 },
1019 {
[email protected]de0aaed2013-05-27 18:16:431020 "enable-pinch-virtual-viewport",
1021 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1022 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1023 kOsLinux | kOsWin | kOsCrOS,
1024 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1025 },
1026 {
[email protected]a4016f12013-05-02 07:53:471027 "forced-maximize-mode",
1028 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1029 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1030 kOsLinux | kOsWin | kOsCrOS,
1031 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1032 },
[email protected]73074742012-05-17 01:44:411033#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281034#if defined(OS_CHROMEOS)
1035 {
[email protected]8b04a1652012-08-04 02:59:491036 "disable-boot-animation",
1037 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1038 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581039 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241040 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491041 },
[email protected]95058572012-08-20 14:57:291042 {
[email protected]d96aef22012-10-30 11:47:021043 "captive-portal-detector",
1044 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1045 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581046 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021047 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1048 },
1049 {
[email protected]c11aa8f12012-12-18 18:43:141050 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571051 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1052 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1053 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141054 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571055 },
[email protected]f0280952012-11-06 20:30:501056 {
[email protected]ea2fab32013-04-16 06:55:021057 "file-manager-legacy",
1058 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1059 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231060 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241061 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231062 },
[email protected]3e035e82012-11-27 20:54:321063 {
[email protected]828d99052013-04-22 08:15:031064 "file-manager-legacy-ui",
1065 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1066 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101067 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241068 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101069 },
1070 {
[email protected]c64d7732013-03-25 18:09:501071 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521072 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1073 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581074 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241075 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471076 },
[email protected]6ad015c2013-03-06 00:49:511077 {
[email protected]c64d7732013-03-25 18:09:501078 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521079 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1080 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511081 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521082 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511083 },
[email protected]099b890c2013-04-25 19:16:261084 {
1085 "disable-quickoffice-component-app",
1086 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1087 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1088 kOsCrOS,
1089 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1090 },
[email protected]62018dc2012-12-13 00:37:351091#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391092 {
[email protected]6247aba2013-03-04 22:57:181093 "views-textfield",
1094 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1095 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391096 kOsWin,
[email protected]6247aba2013-03-04 22:57:181097 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1098 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391099 },
[email protected]bd0cd3bb2012-06-14 03:03:381100 {
[email protected]ffbe5782013-05-09 23:22:081101 "new-dialog-style",
1102 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1103 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321104 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081105 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1106 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321107 },
[email protected]7db8893a2012-07-26 00:49:401108 { "disable-accelerated-video-decode",
1109 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1110 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191111 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401112 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151113 },
[email protected]66ae9fc2012-06-19 21:33:521114#if defined(USE_ASH)
1115 {
1116 "ash-debug-shortcuts",
1117 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1118 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1119 kOsAll,
1120 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1121 },
1122#endif
[email protected]37fee0942012-08-07 21:07:451123 {
[email protected]ad3f6d22012-08-29 02:34:191124 "enable-contacts",
1125 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1126 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1127 kOsCrOS,
1128 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1129 },
[email protected]1d9bb9cd2012-08-28 22:02:501130#if defined(USE_ASH)
1131 { "ash-enable-advanced-gestures",
1132 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1133 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1134 kOsCrOS,
1135 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1136 },
[email protected]cfa24e62013-02-13 21:19:111137 { "ash-disable-tab-scrubbing",
1138 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1139 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161140 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111141 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161142 },
[email protected]ad6fcc32013-05-30 03:46:481143 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081144 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1145 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1146 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481147 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081148 },
[email protected]83eef802012-12-02 07:43:521149 { "ash-enable-workspace-scrubbing",
1150 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1151 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1154 },
[email protected]cf2b1a82013-04-20 01:05:431155 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111156 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1157 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241158 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431159 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1160 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241161 },
[email protected]316708a2012-11-05 22:57:021162#if defined(OS_LINUX)
1163 { "ash-enable-memory-monitor",
1164 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1165 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1166 kOsCrOS,
1167 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1168 },
1169#endif
[email protected]1d9bb9cd2012-08-28 22:02:501170#endif
[email protected]9b7ab882012-09-10 23:46:361171#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131172 { "use-new-network-configuration-handlers",
1173 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1174 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1175 kOsCrOS,
1176 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1177 },
[email protected]ce98ef82013-05-31 22:43:241178 { "use-new-network-connection-handler",
1179 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1180 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1181 kOsCrOS,
1182 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1183 },
[email protected]9b7ab882012-09-10 23:46:361184 {
[email protected]354ff2d2013-05-01 17:06:311185 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121186 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1187 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1188 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311189 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1190 },
1191 {
1192 "ash-audio-device-menu",
1193 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1194 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1195 kOsCrOS,
1196 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121197 },
1198 {
[email protected]205f07892012-10-16 20:26:221199 "enable-carrier-switching",
1200 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1201 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1202 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241203 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221204 },
1205 {
[email protected]9b7ab882012-09-10 23:46:361206 "enable-request-tablet-site",
1207 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1208 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1209 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241210 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361211 },
1212#endif
[email protected]dab49c0b2012-10-04 05:55:351213 {
1214 "debug-packed-apps",
1215 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1216 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561217 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351218 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1219 },
[email protected]d1459ed2012-10-10 01:29:331220 {
1221 "enable-password-generation",
1222 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1223 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561224 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331225 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1226 },
[email protected]26d045f2012-10-18 21:18:431227 {
[email protected]76f7d4882012-10-26 21:09:221228 "enable-deferred-image-decoding",
1229 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1230 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221231 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221232 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1233 },
1234 {
[email protected]075543d2012-10-24 01:29:141235 "performance-monitor-gathering",
1236 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1237 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1238 kOsAll,
1239 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1240 },
[email protected]783d5bb2012-10-24 03:47:141241 {
[email protected]90b482d2013-04-04 10:45:581242 "disable-native-autofill-ui",
1243 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1244 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431245 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581246 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431247 },
1248 {
[email protected]a7259fb2012-11-08 06:22:231249 "enable-experimental-form-filling",
1250 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1251 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1252 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481253 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231254 },
[email protected]6e6efe42013-01-30 00:04:501255 {
[email protected]db3178c2013-03-21 14:54:541256 "wallet-service-use-prod",
1257 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1258 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1259 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481260 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541261 },
1262 {
[email protected]6e6efe42013-01-30 00:04:501263 "enable-interactive-autocomplete",
1264 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1265 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]dc1cb7d82013-05-22 18:00:001266 kOsWin | kOsCrOS | kOsAndroid,
[email protected]000f3ad2013-05-16 02:19:171267 ENABLE_DISABLE_VALUE_TYPE(
1268 autofill::switches::kEnableInteractiveAutocomplete,
1269 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501270 },
[email protected]177260c2013-04-24 01:47:381271#if defined(USE_AURA)
1272 {
1273 "overscroll-history-navigation",
1274 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1275 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1276 kOsAll,
1277 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1278 switches::kOverscrollHistoryNavigation, "1",
1279 switches::kOverscrollHistoryNavigation, "0")
1280 },
1281#endif
[email protected]edbea622012-11-28 20:39:381282 {
1283 "enable-touch-drag-drop",
1284 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1285 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1286 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271287 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1288 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381289 },
[email protected]0e2f43b62013-02-21 00:47:151290 {
1291 "enable-touch-editing",
1292 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1293 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1294 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271295 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1296 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151297 },
[email protected]92e12dd92012-12-11 03:33:201298 {
1299 "enable-rich-notifications",
1300 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1301 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001302 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231303 ENABLE_DISABLE_VALUE_TYPE(
1304 message_center::switches::kEnableRichNotifications,
1305 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201306 },
[email protected]4d51c682012-12-11 11:34:551307 {
[email protected]ddec1aa2013-04-28 23:22:451308 "enable-sync-synced-notifications",
1309 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1310 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181311 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451312 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1313 switches::kDisableSyncSyncedNotifications)
1314 },
1315 {
[email protected]a50e16a2013-04-25 14:07:171316 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551317 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1318 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1319 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171320 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551321 },
[email protected]628a69a92012-12-23 04:09:341322 {
[email protected]fd030142013-02-08 02:04:381323 "enable-usermedia-screen-capture",
1324 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1325 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1326 kOsDesktop,
1327 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1328 },
[email protected]5b93e162013-02-19 06:33:091329 {
1330 "enable-apps-devtool-app",
1331 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1332 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1333 kOsDesktop,
1334 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1335 },
[email protected]9323fdd12013-02-23 00:31:361336 {
1337 "impl-side-painting",
1338 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1339 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041340 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361341 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1342 },
[email protected]a42c85f2013-04-04 18:15:121343 {
[email protected]1c92d3e2013-04-18 05:31:391344 "enable-websocket-experimental-implementation",
1345 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1346 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1347 kOsAll,
1348 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1349 },
1350 {
[email protected]a42c85f2013-04-04 18:15:121351 "max-tiles-for-interest-area",
1352 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1353 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1354 kOsAndroid | kOsLinux | kOsCrOS,
1355 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1356 },
[email protected]7cf7ccb2013-04-20 02:53:081357 {
1358 "enable-offline-mode",
1359 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1360 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1361 kOsAll,
1362 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1363 },
[email protected]a3618122013-04-26 21:15:341364 {
1365 "default-tile-width",
1366 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1367 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1368 kOsAll,
1369 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1370 },
1371 {
1372 "default-tile-height",
1373 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1374 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1375 kOsAll,
1376 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1377 },
[email protected]2f2f72b2013-03-08 22:37:311378 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1379#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371380 {
1381 "track-active-visit-time",
1382 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1383 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1384 kOsWin,
1385 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1386 },
[email protected]2f2f72b2013-03-08 22:37:311387#endif
[email protected]8cc71d42013-03-02 17:26:081388#if defined(OS_ANDROID)
1389 {
1390 "disable-gesture-requirement-for-media-playback",
1391 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1392 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1393 kOsAndroid,
1394 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1395 },
1396#endif
[email protected]6077cab2013-03-11 19:36:141397#if defined(ENABLE_GOOGLE_NOW)
1398 {
1399 "enable-google-now",
1400 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1401 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361402 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141403 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1404 },
1405#endif
[email protected]86459e2c2013-04-10 13:39:241406#if defined(OS_CHROMEOS)
1407 {
1408 "enable-virtual-keyboard",
1409 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1410 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1411 kOsCrOS,
1412 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1413 },
1414#endif
[email protected]38484df12013-04-10 16:42:031415 {
1416 "enable-simple-cache-backend",
1417 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1418 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1419 kOsAndroid,
1420 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1421 },
[email protected]717e4e22013-04-10 20:52:231422 {
1423 "enable-tcp-fast-open",
1424 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1425 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111426 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231427 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1428 },
[email protected]8027acd2013-04-18 08:35:151429 {
1430 "enable-webp-in-accept-header",
1431 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1432 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1433 kOsAll,
1434 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1435 },
[email protected]58c740f2013-05-06 05:25:441436 {
1437 "apps-use-native-frame",
1438 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1439 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1440 kOsWin,
1441 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1442 },
[email protected]896d86b32013-05-09 19:36:441443 {
1444 "enable-syncfs-directory-operation",
1445 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1446 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1447 kOsAll,
1448 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1449 },
[email protected]a4ed7e12013-05-24 01:00:281450 {
1451 "enable-draggable-menu-button",
1452 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1453 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1454 kOsAndroid,
1455 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1456 },
[email protected]380532aa2013-05-24 11:59:351457 {
1458 "enable-reset-profile-settings",
1459 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1460 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1461 kOsAll,
1462 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1463 },
[email protected]289704062013-05-31 01:49:401464 {
1465 "enable-device-discovery",
1466 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1467 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1468 kOsDesktop,
1469 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1470 },
[email protected]56d3c6e42013-05-29 11:28:011471#if defined(OS_MACOSX)
1472 {
1473 "enable-app-list-shim",
1474 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1475 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1476 kOsMac,
1477 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1478 },
[email protected]cb29e162013-05-31 07:47:021479 {
1480 "enable-app-shims",
1481 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1482 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1483 kOsMac,
1484 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1485 },
[email protected]56d3c6e42013-05-29 11:28:011486#endif
[email protected]13177832013-05-31 07:46:051487#if defined(OS_CHROMEOS) || defined(OS_WIN)
1488 {
1489 "enable-omnibox-auto-completion-for-ime",
1490 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1491 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1492 kOsCrOS,
1493 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1494 },
1495#endif
[email protected]910ecfe2013-06-03 23:38:141496#if defined(USE_AURA)
1497 {
1498 "tab-capture-upscale-quality",
1499 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1500 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1501 kOsAll,
1502 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1503 },
1504 {
1505 "tab-capture-downscale-quality",
1506 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1507 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1508 kOsAll,
1509 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1510 },
1511#endif
[email protected]71d4f602013-06-04 23:21:101512 {
[email protected]5e099c62013-06-08 05:46:231513 "enable-spelling-service-feedback",
1514 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1515 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1516 kOsAll,
1517 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1518 },
1519 {
[email protected]71d4f602013-06-04 23:21:101520 "enable-webgl-draft-extensions",
1521 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1522 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1523 kOsAll,
1524 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1525 },
[email protected]deadc492013-06-07 21:39:281526 {
1527 "high-dpi-support",
1528 IDS_FLAGS_HIDPI_NAME,
1529 IDS_FLAGS_HIDPI_DESCRIPTION,
1530 kOsWin,
1531 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1532 switches::kHighDPISupport,"0")
1533 },
[email protected]77e69a512013-06-08 05:56:451534#if defined(OS_CHROMEOS)
1535 {
1536 "enable-quickoffice-editing",
1537 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1538 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1539 kOsCrOS,
1540 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1541 },
1542#endif
[email protected]a0e4b072011-08-17 01:47:071543};
[email protected]ad2a3ded2010-08-27 13:19:051544
[email protected]a314ee5a2010-10-26 21:23:281545const Experiment* experiments = kExperiments;
1546size_t num_experiments = arraysize(kExperiments);
1547
[email protected]e2ddbc92010-10-15 20:02:071548// Stores and encapsulates the little state that about:flags has.
1549class FlagsState {
1550 public:
1551 FlagsState() : needs_restart_(false) {}
1552 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1553 bool IsRestartNeededToCommitChanges();
1554 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281555 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071556 void RemoveFlagsSwitches(
1557 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001558 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071559 void reset();
1560
1561 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551562 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071563 return Singleton<FlagsState>::get();
1564 }
1565
1566 private:
1567 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531568 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071569
1570 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1571};
1572
[email protected]c7b7800a2010-10-07 18:51:351573// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491574// in a set.
[email protected]1a47d7e2010-10-15 00:37:241575void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051576 const ListValue* enabled_experiments = prefs->GetList(
1577 prefs::kEnabledLabsExperiments);
1578 if (!enabled_experiments)
1579 return;
1580
1581 for (ListValue::const_iterator it = enabled_experiments->begin();
1582 it != enabled_experiments->end();
1583 ++it) {
1584 std::string experiment_name;
1585 if (!(*it)->GetAsString(&experiment_name)) {
1586 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1587 continue;
1588 }
1589 result->insert(experiment_name);
1590 }
1591}
1592
[email protected]c6343372013-03-13 17:05:491593// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241594void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051595 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381596 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1597 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051598
1599 experiments_list->Clear();
1600 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1601 it != enabled_experiments.end();
1602 ++it) {
1603 experiments_list->Append(new StringValue(*it));
1604 }
1605}
1606
[email protected]8a6ff28d2010-12-02 16:35:191607// Adds the internal names for the specified experiment to |names|.
1608void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1609 if (e.type == Experiment::SINGLE_VALUE) {
1610 names->insert(e.internal_name);
1611 } else {
[email protected]83e9fa702013-02-25 19:30:441612 DCHECK(e.type == Experiment::MULTI_VALUE ||
1613 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191614 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441615 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191616 }
1617}
1618
[email protected]28e35af2011-02-09 12:56:221619// Confirms that an experiment is valid, used in a DCHECK in
1620// SanitizeList below.
1621bool ValidateExperiment(const Experiment& e) {
1622 switch (e.type) {
1623 case Experiment::SINGLE_VALUE:
1624 DCHECK_EQ(0, e.num_choices);
1625 DCHECK(!e.choices);
1626 break;
1627 case Experiment::MULTI_VALUE:
1628 DCHECK_GT(e.num_choices, 0);
1629 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531630 DCHECK(e.choices[0].command_line_switch);
1631 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221632 break;
[email protected]83e9fa702013-02-25 19:30:441633 case Experiment::ENABLE_DISABLE_VALUE:
1634 DCHECK_EQ(3, e.num_choices);
1635 DCHECK(!e.choices);
1636 DCHECK(e.command_line_switch);
1637 DCHECK(e.command_line_value);
1638 DCHECK(e.disable_command_line_switch);
1639 DCHECK(e.disable_command_line_value);
1640 break;
[email protected]28e35af2011-02-09 12:56:221641 default:
1642 NOTREACHED();
1643 }
1644 return true;
1645}
1646
[email protected]ad2a3ded2010-08-27 13:19:051647// Removes all experiments from prefs::kEnabledLabsExperiments that are
1648// unknown, to prevent this list to become very long as experiments are added
1649// and removed.
1650void SanitizeList(PrefService* prefs) {
1651 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221652 for (size_t i = 0; i < num_experiments; ++i) {
1653 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191654 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221655 }
[email protected]ad2a3ded2010-08-27 13:19:051656
1657 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241658 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051659
1660 std::set<std::string> new_enabled_experiments;
1661 std::set_intersection(
1662 known_experiments.begin(), known_experiments.end(),
1663 enabled_experiments.begin(), enabled_experiments.end(),
1664 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1665
[email protected]4c8853f2012-07-23 01:29:161666 if (new_enabled_experiments != enabled_experiments)
1667 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051668}
1669
[email protected]1a47d7e2010-10-15 00:37:241670void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051671 PrefService* prefs, std::set<std::string>* result) {
1672 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241673 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051674}
1675
[email protected]a314ee5a2010-10-26 21:23:281676// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1677// enabled on the current platform.
1678void GetSanitizedEnabledFlagsForCurrentPlatform(
1679 PrefService* prefs, std::set<std::string>* result) {
1680 GetSanitizedEnabledFlags(prefs, result);
1681
1682 // Filter out any experiments that aren't enabled on the current platform. We
1683 // don't remove these from prefs else syncing to a platform with a different
1684 // set of experiments would be lossy.
1685 std::set<std::string> platform_experiments;
1686 int current_platform = GetCurrentPlatform();
1687 for (size_t i = 0; i < num_experiments; ++i) {
1688 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191689 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581690#if defined(OS_CHROMEOS)
1691 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1692 AddInternalName(experiments[i], &platform_experiments);
1693#endif
[email protected]a314ee5a2010-10-26 21:23:281694 }
1695
1696 std::set<std::string> new_enabled_experiments;
1697 std::set_intersection(
1698 platform_experiments.begin(), platform_experiments.end(),
1699 result->begin(), result->end(),
1700 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1701
1702 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051703}
1704
[email protected]8a6ff28d2010-12-02 16:35:191705// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191706Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221707 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441708 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1709 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191710 ListValue* result = new ListValue;
1711 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191712 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441713 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191714 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441715 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221716 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191717 result->Append(value);
1718 }
1719 return result;
1720}
1721
[email protected]e2ddbc92010-10-15 20:02:071722} // namespace
1723
[email protected]83e9fa702013-02-25 19:30:441724std::string Experiment::NameForChoice(int index) const {
1725 DCHECK(type == Experiment::MULTI_VALUE ||
1726 type == Experiment::ENABLE_DISABLE_VALUE);
1727 DCHECK_LT(index, num_choices);
1728 return std::string(internal_name) + testing::kMultiSeparator +
1729 base::IntToString(index);
1730}
1731
1732string16 Experiment::DescriptionForChoice(int index) const {
1733 DCHECK(type == Experiment::MULTI_VALUE ||
1734 type == Experiment::ENABLE_DISABLE_VALUE);
1735 DCHECK_LT(index, num_choices);
1736 int description_id;
1737 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1738 const int kEnableDisableDescriptionIds[] = {
1739 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1740 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1741 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1742 };
1743 description_id = kEnableDisableDescriptionIds[index];
1744 } else {
1745 description_id = choices[index].description_id;
1746 }
1747 return l10n_util::GetStringUTF16(description_id);
1748}
1749
[email protected]1a47d7e2010-10-15 00:37:241750void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551751 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051752}
1753
[email protected]ee28495a2013-05-20 04:10:521754void GetFlagsExperimentsData(PrefService* prefs,
1755 FlagAccess access,
1756 base::ListValue* supported_experiments,
1757 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051758 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241759 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051760
1761 int current_platform = GetCurrentPlatform();
1762
[email protected]a314ee5a2010-10-26 21:23:281763 for (size_t i = 0; i < num_experiments; ++i) {
1764 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051765
1766 DictionaryValue* data = new DictionaryValue();
1767 data->SetString("internal_name", experiment.internal_name);
1768 data->SetString("name",
1769 l10n_util::GetStringUTF16(experiment.visible_name_id));
1770 data->SetString("description",
1771 l10n_util::GetStringUTF16(
1772 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401773
1774 ListValue* supported_platforms = new ListValue();
1775 AddOsStrings(experiment.supported_platforms, supported_platforms);
1776 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051777
[email protected]28e35af2011-02-09 12:56:221778 switch (experiment.type) {
1779 case Experiment::SINGLE_VALUE:
1780 data->SetBoolean(
1781 "enabled",
1782 enabled_experiments.count(experiment.internal_name) > 0);
1783 break;
1784 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441785 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221786 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1787 break;
1788 default:
1789 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191790 }
1791
[email protected]ee28495a2013-05-20 04:10:521792 bool supported = (experiment.supported_platforms & current_platform) != 0;
1793#if defined(OS_CHROMEOS)
1794 if (access == kOwnerAccessToFlags &&
1795 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1796 supported = true;
1797 }
1798#endif
1799 if (supported)
1800 supported_experiments->Append(data);
1801 else
1802 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051803 }
[email protected]ad2a3ded2010-08-27 13:19:051804}
1805
[email protected]ad2a3ded2010-08-27 13:19:051806bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551807 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051808}
1809
1810void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351811 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551812 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071813}
1814
1815void RemoveFlagsSwitches(
1816 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551817 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071818}
1819
[email protected]cb93bf52013-02-20 01:20:001820void ResetAllFlags(PrefService* prefs) {
1821 FlagsState::GetInstance()->ResetAllFlags(prefs);
1822}
1823
[email protected]a314ee5a2010-10-26 21:23:281824int GetCurrentPlatform() {
1825#if defined(OS_MACOSX)
1826 return kOsMac;
1827#elif defined(OS_WIN)
1828 return kOsWin;
1829#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1830 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211831#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281832 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401833#elif defined(OS_ANDROID)
1834 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281835#else
1836#error Unknown platform
1837#endif
1838}
1839
[email protected]4bc5050c2010-11-18 17:55:541840void RecordUMAStatistics(const PrefService* prefs) {
1841 std::set<std::string> flags;
1842 GetEnabledFlags(prefs, &flags);
1843 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1844 ++it) {
1845 std::string action("AboutFlags_");
1846 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381847 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541848 }
1849 // Since flag metrics are recorded every startup, add a tick so that the
1850 // stats can be made meaningful.
1851 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381852 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1853 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541854}
1855
[email protected]e2ddbc92010-10-15 20:02:071856//////////////////////////////////////////////////////////////////////////////
1857// FlagsState implementation.
1858
1859namespace {
1860
[email protected]83e9fa702013-02-25 19:30:441861typedef std::map<std::string, std::pair<std::string, std::string> >
1862 NameToSwitchAndValueMap;
1863
1864void SetFlagToSwitchMapping(const std::string& key,
1865 const std::string& switch_name,
1866 const std::string& switch_value,
1867 NameToSwitchAndValueMap* name_to_switch_map) {
1868 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1869 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1870}
1871
[email protected]e2ddbc92010-10-15 20:02:071872void FlagsState::ConvertFlagsToSwitches(
1873 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071874 if (command_line->HasSwitch(switches::kNoExperiments))
1875 return;
1876
1877 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001878
[email protected]a314ee5a2010-10-26 21:23:281879 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071880
[email protected]a82744532011-02-11 16:15:531881 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191882 for (size_t i = 0; i < num_experiments; ++i) {
1883 const Experiment& e = experiments[i];
1884 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441885 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1886 e.command_line_value, &name_to_switch_map);
1887 } else if (e.type == Experiment::MULTI_VALUE) {
1888 for (int j = 0; j < e.num_choices; ++j) {
1889 SetFlagToSwitchMapping(e.NameForChoice(j),
1890 e.choices[j].command_line_switch,
1891 e.choices[j].command_line_value,
1892 &name_to_switch_map);
1893 }
[email protected]8a6ff28d2010-12-02 16:35:191894 } else {
[email protected]83e9fa702013-02-25 19:30:441895 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1896 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1897 &name_to_switch_map);
1898 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1899 e.command_line_value, &name_to_switch_map);
1900 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1901 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191902 }
1903 }
[email protected]e2ddbc92010-10-15 20:02:071904
1905 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531906 flags_switches_.insert(
1907 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1908 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071909 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1910 it != enabled_experiments.end();
1911 ++it) {
1912 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531913 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191914 name_to_switch_map.find(experiment_name);
1915 if (name_to_switch_it == name_to_switch_map.end()) {
1916 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071917 continue;
[email protected]8a6ff28d2010-12-02 16:35:191918 }
[email protected]e2ddbc92010-10-15 20:02:071919
[email protected]a82744532011-02-11 16:15:531920 const std::pair<std::string, std::string>&
1921 switch_and_value_pair = name_to_switch_it->second;
1922
1923 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1924 switch_and_value_pair.second);
1925 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071926 }
1927 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531928 flags_switches_.insert(
1929 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1930 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071931}
1932
1933bool FlagsState::IsRestartNeededToCommitChanges() {
1934 return needs_restart_;
1935}
1936
1937void FlagsState::SetExperimentEnabled(
1938 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441939 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191940 if (at_index != std::string::npos) {
1941 DCHECK(enable);
1942 // We're being asked to enable a multi-choice experiment. Disable the
1943 // currently selected choice.
1944 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221945 const std::string experiment_name = internal_name.substr(0, at_index);
1946 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191947
[email protected]28e35af2011-02-09 12:56:221948 // And enable the new choice, if it is not the default first choice.
1949 if (internal_name != experiment_name + "@0") {
1950 std::set<std::string> enabled_experiments;
1951 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081952 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221953 SetEnabledFlags(prefs, enabled_experiments);
1954 }
[email protected]8a6ff28d2010-12-02 16:35:191955 return;
1956 }
1957
[email protected]ad2a3ded2010-08-27 13:19:051958 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241959 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051960
[email protected]8a6ff28d2010-12-02 16:35:191961 const Experiment* e = NULL;
1962 for (size_t i = 0; i < num_experiments; ++i) {
1963 if (experiments[i].internal_name == internal_name) {
1964 e = experiments + i;
1965 break;
1966 }
1967 }
1968 DCHECK(e);
1969
1970 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591971 if (enable)
[email protected]147492b2013-03-19 23:52:081972 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591973 else
[email protected]147492b2013-03-19 23:52:081974 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191975 } else {
1976 if (enable) {
1977 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081978 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191979 } else {
1980 // Find the currently enabled choice and disable it.
1981 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441982 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191983 if (enabled_experiments.find(choice_name) !=
1984 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081985 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191986 enabled_experiments.erase(choice_name);
1987 // Continue on just in case there's a bug and more than one
1988 // experiment for this choice was enabled.
1989 }
1990 }
1991 }
1992 }
[email protected]ad2a3ded2010-08-27 13:19:051993
[email protected]1a47d7e2010-10-15 00:37:241994 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051995}
1996
[email protected]e2ddbc92010-10-15 20:02:071997void FlagsState::RemoveFlagsSwitches(
1998 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531999 for (std::map<std::string, std::string>::const_iterator
2000 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2001 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072002 }
2003}
2004
[email protected]cb93bf52013-02-20 01:20:002005void FlagsState::ResetAllFlags(PrefService* prefs) {
2006 needs_restart_ = true;
2007
2008 std::set<std::string> no_experiments;
2009 SetEnabledFlags(prefs, no_experiments);
2010}
2011
[email protected]e2ddbc92010-10-15 20:02:072012void FlagsState::reset() {
2013 needs_restart_ = false;
2014 flags_switches_.clear();
2015}
2016
[email protected]38e46812011-05-09 20:49:222017} // namespace
[email protected]e2ddbc92010-10-15 20:02:072018
2019namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192020
2021// WARNING: '@' is also used in the html file. If you update this constant you
2022// also need to update the html file.
2023const char kMultiSeparator[] = "@";
2024
[email protected]e2ddbc92010-10-15 20:02:072025void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552026 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072027}
[email protected]a314ee5a2010-10-26 21:23:282028
2029void SetExperiments(const Experiment* e, size_t count) {
2030 if (!e) {
2031 experiments = kExperiments;
2032 num_experiments = arraysize(kExperiments);
2033 } else {
2034 experiments = e;
2035 num_experiments = count;
2036 }
2037}
2038
[email protected]8a6ff28d2010-12-02 16:35:192039const Experiment* GetExperiments(size_t* count) {
2040 *count = num_experiments;
2041 return experiments;
2042}
2043
[email protected]e2ddbc92010-10-15 20:02:072044} // namespace testing
2045
[email protected]1a47d7e2010-10-15 00:37:242046} // namespace about_flags