blob: 1d42cfb1174712701073fe01248fa3333c37cdd6 [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 {
421 "disable-webgl",
422 IDS_FLAGS_DISABLE_WEBGL_NAME,
423 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28424 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12425 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
426 },
[email protected]09096e02012-05-24 11:12:04427 {
[email protected]ce585bf2013-03-14 16:25:16428 "disable-webrtc",
429 IDS_FLAGS_DISABLE_WEBRTC_NAME,
430 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05431 kOsAndroid,
432#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16433 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05434#else
435 SINGLE_VALUE_TYPE("")
436#endif
437 },
[email protected]5e2bc8c2013-05-28 22:59:57438#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30439 {
440 "enable-sctp-data-channels",
441 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
442 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
443 kOsAll,
444 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
445 },
[email protected]c1298742013-07-17 04:06:32446 {
[email protected]f1045f02013-08-02 23:19:35447 "disable-device-enumeration",
448 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
449 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
[email protected]c1298742013-07-17 04:06:32450 kOsAll,
[email protected]f1045f02013-08-02 23:19:35451 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
[email protected]c1298742013-07-17 04:06:32452 },
[email protected]5e2bc8c2013-05-28 22:59:57453#endif
[email protected]34cb5292013-04-15 06:06:31454#if defined(OS_ANDROID)
455 {
[email protected]7b8a31632013-06-13 22:42:37456 "disable-webaudio",
457 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
458 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31459 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37460 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31461 },
462#endif
[email protected]d9da9582013-01-31 04:59:05463 {
[email protected]96bcdc102012-05-24 23:42:10464 "fixed-position-creates-stacking-context",
465 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
466 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
467 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44468 ENABLE_DISABLE_VALUE_TYPE(
469 switches::kEnableFixedPositionCreatesStackingContext,
470 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10471 },
[email protected]fb854192013-02-06 01:30:04472 {
473 "enable-compositing-for-fixed-position",
474 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
475 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
476 kOsAll,
477 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
478 },
[email protected]d8221b22013-05-23 05:35:43479 {
480 "enable-compositing-for-transition",
481 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
482 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
483 kOsAll,
484 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
485 },
[email protected]06fc4d3b2013-07-08 21:07:24486 {
487 "enable-accelerated-fixed-root-background",
488 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
489 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
490 kOsAll,
491 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
492 },
[email protected]a7640ef22012-10-06 00:52:08493 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53494 {
[email protected]e3791ce92011-08-09 01:03:32495 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40496 IDS_FLAGS_ENABLE_NACL_NAME,
497 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56498 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19499 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40500 },
501 {
[email protected]9addd1c2012-09-15 14:28:24502 "enable-nacl-debug", // FLAGS:RECORD_UMA
503 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
504 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56505 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24506 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13507 },
508 {
[email protected]66f409c2012-10-04 20:59:04509 "nacl-debug-mask", // FLAGS:RECORD_UMA
510 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
511 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56512 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04513 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
514 },
515 {
[email protected]df4015352013-07-26 23:18:18516 "disable-pnacl", // FLAGS:RECORD_UMA
517 IDS_FLAGS_PNACL_NAME,
518 IDS_FLAGS_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56519 kOsDesktop,
[email protected]df4015352013-07-26 23:18:18520 ENABLE_DISABLE_VALUE_TYPE("", switches::kDisablePnacl)
[email protected]7babd1c2012-08-08 20:35:29521 },
522 {
[email protected]4bc5050c2010-11-18 17:55:54523 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32524 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
525 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56526 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51527 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32528 },
[email protected]3627b06d2010-11-12 16:36:16529 {
[email protected]ac2e2acd2013-03-21 12:57:29530 "extensions-on-chrome-urls",
531 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
532 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
533 kOsAll,
[email protected]49d9b142013-07-19 08:50:27534 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29535 },
536 {
[email protected]88c92012013-07-02 11:56:34537 "enable-fast-unload",
538 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
539 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
540 kOsAll,
541 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
542 },
543 {
[email protected]e9cddd52013-03-23 17:37:53544 "enable-adview",
545 IDS_FLAGS_ENABLE_ADVIEW_NAME,
546 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
547 kOsDesktop,
548 SINGLE_VALUE_TYPE(switches::kEnableAdview)
549 },
550 {
551 "enable-adview-src-attribute",
552 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
553 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
554 kOsDesktop,
555 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
556 },
557 {
[email protected]1f4da9e2013-06-27 05:23:44558 "enable-app-window-controls",
559 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
560 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
561 kOsDesktop,
562 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
563 },
564 {
[email protected]3a362432012-06-18 20:39:51565 "script-badges",
566 IDS_FLAGS_SCRIPT_BADGES_NAME,
567 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56568 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09569 SINGLE_VALUE_TYPE(switches::kScriptBadges)
570 },
571 {
572 "script-bubble",
573 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
574 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56575 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44576 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
577 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51578 },
579 {
[email protected]cbe224d2011-08-04 22:12:49580 "apps-new-install-bubble",
581 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
582 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56583 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49584 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
585 },
586 {
[email protected]80bd24e2010-11-30 09:34:38587 "disable-hyperlink-auditing",
588 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
589 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
590 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19591 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51592 },
593 {
594 "experimental-location-features", // FLAGS:RECORD_UMA
595 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
596 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
597 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19598 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
599 },
600 {
[email protected]5aea1862011-03-23 23:55:39601 "tab-groups-context-menu",
602 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
603 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
604 kOsWin,
605 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
606 },
[email protected]c94cebd2012-06-21 00:55:28607 {
608 "enable-instant-extended-api",
609 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
610 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46611 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51612 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
613 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28614 },
[email protected]e9bf9d92011-03-31 20:57:15615 {
[email protected]8cc9e532013-05-06 21:01:47616 "enable-local-first-load-ntp",
617 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
618 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46619 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47620 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
621 switches::kDisableLocalFirstLoadNTP)
622 },
[email protected]333bdc52013-07-16 00:37:04623#if defined(OS_ANDROID)
624 {
625 "enable-new-ntp",
626 IDS_FLAGS_ENABLE_NEW_NTP,
627 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
628 kOsAndroid,
629 SINGLE_VALUE_TYPE(switches::kEnableNewNTP)
630 },
631#endif
[email protected]8cc9e532013-05-06 21:01:47632 {
[email protected]354e33b2011-06-15 00:29:10633 "static-ip-config",
634 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
635 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
636 kOsCrOS,
637#if defined(OS_CHROMEOS)
638 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24639 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10640#else
641 SINGLE_VALUE_TYPE("")
642#endif
643 },
[email protected]3eb5728c2011-06-20 22:32:24644 {
645 "show-autofill-type-predictions",
646 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
647 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
648 kOsAll,
[email protected]e217c5632013-04-12 19:11:48649 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24650 },
[email protected]bff4d3e2011-06-21 23:58:52651 {
[email protected]e755a382012-09-13 17:16:35652 "enable-gesture-tap-highlight",
653 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
654 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
655 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47656 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
657 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35658 },
659 {
[email protected]a22ebd812011-06-23 00:05:39660 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
661 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
662 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
663 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40664 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25665 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39666 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
667 },
[email protected]81a6b0b2011-06-24 17:55:40668 {
[email protected]7e7a28092011-12-09 22:24:55669 "enable-panels",
670 IDS_FLAGS_ENABLE_PANELS_NAME,
671 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56672 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55673 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54674 },
[email protected]e3749d12011-07-25 22:22:12675 {
[email protected]27c14f02012-06-22 17:29:58676 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27677 "save-page-as-mhtml", // FLAGS:RECORD_UMA
678 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
679 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
680 kOsMac | kOsWin | kOsLinux,
681 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
682 },
683 {
[email protected]b7bb44f2011-09-01 05:17:03684 "enable-autologin",
685 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
686 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
687 kOsMac | kOsWin | kOsLinux,
688 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
689 },
[email protected]b9841172011-09-26 23:36:09690 {
[email protected]903e63382013-06-01 00:40:58691 "enable-quic",
692 IDS_FLAGS_ENABLE_QUIC_NAME,
693 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
694 kOsAll,
695 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
696 switches::kDisableQuic)
697 },
698 {
[email protected]eb8f88e2013-07-15 09:52:17699 "enable-quic-https",
700 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
701 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
702 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00703 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
704 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17705 },
706 {
[email protected]bca09b9982013-06-27 22:30:46707 "enable-spdy4a2",
708 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
709 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
710 kOsAll,
711 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
712 },
713 {
[email protected]88a332622013-07-30 07:13:32714 "enable-http2-draft-04",
715 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
716 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
717 kOsAll,
718 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
719 },
720 {
[email protected]27b3fe92012-03-21 05:35:06721 "enable-async-dns",
722 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
723 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46724 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44725 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
726 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06727 },
728 {
[email protected]1eb93802012-09-11 18:57:56729 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31730 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
731 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32732 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31733 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44734 },
[email protected]e4e68dbb2011-11-18 01:50:22735 {
[email protected]16c242d2013-05-31 23:56:47736 "enable-encrypted-media",
737 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
738 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50739 kOsAll,
[email protected]16c242d2013-05-31 23:56:47740 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
741 },
742 {
743 "disable-encrypted-media",
744 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
745 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50746 kOsAll,
[email protected]16c242d2013-05-31 23:56:47747 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03748 },
[email protected]f88628792012-12-18 07:07:50749 {
[email protected]d21ead42013-06-24 06:35:06750 "override-encrypted-media-canplaytype",
751 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
752 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
753 kOsMac | kOsWin,
754 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
755 },
756 {
[email protected]f88628792012-12-18 07:07:50757 "enable-opus-playback",
758 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
759 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56760 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50761 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
762 },
[email protected]b150b5532013-06-15 00:50:54763 {
[email protected]6ac955b2013-04-19 23:43:32764 "enable-vp8-alpha-playback",
765 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
766 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
767 kOsDesktop,
768 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
769 },
770 {
[email protected]ca6eaa5a2013-01-24 16:16:04771 "enable-managed-users",
772 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
773 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08774 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04775 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
776 },
[email protected]dc04be7c2012-03-15 23:57:49777#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50778 {
[email protected]2a13a9a2013-04-19 04:00:21779 "ash-disable-auto-maximizing",
780 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
781 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
782 kOsWin | kOsLinux | kOsCrOS,
783 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
784 },
785 {
[email protected]cda278d2012-10-30 20:31:40786 "ash-disable-auto-window-placement",
787 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
788 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
789 kOsWin | kOsLinux | kOsCrOS,
790 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
791 },
[email protected]b4e4ec42012-11-29 21:42:40792 {
[email protected]16f55a22013-02-13 23:47:34793 "ash-disable-per-app-launcher",
794 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
795 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40796 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34797 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40798 },
[email protected]dc04be7c2012-03-15 23:57:49799#endif
[email protected]eaae8b462012-01-20 22:20:39800 {
[email protected]db543d322011-12-15 20:40:15801 "per-tile-painting",
802 IDS_FLAGS_PER_TILE_PAINTING_NAME,
803 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37804 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37805 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15806 },
[email protected]bf88c032011-12-22 19:05:47807 {
808 "enable-javascript-harmony",
809 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
810 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
811 kOsAll,
812 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
813 },
[email protected]7e7f378a2012-01-05 14:35:37814 {
[email protected]85646172012-01-09 22:45:54815 "enable-tab-browser-dragging",
816 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
817 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
818 kOsWin,
819 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
820 },
821 {
[email protected]068b7b52012-02-27 12:41:44822 "disable-restore-session-state",
823 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
824 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37825 kOsAll,
[email protected]068b7b52012-02-27 12:41:44826 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37827 },
[email protected]88864db2012-01-18 20:56:35828 {
829 "disable-software-rasterizer",
830 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
831 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
832#if defined(ENABLE_SWIFTSHADER)
833 kOsAll,
834#else
835 0,
836#endif
837 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
838 },
[email protected]15a5d722012-01-23 09:11:14839 {
[email protected]c1b18ea2013-07-10 13:01:16840 "enable-experimental-web-platform-features",
841 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
842 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16843 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16844 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49845 },
846 {
[email protected]0f95a252012-09-13 22:30:04847 "enable-css-shaders",
848 IDS_FLAGS_CSS_SHADERS_NAME,
849 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
850 kOsAll,
851 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
852 },
853 {
[email protected]3e8befc2012-03-13 01:17:03854 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16855 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
856 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56857 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03858 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16859 },
[email protected]dc04be7c2012-03-15 23:57:49860#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01861 {
[email protected]3cd198a22012-03-12 20:38:01862 "enable-ash-oak",
863 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
864 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
865 kOsAll,
866 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
867 },
[email protected]31cf1c52012-02-29 20:55:01868#endif
[email protected]184ec592012-03-01 11:54:28869 {
870 "enable-devtools-experiments",
871 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
872 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56873 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28874 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
875 },
[email protected]76d1854e2012-03-02 23:57:44876 {
[email protected]3db81f242013-07-12 08:56:17877 "remote-debugging-raw-usb",
878 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
879 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
[email protected]be99de42013-07-12 13:51:16880 kOsDesktop,
[email protected]3db81f242013-07-12 08:56:17881 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
882 },
883 {
[email protected]2fefdb32013-02-26 14:28:10884 "silent-debugger-extension-api",
885 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
886 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
887 kOsDesktop,
888 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
889 },
890 {
[email protected]76d1854e2012-03-02 23:57:44891 "enable-suggestions-ntp",
892 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
893 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56894 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44895 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
896 },
[email protected]a3d54252012-04-05 20:04:13897 {
[email protected]1dbaf5e2012-11-30 05:51:32898 "spellcheck-autocorrect",
899 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
900 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
901 kOsWin | kOsLinux | kOsCrOS,
902 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
903 },
904 {
[email protected]e27137282013-06-20 02:38:35905 "enable-scroll-prediction",
906 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
907 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
908 kOsDesktop,
909 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
910 },
911 {
[email protected]d7932532012-11-21 21:10:31912 "touch-events",
913 IDS_TOUCH_EVENTS_NAME,
914 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56915 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31916 MULTI_VALUE_TYPE(kTouchEventsChoices)
917 },
918 {
[email protected]c9c73ad42012-04-18 03:35:59919 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06920 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
921 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55922 kOsWin,
[email protected]347a0c72012-05-14 20:28:06923 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59924 },
[email protected]8a6aaa72012-04-20 20:53:58925 {
[email protected]b9c96ff2012-11-26 22:24:40926 "disable-touch-adjustment",
927 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
928 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
929 kOsWin | kOsLinux | kOsCrOS,
930 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
931 },
[email protected]0b60afa2012-04-19 17:36:39932#if defined(OS_CHROMEOS)
933 {
[email protected]690de0f2013-06-26 00:51:16934 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31935 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
936 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
937 kOsCrOS,
938 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
939 },
940 {
[email protected]7c4a9bc2012-09-11 22:10:05941 "enable-background-loader",
942 IDS_ENABLE_BACKLOADER_NAME,
943 IDS_ENABLE_BACKLOADER_DESCRIPTION,
944 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24945 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05946 },
947 {
[email protected]3f4181a2013-02-01 21:31:07948 "enable-screensaver-extension",
949 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
950 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
951 kOsCrOS,
952 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
953 },
954 {
[email protected]0b60afa2012-04-19 17:36:39955 "no-discard-tabs",
956 IDS_FLAGS_NO_DISCARD_TABS_NAME,
957 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
958 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24959 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39960 },
[email protected]ba7df7e2013-07-18 21:49:59961 {
962 "ash-enable-docked-windows",
963 IDS_FLAGS_DOCKED_WINDOWS_NAME,
964 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
965 kOsCrOS,
966 SINGLE_VALUE_TYPE(ash::switches::kAshEnableDockedWindows)
967 },
[email protected]0b60afa2012-04-19 17:36:39968#endif
[email protected]79be6d32012-04-24 20:47:44969 {
[email protected]8d68a3e02013-01-12 15:57:10970 "enable-download-resumption",
971 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
972 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56973 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10974 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
975 },
976 {
[email protected]9a5940d2012-04-27 19:16:23977 "allow-nacl-socket-api",
978 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
979 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56980 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23981 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
982 },
[email protected]85333732012-05-01 19:02:24983 {
[email protected]60673ad72012-05-02 06:16:33984 "stacked-tab-strip",
985 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
986 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
987 kOsWin,
988 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
989 },
990 {
[email protected]4bd20202012-06-14 17:35:01991 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24992 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
993 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
994 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01995 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24996 },
[email protected]190349fd2012-05-02 00:10:47997#if defined(OS_CHROMEOS)
998 {
999 "allow-touchpad-three-finger-click",
1000 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1001 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1002 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241003 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471004 },
1005#endif
[email protected]53520b1b2012-05-07 21:43:371006#if defined(USE_ASH)
1007 {
[email protected]8257d382013-03-26 13:08:421008 "show-launcher-alignment-menu",
[email protected]81dd43d2013-08-06 05:58:271009 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
1010 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421011 kOsAll,
[email protected]81dd43d2013-08-06 05:58:271012 SINGLE_VALUE_TYPE(switches::kShowShelfAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421013 },
1014 {
[email protected]2ddf37b2013-04-20 01:15:581015 "disable-minimize-on-second-launcher-item-click",
1016 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1017 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1018 kOsAll,
1019 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1020 },
1021 {
[email protected]d24ce2c2013-08-01 15:14:191022 "enable-overview-mode",
1023 IDS_FLAGS_OVERVIEW_MODE_NAME,
1024 IDS_FLAGS_OVERVIEW_MODE_DESCRIPTION,
1025 kOsCrOS,
1026 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOverviewMode)
1027 },
1028 {
[email protected]73074742012-05-17 01:44:411029 "show-touch-hud",
1030 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1031 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1032 kOsAll,
1033 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1034 },
1035 {
[email protected]9f0940b62012-05-23 22:56:351036 "enable-pinch",
1037 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1038 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061039 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381040 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1041 },
1042 {
[email protected]de0aaed2013-05-27 18:16:431043 "enable-pinch-virtual-viewport",
1044 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1045 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1046 kOsLinux | kOsWin | kOsCrOS,
1047 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1048 },
1049 {
[email protected]a4016f12013-05-02 07:53:471050 "forced-maximize-mode",
1051 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1052 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1053 kOsLinux | kOsWin | kOsCrOS,
1054 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1055 },
[email protected]73074742012-05-17 01:44:411056#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281057#if defined(OS_CHROMEOS)
1058 {
[email protected]8b04a1652012-08-04 02:59:491059 "disable-boot-animation",
1060 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1061 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581062 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241063 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491064 },
[email protected]95058572012-08-20 14:57:291065 {
[email protected]d96aef22012-10-30 11:47:021066 "captive-portal-detector",
1067 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1068 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581069 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021070 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1071 },
1072 {
[email protected]c11aa8f12012-12-18 18:43:141073 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571074 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1075 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1076 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141077 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571078 },
[email protected]f0280952012-11-06 20:30:501079 {
[email protected]53bc4352013-06-24 10:22:371080 "file-manager-show-checkboxes",
1081 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1082 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491083 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371084 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491085 },
1086 {
[email protected]f6ded872013-07-23 09:41:361087 "file-manager-enable-webstore-integration",
1088 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1089 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1090 kOsCrOS,
1091 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1092 },
1093 {
[email protected]099b890c2013-04-25 19:16:261094 "disable-quickoffice-component-app",
1095 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1096 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1097 kOsCrOS,
1098 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1099 },
[email protected]62018dc2012-12-13 00:37:351100#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391101 {
[email protected]6247aba2013-03-04 22:57:181102 "views-textfield",
1103 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1104 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391105 kOsWin,
[email protected]6247aba2013-03-04 22:57:181106 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1107 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391108 },
[email protected]bd0cd3bb2012-06-14 03:03:381109 {
[email protected]ffbe5782013-05-09 23:22:081110 "new-dialog-style",
1111 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1112 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321113 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081114 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1115 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321116 },
[email protected]7db8893a2012-07-26 00:49:401117 { "disable-accelerated-video-decode",
1118 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1119 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191120 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401121 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151122 },
[email protected]66ae9fc2012-06-19 21:33:521123#if defined(USE_ASH)
1124 {
1125 "ash-debug-shortcuts",
1126 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1127 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1128 kOsAll,
1129 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1130 },
1131#endif
[email protected]37fee0942012-08-07 21:07:451132 {
[email protected]ad3f6d22012-08-29 02:34:191133 "enable-contacts",
1134 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1135 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1136 kOsCrOS,
1137 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1138 },
[email protected]1d9bb9cd2012-08-28 22:02:501139#if defined(USE_ASH)
1140 { "ash-enable-advanced-gestures",
1141 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1142 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1143 kOsCrOS,
1144 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1145 },
[email protected]cfa24e62013-02-13 21:19:111146 { "ash-disable-tab-scrubbing",
1147 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1148 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161149 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111150 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161151 },
[email protected]ad6fcc32013-05-30 03:46:481152 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081153 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1154 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1155 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481156 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081157 },
[email protected]cf2b1a82013-04-20 01:05:431158 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111159 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1160 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241161 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431162 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1163 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241164 },
[email protected]316708a2012-11-05 22:57:021165#if defined(OS_LINUX)
1166 { "ash-enable-memory-monitor",
1167 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1168 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1169 kOsCrOS,
1170 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1171 },
1172#endif
[email protected]1d9bb9cd2012-08-28 22:02:501173#endif
[email protected]9b7ab882012-09-10 23:46:361174#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131175 { "use-new-network-configuration-handlers",
1176 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1177 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1178 kOsCrOS,
1179 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1180 },
[email protected]ce98ef82013-05-31 22:43:241181 { "use-new-network-connection-handler",
1182 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1183 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1184 kOsCrOS,
1185 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1186 },
[email protected]9b7ab882012-09-10 23:46:361187 {
[email protected]354ff2d2013-05-01 17:06:311188 "ash-audio-device-menu",
1189 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1190 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1191 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431192 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1193 ash::switches::kAshDisableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121194 },
1195 {
[email protected]205f07892012-10-16 20:26:221196 "enable-carrier-switching",
1197 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1198 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1199 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241200 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221201 },
1202 {
[email protected]9b7ab882012-09-10 23:46:361203 "enable-request-tablet-site",
1204 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1205 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1206 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241207 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361208 },
1209#endif
[email protected]dab49c0b2012-10-04 05:55:351210 {
1211 "debug-packed-apps",
1212 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1213 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561214 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351215 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1216 },
[email protected]d1459ed2012-10-10 01:29:331217 {
1218 "enable-password-generation",
1219 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1220 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561221 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331222 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1223 },
[email protected]26d045f2012-10-18 21:18:431224 {
[email protected]283cc562013-07-18 08:25:431225 "password-autofill-public-suffix-domain-matching",
1226 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1227 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
[email protected]17b9c742013-06-22 13:48:421228 kOsAndroid,
[email protected]283cc562013-07-18 08:25:431229 ENABLE_DISABLE_VALUE_TYPE(
1230 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1231 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
[email protected]17b9c742013-06-22 13:48:421232 },
1233 {
[email protected]76f7d4882012-10-26 21:09:221234 "enable-deferred-image-decoding",
1235 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1236 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221237 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221238 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1239 },
1240 {
[email protected]075543d2012-10-24 01:29:141241 "performance-monitor-gathering",
1242 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1243 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1244 kOsAll,
1245 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1246 },
[email protected]783d5bb2012-10-24 03:47:141247 {
[email protected]a7259fb2012-11-08 06:22:231248 "enable-experimental-form-filling",
1249 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1250 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1251 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481252 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231253 },
[email protected]6e6efe42013-01-30 00:04:501254 {
[email protected]db3178c2013-03-21 14:54:541255 "wallet-service-use-prod",
1256 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1257 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1258 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481259 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541260 },
1261 {
[email protected]6e6efe42013-01-30 00:04:501262 "enable-interactive-autocomplete",
1263 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1264 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]41c82d22013-08-02 05:17:121265 kOsWin | kOsCrOS | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171266 ENABLE_DISABLE_VALUE_TYPE(
1267 autofill::switches::kEnableInteractiveAutocomplete,
1268 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501269 },
[email protected]177260c2013-04-24 01:47:381270#if defined(USE_AURA)
1271 {
1272 "overscroll-history-navigation",
1273 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1274 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1275 kOsAll,
1276 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1277 switches::kOverscrollHistoryNavigation, "1",
1278 switches::kOverscrollHistoryNavigation, "0")
1279 },
1280#endif
[email protected]edbea622012-11-28 20:39:381281 {
[email protected]888878e82013-07-24 22:49:401282 "scroll-end-effect",
1283 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1284 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1285 kOsCrOS,
1286 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1287 switches::kScrollEndEffect, "1",
1288 switches::kScrollEndEffect, "0")
1289 },
1290 {
[email protected]0222b1b42013-07-26 09:57:001291 "enable-touch-side-bezels",
1292 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1293 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1294 kOsCrOS,
1295 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1296 switches::kTouchSideBezels, "1",
1297 switches::kTouchSideBezels, "0")
1298 },
1299 {
[email protected]edbea622012-11-28 20:39:381300 "enable-touch-drag-drop",
1301 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1302 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1303 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271304 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1305 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381306 },
[email protected]0e2f43b62013-02-21 00:47:151307 {
1308 "enable-touch-editing",
1309 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1310 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1311 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271312 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1313 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151314 },
[email protected]92e12dd92012-12-11 03:33:201315 {
1316 "enable-rich-notifications",
1317 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1318 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361319 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231320 ENABLE_DISABLE_VALUE_TYPE(
1321 message_center::switches::kEnableRichNotifications,
1322 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201323 },
[email protected]4d51c682012-12-11 11:34:551324 {
[email protected]ddec1aa2013-04-28 23:22:451325 "enable-sync-synced-notifications",
1326 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1327 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181328 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451329 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1330 switches::kDisableSyncSyncedNotifications)
1331 },
1332 {
[email protected]a50e16a2013-04-25 14:07:171333 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551334 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1335 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1336 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171337 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551338 },
[email protected]628a69a92012-12-23 04:09:341339 {
[email protected]fd030142013-02-08 02:04:381340 "enable-usermedia-screen-capture",
1341 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1342 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1343 kOsDesktop,
1344 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1345 },
[email protected]5b93e162013-02-19 06:33:091346 {
1347 "enable-apps-devtool-app",
1348 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1349 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1350 kOsDesktop,
1351 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1352 },
[email protected]9323fdd12013-02-23 00:31:361353 {
1354 "impl-side-painting",
1355 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1356 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041357 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361358 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1359 },
[email protected]a42c85f2013-04-04 18:15:121360 {
[email protected]0c04d1c2013-07-10 00:02:321361 "delegated-renderer",
1362 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1363 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1364#ifdef USE_AURA
1365 kOsWin | kOsLinux |
1366#endif
1367 kOsAndroid | kOsCrOS,
1368 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1369 },
1370 {
[email protected]1c92d3e2013-04-18 05:31:391371 "enable-websocket-experimental-implementation",
1372 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1373 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1374 kOsAll,
1375 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1376 },
1377 {
[email protected]a42c85f2013-04-04 18:15:121378 "max-tiles-for-interest-area",
1379 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1380 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1381 kOsAndroid | kOsLinux | kOsCrOS,
1382 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1383 },
[email protected]7cf7ccb2013-04-20 02:53:081384 {
1385 "enable-offline-mode",
1386 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1387 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1388 kOsAll,
1389 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1390 },
[email protected]a3618122013-04-26 21:15:341391 {
1392 "default-tile-width",
1393 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1394 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1395 kOsAll,
1396 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1397 },
1398 {
1399 "default-tile-height",
1400 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1401 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1402 kOsAll,
1403 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1404 },
[email protected]2f2f72b2013-03-08 22:37:311405 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1406#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371407 {
1408 "track-active-visit-time",
1409 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1410 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1411 kOsWin,
1412 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1413 },
[email protected]2f2f72b2013-03-08 22:37:311414#endif
[email protected]8cc71d42013-03-02 17:26:081415#if defined(OS_ANDROID)
1416 {
1417 "disable-gesture-requirement-for-media-playback",
1418 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1419 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1420 kOsAndroid,
1421 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1422 },
1423#endif
[email protected]6077cab2013-03-11 19:36:141424#if defined(ENABLE_GOOGLE_NOW)
1425 {
1426 "enable-google-now",
1427 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1428 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361429 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141430 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1431 },
1432#endif
[email protected]86459e2c2013-04-10 13:39:241433#if defined(OS_CHROMEOS)
1434 {
1435 "enable-virtual-keyboard",
1436 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1437 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1438 kOsCrOS,
1439 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1440 },
1441#endif
[email protected]38484df12013-04-10 16:42:031442 {
1443 "enable-simple-cache-backend",
1444 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1445 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251446 kOsAll,
[email protected]38484df12013-04-10 16:42:031447 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1448 },
[email protected]717e4e22013-04-10 20:52:231449 {
1450 "enable-tcp-fast-open",
1451 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1452 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111453 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231454 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1455 },
[email protected]8027acd2013-04-18 08:35:151456 {
[email protected]58c740f2013-05-06 05:25:441457 "apps-use-native-frame",
1458 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1459 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
[email protected]fa39ebda2013-08-06 08:42:581460 kOsMac | kOsWin,
[email protected]58c740f2013-05-06 05:25:441461 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1462 },
[email protected]896d86b32013-05-09 19:36:441463 {
1464 "enable-syncfs-directory-operation",
1465 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1466 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1467 kOsAll,
1468 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1469 },
[email protected]a4ed7e12013-05-24 01:00:281470 {
[email protected]380532aa2013-05-24 11:59:351471 "enable-reset-profile-settings",
1472 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1473 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1474 kOsAll,
1475 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1476 },
[email protected]9f94a6c42013-07-11 18:49:151477 {
1478 "enable-device-discovery",
1479 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1480 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1481 kOsDesktop,
1482 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1483 },
[email protected]56d3c6e42013-05-29 11:28:011484#if defined(OS_MACOSX)
1485 {
1486 "enable-app-list-shim",
1487 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1488 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1489 kOsMac,
1490 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1491 },
[email protected]cb29e162013-05-31 07:47:021492 {
1493 "enable-app-shims",
1494 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1495 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1496 kOsMac,
1497 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1498 },
[email protected]67604442013-06-15 00:04:331499 {
1500 "enable-simplified-fullscreen",
1501 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1502 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1503 kOsMac,
1504 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1505 },
[email protected]56d3c6e42013-05-29 11:28:011506#endif
[email protected]13177832013-05-31 07:46:051507#if defined(OS_CHROMEOS) || defined(OS_WIN)
1508 {
[email protected]6d9087b2013-07-30 08:25:461509 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051510 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1511 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]6d9087b2013-07-30 08:25:461512 kOsCrOS | kOsWin,
1513 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1514 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051515 },
1516#endif
[email protected]910ecfe2013-06-03 23:38:141517#if defined(USE_AURA)
1518 {
1519 "tab-capture-upscale-quality",
1520 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1521 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1522 kOsAll,
1523 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1524 },
1525 {
1526 "tab-capture-downscale-quality",
1527 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1528 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1529 kOsAll,
1530 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1531 },
1532#endif
[email protected]71d4f602013-06-04 23:21:101533 {
[email protected]5e099c62013-06-08 05:46:231534 "enable-spelling-service-feedback",
1535 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1536 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1537 kOsAll,
1538 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1539 },
1540 {
[email protected]71d4f602013-06-04 23:21:101541 "enable-webgl-draft-extensions",
1542 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1543 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1544 kOsAll,
1545 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1546 },
[email protected]deadc492013-06-07 21:39:281547 {
[email protected]962dd6d92013-08-08 22:20:491548 "enable-html-imports",
1549 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1550 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1551 kOsAll,
1552 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1553 },
1554 {
[email protected]deadc492013-06-07 21:39:281555 "high-dpi-support",
1556 IDS_FLAGS_HIDPI_NAME,
1557 IDS_FLAGS_HIDPI_DESCRIPTION,
1558 kOsWin,
1559 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1560 switches::kHighDPISupport,"0")
1561 },
[email protected]77e69a512013-06-08 05:56:451562#if defined(OS_CHROMEOS)
1563 {
[email protected]0a5dd632013-08-06 23:10:451564 "enable-quickoffice-viewing",
1565 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_NAME,
1566 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_DESCRIPTION,
[email protected]77e69a512013-06-08 05:56:451567 kOsCrOS,
[email protected]0a5dd632013-08-06 23:10:451568 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeViewing),
[email protected]77e69a512013-06-08 05:56:451569 },
[email protected]4b8e2502013-07-23 18:34:361570 {
1571 "enable-sticky-keys",
1572 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1573 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1574 kOsCrOS,
[email protected]f311449d2013-08-01 19:51:241575 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableStickyKeys,
1576 switches::kDisableStickyKeys)
[email protected]4b8e2502013-07-23 18:34:361577 },
[email protected]77e69a512013-06-08 05:56:451578#endif
[email protected]82ca4212013-06-11 12:09:171579 {
1580 "enable-translate-settings",
1581 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1582 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1583 kOsAll,
1584 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1585 },
[email protected]bc1697a82013-06-27 15:48:311586 {
1587 "enable-web-midi",
1588 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1589 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1590 kOsMac,
1591 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1592 },
[email protected]020df792013-06-29 14:26:211593 {
1594 "enable-new-profile-management",
1595 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1596 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1597 kOsWin,
1598 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1599 },
1600 {
1601 "enable-gaia-profile-info",
1602 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1603 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221604 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211605 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1606 },
[email protected]dcf6cf32013-07-03 10:53:281607#if defined(OS_WIN)
1608 {
1609 "disable-app-launcher",
1610 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1611 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
1612 kOsAll,
1613 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1614 },
1615#endif
[email protected]a0e4b072011-08-17 01:47:071616};
[email protected]ad2a3ded2010-08-27 13:19:051617
[email protected]a314ee5a2010-10-26 21:23:281618const Experiment* experiments = kExperiments;
1619size_t num_experiments = arraysize(kExperiments);
1620
[email protected]e2ddbc92010-10-15 20:02:071621// Stores and encapsulates the little state that about:flags has.
1622class FlagsState {
1623 public:
1624 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401625 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1626 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071627 bool IsRestartNeededToCommitChanges();
1628 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401629 FlagsStorage* flags_storage,
1630 const std::string& internal_name,
1631 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071632 void RemoveFlagsSwitches(
1633 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401634 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071635 void reset();
1636
1637 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551638 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071639 return Singleton<FlagsState>::get();
1640 }
1641
1642 private:
1643 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531644 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071645
1646 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1647};
1648
[email protected]8a6ff28d2010-12-02 16:35:191649// Adds the internal names for the specified experiment to |names|.
1650void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1651 if (e.type == Experiment::SINGLE_VALUE) {
1652 names->insert(e.internal_name);
1653 } else {
[email protected]83e9fa702013-02-25 19:30:441654 DCHECK(e.type == Experiment::MULTI_VALUE ||
1655 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191656 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441657 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191658 }
1659}
1660
[email protected]28e35af2011-02-09 12:56:221661// Confirms that an experiment is valid, used in a DCHECK in
1662// SanitizeList below.
1663bool ValidateExperiment(const Experiment& e) {
1664 switch (e.type) {
1665 case Experiment::SINGLE_VALUE:
1666 DCHECK_EQ(0, e.num_choices);
1667 DCHECK(!e.choices);
1668 break;
1669 case Experiment::MULTI_VALUE:
1670 DCHECK_GT(e.num_choices, 0);
1671 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531672 DCHECK(e.choices[0].command_line_switch);
1673 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221674 break;
[email protected]83e9fa702013-02-25 19:30:441675 case Experiment::ENABLE_DISABLE_VALUE:
1676 DCHECK_EQ(3, e.num_choices);
1677 DCHECK(!e.choices);
1678 DCHECK(e.command_line_switch);
1679 DCHECK(e.command_line_value);
1680 DCHECK(e.disable_command_line_switch);
1681 DCHECK(e.disable_command_line_value);
1682 break;
[email protected]28e35af2011-02-09 12:56:221683 default:
1684 NOTREACHED();
1685 }
1686 return true;
1687}
1688
[email protected]ad2a3ded2010-08-27 13:19:051689// Removes all experiments from prefs::kEnabledLabsExperiments that are
1690// unknown, to prevent this list to become very long as experiments are added
1691// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401692void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051693 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221694 for (size_t i = 0; i < num_experiments; ++i) {
1695 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191696 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221697 }
[email protected]ad2a3ded2010-08-27 13:19:051698
[email protected]07d666d2013-07-21 23:56:261699 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051700
1701 std::set<std::string> new_enabled_experiments;
1702 std::set_intersection(
1703 known_experiments.begin(), known_experiments.end(),
1704 enabled_experiments.begin(), enabled_experiments.end(),
1705 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1706
[email protected]07d666d2013-07-21 23:56:261707 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401708 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051709}
1710
[email protected]1a47d7e2010-10-15 00:37:241711void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401712 FlagsStorage* flags_storage, std::set<std::string>* result) {
1713 SanitizeList(flags_storage);
1714 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051715}
1716
[email protected]a314ee5a2010-10-26 21:23:281717// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1718// enabled on the current platform.
1719void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401720 FlagsStorage* flags_storage, std::set<std::string>* result) {
1721 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281722
1723 // Filter out any experiments that aren't enabled on the current platform. We
1724 // don't remove these from prefs else syncing to a platform with a different
1725 // set of experiments would be lossy.
1726 std::set<std::string> platform_experiments;
1727 int current_platform = GetCurrentPlatform();
1728 for (size_t i = 0; i < num_experiments; ++i) {
1729 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191730 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581731#if defined(OS_CHROMEOS)
1732 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1733 AddInternalName(experiments[i], &platform_experiments);
1734#endif
[email protected]a314ee5a2010-10-26 21:23:281735 }
1736
1737 std::set<std::string> new_enabled_experiments;
1738 std::set_intersection(
1739 platform_experiments.begin(), platform_experiments.end(),
1740 result->begin(), result->end(),
1741 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1742
1743 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051744}
1745
[email protected]8a6ff28d2010-12-02 16:35:191746// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191747Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221748 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441749 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1750 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191751 ListValue* result = new ListValue;
1752 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191753 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441754 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191755 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441756 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221757 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191758 result->Append(value);
1759 }
1760 return result;
1761}
1762
[email protected]e2ddbc92010-10-15 20:02:071763} // namespace
1764
[email protected]83e9fa702013-02-25 19:30:441765std::string Experiment::NameForChoice(int index) const {
1766 DCHECK(type == Experiment::MULTI_VALUE ||
1767 type == Experiment::ENABLE_DISABLE_VALUE);
1768 DCHECK_LT(index, num_choices);
1769 return std::string(internal_name) + testing::kMultiSeparator +
1770 base::IntToString(index);
1771}
1772
1773string16 Experiment::DescriptionForChoice(int index) const {
1774 DCHECK(type == Experiment::MULTI_VALUE ||
1775 type == Experiment::ENABLE_DISABLE_VALUE);
1776 DCHECK_LT(index, num_choices);
1777 int description_id;
1778 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1779 const int kEnableDisableDescriptionIds[] = {
1780 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1781 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1782 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1783 };
1784 description_id = kEnableDisableDescriptionIds[index];
1785 } else {
1786 description_id = choices[index].description_id;
1787 }
1788 return l10n_util::GetStringUTF16(description_id);
1789}
1790
[email protected]e6d1c4f2013-06-12 17:37:401791void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1792 CommandLine* command_line) {
1793 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1794 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051795}
1796
[email protected]6d98abf2013-06-17 23:35:511797bool AreSwitchesIdenticalToCurrentCommandLine(
1798 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1799 std::set<CommandLine::StringType> new_flags =
1800 ExtractFlagsFromCommandLine(new_cmdline);
1801 std::set<CommandLine::StringType> active_flags =
1802 ExtractFlagsFromCommandLine(active_cmdline);
1803
1804 // Needed because std::equal doesn't check if the 2nd set is empty.
1805 if (new_flags.size() != active_flags.size())
1806 return false;
1807
1808 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1809}
1810
[email protected]e6d1c4f2013-06-12 17:37:401811void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521812 FlagAccess access,
1813 base::ListValue* supported_experiments,
1814 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051815 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401816 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051817
1818 int current_platform = GetCurrentPlatform();
1819
[email protected]a314ee5a2010-10-26 21:23:281820 for (size_t i = 0; i < num_experiments; ++i) {
1821 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051822
1823 DictionaryValue* data = new DictionaryValue();
1824 data->SetString("internal_name", experiment.internal_name);
1825 data->SetString("name",
1826 l10n_util::GetStringUTF16(experiment.visible_name_id));
1827 data->SetString("description",
1828 l10n_util::GetStringUTF16(
1829 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401830
1831 ListValue* supported_platforms = new ListValue();
1832 AddOsStrings(experiment.supported_platforms, supported_platforms);
1833 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051834
[email protected]28e35af2011-02-09 12:56:221835 switch (experiment.type) {
1836 case Experiment::SINGLE_VALUE:
1837 data->SetBoolean(
1838 "enabled",
1839 enabled_experiments.count(experiment.internal_name) > 0);
1840 break;
1841 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441842 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221843 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1844 break;
1845 default:
1846 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191847 }
1848
[email protected]ee28495a2013-05-20 04:10:521849 bool supported = (experiment.supported_platforms & current_platform) != 0;
1850#if defined(OS_CHROMEOS)
1851 if (access == kOwnerAccessToFlags &&
1852 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1853 supported = true;
1854 }
1855#endif
1856 if (supported)
1857 supported_experiments->Append(data);
1858 else
1859 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051860 }
[email protected]ad2a3ded2010-08-27 13:19:051861}
1862
[email protected]ad2a3ded2010-08-27 13:19:051863bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551864 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051865}
1866
[email protected]e6d1c4f2013-06-12 17:37:401867void SetExperimentEnabled(FlagsStorage* flags_storage,
1868 const std::string& internal_name,
1869 bool enable) {
1870 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1871 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071872}
1873
1874void RemoveFlagsSwitches(
1875 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551876 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071877}
1878
[email protected]e6d1c4f2013-06-12 17:37:401879void ResetAllFlags(FlagsStorage* flags_storage) {
1880 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001881}
1882
[email protected]a314ee5a2010-10-26 21:23:281883int GetCurrentPlatform() {
1884#if defined(OS_MACOSX)
1885 return kOsMac;
1886#elif defined(OS_WIN)
1887 return kOsWin;
1888#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1889 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211890#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281891 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401892#elif defined(OS_ANDROID)
1893 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281894#else
1895#error Unknown platform
1896#endif
1897}
1898
[email protected]e6d1c4f2013-06-12 17:37:401899void RecordUMAStatistics(FlagsStorage* flags_storage) {
1900 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541901 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1902 ++it) {
1903 std::string action("AboutFlags_");
1904 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381905 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541906 }
1907 // Since flag metrics are recorded every startup, add a tick so that the
1908 // stats can be made meaningful.
1909 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381910 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1911 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541912}
1913
[email protected]e2ddbc92010-10-15 20:02:071914//////////////////////////////////////////////////////////////////////////////
1915// FlagsState implementation.
1916
1917namespace {
1918
[email protected]83e9fa702013-02-25 19:30:441919typedef std::map<std::string, std::pair<std::string, std::string> >
1920 NameToSwitchAndValueMap;
1921
1922void SetFlagToSwitchMapping(const std::string& key,
1923 const std::string& switch_name,
1924 const std::string& switch_value,
1925 NameToSwitchAndValueMap* name_to_switch_map) {
1926 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1927 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1928}
1929
[email protected]e2ddbc92010-10-15 20:02:071930void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401931 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071932 if (command_line->HasSwitch(switches::kNoExperiments))
1933 return;
1934
1935 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001936
[email protected]e6d1c4f2013-06-12 17:37:401937 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1938 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071939
[email protected]a82744532011-02-11 16:15:531940 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191941 for (size_t i = 0; i < num_experiments; ++i) {
1942 const Experiment& e = experiments[i];
1943 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441944 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1945 e.command_line_value, &name_to_switch_map);
1946 } else if (e.type == Experiment::MULTI_VALUE) {
1947 for (int j = 0; j < e.num_choices; ++j) {
1948 SetFlagToSwitchMapping(e.NameForChoice(j),
1949 e.choices[j].command_line_switch,
1950 e.choices[j].command_line_value,
1951 &name_to_switch_map);
1952 }
[email protected]8a6ff28d2010-12-02 16:35:191953 } else {
[email protected]83e9fa702013-02-25 19:30:441954 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1955 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1956 &name_to_switch_map);
1957 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1958 e.command_line_value, &name_to_switch_map);
1959 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1960 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191961 }
1962 }
[email protected]e2ddbc92010-10-15 20:02:071963
1964 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531965 flags_switches_.insert(
1966 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1967 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071968 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1969 it != enabled_experiments.end();
1970 ++it) {
1971 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531972 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191973 name_to_switch_map.find(experiment_name);
1974 if (name_to_switch_it == name_to_switch_map.end()) {
1975 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071976 continue;
[email protected]8a6ff28d2010-12-02 16:35:191977 }
[email protected]e2ddbc92010-10-15 20:02:071978
[email protected]a82744532011-02-11 16:15:531979 const std::pair<std::string, std::string>&
1980 switch_and_value_pair = name_to_switch_it->second;
1981
1982 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1983 switch_and_value_pair.second);
1984 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071985 }
1986 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531987 flags_switches_.insert(
1988 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1989 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071990}
1991
1992bool FlagsState::IsRestartNeededToCommitChanges() {
1993 return needs_restart_;
1994}
1995
[email protected]e6d1c4f2013-06-12 17:37:401996void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1997 const std::string& internal_name,
1998 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441999 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192000 if (at_index != std::string::npos) {
2001 DCHECK(enable);
2002 // We're being asked to enable a multi-choice experiment. Disable the
2003 // currently selected choice.
2004 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222005 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402006 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192007
[email protected]28e35af2011-02-09 12:56:222008 // And enable the new choice, if it is not the default first choice.
2009 if (internal_name != experiment_name + "@0") {
2010 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402011 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082012 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402013 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222014 }
[email protected]8a6ff28d2010-12-02 16:35:192015 return;
2016 }
2017
[email protected]ad2a3ded2010-08-27 13:19:052018 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402019 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052020
[email protected]8a6ff28d2010-12-02 16:35:192021 const Experiment* e = NULL;
2022 for (size_t i = 0; i < num_experiments; ++i) {
2023 if (experiments[i].internal_name == internal_name) {
2024 e = experiments + i;
2025 break;
2026 }
2027 }
2028 DCHECK(e);
2029
2030 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592031 if (enable)
[email protected]147492b2013-03-19 23:52:082032 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592033 else
[email protected]147492b2013-03-19 23:52:082034 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192035 } else {
2036 if (enable) {
2037 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082038 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192039 } else {
2040 // Find the currently enabled choice and disable it.
2041 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442042 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192043 if (enabled_experiments.find(choice_name) !=
2044 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082045 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192046 enabled_experiments.erase(choice_name);
2047 // Continue on just in case there's a bug and more than one
2048 // experiment for this choice was enabled.
2049 }
2050 }
2051 }
2052 }
[email protected]ad2a3ded2010-08-27 13:19:052053
[email protected]e6d1c4f2013-06-12 17:37:402054 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052055}
2056
[email protected]e2ddbc92010-10-15 20:02:072057void FlagsState::RemoveFlagsSwitches(
2058 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532059 for (std::map<std::string, std::string>::const_iterator
2060 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2061 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072062 }
2063}
2064
[email protected]e6d1c4f2013-06-12 17:37:402065void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002066 needs_restart_ = true;
2067
2068 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402069 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002070}
2071
[email protected]e2ddbc92010-10-15 20:02:072072void FlagsState::reset() {
2073 needs_restart_ = false;
2074 flags_switches_.clear();
2075}
2076
[email protected]38e46812011-05-09 20:49:222077} // namespace
[email protected]e2ddbc92010-10-15 20:02:072078
2079namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192080
2081// WARNING: '@' is also used in the html file. If you update this constant you
2082// also need to update the html file.
2083const char kMultiSeparator[] = "@";
2084
[email protected]e2ddbc92010-10-15 20:02:072085void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552086 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072087}
[email protected]a314ee5a2010-10-26 21:23:282088
2089void SetExperiments(const Experiment* e, size_t count) {
2090 if (!e) {
2091 experiments = kExperiments;
2092 num_experiments = arraysize(kExperiments);
2093 } else {
2094 experiments = e;
2095 num_experiments = count;
2096 }
2097}
2098
[email protected]8a6ff28d2010-12-02 16:35:192099const Experiment* GetExperiments(size_t* count) {
2100 *count = num_experiments;
2101 return experiments;
2102}
2103
[email protected]e2ddbc92010-10-15 20:02:072104} // namespace testing
2105
[email protected]1a47d7e2010-10-15 00:37:242106} // namespace about_flags