blob: adef685e4f4c8ae927e94100379746bf38db6ec0 [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]3ea1b182013-02-08 22:38:4115#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2016#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5218#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4019#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1022#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3823#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2724#include "extensions/common/switches.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"
[email protected]6d98abf2013-06-17 23:35:5143#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4644#endif
45
[email protected]7f6f44c2011-12-14 13:23:3846using content::UserMetricsAction;
47
[email protected]1a47d7e2010-10-15 00:37:2448namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0549
[email protected]8a6ff28d2010-12-02 16:35:1950// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5351#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4452 Experiment::SINGLE_VALUE, \
53 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5354#define SINGLE_VALUE_TYPE(command_line_switch) \
55 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4456#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
57 disable_switch, disable_value) \
58 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
59 disable_switch, disable_value, NULL, 3
60#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
61 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5362#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4463 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1964
[email protected]e2ddbc92010-10-15 20:02:0765namespace {
66
[email protected]9c7453d2012-01-21 00:45:4067const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5668const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0569
[email protected]cc3e2052011-12-20 01:01:4070// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
71// whether the experiment is available on that platform.
72void AddOsStrings(unsigned bitmask, ListValue* list) {
73 struct {
74 unsigned bit;
75 const char* const name;
76 } kBitsToOs[] = {
77 {kOsMac, "Mac"},
78 {kOsWin, "Windows"},
79 {kOsLinux, "Linux"},
80 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0181 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5882 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4083 };
84 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
85 if (bitmask & kBitsToOs[i].bit)
86 list->Append(new StringValue(kBitsToOs[i].name));
87}
88
[email protected]6d98abf2013-06-17 23:35:5189// Convert switch constants to proper CommandLine::StringType strings.
90CommandLine::StringType GetSwitchString(const std::string& flag) {
91 CommandLine cmd_line(CommandLine::NO_PROGRAM);
92 cmd_line.AppendSwitch(flag);
93 DCHECK(cmd_line.argv().size() == 2);
94 return cmd_line.argv()[1];
95}
96
97// Scoops flags from a command line.
98std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
99 const CommandLine& cmdline) {
100 std::set<CommandLine::StringType> flags;
101 // First do the ones between --flag-switches-begin and --flag-switches-end.
102 CommandLine::StringVector::const_iterator first =
103 std::find(cmdline.argv().begin(), cmdline.argv().end(),
104 GetSwitchString(switches::kFlagSwitchesBegin));
105 CommandLine::StringVector::const_iterator last =
106 std::find(cmdline.argv().begin(), cmdline.argv().end(),
107 GetSwitchString(switches::kFlagSwitchesEnd));
108 if (first != cmdline.argv().end() && last != cmdline.argv().end())
109 flags.insert(first + 1, last);
110#if defined(OS_CHROMEOS)
111 // Then add those between --policy-switches-begin and --policy-switches-end.
112 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
113 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
114 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
115 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
116 if (first != cmdline.argv().end() && last != cmdline.argv().end())
117 flags.insert(first + 1, last);
118#endif
119 return flags;
120}
121
[email protected]fb854192013-02-06 01:30:04122const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
123 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
124 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
125 switches::kEnableCompositingForFixedPosition, ""},
126 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
127 switches::kDisableCompositingForFixedPosition, ""},
128 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
129 switches::kEnableHighDpiCompositingForFixedPosition, ""}
130};
131
[email protected]d8221b22013-05-23 05:35:43132const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
133 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
134 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
135 switches::kEnableCompositingForTransition, ""},
136 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
137 switches::kDisableCompositingForTransition, ""},
138};
139
[email protected]06fc4d3b2013-07-08 21:07:24140const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
141 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
142 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
143 switches::kEnableAcceleratedFixedRootBackground, ""},
144 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
145 switches::kDisableAcceleratedFixedRootBackground, ""},
146};
147
[email protected]8b1c3c72013-01-25 01:48:43148const Experiment::Choice kGDIPresentChoices[] = {
149 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
150 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
151 switches::kDoFirstShowPresentWithGDI, ""},
152 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
153 switches::kDoAllShowPresentWithGDI, ""}
154};
155
[email protected]d7932532012-11-21 21:10:31156const Experiment::Choice kTouchEventsChoices[] = {
157 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
158 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
159 switches::kTouchEvents,
160 switches::kTouchEventsEnabled },
161 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
162 switches::kTouchEvents,
163 switches::kTouchEventsDisabled }
164};
165
[email protected]347a0c72012-05-14 20:28:06166const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31167 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20168 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06169 switches::kTouchOptimizedUI,
170 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20171 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06172 switches::kTouchOptimizedUI,
173 switches::kTouchOptimizedUIDisabled }
174};
175
[email protected]66f409c2012-10-04 20:59:04176const Experiment::Choice kNaClDebugMaskChoices[] = {
177 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
178 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
179 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
180 // an option to switch off its debugging.
181 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
182 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
183 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
184 switches::kNaClDebugMask, "*://*/*debug.nmf" }
185};
186
[email protected]ea2f3342012-09-21 21:13:36187#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02188
189const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24190 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02191 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24192 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19193 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24194 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02195};
[email protected]a78c7432013-03-13 06:22:43196
[email protected]ea2f3342012-09-21 21:13:36197#endif
198
[email protected]9323fdd12013-02-23 00:31:36199const Experiment::Choice kImplSidePaintingChoices[] = {
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
201 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
202 cc::switches::kEnableImplSidePainting, ""},
203 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
204 cc::switches::kDisableImplSidePainting, ""}
205};
206
[email protected]0c04d1c2013-07-10 00:02:32207const Experiment::Choice kDelegatedRendererChoices[] = {
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
209 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
210 switches::kEnableDelegatedRenderer, ""},
211 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
212 switches::kDisableDelegatedRenderer, ""}
213};
214
[email protected]a42c85f2013-04-04 18:15:12215const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
217 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
218 cc::switches::kMaxTilesForInterestArea, "64"},
219 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
220 cc::switches::kMaxTilesForInterestArea, "128"},
221 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
222 cc::switches::kMaxTilesForInterestArea, "256"},
223 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
224 cc::switches::kMaxTilesForInterestArea, "512"}
225};
226
[email protected]a3618122013-04-26 21:15:34227const Experiment::Choice kDefaultTileWidthChoices[] = {
228 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
229 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
230 switches::kDefaultTileWidth, "128"},
231 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
232 switches::kDefaultTileWidth, "256"},
233 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
234 switches::kDefaultTileWidth, "512"},
235 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
236 switches::kDefaultTileWidth, "1024"}
237};
238
239const Experiment::Choice kDefaultTileHeightChoices[] = {
240 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
241 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
242 switches::kDefaultTileHeight, "128"},
243 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
244 switches::kDefaultTileHeight, "256"},
245 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
246 switches::kDefaultTileHeight, "512"},
247 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
248 switches::kDefaultTileHeight, "1024"}
249};
250
[email protected]38484df12013-04-10 16:42:03251const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21252 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
253 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
254 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03255 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
256 switches::kUseSimpleCacheBackend, "on"}
257};
258
[email protected]910ecfe2013-06-03 23:38:14259const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
260 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
261 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
262 switches::kTabCaptureUpscaleQuality, "fast" },
263 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
264 switches::kTabCaptureUpscaleQuality, "good" },
265 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
266 switches::kTabCaptureUpscaleQuality, "best" },
267};
268
269const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
270 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
271 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
272 switches::kTabCaptureDownscaleQuality, "fast" },
273 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
274 switches::kTabCaptureDownscaleQuality, "good" },
275 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
276 switches::kTabCaptureDownscaleQuality, "best" },
277};
278
[email protected]4bc5050c2010-11-18 17:55:54279// RECORDING USER METRICS FOR FLAGS:
280// -----------------------------------------------------------------------------
281// The first line of the experiment is the internal name. If you'd like to
282// gather statistics about the usage of your flag, you should append a marker
283// comment to the end of the feature name, like so:
284// "my-special-feature", // FLAGS:RECORD_UMA
285//
286// After doing that, run //chrome/tools/extract_actions.py (see instructions at
287// the top of that file for details) to update the chromeactions.txt file, which
288// will enable UMA to record your feature flag.
289//
[email protected]783d5bb2012-10-24 03:47:14290// After your feature has shipped under a flag, you can locate the metrics under
291// the action name AboutFlags_internal-action-name. Actions are recorded once
292// per startup, so you should divide this number by AboutFlags_StartupTick to
293// get a sense of usage. Note that this will not be the same as number of users
294// with a given feature enabled because users can quit and relaunch the
295// application multiple times over a given time interval. The dashboard also
296// shows you how many (metrics reporting) users have enabled the flag over the
297// last seven days. However, note that this is not the same as the number of
298// users who have the flag enabled, since enabling the flag happens once,
299// whereas running with the flag enabled happens until the user flips the flag
300// again.
[email protected]4bc5050c2010-11-18 17:55:54301
[email protected]8a6ff28d2010-12-02 16:35:19302// To add a new experiment add to the end of kExperiments. There are two
303// distinct types of experiments:
304// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
305// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22306// . MULTI_VALUE: a list of choices, the first of which should correspond to a
307// deactivated state for this lab (i.e. no command line option). To specify
308// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
309// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19310// See the documentation of Experiment for details on the fields.
311//
312// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05313const Experiment kExperiments[] = {
314 {
[email protected]aac169d2011-03-18 19:53:03315 "expose-for-tabs", // FLAGS:RECORD_UMA
316 IDS_FLAGS_TABPOSE_NAME,
317 IDS_FLAGS_TABPOSE_DESCRIPTION,
318 kOsMac,
319#if defined(OS_MACOSX)
320 // The switch exists only on OS X.
321 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
322#else
323 SINGLE_VALUE_TYPE("")
324#endif
325 },
326 {
[email protected]4bc5050c2010-11-18 17:55:54327 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05328 IDS_FLAGS_CONFLICTS_CHECK_NAME,
329 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
330 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19331 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05332 },
333 {
[email protected]96c6f4c2011-05-18 19:36:22334 "ignore-gpu-blacklist",
335 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
336 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
337 kOsAll,
338 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
339 },
340 {
[email protected]0110cf112011-07-02 00:39:43341 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22342 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
343 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23344 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44345 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
346 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22347 },
348 {
[email protected]72787e392012-03-23 05:55:43349 "threaded-compositing-mode",
350 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
351 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58352 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44353 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
354 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59355 },
356 {
[email protected]17e27692013-02-06 17:02:09357 "force-accelerated-composited-scrolling",
358 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
359 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
360 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44361 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
362 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09363 },
364 {
[email protected]8b1c3c72013-01-25 01:48:43365 "present-with-GDI",
366 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
367 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
368 kOsWin,
369 MULTI_VALUE_TYPE(kGDIPresentChoices)
370 },
371 {
[email protected]2b608752013-05-01 03:34:36372 "enable-experimental-canvas-features",
373 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
374 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
375 kOsAll,
376 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
377 },
378 {
[email protected]81c64af62012-06-06 20:15:52379 "disable-accelerated-2d-canvas",
380 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
381 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
382 kOsAll,
383 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
384 },
385 {
[email protected]efcde132012-05-30 01:05:18386 "disable-threaded-animation",
387 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
388 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59389 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37390 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59391 },
392 {
[email protected]5963b772011-02-09 22:55:38393 "composited-layer-borders",
394 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
395 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
396 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57397 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38398 },
399 {
[email protected]a8f1eaa2011-03-07 19:00:58400 "show-fps-counter",
401 IDS_FLAGS_SHOW_FPS_COUNTER,
402 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
403 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57404 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58405 },
[email protected]8ff7f342011-05-25 01:49:47406 {
[email protected]70c98a332011-12-21 20:51:52407 "accelerated-filters",
408 IDS_FLAGS_ACCELERATED_FILTERS,
409 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
410 kOsAll,
411 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
412 },
413 {
[email protected]8ff7f342011-05-25 01:49:47414 "disable-gpu-vsync",
415 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
416 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56417 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47418 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
419 },
[email protected]deaba6d52011-09-23 14:47:12420 {
[email protected]4052d832013-01-16 05:31:01421 "enable-webgl",
422 IDS_FLAGS_ENABLE_WEBGL_NAME,
423 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
424 kOsAndroid,
425#if defined(OS_ANDROID)
426 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
427#else
428 SINGLE_VALUE_TYPE("")
429#endif
430 },
431 {
[email protected]deaba6d52011-09-23 14:47:12432 "disable-webgl",
433 IDS_FLAGS_DISABLE_WEBGL_NAME,
434 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56435 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01436#if defined(OS_ANDROID)
437 SINGLE_VALUE_TYPE("")
438#else
[email protected]deaba6d52011-09-23 14:47:12439 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01440#endif
[email protected]deaba6d52011-09-23 14:47:12441 },
[email protected]09096e02012-05-24 11:12:04442 {
[email protected]ce585bf2013-03-14 16:25:16443 "disable-webrtc",
444 IDS_FLAGS_DISABLE_WEBRTC_NAME,
445 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05446 kOsAndroid,
447#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16448 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05449#else
450 SINGLE_VALUE_TYPE("")
451#endif
452 },
[email protected]5e2bc8c2013-05-28 22:59:57453#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30454 {
455 "enable-sctp-data-channels",
456 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
457 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
458 kOsAll,
459 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
460 },
[email protected]c1298742013-07-17 04:06:32461 {
462 "enable-device-enumeration",
463 IDS_FLAGS_ENABLE_DEVICE_ENUMERATION_NAME,
464 IDS_FLAGS_ENABLE_DEVICE_ENUMERATION_DESCRIPTION,
465 kOsAll,
466 SINGLE_VALUE_TYPE(switches::kEnableDeviceEnumeration)
467 },
[email protected]5e2bc8c2013-05-28 22:59:57468#endif
[email protected]34cb5292013-04-15 06:06:31469#if defined(OS_ANDROID)
470 {
[email protected]7b8a31632013-06-13 22:42:37471 "disable-webaudio",
472 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
473 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31474 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37475 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31476 },
477#endif
[email protected]d9da9582013-01-31 04:59:05478 {
[email protected]96bcdc102012-05-24 23:42:10479 "fixed-position-creates-stacking-context",
480 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
481 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
482 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44483 ENABLE_DISABLE_VALUE_TYPE(
484 switches::kEnableFixedPositionCreatesStackingContext,
485 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10486 },
[email protected]fb854192013-02-06 01:30:04487 {
488 "enable-compositing-for-fixed-position",
489 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
490 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
491 kOsAll,
492 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
493 },
[email protected]d8221b22013-05-23 05:35:43494 {
495 "enable-compositing-for-transition",
496 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
497 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
498 kOsAll,
499 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
500 },
[email protected]06fc4d3b2013-07-08 21:07:24501 {
502 "enable-accelerated-fixed-root-background",
503 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
504 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
505 kOsAll,
506 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
507 },
[email protected]a7640ef22012-10-06 00:52:08508 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53509 {
[email protected]e3791ce92011-08-09 01:03:32510 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40511 IDS_FLAGS_ENABLE_NACL_NAME,
512 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56513 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19514 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40515 },
516 {
[email protected]9addd1c2012-09-15 14:28:24517 "enable-nacl-debug", // FLAGS:RECORD_UMA
518 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
519 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56520 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24521 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13522 },
523 {
[email protected]66f409c2012-10-04 20:59:04524 "nacl-debug-mask", // FLAGS:RECORD_UMA
525 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
526 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56527 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04528 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
529 },
530 {
[email protected]df4015352013-07-26 23:18:18531 "disable-pnacl", // FLAGS:RECORD_UMA
532 IDS_FLAGS_PNACL_NAME,
533 IDS_FLAGS_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56534 kOsDesktop,
[email protected]df4015352013-07-26 23:18:18535 ENABLE_DISABLE_VALUE_TYPE("", switches::kDisablePnacl)
[email protected]7babd1c2012-08-08 20:35:29536 },
537 {
[email protected]4bc5050c2010-11-18 17:55:54538 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32539 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
540 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56541 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51542 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32543 },
[email protected]3627b06d2010-11-12 16:36:16544 {
[email protected]ac2e2acd2013-03-21 12:57:29545 "extensions-on-chrome-urls",
546 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
547 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
548 kOsAll,
[email protected]49d9b142013-07-19 08:50:27549 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29550 },
551 {
[email protected]88c92012013-07-02 11:56:34552 "enable-fast-unload",
553 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
554 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
555 kOsAll,
556 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
557 },
558 {
[email protected]e9cddd52013-03-23 17:37:53559 "enable-adview",
560 IDS_FLAGS_ENABLE_ADVIEW_NAME,
561 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
562 kOsDesktop,
563 SINGLE_VALUE_TYPE(switches::kEnableAdview)
564 },
565 {
566 "enable-adview-src-attribute",
567 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
568 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
569 kOsDesktop,
570 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
571 },
572 {
[email protected]1f4da9e2013-06-27 05:23:44573 "enable-app-window-controls",
574 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
575 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
576 kOsDesktop,
577 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
578 },
579 {
[email protected]3a362432012-06-18 20:39:51580 "script-badges",
581 IDS_FLAGS_SCRIPT_BADGES_NAME,
582 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56583 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09584 SINGLE_VALUE_TYPE(switches::kScriptBadges)
585 },
586 {
587 "script-bubble",
588 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
589 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56590 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44591 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
592 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51593 },
594 {
[email protected]cbe224d2011-08-04 22:12:49595 "apps-new-install-bubble",
596 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
597 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56598 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49599 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
600 },
601 {
[email protected]80bd24e2010-11-30 09:34:38602 "disable-hyperlink-auditing",
603 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
604 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
605 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19606 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51607 },
608 {
609 "experimental-location-features", // FLAGS:RECORD_UMA
610 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
611 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
612 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19613 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
614 },
615 {
[email protected]5aea1862011-03-23 23:55:39616 "tab-groups-context-menu",
617 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
618 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
619 kOsWin,
620 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
621 },
[email protected]c94cebd2012-06-21 00:55:28622 {
623 "enable-instant-extended-api",
624 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
625 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46626 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51627 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
628 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28629 },
[email protected]e9bf9d92011-03-31 20:57:15630 {
[email protected]8cc9e532013-05-06 21:01:47631 "enable-local-first-load-ntp",
632 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
633 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46634 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47635 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
636 switches::kDisableLocalFirstLoadNTP)
637 },
[email protected]333bdc52013-07-16 00:37:04638#if defined(OS_ANDROID)
639 {
640 "enable-new-ntp",
641 IDS_FLAGS_ENABLE_NEW_NTP,
642 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
643 kOsAndroid,
644 SINGLE_VALUE_TYPE(switches::kEnableNewNTP)
645 },
646#endif
[email protected]8cc9e532013-05-06 21:01:47647 {
[email protected]354e33b2011-06-15 00:29:10648 "static-ip-config",
649 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
650 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
651 kOsCrOS,
652#if defined(OS_CHROMEOS)
653 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24654 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10655#else
656 SINGLE_VALUE_TYPE("")
657#endif
658 },
[email protected]3eb5728c2011-06-20 22:32:24659 {
660 "show-autofill-type-predictions",
661 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
662 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
663 kOsAll,
[email protected]e217c5632013-04-12 19:11:48664 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24665 },
[email protected]bff4d3e2011-06-21 23:58:52666 {
[email protected]e755a382012-09-13 17:16:35667 "enable-gesture-tap-highlight",
668 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
669 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
670 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47671 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
672 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35673 },
674 {
[email protected]a22ebd812011-06-23 00:05:39675 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
676 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
677 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
678 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40679 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25680 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39681 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
682 },
[email protected]81a6b0b2011-06-24 17:55:40683 {
[email protected]7e7a28092011-12-09 22:24:55684 "enable-panels",
685 IDS_FLAGS_ENABLE_PANELS_NAME,
686 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56687 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55688 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54689 },
[email protected]e3749d12011-07-25 22:22:12690 {
[email protected]27c14f02012-06-22 17:29:58691 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27692 "save-page-as-mhtml", // FLAGS:RECORD_UMA
693 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
694 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
695 kOsMac | kOsWin | kOsLinux,
696 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
697 },
698 {
[email protected]b7bb44f2011-09-01 05:17:03699 "enable-autologin",
700 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
701 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
702 kOsMac | kOsWin | kOsLinux,
703 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
704 },
[email protected]b9841172011-09-26 23:36:09705 {
[email protected]903e63382013-06-01 00:40:58706 "enable-quic",
707 IDS_FLAGS_ENABLE_QUIC_NAME,
708 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
709 kOsAll,
710 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
711 switches::kDisableQuic)
712 },
713 {
[email protected]eb8f88e2013-07-15 09:52:17714 "enable-quic-https",
715 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
716 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
717 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00718 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
719 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17720 },
721 {
[email protected]bca09b9982013-06-27 22:30:46722 "enable-spdy4a2",
723 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
724 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
725 kOsAll,
726 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
727 },
728 {
[email protected]88a332622013-07-30 07:13:32729 "enable-http2-draft-04",
730 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
731 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
732 kOsAll,
733 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
734 },
735 {
[email protected]27b3fe92012-03-21 05:35:06736 "enable-async-dns",
737 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
738 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46739 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44740 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
741 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06742 },
[email protected]27b3fe92012-03-21 05:35:06743 {
[email protected]1eb93802012-09-11 18:57:56744 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31745 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
746 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32747 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31748 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44749 },
[email protected]e4e68dbb2011-11-18 01:50:22750 {
[email protected]16c242d2013-05-31 23:56:47751 "enable-encrypted-media",
752 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
753 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50754 kOsAll,
[email protected]16c242d2013-05-31 23:56:47755 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
756 },
757 {
758 "disable-encrypted-media",
759 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
760 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50761 kOsAll,
[email protected]16c242d2013-05-31 23:56:47762 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03763 },
[email protected]f88628792012-12-18 07:07:50764 {
[email protected]d21ead42013-06-24 06:35:06765 "override-encrypted-media-canplaytype",
766 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
767 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
768 kOsMac | kOsWin,
769 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
770 },
771 {
[email protected]f88628792012-12-18 07:07:50772 "enable-opus-playback",
773 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
774 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56775 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50776 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
777 },
[email protected]b150b5532013-06-15 00:50:54778 {
[email protected]6ac955b2013-04-19 23:43:32779 "enable-vp8-alpha-playback",
780 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
781 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
782 kOsDesktop,
783 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
784 },
785 {
[email protected]ca6eaa5a2013-01-24 16:16:04786 "enable-managed-users",
787 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
788 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08789 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04790 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
791 },
[email protected]dc04be7c2012-03-15 23:57:49792#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50793 {
[email protected]2a13a9a2013-04-19 04:00:21794 "ash-disable-auto-maximizing",
795 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
796 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
797 kOsWin | kOsLinux | kOsCrOS,
798 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
799 },
800 {
[email protected]cda278d2012-10-30 20:31:40801 "ash-disable-auto-window-placement",
802 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
803 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
804 kOsWin | kOsLinux | kOsCrOS,
805 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
806 },
[email protected]b4e4ec42012-11-29 21:42:40807 {
[email protected]16f55a22013-02-13 23:47:34808 "ash-disable-per-app-launcher",
809 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
810 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40811 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34812 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40813 },
[email protected]dc04be7c2012-03-15 23:57:49814#endif
[email protected]eaae8b462012-01-20 22:20:39815 {
[email protected]db543d322011-12-15 20:40:15816 "per-tile-painting",
817 IDS_FLAGS_PER_TILE_PAINTING_NAME,
818 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37819 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37820 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15821 },
[email protected]bf88c032011-12-22 19:05:47822 {
823 "enable-javascript-harmony",
824 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
825 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
826 kOsAll,
827 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
828 },
[email protected]7e7f378a2012-01-05 14:35:37829 {
[email protected]85646172012-01-09 22:45:54830 "enable-tab-browser-dragging",
831 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
832 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
833 kOsWin,
834 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
835 },
836 {
[email protected]068b7b52012-02-27 12:41:44837 "disable-restore-session-state",
838 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
839 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37840 kOsAll,
[email protected]068b7b52012-02-27 12:41:44841 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37842 },
[email protected]88864db2012-01-18 20:56:35843 {
844 "disable-software-rasterizer",
845 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
846 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
847#if defined(ENABLE_SWIFTSHADER)
848 kOsAll,
849#else
850 0,
851#endif
852 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
853 },
[email protected]15a5d722012-01-23 09:11:14854 {
[email protected]c1b18ea2013-07-10 13:01:16855 "enable-experimental-web-platform-features",
856 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
857 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16858 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16859 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49860 },
861 {
[email protected]0f95a252012-09-13 22:30:04862 "enable-css-shaders",
863 IDS_FLAGS_CSS_SHADERS_NAME,
864 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
865 kOsAll,
866 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
867 },
868 {
[email protected]3e8befc2012-03-13 01:17:03869 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16870 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
871 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56872 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03873 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16874 },
[email protected]dc04be7c2012-03-15 23:57:49875#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01876 {
[email protected]3cd198a22012-03-12 20:38:01877 "enable-ash-oak",
878 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
879 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
880 kOsAll,
881 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
882 },
[email protected]31cf1c52012-02-29 20:55:01883#endif
[email protected]184ec592012-03-01 11:54:28884 {
885 "enable-devtools-experiments",
886 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
887 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56888 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28889 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
890 },
[email protected]76d1854e2012-03-02 23:57:44891 {
[email protected]3db81f242013-07-12 08:56:17892 "remote-debugging-raw-usb",
893 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
894 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
[email protected]be99de42013-07-12 13:51:16895 kOsDesktop,
[email protected]3db81f242013-07-12 08:56:17896 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
897 },
898 {
[email protected]2fefdb32013-02-26 14:28:10899 "silent-debugger-extension-api",
900 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
901 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
902 kOsDesktop,
903 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
904 },
905 {
[email protected]76d1854e2012-03-02 23:57:44906 "enable-suggestions-ntp",
907 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
908 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56909 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44910 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
911 },
[email protected]a3d54252012-04-05 20:04:13912 {
[email protected]1dbaf5e2012-11-30 05:51:32913 "spellcheck-autocorrect",
914 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
915 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
916 kOsWin | kOsLinux | kOsCrOS,
917 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
918 },
919 {
[email protected]e27137282013-06-20 02:38:35920 "enable-scroll-prediction",
921 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
922 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
923 kOsDesktop,
924 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
925 },
926 {
[email protected]d7932532012-11-21 21:10:31927 "touch-events",
928 IDS_TOUCH_EVENTS_NAME,
929 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56930 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31931 MULTI_VALUE_TYPE(kTouchEventsChoices)
932 },
933 {
[email protected]c9c73ad42012-04-18 03:35:59934 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06935 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
936 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55937 kOsWin,
[email protected]347a0c72012-05-14 20:28:06938 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59939 },
[email protected]8a6aaa72012-04-20 20:53:58940 {
[email protected]b9c96ff2012-11-26 22:24:40941 "disable-touch-adjustment",
942 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
943 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
944 kOsWin | kOsLinux | kOsCrOS,
945 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
946 },
947 {
[email protected]0b9383a2012-10-26 00:58:16948 "enable-tab-capture",
949 IDS_ENABLE_TAB_CAPTURE_NAME,
950 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25951 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44952 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
953 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16954 },
[email protected]0b60afa2012-04-19 17:36:39955#if defined(OS_CHROMEOS)
956 {
[email protected]690de0f2013-06-26 00:51:16957 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31958 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
959 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
960 kOsCrOS,
961 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
962 },
963 {
[email protected]7c4a9bc2012-09-11 22:10:05964 "enable-background-loader",
965 IDS_ENABLE_BACKLOADER_NAME,
966 IDS_ENABLE_BACKLOADER_DESCRIPTION,
967 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24968 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05969 },
970 {
[email protected]3f4181a2013-02-01 21:31:07971 "enable-screensaver-extension",
972 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
973 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
974 kOsCrOS,
975 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
976 },
977 {
[email protected]0b60afa2012-04-19 17:36:39978 "no-discard-tabs",
979 IDS_FLAGS_NO_DISCARD_TABS_NAME,
980 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
981 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24982 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39983 },
[email protected]ba7df7e2013-07-18 21:49:59984 {
985 "ash-enable-docked-windows",
986 IDS_FLAGS_DOCKED_WINDOWS_NAME,
987 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
988 kOsCrOS,
989 SINGLE_VALUE_TYPE(ash::switches::kAshEnableDockedWindows)
990 },
[email protected]0b60afa2012-04-19 17:36:39991#endif
[email protected]79be6d32012-04-24 20:47:44992 {
[email protected]8d68a3e02013-01-12 15:57:10993 "enable-download-resumption",
994 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
995 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56996 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10997 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
998 },
999 {
[email protected]9a5940d2012-04-27 19:16:231000 "allow-nacl-socket-api",
1001 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1002 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561003 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:231004 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1005 },
[email protected]85333732012-05-01 19:02:241006 {
[email protected]60673ad72012-05-02 06:16:331007 "stacked-tab-strip",
1008 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1009 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1010 kOsWin,
1011 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1012 },
1013 {
[email protected]4bd20202012-06-14 17:35:011014 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241015 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1016 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1017 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011018 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241019 },
[email protected]190349fd2012-05-02 00:10:471020#if defined(OS_CHROMEOS)
1021 {
1022 "allow-touchpad-three-finger-click",
1023 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1024 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1025 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241026 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471027 },
1028#endif
[email protected]53520b1b2012-05-07 21:43:371029#if defined(USE_ASH)
1030 {
[email protected]8257d382013-03-26 13:08:421031 "show-launcher-alignment-menu",
1032 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1033 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421034 kOsAll,
[email protected]8257d382013-03-26 13:08:421035 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421036 },
1037 {
[email protected]2ddf37b2013-04-20 01:15:581038 "disable-minimize-on-second-launcher-item-click",
1039 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1040 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1041 kOsAll,
1042 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1043 },
1044 {
[email protected]73074742012-05-17 01:44:411045 "show-touch-hud",
1046 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1047 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1048 kOsAll,
1049 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1050 },
1051 {
[email protected]9f0940b62012-05-23 22:56:351052 "enable-pinch",
1053 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1054 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061055 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381056 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1057 },
1058 {
[email protected]de0aaed2013-05-27 18:16:431059 "enable-pinch-virtual-viewport",
1060 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1061 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1062 kOsLinux | kOsWin | kOsCrOS,
1063 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1064 },
1065 {
[email protected]a4016f12013-05-02 07:53:471066 "forced-maximize-mode",
1067 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1068 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1069 kOsLinux | kOsWin | kOsCrOS,
1070 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1071 },
[email protected]73074742012-05-17 01:44:411072#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281073#if defined(OS_CHROMEOS)
1074 {
[email protected]8b04a1652012-08-04 02:59:491075 "disable-boot-animation",
1076 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1077 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581078 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241079 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491080 },
[email protected]95058572012-08-20 14:57:291081 {
[email protected]d96aef22012-10-30 11:47:021082 "captive-portal-detector",
1083 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1084 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581085 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021086 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1087 },
1088 {
[email protected]c11aa8f12012-12-18 18:43:141089 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571090 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1091 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1092 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141093 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571094 },
[email protected]f0280952012-11-06 20:30:501095 {
[email protected]53bc4352013-06-24 10:22:371096 "file-manager-show-checkboxes",
1097 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1098 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491099 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371100 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491101 },
1102 {
[email protected]0c02ce292013-07-19 08:27:121103 "file-manager-enable-folder-shortcuts",
1104 IDS_FLAGS_FILE_MANAGER_ENABLE_FOLDER_SHORTCUTS,
1105 IDS_FLAGS_FILE_MANAGER_ENABLE_FOLDER_SHORTCUTS_DESCRIPTION,
1106 kOsCrOS,
1107 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableFolderShortcuts)
1108 },
1109 {
[email protected]f6ded872013-07-23 09:41:361110 "file-manager-enable-webstore-integration",
1111 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1112 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1113 kOsCrOS,
1114 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1115 },
1116 {
[email protected]099b890c2013-04-25 19:16:261117 "disable-quickoffice-component-app",
1118 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1119 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1120 kOsCrOS,
1121 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1122 },
[email protected]62018dc2012-12-13 00:37:351123#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391124 {
[email protected]6247aba2013-03-04 22:57:181125 "views-textfield",
1126 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1127 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391128 kOsWin,
[email protected]6247aba2013-03-04 22:57:181129 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1130 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391131 },
[email protected]bd0cd3bb2012-06-14 03:03:381132 {
[email protected]ffbe5782013-05-09 23:22:081133 "new-dialog-style",
1134 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1135 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321136 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081137 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1138 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321139 },
[email protected]7db8893a2012-07-26 00:49:401140 { "disable-accelerated-video-decode",
1141 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1142 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191143 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401144 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151145 },
[email protected]66ae9fc2012-06-19 21:33:521146#if defined(USE_ASH)
1147 {
1148 "ash-debug-shortcuts",
1149 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1150 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1151 kOsAll,
1152 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1153 },
1154#endif
[email protected]37fee0942012-08-07 21:07:451155 {
[email protected]ad3f6d22012-08-29 02:34:191156 "enable-contacts",
1157 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1158 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1161 },
[email protected]1d9bb9cd2012-08-28 22:02:501162#if defined(USE_ASH)
1163 { "ash-enable-advanced-gestures",
1164 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1165 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1166 kOsCrOS,
1167 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1168 },
[email protected]cfa24e62013-02-13 21:19:111169 { "ash-disable-tab-scrubbing",
1170 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1171 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161172 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111173 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161174 },
[email protected]ad6fcc32013-05-30 03:46:481175 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081176 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1177 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1178 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481179 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081180 },
[email protected]cf2b1a82013-04-20 01:05:431181 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111182 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1183 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241184 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431185 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1186 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241187 },
[email protected]316708a2012-11-05 22:57:021188#if defined(OS_LINUX)
1189 { "ash-enable-memory-monitor",
1190 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1191 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1192 kOsCrOS,
1193 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1194 },
1195#endif
[email protected]1d9bb9cd2012-08-28 22:02:501196#endif
[email protected]9b7ab882012-09-10 23:46:361197#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131198 { "use-new-network-configuration-handlers",
1199 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1200 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1201 kOsCrOS,
1202 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1203 },
[email protected]ce98ef82013-05-31 22:43:241204 { "use-new-network-connection-handler",
1205 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1206 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1207 kOsCrOS,
1208 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1209 },
[email protected]9b7ab882012-09-10 23:46:361210 {
[email protected]354ff2d2013-05-01 17:06:311211 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121212 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1213 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1214 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431215 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableNewAudioHandler,
1216 ash::switches::kAshDisableNewAudioHandler)
[email protected]354ff2d2013-05-01 17:06:311217 },
1218 {
1219 "ash-audio-device-menu",
1220 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1221 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1222 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431223 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1224 ash::switches::kAshDisableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121225 },
1226 {
[email protected]205f07892012-10-16 20:26:221227 "enable-carrier-switching",
1228 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1229 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1230 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241231 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221232 },
1233 {
[email protected]9b7ab882012-09-10 23:46:361234 "enable-request-tablet-site",
1235 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1236 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1237 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241238 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361239 },
1240#endif
[email protected]dab49c0b2012-10-04 05:55:351241 {
1242 "debug-packed-apps",
1243 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1244 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561245 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351246 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1247 },
[email protected]d1459ed2012-10-10 01:29:331248 {
1249 "enable-password-generation",
1250 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1251 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561252 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331253 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1254 },
[email protected]26d045f2012-10-18 21:18:431255 {
[email protected]283cc562013-07-18 08:25:431256 "password-autofill-public-suffix-domain-matching",
1257 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1258 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
[email protected]17b9c742013-06-22 13:48:421259 kOsAndroid,
[email protected]283cc562013-07-18 08:25:431260 ENABLE_DISABLE_VALUE_TYPE(
1261 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1262 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
[email protected]17b9c742013-06-22 13:48:421263 },
1264 {
[email protected]76f7d4882012-10-26 21:09:221265 "enable-deferred-image-decoding",
1266 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1267 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221268 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221269 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1270 },
1271 {
[email protected]075543d2012-10-24 01:29:141272 "performance-monitor-gathering",
1273 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1274 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1275 kOsAll,
1276 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1277 },
[email protected]783d5bb2012-10-24 03:47:141278 {
[email protected]a7259fb2012-11-08 06:22:231279 "enable-experimental-form-filling",
1280 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1281 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1282 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481283 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231284 },
[email protected]6e6efe42013-01-30 00:04:501285 {
[email protected]db3178c2013-03-21 14:54:541286 "wallet-service-use-prod",
1287 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1288 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1289 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481290 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541291 },
1292 {
[email protected]6e6efe42013-01-30 00:04:501293 "enable-interactive-autocomplete",
1294 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1295 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061296 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171297 ENABLE_DISABLE_VALUE_TYPE(
1298 autofill::switches::kEnableInteractiveAutocomplete,
1299 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501300 },
[email protected]177260c2013-04-24 01:47:381301#if defined(USE_AURA)
1302 {
1303 "overscroll-history-navigation",
1304 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1305 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1306 kOsAll,
1307 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1308 switches::kOverscrollHistoryNavigation, "1",
1309 switches::kOverscrollHistoryNavigation, "0")
1310 },
1311#endif
[email protected]edbea622012-11-28 20:39:381312 {
[email protected]888878e82013-07-24 22:49:401313 "scroll-end-effect",
1314 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1315 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1316 kOsCrOS,
1317 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1318 switches::kScrollEndEffect, "1",
1319 switches::kScrollEndEffect, "0")
1320 },
1321 {
[email protected]0222b1b42013-07-26 09:57:001322 "enable-touch-side-bezels",
1323 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1324 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1325 kOsCrOS,
1326 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1327 switches::kTouchSideBezels, "1",
1328 switches::kTouchSideBezels, "0")
1329 },
1330 {
[email protected]edbea622012-11-28 20:39:381331 "enable-touch-drag-drop",
1332 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1333 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1334 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271335 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1336 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381337 },
[email protected]0e2f43b62013-02-21 00:47:151338 {
1339 "enable-touch-editing",
1340 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1341 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1342 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271343 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1344 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151345 },
[email protected]92e12dd92012-12-11 03:33:201346 {
1347 "enable-rich-notifications",
1348 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1349 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361350 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231351 ENABLE_DISABLE_VALUE_TYPE(
1352 message_center::switches::kEnableRichNotifications,
1353 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201354 },
[email protected]4d51c682012-12-11 11:34:551355 {
[email protected]ddec1aa2013-04-28 23:22:451356 "enable-sync-synced-notifications",
1357 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1358 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181359 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451360 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1361 switches::kDisableSyncSyncedNotifications)
1362 },
1363 {
[email protected]a50e16a2013-04-25 14:07:171364 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551365 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1366 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1367 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171368 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551369 },
[email protected]628a69a92012-12-23 04:09:341370 {
[email protected]fd030142013-02-08 02:04:381371 "enable-usermedia-screen-capture",
1372 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1373 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1374 kOsDesktop,
1375 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1376 },
[email protected]5b93e162013-02-19 06:33:091377 {
1378 "enable-apps-devtool-app",
1379 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1380 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1381 kOsDesktop,
1382 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1383 },
[email protected]9323fdd12013-02-23 00:31:361384 {
1385 "impl-side-painting",
1386 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1387 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041388 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361389 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1390 },
[email protected]a42c85f2013-04-04 18:15:121391 {
[email protected]0c04d1c2013-07-10 00:02:321392 "delegated-renderer",
1393 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1394 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1395#ifdef USE_AURA
1396 kOsWin | kOsLinux |
1397#endif
1398 kOsAndroid | kOsCrOS,
1399 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1400 },
1401 {
[email protected]1c92d3e2013-04-18 05:31:391402 "enable-websocket-experimental-implementation",
1403 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1404 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1405 kOsAll,
1406 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1407 },
1408 {
[email protected]a42c85f2013-04-04 18:15:121409 "max-tiles-for-interest-area",
1410 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1411 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1412 kOsAndroid | kOsLinux | kOsCrOS,
1413 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1414 },
[email protected]7cf7ccb2013-04-20 02:53:081415 {
1416 "enable-offline-mode",
1417 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1418 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1419 kOsAll,
1420 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1421 },
[email protected]a3618122013-04-26 21:15:341422 {
1423 "default-tile-width",
1424 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1425 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1426 kOsAll,
1427 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1428 },
1429 {
1430 "default-tile-height",
1431 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1432 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1433 kOsAll,
1434 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1435 },
[email protected]2f2f72b2013-03-08 22:37:311436 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1437#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371438 {
1439 "track-active-visit-time",
1440 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1441 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1442 kOsWin,
1443 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1444 },
[email protected]2f2f72b2013-03-08 22:37:311445#endif
[email protected]8cc71d42013-03-02 17:26:081446#if defined(OS_ANDROID)
1447 {
1448 "disable-gesture-requirement-for-media-playback",
1449 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1450 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1451 kOsAndroid,
1452 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1453 },
1454#endif
[email protected]6077cab2013-03-11 19:36:141455#if defined(ENABLE_GOOGLE_NOW)
1456 {
1457 "enable-google-now",
1458 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1459 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361460 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141461 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1462 },
1463#endif
[email protected]86459e2c2013-04-10 13:39:241464#if defined(OS_CHROMEOS)
1465 {
1466 "enable-virtual-keyboard",
1467 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1468 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1469 kOsCrOS,
1470 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1471 },
1472#endif
[email protected]38484df12013-04-10 16:42:031473 {
1474 "enable-simple-cache-backend",
1475 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1476 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251477 kOsAll,
[email protected]38484df12013-04-10 16:42:031478 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1479 },
[email protected]717e4e22013-04-10 20:52:231480 {
1481 "enable-tcp-fast-open",
1482 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1483 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111484 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231485 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1486 },
[email protected]8027acd2013-04-18 08:35:151487 {
[email protected]58c740f2013-05-06 05:25:441488 "apps-use-native-frame",
1489 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1490 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1491 kOsWin,
1492 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1493 },
[email protected]896d86b32013-05-09 19:36:441494 {
1495 "enable-syncfs-directory-operation",
1496 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1497 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1498 kOsAll,
1499 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1500 },
[email protected]a4ed7e12013-05-24 01:00:281501 {
[email protected]380532aa2013-05-24 11:59:351502 "enable-reset-profile-settings",
1503 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1504 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1505 kOsAll,
1506 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1507 },
[email protected]9f94a6c42013-07-11 18:49:151508 {
1509 "enable-device-discovery",
1510 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1511 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1512 kOsDesktop,
1513 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1514 },
[email protected]56d3c6e42013-05-29 11:28:011515#if defined(OS_MACOSX)
1516 {
1517 "enable-app-list-shim",
1518 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1519 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1520 kOsMac,
1521 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1522 },
[email protected]cb29e162013-05-31 07:47:021523 {
1524 "enable-app-shims",
1525 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1526 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1527 kOsMac,
1528 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1529 },
[email protected]67604442013-06-15 00:04:331530 {
1531 "enable-simplified-fullscreen",
1532 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1533 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1534 kOsMac,
1535 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1536 },
[email protected]56d3c6e42013-05-29 11:28:011537#endif
[email protected]13177832013-05-31 07:46:051538#if defined(OS_CHROMEOS) || defined(OS_WIN)
1539 {
[email protected]6d9087b2013-07-30 08:25:461540 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051541 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1542 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]6d9087b2013-07-30 08:25:461543 kOsCrOS | kOsWin,
1544 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1545 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051546 },
1547#endif
[email protected]910ecfe2013-06-03 23:38:141548#if defined(USE_AURA)
1549 {
1550 "tab-capture-upscale-quality",
1551 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1552 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1553 kOsAll,
1554 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1555 },
1556 {
1557 "tab-capture-downscale-quality",
1558 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1559 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1560 kOsAll,
1561 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1562 },
1563#endif
[email protected]71d4f602013-06-04 23:21:101564 {
[email protected]5e099c62013-06-08 05:46:231565 "enable-spelling-service-feedback",
1566 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1567 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1568 kOsAll,
1569 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1570 },
1571 {
[email protected]71d4f602013-06-04 23:21:101572 "enable-webgl-draft-extensions",
1573 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1574 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1575 kOsAll,
1576 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1577 },
[email protected]deadc492013-06-07 21:39:281578 {
1579 "high-dpi-support",
1580 IDS_FLAGS_HIDPI_NAME,
1581 IDS_FLAGS_HIDPI_DESCRIPTION,
1582 kOsWin,
1583 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1584 switches::kHighDPISupport,"0")
1585 },
[email protected]77e69a512013-06-08 05:56:451586#if defined(OS_CHROMEOS)
1587 {
1588 "enable-quickoffice-editing",
1589 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1590 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1591 kOsCrOS,
1592 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1593 },
[email protected]4b8e2502013-07-23 18:34:361594 {
1595 "enable-sticky-keys",
1596 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1597 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1598 kOsCrOS,
1599 SINGLE_VALUE_TYPE(switches::kEnableStickyKeys),
1600 },
[email protected]77e69a512013-06-08 05:56:451601#endif
[email protected]82ca4212013-06-11 12:09:171602 {
1603 "enable-translate-settings",
1604 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1605 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1606 kOsAll,
1607 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1608 },
[email protected]bc1697a82013-06-27 15:48:311609 {
1610 "enable-web-midi",
1611 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1612 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1613 kOsMac,
1614 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1615 },
[email protected]020df792013-06-29 14:26:211616 {
1617 "enable-new-profile-management",
1618 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1619 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1620 kOsWin,
1621 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1622 },
1623 {
1624 "enable-gaia-profile-info",
1625 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1626 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221627 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211628 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1629 },
[email protected]dcf6cf32013-07-03 10:53:281630#if defined(OS_WIN)
1631 {
1632 "disable-app-launcher",
1633 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1634 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
1635 kOsAll,
1636 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1637 },
1638#endif
[email protected]57b6f6e2013-07-13 03:03:351639 {
1640 "enable-device-motion",
1641 IDS_FLAGS_ENABLE_DEVICE_MOTION_NAME,
1642 IDS_FLAGS_ENABLE_DEVICE_MOTION_DESCRIPTION,
1643 kOsAndroid,
1644 SINGLE_VALUE_TYPE(switches::kEnableDeviceMotion)
1645 },
[email protected]a0e4b072011-08-17 01:47:071646};
[email protected]ad2a3ded2010-08-27 13:19:051647
[email protected]a314ee5a2010-10-26 21:23:281648const Experiment* experiments = kExperiments;
1649size_t num_experiments = arraysize(kExperiments);
1650
[email protected]e2ddbc92010-10-15 20:02:071651// Stores and encapsulates the little state that about:flags has.
1652class FlagsState {
1653 public:
1654 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401655 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1656 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071657 bool IsRestartNeededToCommitChanges();
1658 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401659 FlagsStorage* flags_storage,
1660 const std::string& internal_name,
1661 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071662 void RemoveFlagsSwitches(
1663 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401664 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071665 void reset();
1666
1667 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551668 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071669 return Singleton<FlagsState>::get();
1670 }
1671
1672 private:
1673 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531674 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071675
1676 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1677};
1678
[email protected]8a6ff28d2010-12-02 16:35:191679// Adds the internal names for the specified experiment to |names|.
1680void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1681 if (e.type == Experiment::SINGLE_VALUE) {
1682 names->insert(e.internal_name);
1683 } else {
[email protected]83e9fa702013-02-25 19:30:441684 DCHECK(e.type == Experiment::MULTI_VALUE ||
1685 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191686 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441687 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191688 }
1689}
1690
[email protected]28e35af2011-02-09 12:56:221691// Confirms that an experiment is valid, used in a DCHECK in
1692// SanitizeList below.
1693bool ValidateExperiment(const Experiment& e) {
1694 switch (e.type) {
1695 case Experiment::SINGLE_VALUE:
1696 DCHECK_EQ(0, e.num_choices);
1697 DCHECK(!e.choices);
1698 break;
1699 case Experiment::MULTI_VALUE:
1700 DCHECK_GT(e.num_choices, 0);
1701 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531702 DCHECK(e.choices[0].command_line_switch);
1703 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221704 break;
[email protected]83e9fa702013-02-25 19:30:441705 case Experiment::ENABLE_DISABLE_VALUE:
1706 DCHECK_EQ(3, e.num_choices);
1707 DCHECK(!e.choices);
1708 DCHECK(e.command_line_switch);
1709 DCHECK(e.command_line_value);
1710 DCHECK(e.disable_command_line_switch);
1711 DCHECK(e.disable_command_line_value);
1712 break;
[email protected]28e35af2011-02-09 12:56:221713 default:
1714 NOTREACHED();
1715 }
1716 return true;
1717}
1718
[email protected]ad2a3ded2010-08-27 13:19:051719// Removes all experiments from prefs::kEnabledLabsExperiments that are
1720// unknown, to prevent this list to become very long as experiments are added
1721// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401722void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051723 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221724 for (size_t i = 0; i < num_experiments; ++i) {
1725 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191726 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221727 }
[email protected]ad2a3ded2010-08-27 13:19:051728
[email protected]07d666d2013-07-21 23:56:261729 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051730
1731 std::set<std::string> new_enabled_experiments;
1732 std::set_intersection(
1733 known_experiments.begin(), known_experiments.end(),
1734 enabled_experiments.begin(), enabled_experiments.end(),
1735 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1736
[email protected]07d666d2013-07-21 23:56:261737 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401738 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051739}
1740
[email protected]1a47d7e2010-10-15 00:37:241741void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401742 FlagsStorage* flags_storage, std::set<std::string>* result) {
1743 SanitizeList(flags_storage);
1744 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051745}
1746
[email protected]a314ee5a2010-10-26 21:23:281747// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1748// enabled on the current platform.
1749void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401750 FlagsStorage* flags_storage, std::set<std::string>* result) {
1751 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281752
1753 // Filter out any experiments that aren't enabled on the current platform. We
1754 // don't remove these from prefs else syncing to a platform with a different
1755 // set of experiments would be lossy.
1756 std::set<std::string> platform_experiments;
1757 int current_platform = GetCurrentPlatform();
1758 for (size_t i = 0; i < num_experiments; ++i) {
1759 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191760 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581761#if defined(OS_CHROMEOS)
1762 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1763 AddInternalName(experiments[i], &platform_experiments);
1764#endif
[email protected]a314ee5a2010-10-26 21:23:281765 }
1766
1767 std::set<std::string> new_enabled_experiments;
1768 std::set_intersection(
1769 platform_experiments.begin(), platform_experiments.end(),
1770 result->begin(), result->end(),
1771 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1772
1773 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051774}
1775
[email protected]8a6ff28d2010-12-02 16:35:191776// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191777Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221778 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441779 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1780 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191781 ListValue* result = new ListValue;
1782 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191783 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441784 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191785 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441786 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221787 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191788 result->Append(value);
1789 }
1790 return result;
1791}
1792
[email protected]e2ddbc92010-10-15 20:02:071793} // namespace
1794
[email protected]83e9fa702013-02-25 19:30:441795std::string Experiment::NameForChoice(int index) const {
1796 DCHECK(type == Experiment::MULTI_VALUE ||
1797 type == Experiment::ENABLE_DISABLE_VALUE);
1798 DCHECK_LT(index, num_choices);
1799 return std::string(internal_name) + testing::kMultiSeparator +
1800 base::IntToString(index);
1801}
1802
1803string16 Experiment::DescriptionForChoice(int index) const {
1804 DCHECK(type == Experiment::MULTI_VALUE ||
1805 type == Experiment::ENABLE_DISABLE_VALUE);
1806 DCHECK_LT(index, num_choices);
1807 int description_id;
1808 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1809 const int kEnableDisableDescriptionIds[] = {
1810 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1811 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1812 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1813 };
1814 description_id = kEnableDisableDescriptionIds[index];
1815 } else {
1816 description_id = choices[index].description_id;
1817 }
1818 return l10n_util::GetStringUTF16(description_id);
1819}
1820
[email protected]e6d1c4f2013-06-12 17:37:401821void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1822 CommandLine* command_line) {
1823 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1824 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051825}
1826
[email protected]6d98abf2013-06-17 23:35:511827bool AreSwitchesIdenticalToCurrentCommandLine(
1828 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1829 std::set<CommandLine::StringType> new_flags =
1830 ExtractFlagsFromCommandLine(new_cmdline);
1831 std::set<CommandLine::StringType> active_flags =
1832 ExtractFlagsFromCommandLine(active_cmdline);
1833
1834 // Needed because std::equal doesn't check if the 2nd set is empty.
1835 if (new_flags.size() != active_flags.size())
1836 return false;
1837
1838 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1839}
1840
[email protected]e6d1c4f2013-06-12 17:37:401841void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521842 FlagAccess access,
1843 base::ListValue* supported_experiments,
1844 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051845 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401846 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051847
1848 int current_platform = GetCurrentPlatform();
1849
[email protected]a314ee5a2010-10-26 21:23:281850 for (size_t i = 0; i < num_experiments; ++i) {
1851 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051852
1853 DictionaryValue* data = new DictionaryValue();
1854 data->SetString("internal_name", experiment.internal_name);
1855 data->SetString("name",
1856 l10n_util::GetStringUTF16(experiment.visible_name_id));
1857 data->SetString("description",
1858 l10n_util::GetStringUTF16(
1859 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401860
1861 ListValue* supported_platforms = new ListValue();
1862 AddOsStrings(experiment.supported_platforms, supported_platforms);
1863 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051864
[email protected]28e35af2011-02-09 12:56:221865 switch (experiment.type) {
1866 case Experiment::SINGLE_VALUE:
1867 data->SetBoolean(
1868 "enabled",
1869 enabled_experiments.count(experiment.internal_name) > 0);
1870 break;
1871 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441872 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221873 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1874 break;
1875 default:
1876 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191877 }
1878
[email protected]ee28495a2013-05-20 04:10:521879 bool supported = (experiment.supported_platforms & current_platform) != 0;
1880#if defined(OS_CHROMEOS)
1881 if (access == kOwnerAccessToFlags &&
1882 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1883 supported = true;
1884 }
1885#endif
1886 if (supported)
1887 supported_experiments->Append(data);
1888 else
1889 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051890 }
[email protected]ad2a3ded2010-08-27 13:19:051891}
1892
[email protected]ad2a3ded2010-08-27 13:19:051893bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551894 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051895}
1896
[email protected]e6d1c4f2013-06-12 17:37:401897void SetExperimentEnabled(FlagsStorage* flags_storage,
1898 const std::string& internal_name,
1899 bool enable) {
1900 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1901 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071902}
1903
1904void RemoveFlagsSwitches(
1905 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551906 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071907}
1908
[email protected]e6d1c4f2013-06-12 17:37:401909void ResetAllFlags(FlagsStorage* flags_storage) {
1910 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001911}
1912
[email protected]a314ee5a2010-10-26 21:23:281913int GetCurrentPlatform() {
1914#if defined(OS_MACOSX)
1915 return kOsMac;
1916#elif defined(OS_WIN)
1917 return kOsWin;
1918#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1919 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211920#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281921 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401922#elif defined(OS_ANDROID)
1923 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281924#else
1925#error Unknown platform
1926#endif
1927}
1928
[email protected]e6d1c4f2013-06-12 17:37:401929void RecordUMAStatistics(FlagsStorage* flags_storage) {
1930 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541931 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1932 ++it) {
1933 std::string action("AboutFlags_");
1934 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381935 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541936 }
1937 // Since flag metrics are recorded every startup, add a tick so that the
1938 // stats can be made meaningful.
1939 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381940 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1941 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541942}
1943
[email protected]e2ddbc92010-10-15 20:02:071944//////////////////////////////////////////////////////////////////////////////
1945// FlagsState implementation.
1946
1947namespace {
1948
[email protected]83e9fa702013-02-25 19:30:441949typedef std::map<std::string, std::pair<std::string, std::string> >
1950 NameToSwitchAndValueMap;
1951
1952void SetFlagToSwitchMapping(const std::string& key,
1953 const std::string& switch_name,
1954 const std::string& switch_value,
1955 NameToSwitchAndValueMap* name_to_switch_map) {
1956 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1957 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1958}
1959
[email protected]e2ddbc92010-10-15 20:02:071960void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401961 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071962 if (command_line->HasSwitch(switches::kNoExperiments))
1963 return;
1964
1965 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001966
[email protected]e6d1c4f2013-06-12 17:37:401967 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1968 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071969
[email protected]a82744532011-02-11 16:15:531970 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191971 for (size_t i = 0; i < num_experiments; ++i) {
1972 const Experiment& e = experiments[i];
1973 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441974 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1975 e.command_line_value, &name_to_switch_map);
1976 } else if (e.type == Experiment::MULTI_VALUE) {
1977 for (int j = 0; j < e.num_choices; ++j) {
1978 SetFlagToSwitchMapping(e.NameForChoice(j),
1979 e.choices[j].command_line_switch,
1980 e.choices[j].command_line_value,
1981 &name_to_switch_map);
1982 }
[email protected]8a6ff28d2010-12-02 16:35:191983 } else {
[email protected]83e9fa702013-02-25 19:30:441984 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1985 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1986 &name_to_switch_map);
1987 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1988 e.command_line_value, &name_to_switch_map);
1989 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1990 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191991 }
1992 }
[email protected]e2ddbc92010-10-15 20:02:071993
1994 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531995 flags_switches_.insert(
1996 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1997 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071998 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1999 it != enabled_experiments.end();
2000 ++it) {
2001 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532002 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192003 name_to_switch_map.find(experiment_name);
2004 if (name_to_switch_it == name_to_switch_map.end()) {
2005 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072006 continue;
[email protected]8a6ff28d2010-12-02 16:35:192007 }
[email protected]e2ddbc92010-10-15 20:02:072008
[email protected]a82744532011-02-11 16:15:532009 const std::pair<std::string, std::string>&
2010 switch_and_value_pair = name_to_switch_it->second;
2011
2012 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2013 switch_and_value_pair.second);
2014 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072015 }
2016 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:532017 flags_switches_.insert(
2018 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2019 std::string()));
[email protected]e2ddbc92010-10-15 20:02:072020}
2021
2022bool FlagsState::IsRestartNeededToCommitChanges() {
2023 return needs_restart_;
2024}
2025
[email protected]e6d1c4f2013-06-12 17:37:402026void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2027 const std::string& internal_name,
2028 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442029 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192030 if (at_index != std::string::npos) {
2031 DCHECK(enable);
2032 // We're being asked to enable a multi-choice experiment. Disable the
2033 // currently selected choice.
2034 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222035 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402036 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192037
[email protected]28e35af2011-02-09 12:56:222038 // And enable the new choice, if it is not the default first choice.
2039 if (internal_name != experiment_name + "@0") {
2040 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402041 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082042 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402043 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222044 }
[email protected]8a6ff28d2010-12-02 16:35:192045 return;
2046 }
2047
[email protected]ad2a3ded2010-08-27 13:19:052048 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402049 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052050
[email protected]8a6ff28d2010-12-02 16:35:192051 const Experiment* e = NULL;
2052 for (size_t i = 0; i < num_experiments; ++i) {
2053 if (experiments[i].internal_name == internal_name) {
2054 e = experiments + i;
2055 break;
2056 }
2057 }
2058 DCHECK(e);
2059
2060 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592061 if (enable)
[email protected]147492b2013-03-19 23:52:082062 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592063 else
[email protected]147492b2013-03-19 23:52:082064 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192065 } else {
2066 if (enable) {
2067 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082068 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192069 } else {
2070 // Find the currently enabled choice and disable it.
2071 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442072 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192073 if (enabled_experiments.find(choice_name) !=
2074 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082075 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192076 enabled_experiments.erase(choice_name);
2077 // Continue on just in case there's a bug and more than one
2078 // experiment for this choice was enabled.
2079 }
2080 }
2081 }
2082 }
[email protected]ad2a3ded2010-08-27 13:19:052083
[email protected]e6d1c4f2013-06-12 17:37:402084 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052085}
2086
[email protected]e2ddbc92010-10-15 20:02:072087void FlagsState::RemoveFlagsSwitches(
2088 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532089 for (std::map<std::string, std::string>::const_iterator
2090 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2091 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072092 }
2093}
2094
[email protected]e6d1c4f2013-06-12 17:37:402095void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002096 needs_restart_ = true;
2097
2098 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402099 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002100}
2101
[email protected]e2ddbc92010-10-15 20:02:072102void FlagsState::reset() {
2103 needs_restart_ = false;
2104 flags_switches_.clear();
2105}
2106
[email protected]38e46812011-05-09 20:49:222107} // namespace
[email protected]e2ddbc92010-10-15 20:02:072108
2109namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192110
2111// WARNING: '@' is also used in the html file. If you update this constant you
2112// also need to update the html file.
2113const char kMultiSeparator[] = "@";
2114
[email protected]e2ddbc92010-10-15 20:02:072115void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552116 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072117}
[email protected]a314ee5a2010-10-26 21:23:282118
2119void SetExperiments(const Experiment* e, size_t count) {
2120 if (!e) {
2121 experiments = kExperiments;
2122 num_experiments = arraysize(kExperiments);
2123 } else {
2124 experiments = e;
2125 num_experiments = count;
2126 }
2127}
2128
[email protected]8a6ff28d2010-12-02 16:35:192129const Experiment* GetExperiments(size_t* count) {
2130 *count = num_experiments;
2131 return experiments;
2132}
2133
[email protected]e2ddbc92010-10-15 20:02:072134} // namespace testing
2135
[email protected]1a47d7e2010-10-15 00:37:242136} // namespace about_flags