blob: 65a2a7e3dea4f28f744387e831d086ffe4d60497 [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]265fd7b2013-08-13 02:32:1013#include "ash/ash_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0514#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1515#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2017#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4020#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1023#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2725#include "extensions/common/switches.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0527#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0228#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0229#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1730#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5931#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4832#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2733#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2434#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5635#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2436#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5637
[email protected]dc04be7c2012-03-15 23:57:4938#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3139#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4940#endif
41
[email protected]badba1ad2012-11-16 17:21:4642#if defined(OS_CHROMEOS)
43#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5144#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4645#endif
46
[email protected]7f6f44c2011-12-14 13:23:3847using content::UserMetricsAction;
48
[email protected]1a47d7e2010-10-15 00:37:2449namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0550
[email protected]8a6ff28d2010-12-02 16:35:1951// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5352#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4453 Experiment::SINGLE_VALUE, \
54 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5355#define SINGLE_VALUE_TYPE(command_line_switch) \
56 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4457#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
58 disable_switch, disable_value) \
59 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
60 disable_switch, disable_value, NULL, 3
61#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
62 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5363#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4464 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1965
[email protected]e2ddbc92010-10-15 20:02:0766namespace {
67
[email protected]9c7453d2012-01-21 00:45:4068const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5669const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0570
[email protected]cc3e2052011-12-20 01:01:4071// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
72// whether the experiment is available on that platform.
73void AddOsStrings(unsigned bitmask, ListValue* list) {
74 struct {
75 unsigned bit;
76 const char* const name;
77 } kBitsToOs[] = {
78 {kOsMac, "Mac"},
79 {kOsWin, "Windows"},
80 {kOsLinux, "Linux"},
81 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0182 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5883 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4084 };
85 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
86 if (bitmask & kBitsToOs[i].bit)
87 list->Append(new StringValue(kBitsToOs[i].name));
88}
89
[email protected]6d98abf2013-06-17 23:35:5190// Convert switch constants to proper CommandLine::StringType strings.
91CommandLine::StringType GetSwitchString(const std::string& flag) {
92 CommandLine cmd_line(CommandLine::NO_PROGRAM);
93 cmd_line.AppendSwitch(flag);
94 DCHECK(cmd_line.argv().size() == 2);
95 return cmd_line.argv()[1];
96}
97
98// Scoops flags from a command line.
99std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
100 const CommandLine& cmdline) {
101 std::set<CommandLine::StringType> flags;
102 // First do the ones between --flag-switches-begin and --flag-switches-end.
103 CommandLine::StringVector::const_iterator first =
104 std::find(cmdline.argv().begin(), cmdline.argv().end(),
105 GetSwitchString(switches::kFlagSwitchesBegin));
106 CommandLine::StringVector::const_iterator last =
107 std::find(cmdline.argv().begin(), cmdline.argv().end(),
108 GetSwitchString(switches::kFlagSwitchesEnd));
109 if (first != cmdline.argv().end() && last != cmdline.argv().end())
110 flags.insert(first + 1, last);
111#if defined(OS_CHROMEOS)
112 // Then add those between --policy-switches-begin and --policy-switches-end.
113 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
115 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
116 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
117 if (first != cmdline.argv().end() && last != cmdline.argv().end())
118 flags.insert(first + 1, last);
119#endif
120 return flags;
121}
122
[email protected]fb854192013-02-06 01:30:04123const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
124 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
125 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
126 switches::kEnableCompositingForFixedPosition, ""},
127 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
128 switches::kDisableCompositingForFixedPosition, ""},
129 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
130 switches::kEnableHighDpiCompositingForFixedPosition, ""}
131};
132
[email protected]d8221b22013-05-23 05:35:43133const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
134 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
135 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
136 switches::kEnableCompositingForTransition, ""},
137 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
138 switches::kDisableCompositingForTransition, ""},
139};
140
[email protected]06fc4d3b2013-07-08 21:07:24141const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
143 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
144 switches::kEnableAcceleratedFixedRootBackground, ""},
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
146 switches::kDisableAcceleratedFixedRootBackground, ""},
147};
148
[email protected]8b1c3c72013-01-25 01:48:43149const Experiment::Choice kGDIPresentChoices[] = {
150 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
151 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
152 switches::kDoFirstShowPresentWithGDI, ""},
153 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
154 switches::kDoAllShowPresentWithGDI, ""}
155};
156
[email protected]d7932532012-11-21 21:10:31157const Experiment::Choice kTouchEventsChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
159 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
160 switches::kTouchEvents,
161 switches::kTouchEventsEnabled },
162 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
163 switches::kTouchEvents,
164 switches::kTouchEventsDisabled }
165};
166
[email protected]347a0c72012-05-14 20:28:06167const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31168 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20169 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06170 switches::kTouchOptimizedUI,
171 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20172 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06173 switches::kTouchOptimizedUI,
174 switches::kTouchOptimizedUIDisabled }
175};
176
[email protected]66f409c2012-10-04 20:59:04177const Experiment::Choice kNaClDebugMaskChoices[] = {
178 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
179 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
180 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
181 // an option to switch off its debugging.
182 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
183 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
184 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
185 switches::kNaClDebugMask, "*://*/*debug.nmf" }
186};
187
[email protected]ea2f3342012-09-21 21:13:36188#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02189
190const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24191 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02192 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24193 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19194 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24195 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02196};
[email protected]a78c7432013-03-13 06:22:43197
[email protected]ea2f3342012-09-21 21:13:36198#endif
199
[email protected]9323fdd12013-02-23 00:31:36200const Experiment::Choice kImplSidePaintingChoices[] = {
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
202 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
203 cc::switches::kEnableImplSidePainting, ""},
204 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
205 cc::switches::kDisableImplSidePainting, ""}
206};
207
[email protected]0c04d1c2013-07-10 00:02:32208const Experiment::Choice kDelegatedRendererChoices[] = {
209 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
210 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
211 switches::kEnableDelegatedRenderer, ""},
212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
213 switches::kDisableDelegatedRenderer, ""}
214};
215
[email protected]a42c85f2013-04-04 18:15:12216const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
218 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
219 cc::switches::kMaxTilesForInterestArea, "64"},
220 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
221 cc::switches::kMaxTilesForInterestArea, "128"},
222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
223 cc::switches::kMaxTilesForInterestArea, "256"},
224 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
225 cc::switches::kMaxTilesForInterestArea, "512"}
226};
227
[email protected]a3618122013-04-26 21:15:34228const Experiment::Choice kDefaultTileWidthChoices[] = {
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
230 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
231 switches::kDefaultTileWidth, "128"},
232 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
233 switches::kDefaultTileWidth, "256"},
234 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
235 switches::kDefaultTileWidth, "512"},
236 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
237 switches::kDefaultTileWidth, "1024"}
238};
239
240const Experiment::Choice kDefaultTileHeightChoices[] = {
241 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
242 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
243 switches::kDefaultTileHeight, "128"},
244 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
245 switches::kDefaultTileHeight, "256"},
246 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
247 switches::kDefaultTileHeight, "512"},
248 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
249 switches::kDefaultTileHeight, "1024"}
250};
251
[email protected]38484df12013-04-10 16:42:03252const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21253 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
254 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
255 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03256 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
257 switches::kUseSimpleCacheBackend, "on"}
258};
259
[email protected]910ecfe2013-06-03 23:38:14260const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
261 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
262 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
263 switches::kTabCaptureUpscaleQuality, "fast" },
264 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
265 switches::kTabCaptureUpscaleQuality, "good" },
266 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
267 switches::kTabCaptureUpscaleQuality, "best" },
268};
269
270const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
271 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
272 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
273 switches::kTabCaptureDownscaleQuality, "fast" },
274 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
275 switches::kTabCaptureDownscaleQuality, "good" },
276 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
277 switches::kTabCaptureDownscaleQuality, "best" },
278};
279
[email protected]be2e40a2013-08-27 02:49:20280const Experiment::Choice kMapImageChoices[] = {
281 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
282 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
283 cc::switches::kEnableMapImage, ""},
284 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
285 cc::switches::kDisableMapImage, ""}
286};
287
[email protected]4bc5050c2010-11-18 17:55:54288// RECORDING USER METRICS FOR FLAGS:
289// -----------------------------------------------------------------------------
290// The first line of the experiment is the internal name. If you'd like to
291// gather statistics about the usage of your flag, you should append a marker
292// comment to the end of the feature name, like so:
293// "my-special-feature", // FLAGS:RECORD_UMA
294//
295// After doing that, run //chrome/tools/extract_actions.py (see instructions at
296// the top of that file for details) to update the chromeactions.txt file, which
297// will enable UMA to record your feature flag.
298//
[email protected]783d5bb2012-10-24 03:47:14299// After your feature has shipped under a flag, you can locate the metrics under
300// the action name AboutFlags_internal-action-name. Actions are recorded once
301// per startup, so you should divide this number by AboutFlags_StartupTick to
302// get a sense of usage. Note that this will not be the same as number of users
303// with a given feature enabled because users can quit and relaunch the
304// application multiple times over a given time interval. The dashboard also
305// shows you how many (metrics reporting) users have enabled the flag over the
306// last seven days. However, note that this is not the same as the number of
307// users who have the flag enabled, since enabling the flag happens once,
308// whereas running with the flag enabled happens until the user flips the flag
309// again.
[email protected]4bc5050c2010-11-18 17:55:54310
[email protected]8a6ff28d2010-12-02 16:35:19311// To add a new experiment add to the end of kExperiments. There are two
312// distinct types of experiments:
313// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
314// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22315// . MULTI_VALUE: a list of choices, the first of which should correspond to a
316// deactivated state for this lab (i.e. no command line option). To specify
317// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
318// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19319// See the documentation of Experiment for details on the fields.
320//
321// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05322const Experiment kExperiments[] = {
323 {
[email protected]aac169d2011-03-18 19:53:03324 "expose-for-tabs", // FLAGS:RECORD_UMA
325 IDS_FLAGS_TABPOSE_NAME,
326 IDS_FLAGS_TABPOSE_DESCRIPTION,
327 kOsMac,
328#if defined(OS_MACOSX)
329 // The switch exists only on OS X.
330 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
331#else
332 SINGLE_VALUE_TYPE("")
333#endif
334 },
335 {
[email protected]4bc5050c2010-11-18 17:55:54336 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05337 IDS_FLAGS_CONFLICTS_CHECK_NAME,
338 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
339 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19340 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05341 },
342 {
[email protected]96c6f4c2011-05-18 19:36:22343 "ignore-gpu-blacklist",
344 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
345 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
346 kOsAll,
347 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
348 },
349 {
[email protected]0110cf112011-07-02 00:39:43350 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22351 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
352 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23353 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44354 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
355 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22356 },
357 {
[email protected]72787e392012-03-23 05:55:43358 "threaded-compositing-mode",
359 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
360 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58361 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44362 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
363 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59364 },
365 {
[email protected]17e27692013-02-06 17:02:09366 "force-accelerated-composited-scrolling",
367 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
368 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
369 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44370 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
371 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09372 },
373 {
[email protected]8b1c3c72013-01-25 01:48:43374 "present-with-GDI",
375 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
376 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
377 kOsWin,
378 MULTI_VALUE_TYPE(kGDIPresentChoices)
379 },
380 {
[email protected]2b608752013-05-01 03:34:36381 "enable-experimental-canvas-features",
382 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
383 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
384 kOsAll,
385 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
386 },
387 {
[email protected]81c64af62012-06-06 20:15:52388 "disable-accelerated-2d-canvas",
389 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
390 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
391 kOsAll,
392 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
393 },
394 {
[email protected]efcde132012-05-30 01:05:18395 "disable-threaded-animation",
396 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
397 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59398 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37399 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59400 },
401 {
[email protected]5963b772011-02-09 22:55:38402 "composited-layer-borders",
403 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
404 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
405 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57406 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38407 },
408 {
[email protected]a8f1eaa2011-03-07 19:00:58409 "show-fps-counter",
410 IDS_FLAGS_SHOW_FPS_COUNTER,
411 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
412 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57413 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58414 },
[email protected]8ff7f342011-05-25 01:49:47415 {
[email protected]70c98a332011-12-21 20:51:52416 "accelerated-filters",
417 IDS_FLAGS_ACCELERATED_FILTERS,
418 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
419 kOsAll,
420 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
421 },
422 {
[email protected]8ff7f342011-05-25 01:49:47423 "disable-gpu-vsync",
424 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
425 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56426 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47427 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
428 },
[email protected]deaba6d52011-09-23 14:47:12429 {
430 "disable-webgl",
431 IDS_FLAGS_DISABLE_WEBGL_NAME,
432 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28433 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12434 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
435 },
[email protected]09096e02012-05-24 11:12:04436 {
[email protected]ce585bf2013-03-14 16:25:16437 "disable-webrtc",
438 IDS_FLAGS_DISABLE_WEBRTC_NAME,
439 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05440 kOsAndroid,
441#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16442 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05443#else
444 SINGLE_VALUE_TYPE("")
445#endif
446 },
[email protected]5e2bc8c2013-05-28 22:59:57447#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30448 {
[email protected]214a88cc2013-09-07 03:19:52449 "disable-sctp-data-channels",
450 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_NAME,
451 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
[email protected]d816ddc2013-05-23 14:28:30452 kOsAll,
[email protected]214a88cc2013-09-07 03:19:52453 SINGLE_VALUE_TYPE(switches::kDisableSCTPDataChannels)
[email protected]d816ddc2013-05-23 14:28:30454 },
[email protected]c1298742013-07-17 04:06:32455 {
[email protected]f1045f02013-08-02 23:19:35456 "disable-device-enumeration",
457 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
458 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
[email protected]c1298742013-07-17 04:06:32459 kOsAll,
[email protected]f1045f02013-08-02 23:19:35460 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
[email protected]c1298742013-07-17 04:06:32461 },
[email protected]96cbf422013-09-11 12:42:22462 {
463 "disable-webrtc-hw-encoding",
464 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
465 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
466 kOsCrOS,
467 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
468 },
[email protected]cbd5e162013-09-11 18:36:27469 {
470 "enable-webrtc-hw-decoding",
471 IDS_FLAGS_ENABLE_WEBRTC_HW_DECODING_NAME,
472 IDS_FLAGS_ENABLE_WEBRTC_HW_DECODING_DESCRIPTION,
473 kOsCrOS,
474 SINGLE_VALUE_TYPE(switches::kEnableWebRtcHWDecoding)
475 },
[email protected]5e2bc8c2013-05-28 22:59:57476#endif
[email protected]34cb5292013-04-15 06:06:31477#if defined(OS_ANDROID)
478 {
[email protected]7b8a31632013-06-13 22:42:37479 "disable-webaudio",
480 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
481 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31482 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37483 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31484 },
485#endif
[email protected]d9da9582013-01-31 04:59:05486 {
[email protected]96bcdc102012-05-24 23:42:10487 "fixed-position-creates-stacking-context",
488 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
489 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
490 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44491 ENABLE_DISABLE_VALUE_TYPE(
492 switches::kEnableFixedPositionCreatesStackingContext,
493 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10494 },
[email protected]fb854192013-02-06 01:30:04495 {
496 "enable-compositing-for-fixed-position",
497 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
498 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
499 kOsAll,
500 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
501 },
[email protected]d8221b22013-05-23 05:35:43502 {
503 "enable-compositing-for-transition",
504 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
505 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
506 kOsAll,
507 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
508 },
[email protected]06fc4d3b2013-07-08 21:07:24509 {
510 "enable-accelerated-fixed-root-background",
511 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
512 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
513 kOsAll,
514 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
515 },
[email protected]a7640ef22012-10-06 00:52:08516 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53517 {
[email protected]e3791ce92011-08-09 01:03:32518 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40519 IDS_FLAGS_ENABLE_NACL_NAME,
520 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56521 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19522 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40523 },
524 {
[email protected]9addd1c2012-09-15 14:28:24525 "enable-nacl-debug", // FLAGS:RECORD_UMA
526 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
527 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56528 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24529 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13530 },
531 {
[email protected]7de24f52013-08-29 10:02:55532 "disable-pnacl", // FLAGS:RECORD_UMA
533 IDS_FLAGS_DISABLE_PNACL_NAME,
534 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
535 kOsDesktop,
536 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
537 },
538 {
[email protected]66f409c2012-10-04 20:59:04539 "nacl-debug-mask", // FLAGS:RECORD_UMA
540 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
541 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56542 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04543 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
544 },
545 {
[email protected]4bc5050c2010-11-18 17:55:54546 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32547 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
548 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56549 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51550 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32551 },
[email protected]3627b06d2010-11-12 16:36:16552 {
[email protected]ac2e2acd2013-03-21 12:57:29553 "extensions-on-chrome-urls",
554 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
555 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
556 kOsAll,
[email protected]49d9b142013-07-19 08:50:27557 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29558 },
559 {
[email protected]88c92012013-07-02 11:56:34560 "enable-fast-unload",
561 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
562 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
563 kOsAll,
564 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
565 },
566 {
[email protected]e9cddd52013-03-23 17:37:53567 "enable-adview",
568 IDS_FLAGS_ENABLE_ADVIEW_NAME,
569 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
570 kOsDesktop,
571 SINGLE_VALUE_TYPE(switches::kEnableAdview)
572 },
573 {
574 "enable-adview-src-attribute",
575 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
576 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
577 kOsDesktop,
578 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
579 },
580 {
[email protected]1f4da9e2013-06-27 05:23:44581 "enable-app-window-controls",
582 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
583 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
584 kOsDesktop,
585 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
586 },
587 {
[email protected]3a362432012-06-18 20:39:51588 "script-badges",
589 IDS_FLAGS_SCRIPT_BADGES_NAME,
590 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56591 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09592 SINGLE_VALUE_TYPE(switches::kScriptBadges)
593 },
594 {
595 "script-bubble",
596 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
597 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56598 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44599 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
600 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51601 },
602 {
[email protected]cbe224d2011-08-04 22:12:49603 "apps-new-install-bubble",
604 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
605 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56606 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49607 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
608 },
609 {
[email protected]80bd24e2010-11-30 09:34:38610 "disable-hyperlink-auditing",
611 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
612 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
613 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19614 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51615 },
616 {
[email protected]5aea1862011-03-23 23:55:39617 "tab-groups-context-menu",
618 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
619 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
620 kOsWin,
621 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
622 },
[email protected]c94cebd2012-06-21 00:55:28623 {
624 "enable-instant-extended-api",
625 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
626 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46627 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51628 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
629 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28630 },
[email protected]e9bf9d92011-03-31 20:57:15631 {
[email protected]8cc9e532013-05-06 21:01:47632 "enable-local-first-load-ntp",
633 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
634 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46635 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47636 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
637 switches::kDisableLocalFirstLoadNTP)
638 },
[email protected]333bdc52013-07-16 00:37:04639#if defined(OS_ANDROID)
640 {
641 "enable-new-ntp",
642 IDS_FLAGS_ENABLE_NEW_NTP,
643 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
644 kOsAndroid,
[email protected]6bab2e32013-09-11 00:09:03645 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
646 switches::kDisableNewNTP)
[email protected]333bdc52013-07-16 00:37:04647 },
648#endif
[email protected]8cc9e532013-05-06 21:01:47649 {
[email protected]354e33b2011-06-15 00:29:10650 "static-ip-config",
651 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
652 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
653 kOsCrOS,
654#if defined(OS_CHROMEOS)
655 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24656 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10657#else
658 SINGLE_VALUE_TYPE("")
659#endif
660 },
[email protected]3eb5728c2011-06-20 22:32:24661 {
662 "show-autofill-type-predictions",
663 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
664 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
665 kOsAll,
[email protected]e217c5632013-04-12 19:11:48666 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24667 },
[email protected]bff4d3e2011-06-21 23:58:52668 {
[email protected]e755a382012-09-13 17:16:35669 "enable-gesture-tap-highlight",
670 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
671 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
672 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47673 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
674 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35675 },
676 {
[email protected]a22ebd812011-06-23 00:05:39677 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
678 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
679 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
680 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40681 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25682 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39683 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
684 },
[email protected]81a6b0b2011-06-24 17:55:40685 {
[email protected]7e7a28092011-12-09 22:24:55686 "enable-panels",
687 IDS_FLAGS_ENABLE_PANELS_NAME,
688 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56689 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55690 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54691 },
[email protected]e3749d12011-07-25 22:22:12692 {
[email protected]27c14f02012-06-22 17:29:58693 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27694 "save-page-as-mhtml", // FLAGS:RECORD_UMA
695 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
696 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
697 kOsMac | kOsWin | kOsLinux,
698 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
699 },
700 {
[email protected]b7bb44f2011-09-01 05:17:03701 "enable-autologin",
702 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
703 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
704 kOsMac | kOsWin | kOsLinux,
705 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
706 },
[email protected]b9841172011-09-26 23:36:09707 {
[email protected]903e63382013-06-01 00:40:58708 "enable-quic",
709 IDS_FLAGS_ENABLE_QUIC_NAME,
710 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
711 kOsAll,
712 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
713 switches::kDisableQuic)
714 },
715 {
[email protected]eb8f88e2013-07-15 09:52:17716 "enable-quic-https",
717 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
718 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
719 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00720 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
721 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17722 },
723 {
[email protected]bca09b9982013-06-27 22:30:46724 "enable-spdy4a2",
725 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
726 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
727 kOsAll,
728 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
729 },
730 {
[email protected]88a332622013-07-30 07:13:32731 "enable-http2-draft-04",
732 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
733 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
734 kOsAll,
735 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
736 },
737 {
[email protected]27b3fe92012-03-21 05:35:06738 "enable-async-dns",
739 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
740 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46741 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44742 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
743 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06744 },
745 {
[email protected]1eb93802012-09-11 18:57:56746 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31747 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
748 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32749 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31750 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44751 },
[email protected]e4e68dbb2011-11-18 01:50:22752 {
[email protected]16c242d2013-05-31 23:56:47753 "enable-encrypted-media",
754 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
755 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50756 kOsAll,
[email protected]16c242d2013-05-31 23:56:47757 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
758 },
759 {
760 "disable-encrypted-media",
761 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
762 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50763 kOsAll,
[email protected]16c242d2013-05-31 23:56:47764 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03765 },
[email protected]f88628792012-12-18 07:07:50766 {
[email protected]d21ead42013-06-24 06:35:06767 "override-encrypted-media-canplaytype",
768 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
769 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
[email protected]e90b52d2013-09-06 00:03:51770 kOsMac | kOsWin | kOsAndroid,
[email protected]d21ead42013-06-24 06:35:06771 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
772 },
[email protected]ce3934bb2013-09-10 02:02:56773#if defined(OS_ANDROID)
774 {
775 "mediadrm-enable-non-compositing",
776 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
777 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
778 kOsAndroid,
779 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
780 },
781#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06782 {
[email protected]f88628792012-12-18 07:07:50783 "enable-opus-playback",
784 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
785 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56786 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50787 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
788 },
[email protected]b150b5532013-06-15 00:50:54789 {
[email protected]fb53f262013-09-03 20:52:42790 "disable-vp8-alpha-playback",
791 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_NAME,
792 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
[email protected]6ac955b2013-04-19 23:43:32793 kOsDesktop,
[email protected]fb53f262013-09-03 20:52:42794 SINGLE_VALUE_TYPE(switches::kDisableVp8AlphaPlayback)
[email protected]6ac955b2013-04-19 23:43:32795 },
796 {
[email protected]ca6eaa5a2013-01-24 16:16:04797 "enable-managed-users",
798 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
799 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08800 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04801 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
802 },
[email protected]dc04be7c2012-03-15 23:57:49803#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50804 {
[email protected]2a13a9a2013-04-19 04:00:21805 "ash-disable-auto-maximizing",
806 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
807 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
808 kOsWin | kOsLinux | kOsCrOS,
809 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
810 },
[email protected]dc04be7c2012-03-15 23:57:49811#endif
[email protected]eaae8b462012-01-20 22:20:39812 {
[email protected]db543d322011-12-15 20:40:15813 "per-tile-painting",
814 IDS_FLAGS_PER_TILE_PAINTING_NAME,
815 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37816 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37817 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15818 },
[email protected]bf88c032011-12-22 19:05:47819 {
820 "enable-javascript-harmony",
821 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
822 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
823 kOsAll,
824 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
825 },
[email protected]7e7f378a2012-01-05 14:35:37826 {
[email protected]85646172012-01-09 22:45:54827 "enable-tab-browser-dragging",
828 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
829 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
830 kOsWin,
831 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
832 },
833 {
[email protected]068b7b52012-02-27 12:41:44834 "disable-restore-session-state",
835 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
836 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37837 kOsAll,
[email protected]068b7b52012-02-27 12:41:44838 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37839 },
[email protected]88864db2012-01-18 20:56:35840 {
841 "disable-software-rasterizer",
842 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
843 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
844#if defined(ENABLE_SWIFTSHADER)
845 kOsAll,
846#else
847 0,
848#endif
849 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
850 },
[email protected]15a5d722012-01-23 09:11:14851 {
[email protected]c1b18ea2013-07-10 13:01:16852 "enable-experimental-web-platform-features",
853 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
854 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16855 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16856 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49857 },
858 {
[email protected]0f95a252012-09-13 22:30:04859 "enable-css-shaders",
860 IDS_FLAGS_CSS_SHADERS_NAME,
861 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
862 kOsAll,
863 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
864 },
865 {
[email protected]3e8befc2012-03-13 01:17:03866 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16867 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
868 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56869 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03870 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16871 },
[email protected]dc04be7c2012-03-15 23:57:49872#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01873 {
[email protected]3cd198a22012-03-12 20:38:01874 "enable-ash-oak",
875 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
876 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
877 kOsAll,
878 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
879 },
[email protected]31cf1c52012-02-29 20:55:01880#endif
[email protected]184ec592012-03-01 11:54:28881 {
882 "enable-devtools-experiments",
883 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
884 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56885 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28886 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
887 },
[email protected]76d1854e2012-03-02 23:57:44888 {
[email protected]3db81f242013-07-12 08:56:17889 "remote-debugging-raw-usb",
890 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
891 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
[email protected]be99de42013-07-12 13:51:16892 kOsDesktop,
[email protected]3db81f242013-07-12 08:56:17893 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
894 },
895 {
[email protected]2fefdb32013-02-26 14:28:10896 "silent-debugger-extension-api",
897 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
898 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
899 kOsDesktop,
900 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
901 },
902 {
[email protected]76d1854e2012-03-02 23:57:44903 "enable-suggestions-ntp",
904 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
905 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56906 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44907 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
908 },
[email protected]a3d54252012-04-05 20:04:13909 {
[email protected]1dbaf5e2012-11-30 05:51:32910 "spellcheck-autocorrect",
911 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
912 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
913 kOsWin | kOsLinux | kOsCrOS,
914 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
915 },
916 {
[email protected]e27137282013-06-20 02:38:35917 "enable-scroll-prediction",
918 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
919 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
920 kOsDesktop,
921 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
922 },
923 {
[email protected]d7932532012-11-21 21:10:31924 "touch-events",
925 IDS_TOUCH_EVENTS_NAME,
926 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56927 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31928 MULTI_VALUE_TYPE(kTouchEventsChoices)
929 },
930 {
[email protected]c9c73ad42012-04-18 03:35:59931 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06932 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
933 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55934 kOsWin,
[email protected]347a0c72012-05-14 20:28:06935 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59936 },
[email protected]8a6aaa72012-04-20 20:53:58937 {
[email protected]b9c96ff2012-11-26 22:24:40938 "disable-touch-adjustment",
939 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
940 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
941 kOsWin | kOsLinux | kOsCrOS,
942 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
943 },
[email protected]0b60afa2012-04-19 17:36:39944#if defined(OS_CHROMEOS)
945 {
[email protected]690de0f2013-06-26 00:51:16946 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31947 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
948 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
949 kOsCrOS,
[email protected]f54effe2013-09-05 01:09:02950 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
951 ash::switches::kAshDisableAlternateShelfLayout)
[email protected]1dd46bd2013-06-14 07:08:31952 },
953 {
[email protected]58fb96a2013-09-04 23:43:06954 "ash-disable-drag-off-shelf",
[email protected]28fb77a62013-08-24 14:37:57955 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
956 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
957 kOsCrOS,
[email protected]58fb96a2013-09-04 23:43:06958 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
[email protected]28fb77a62013-08-24 14:37:57959 },
960 {
[email protected]7c4a9bc2012-09-11 22:10:05961 "enable-background-loader",
962 IDS_ENABLE_BACKLOADER_NAME,
963 IDS_ENABLE_BACKLOADER_DESCRIPTION,
964 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24965 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05966 },
967 {
[email protected]3f4181a2013-02-01 21:31:07968 "enable-screensaver-extension",
969 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
970 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
971 kOsCrOS,
972 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
973 },
974 {
[email protected]0b60afa2012-04-19 17:36:39975 "no-discard-tabs",
976 IDS_FLAGS_NO_DISCARD_TABS_NAME,
977 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
978 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24979 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39980 },
[email protected]ba7df7e2013-07-18 21:49:59981 {
982 "ash-enable-docked-windows",
983 IDS_FLAGS_DOCKED_WINDOWS_NAME,
984 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
985 kOsCrOS,
986 SINGLE_VALUE_TYPE(ash::switches::kAshEnableDockedWindows)
987 },
[email protected]0b60afa2012-04-19 17:36:39988#endif
[email protected]79be6d32012-04-24 20:47:44989 {
[email protected]8d68a3e02013-01-12 15:57:10990 "enable-download-resumption",
991 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
992 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56993 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10994 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
995 },
996 {
[email protected]9a5940d2012-04-27 19:16:23997 "allow-nacl-socket-api",
998 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
999 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561000 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:231001 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1002 },
[email protected]85333732012-05-01 19:02:241003 {
[email protected]60673ad72012-05-02 06:16:331004 "stacked-tab-strip",
1005 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1006 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1007 kOsWin,
1008 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1009 },
1010 {
[email protected]4bd20202012-06-14 17:35:011011 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241012 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1013 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1014 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011015 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241016 },
[email protected]190349fd2012-05-02 00:10:471017#if defined(OS_CHROMEOS)
1018 {
1019 "allow-touchpad-three-finger-click",
1020 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1021 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1022 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241023 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471024 },
1025#endif
[email protected]53520b1b2012-05-07 21:43:371026#if defined(USE_ASH)
1027 {
[email protected]8257d382013-03-26 13:08:421028 "show-launcher-alignment-menu",
[email protected]81dd43d2013-08-06 05:58:271029 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
1030 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421031 kOsAll,
[email protected]265fd7b2013-08-13 02:32:101032 ENABLE_DISABLE_VALUE_TYPE(
1033 ash::switches::kShowShelfAlignmentMenu,
1034 ash::switches::kHideShelfAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421035 },
1036 {
[email protected]2ddf37b2013-04-20 01:15:581037 "disable-minimize-on-second-launcher-item-click",
1038 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1039 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1040 kOsAll,
1041 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1042 },
1043 {
[email protected]1f923dd2013-09-04 23:35:161044 "disable-overview-mode",
1045 IDS_FLAGS_DISABLE_OVERVIEW_MODE_NAME,
1046 IDS_FLAGS_DISABLE_OVERVIEW_MODE_DESCRIPTION,
[email protected]d24ce2c2013-08-01 15:14:191047 kOsCrOS,
[email protected]1f923dd2013-09-04 23:35:161048 SINGLE_VALUE_TYPE(ash::switches::kAshDisableOverviewMode)
[email protected]d24ce2c2013-08-01 15:14:191049 },
1050 {
[email protected]73074742012-05-17 01:44:411051 "show-touch-hud",
1052 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1053 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1054 kOsAll,
1055 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1056 },
1057 {
[email protected]9f0940b62012-05-23 22:56:351058 "enable-pinch",
1059 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1060 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061061 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381062 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1063 },
1064 {
[email protected]de0aaed2013-05-27 18:16:431065 "enable-pinch-virtual-viewport",
1066 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1067 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1068 kOsLinux | kOsWin | kOsCrOS,
1069 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1070 },
1071 {
[email protected]a4016f12013-05-02 07:53:471072 "forced-maximize-mode",
1073 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1074 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1075 kOsLinux | kOsWin | kOsCrOS,
1076 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1077 },
[email protected]73074742012-05-17 01:44:411078#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281079#if defined(OS_CHROMEOS)
1080 {
[email protected]8b04a1652012-08-04 02:59:491081 "disable-boot-animation",
1082 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1083 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581084 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241085 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491086 },
[email protected]95058572012-08-20 14:57:291087 {
[email protected]d96aef22012-10-30 11:47:021088 "captive-portal-detector",
1089 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1090 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581091 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021092 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1093 },
1094 {
[email protected]c11aa8f12012-12-18 18:43:141095 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571096 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1097 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1098 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141099 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571100 },
[email protected]f0280952012-11-06 20:30:501101 {
[email protected]53bc4352013-06-24 10:22:371102 "file-manager-show-checkboxes",
1103 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1104 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491105 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371106 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491107 },
1108 {
[email protected]f6ded872013-07-23 09:41:361109 "file-manager-enable-webstore-integration",
1110 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1111 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1112 kOsCrOS,
1113 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1114 },
1115 {
[email protected]099b890c2013-04-25 19:16:261116 "disable-quickoffice-component-app",
1117 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1118 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1119 kOsCrOS,
1120 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1121 },
[email protected]62018dc2012-12-13 00:37:351122#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391123 {
[email protected]6247aba2013-03-04 22:57:181124 "views-textfield",
1125 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1126 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391127 kOsWin,
[email protected]6247aba2013-03-04 22:57:181128 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1129 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391130 },
[email protected]7db8893a2012-07-26 00:49:401131 { "disable-accelerated-video-decode",
1132 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1133 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191134 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401135 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151136 },
[email protected]66ae9fc2012-06-19 21:33:521137#if defined(USE_ASH)
1138 {
1139 "ash-debug-shortcuts",
1140 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1141 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1142 kOsAll,
1143 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1144 },
1145#endif
[email protected]37fee0942012-08-07 21:07:451146 {
[email protected]ad3f6d22012-08-29 02:34:191147 "enable-contacts",
1148 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1149 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1150 kOsCrOS,
1151 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1152 },
[email protected]1d9bb9cd2012-08-28 22:02:501153#if defined(USE_ASH)
1154 { "ash-enable-advanced-gestures",
1155 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1156 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1157 kOsCrOS,
1158 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1159 },
[email protected]cfa24e62013-02-13 21:19:111160 { "ash-disable-tab-scrubbing",
1161 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1162 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161163 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111164 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161165 },
[email protected]ad6fcc32013-05-30 03:46:481166 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081167 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1168 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1169 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481170 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081171 },
[email protected]cf2b1a82013-04-20 01:05:431172 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111173 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1174 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241175 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431176 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1177 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241178 },
[email protected]316708a2012-11-05 22:57:021179#if defined(OS_LINUX)
1180 { "ash-enable-memory-monitor",
1181 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1182 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1183 kOsCrOS,
1184 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1185 },
1186#endif
[email protected]1d9bb9cd2012-08-28 22:02:501187#endif
[email protected]9b7ab882012-09-10 23:46:361188#if defined(OS_CHROMEOS)
[email protected]9b7ab882012-09-10 23:46:361189 {
[email protected]354ff2d2013-05-01 17:06:311190 "ash-audio-device-menu",
1191 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1192 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1193 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431194 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1195 ash::switches::kAshDisableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121196 },
1197 {
[email protected]205f07892012-10-16 20:26:221198 "enable-carrier-switching",
1199 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1200 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1201 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241202 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221203 },
1204 {
[email protected]9b7ab882012-09-10 23:46:361205 "enable-request-tablet-site",
1206 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1207 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1208 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241209 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361210 },
1211#endif
[email protected]dab49c0b2012-10-04 05:55:351212 {
1213 "debug-packed-apps",
1214 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1215 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561216 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351217 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1218 },
[email protected]d1459ed2012-10-10 01:29:331219 {
1220 "enable-password-generation",
1221 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1222 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561223 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331224 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1225 },
[email protected]26d045f2012-10-18 21:18:431226 {
[email protected]374c7b22013-09-06 08:20:061227 "enable-people-search",
1228 IDS_FLAGS_ENABLE_PEOPLE_SEARCH_NAME,
1229 IDS_FLAGS_ENABLE_PEOPLE_SEARCH_DESCRIPTION,
1230 kOsMac | kOsWin | kOsCrOS,
1231 SINGLE_VALUE_TYPE(switches::kEnablePeopleSearch)
1232 },
1233 {
[email protected]283cc562013-07-18 08:25:431234 "password-autofill-public-suffix-domain-matching",
1235 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1236 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
[email protected]17b9c742013-06-22 13:48:421237 kOsAndroid,
[email protected]283cc562013-07-18 08:25:431238 ENABLE_DISABLE_VALUE_TYPE(
1239 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1240 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
[email protected]17b9c742013-06-22 13:48:421241 },
1242 {
[email protected]76f7d4882012-10-26 21:09:221243 "enable-deferred-image-decoding",
1244 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1245 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221246 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221247 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1248 },
1249 {
[email protected]075543d2012-10-24 01:29:141250 "performance-monitor-gathering",
1251 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1252 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1253 kOsAll,
1254 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1255 },
[email protected]783d5bb2012-10-24 03:47:141256 {
[email protected]a7259fb2012-11-08 06:22:231257 "enable-experimental-form-filling",
1258 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1259 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1260 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481261 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231262 },
[email protected]6e6efe42013-01-30 00:04:501263 {
[email protected]db3178c2013-03-21 14:54:541264 "wallet-service-use-prod",
1265 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1266 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1267 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481268 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541269 },
1270 {
[email protected]6e6efe42013-01-30 00:04:501271 "enable-interactive-autocomplete",
1272 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1273 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]2a9b0c12013-08-15 02:38:391274 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171275 ENABLE_DISABLE_VALUE_TYPE(
1276 autofill::switches::kEnableInteractiveAutocomplete,
1277 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501278 },
[email protected]177260c2013-04-24 01:47:381279#if defined(USE_AURA)
1280 {
1281 "overscroll-history-navigation",
1282 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1283 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1284 kOsAll,
1285 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1286 switches::kOverscrollHistoryNavigation, "1",
1287 switches::kOverscrollHistoryNavigation, "0")
1288 },
1289#endif
[email protected]edbea622012-11-28 20:39:381290 {
[email protected]888878e82013-07-24 22:49:401291 "scroll-end-effect",
1292 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1293 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1294 kOsCrOS,
1295 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1296 switches::kScrollEndEffect, "1",
1297 switches::kScrollEndEffect, "0")
1298 },
1299 {
[email protected]0222b1b42013-07-26 09:57:001300 "enable-touch-side-bezels",
1301 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1302 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1303 kOsCrOS,
1304 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1305 switches::kTouchSideBezels, "1",
1306 switches::kTouchSideBezels, "0")
1307 },
1308 {
[email protected]06582ecb2013-08-14 02:37:161309 "enable-no-touch-to-renderer-while-scrolling",
1310 IDS_FLAGS_ENABLE_NO_TOUCH_TO_RENDERER_WHILE_SCROLLING_NAME,
1311 IDS_FLAGS_ENABLE_NO_TOUCH_TO_RENDERER_WHILE_SCROLLING_DESCRIPTION,
1312 kOsDesktop,
1313 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1314 switches::kNoTouchToRendererWhileScrolling, "1",
1315 switches::kNoTouchToRendererWhileScrolling, "0")
1316 },
1317 {
[email protected]edbea622012-11-28 20:39:381318 "enable-touch-drag-drop",
1319 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1320 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1321 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271322 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1323 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381324 },
[email protected]0e2f43b62013-02-21 00:47:151325 {
1326 "enable-touch-editing",
1327 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1328 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1329 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271330 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1331 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151332 },
[email protected]92e12dd92012-12-11 03:33:201333 {
1334 "enable-rich-notifications",
1335 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1336 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361337 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231338 ENABLE_DISABLE_VALUE_TYPE(
1339 message_center::switches::kEnableRichNotifications,
1340 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201341 },
[email protected]4d51c682012-12-11 11:34:551342 {
[email protected]ddec1aa2013-04-28 23:22:451343 "enable-sync-synced-notifications",
1344 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1345 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181346 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451347 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1348 switches::kDisableSyncSyncedNotifications)
1349 },
1350 {
[email protected]a50e16a2013-04-25 14:07:171351 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551352 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1353 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1354 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171355 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551356 },
[email protected]628a69a92012-12-23 04:09:341357 {
[email protected]fd030142013-02-08 02:04:381358 "enable-usermedia-screen-capture",
1359 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1360 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1361 kOsDesktop,
1362 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1363 },
[email protected]5b93e162013-02-19 06:33:091364 {
1365 "enable-apps-devtool-app",
1366 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1367 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1368 kOsDesktop,
1369 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1370 },
[email protected]9323fdd12013-02-23 00:31:361371 {
1372 "impl-side-painting",
1373 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1374 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041375 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361376 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1377 },
[email protected]a42c85f2013-04-04 18:15:121378 {
[email protected]0c04d1c2013-07-10 00:02:321379 "delegated-renderer",
1380 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1381 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1382#ifdef USE_AURA
1383 kOsWin | kOsLinux |
1384#endif
1385 kOsAndroid | kOsCrOS,
1386 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1387 },
1388 {
[email protected]1c92d3e2013-04-18 05:31:391389 "enable-websocket-experimental-implementation",
1390 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1391 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1392 kOsAll,
1393 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1394 },
1395 {
[email protected]a42c85f2013-04-04 18:15:121396 "max-tiles-for-interest-area",
1397 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1398 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1399 kOsAndroid | kOsLinux | kOsCrOS,
1400 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1401 },
[email protected]7cf7ccb2013-04-20 02:53:081402 {
1403 "enable-offline-mode",
1404 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1405 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1406 kOsAll,
1407 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1408 },
[email protected]a3618122013-04-26 21:15:341409 {
1410 "default-tile-width",
1411 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1412 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1413 kOsAll,
1414 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1415 },
1416 {
1417 "default-tile-height",
1418 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1419 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1420 kOsAll,
1421 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1422 },
[email protected]2f2f72b2013-03-08 22:37:311423 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1424#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371425 {
1426 "track-active-visit-time",
1427 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1428 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1429 kOsWin,
1430 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1431 },
[email protected]2f2f72b2013-03-08 22:37:311432#endif
[email protected]8cc71d42013-03-02 17:26:081433#if defined(OS_ANDROID)
1434 {
1435 "disable-gesture-requirement-for-media-playback",
1436 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1437 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1438 kOsAndroid,
1439 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1440 },
1441#endif
[email protected]6077cab2013-03-11 19:36:141442#if defined(ENABLE_GOOGLE_NOW)
1443 {
1444 "enable-google-now",
1445 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1446 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361447 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141448 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1449 },
1450#endif
[email protected]86459e2c2013-04-10 13:39:241451#if defined(OS_CHROMEOS)
1452 {
1453 "enable-virtual-keyboard",
1454 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1455 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1456 kOsCrOS,
1457 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1458 },
1459#endif
[email protected]38484df12013-04-10 16:42:031460 {
1461 "enable-simple-cache-backend",
1462 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1463 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251464 kOsAll,
[email protected]38484df12013-04-10 16:42:031465 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1466 },
[email protected]717e4e22013-04-10 20:52:231467 {
1468 "enable-tcp-fast-open",
1469 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1470 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111471 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231472 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1473 },
[email protected]8027acd2013-04-18 08:35:151474 {
[email protected]58c740f2013-05-06 05:25:441475 "apps-use-native-frame",
1476 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1477 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
[email protected]fa39ebda2013-08-06 08:42:581478 kOsMac | kOsWin,
[email protected]58c740f2013-05-06 05:25:441479 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1480 },
[email protected]896d86b32013-05-09 19:36:441481 {
1482 "enable-syncfs-directory-operation",
1483 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1484 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1485 kOsAll,
1486 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1487 },
[email protected]a4ed7e12013-05-24 01:00:281488 {
[email protected]2f7992ba2013-09-08 23:44:571489 "disable-device-discovery",
1490 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1491 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1492 kOsWin | kOsLinux | kOsCrOS,
1493 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
[email protected]9f94a6c42013-07-11 18:49:151494 },
[email protected]56d3c6e42013-05-29 11:28:011495#if defined(OS_MACOSX)
1496 {
1497 "enable-app-list-shim",
1498 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1499 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1500 kOsMac,
1501 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1502 },
[email protected]cb29e162013-05-31 07:47:021503 {
1504 "enable-app-shims",
1505 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1506 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1507 kOsMac,
1508 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1509 },
[email protected]67604442013-06-15 00:04:331510 {
1511 "enable-simplified-fullscreen",
1512 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1513 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1514 kOsMac,
1515 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1516 },
[email protected]56d3c6e42013-05-29 11:28:011517#endif
[email protected]13177832013-05-31 07:46:051518#if defined(OS_CHROMEOS) || defined(OS_WIN)
1519 {
[email protected]6d9087b2013-07-30 08:25:461520 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051521 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1522 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]6d9087b2013-07-30 08:25:461523 kOsCrOS | kOsWin,
1524 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1525 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051526 },
1527#endif
[email protected]910ecfe2013-06-03 23:38:141528#if defined(USE_AURA)
1529 {
1530 "tab-capture-upscale-quality",
1531 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1532 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1533 kOsAll,
1534 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1535 },
1536 {
1537 "tab-capture-downscale-quality",
1538 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1539 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1540 kOsAll,
1541 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1542 },
1543#endif
[email protected]71d4f602013-06-04 23:21:101544 {
[email protected]5e099c62013-06-08 05:46:231545 "enable-spelling-service-feedback",
1546 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1547 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1548 kOsAll,
1549 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1550 },
1551 {
[email protected]71d4f602013-06-04 23:21:101552 "enable-webgl-draft-extensions",
1553 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1554 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1555 kOsAll,
1556 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1557 },
[email protected]deadc492013-06-07 21:39:281558 {
[email protected]962dd6d92013-08-08 22:20:491559 "enable-html-imports",
1560 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1561 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1562 kOsAll,
1563 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1564 },
1565 {
[email protected]deadc492013-06-07 21:39:281566 "high-dpi-support",
1567 IDS_FLAGS_HIDPI_NAME,
1568 IDS_FLAGS_HIDPI_DESCRIPTION,
1569 kOsWin,
[email protected]bde885b2013-09-12 20:55:531570 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
1571 switches::kHighDPISupport, "0")
[email protected]deadc492013-06-07 21:39:281572 },
[email protected]77e69a512013-06-08 05:56:451573#if defined(OS_CHROMEOS)
1574 {
[email protected]0a5dd632013-08-06 23:10:451575 "enable-quickoffice-viewing",
1576 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_NAME,
1577 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_DESCRIPTION,
[email protected]77e69a512013-06-08 05:56:451578 kOsCrOS,
[email protected]0a5dd632013-08-06 23:10:451579 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeViewing),
[email protected]77e69a512013-06-08 05:56:451580 },
[email protected]4b8e2502013-07-23 18:34:361581 {
1582 "enable-sticky-keys",
1583 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1584 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1585 kOsCrOS,
[email protected]f311449d2013-08-01 19:51:241586 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableStickyKeys,
1587 switches::kDisableStickyKeys)
[email protected]4b8e2502013-07-23 18:34:361588 },
[email protected]77e69a512013-06-08 05:56:451589#endif
[email protected]82ca4212013-06-11 12:09:171590 {
[email protected]bc1697a82013-06-27 15:48:311591 "enable-web-midi",
1592 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1593 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1594 kOsMac,
1595 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1596 },
[email protected]020df792013-06-29 14:26:211597 {
1598 "enable-new-profile-management",
1599 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1600 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1601 kOsWin,
1602 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1603 },
1604 {
1605 "enable-gaia-profile-info",
1606 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1607 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221608 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211609 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1610 },
[email protected]dcf6cf32013-07-03 10:53:281611 {
1612 "disable-app-launcher",
1613 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1614 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
[email protected]3be26972013-08-22 08:43:021615 kOsMac | kOsWin,
[email protected]dcf6cf32013-07-03 10:53:281616 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1617 },
[email protected]d4839992013-08-13 05:41:091618#if defined(OS_CHROMEOS)
1619 {
1620 "disable-user-image-sync",
1621 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1622 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1623 kOsCrOS,
1624 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1625 },
1626#endif
[email protected]0e38c3252013-08-14 22:18:511627#if defined(OS_ANDROID)
1628 {
1629 "enable-accessibility-tab-switcher",
1630 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1631 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1632 kOsAndroid,
1633 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561634 },
[email protected]0e38c3252013-08-14 22:18:511635#endif
[email protected]2e9d79f2013-08-16 05:45:561636 {
1637 "enable-batched-shutdown",
1638 IDS_FLAGS_ENABLE_BATCHED_SHUTDOWN_NAME,
1639 IDS_FLAGS_ENABLE_BATCHED_SHUTDOWN_DESCRIPTION,
1640 kOsDesktop,
1641 SINGLE_VALUE_TYPE(switches::kEnableBatchedShutdown)
1642 },
[email protected]be2e40a2013-08-27 02:49:201643 {
1644 "map-image",
1645 IDS_FLAGS_MAP_IMAGE_NAME,
1646 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1647 kOsAll,
1648 MULTI_VALUE_TYPE(kMapImageChoices)
[email protected]4fdc518f2013-08-28 21:37:271649 },
1650 {
1651 "enable-device-motion",
1652 IDS_FLAGS_ENABLE_DEVICE_MOTION_NAME,
1653 IDS_FLAGS_ENABLE_DEVICE_MOTION_DESCRIPTION,
1654 kOsDesktop,
1655 SINGLE_VALUE_TYPE(switches::kEnableDeviceMotion)
1656 },
[email protected]9af61ee92013-09-06 20:31:371657 {
1658 "enable-add-to-homescreen",
1659 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_NAME,
1660 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_DESCRIPTION,
1661 kOsAndroid,
1662#if defined(OS_ANDROID)
1663 SINGLE_VALUE_TYPE(switches::kEnableAddToHomescreen)
1664#else
1665 SINGLE_VALUE_TYPE("")
1666#endif
1667 },
[email protected]a0e4b072011-08-17 01:47:071668};
[email protected]ad2a3ded2010-08-27 13:19:051669
[email protected]a314ee5a2010-10-26 21:23:281670const Experiment* experiments = kExperiments;
1671size_t num_experiments = arraysize(kExperiments);
1672
[email protected]e2ddbc92010-10-15 20:02:071673// Stores and encapsulates the little state that about:flags has.
1674class FlagsState {
1675 public:
1676 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401677 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1678 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071679 bool IsRestartNeededToCommitChanges();
1680 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401681 FlagsStorage* flags_storage,
1682 const std::string& internal_name,
1683 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071684 void RemoveFlagsSwitches(
1685 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401686 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071687 void reset();
1688
1689 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551690 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071691 return Singleton<FlagsState>::get();
1692 }
1693
1694 private:
1695 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531696 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071697
1698 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1699};
1700
[email protected]8a6ff28d2010-12-02 16:35:191701// Adds the internal names for the specified experiment to |names|.
1702void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1703 if (e.type == Experiment::SINGLE_VALUE) {
1704 names->insert(e.internal_name);
1705 } else {
[email protected]83e9fa702013-02-25 19:30:441706 DCHECK(e.type == Experiment::MULTI_VALUE ||
1707 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191708 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441709 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191710 }
1711}
1712
[email protected]28e35af2011-02-09 12:56:221713// Confirms that an experiment is valid, used in a DCHECK in
1714// SanitizeList below.
1715bool ValidateExperiment(const Experiment& e) {
1716 switch (e.type) {
1717 case Experiment::SINGLE_VALUE:
1718 DCHECK_EQ(0, e.num_choices);
1719 DCHECK(!e.choices);
1720 break;
1721 case Experiment::MULTI_VALUE:
1722 DCHECK_GT(e.num_choices, 0);
1723 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531724 DCHECK(e.choices[0].command_line_switch);
1725 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221726 break;
[email protected]83e9fa702013-02-25 19:30:441727 case Experiment::ENABLE_DISABLE_VALUE:
1728 DCHECK_EQ(3, e.num_choices);
1729 DCHECK(!e.choices);
1730 DCHECK(e.command_line_switch);
1731 DCHECK(e.command_line_value);
1732 DCHECK(e.disable_command_line_switch);
1733 DCHECK(e.disable_command_line_value);
1734 break;
[email protected]28e35af2011-02-09 12:56:221735 default:
1736 NOTREACHED();
1737 }
1738 return true;
1739}
1740
[email protected]ad2a3ded2010-08-27 13:19:051741// Removes all experiments from prefs::kEnabledLabsExperiments that are
1742// unknown, to prevent this list to become very long as experiments are added
1743// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401744void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051745 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221746 for (size_t i = 0; i < num_experiments; ++i) {
1747 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191748 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221749 }
[email protected]ad2a3ded2010-08-27 13:19:051750
[email protected]07d666d2013-07-21 23:56:261751 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051752
1753 std::set<std::string> new_enabled_experiments;
1754 std::set_intersection(
1755 known_experiments.begin(), known_experiments.end(),
1756 enabled_experiments.begin(), enabled_experiments.end(),
1757 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1758
[email protected]07d666d2013-07-21 23:56:261759 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401760 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051761}
1762
[email protected]1a47d7e2010-10-15 00:37:241763void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401764 FlagsStorage* flags_storage, std::set<std::string>* result) {
1765 SanitizeList(flags_storage);
1766 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051767}
1768
[email protected]a314ee5a2010-10-26 21:23:281769// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1770// enabled on the current platform.
1771void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401772 FlagsStorage* flags_storage, std::set<std::string>* result) {
1773 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281774
1775 // Filter out any experiments that aren't enabled on the current platform. We
1776 // don't remove these from prefs else syncing to a platform with a different
1777 // set of experiments would be lossy.
1778 std::set<std::string> platform_experiments;
1779 int current_platform = GetCurrentPlatform();
1780 for (size_t i = 0; i < num_experiments; ++i) {
1781 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191782 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581783#if defined(OS_CHROMEOS)
1784 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1785 AddInternalName(experiments[i], &platform_experiments);
1786#endif
[email protected]a314ee5a2010-10-26 21:23:281787 }
1788
1789 std::set<std::string> new_enabled_experiments;
1790 std::set_intersection(
1791 platform_experiments.begin(), platform_experiments.end(),
1792 result->begin(), result->end(),
1793 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1794
1795 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051796}
1797
[email protected]8a6ff28d2010-12-02 16:35:191798// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191799Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221800 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441801 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1802 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191803 ListValue* result = new ListValue;
1804 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191805 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441806 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191807 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441808 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221809 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191810 result->Append(value);
1811 }
1812 return result;
1813}
1814
[email protected]e2ddbc92010-10-15 20:02:071815} // namespace
1816
[email protected]83e9fa702013-02-25 19:30:441817std::string Experiment::NameForChoice(int index) const {
1818 DCHECK(type == Experiment::MULTI_VALUE ||
1819 type == Experiment::ENABLE_DISABLE_VALUE);
1820 DCHECK_LT(index, num_choices);
1821 return std::string(internal_name) + testing::kMultiSeparator +
1822 base::IntToString(index);
1823}
1824
1825string16 Experiment::DescriptionForChoice(int index) const {
1826 DCHECK(type == Experiment::MULTI_VALUE ||
1827 type == Experiment::ENABLE_DISABLE_VALUE);
1828 DCHECK_LT(index, num_choices);
1829 int description_id;
1830 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1831 const int kEnableDisableDescriptionIds[] = {
1832 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1833 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1834 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1835 };
1836 description_id = kEnableDisableDescriptionIds[index];
1837 } else {
1838 description_id = choices[index].description_id;
1839 }
1840 return l10n_util::GetStringUTF16(description_id);
1841}
1842
[email protected]e6d1c4f2013-06-12 17:37:401843void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1844 CommandLine* command_line) {
1845 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1846 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051847}
1848
[email protected]6d98abf2013-06-17 23:35:511849bool AreSwitchesIdenticalToCurrentCommandLine(
1850 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1851 std::set<CommandLine::StringType> new_flags =
1852 ExtractFlagsFromCommandLine(new_cmdline);
1853 std::set<CommandLine::StringType> active_flags =
1854 ExtractFlagsFromCommandLine(active_cmdline);
1855
1856 // Needed because std::equal doesn't check if the 2nd set is empty.
1857 if (new_flags.size() != active_flags.size())
1858 return false;
1859
1860 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1861}
1862
[email protected]e6d1c4f2013-06-12 17:37:401863void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521864 FlagAccess access,
1865 base::ListValue* supported_experiments,
1866 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051867 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401868 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051869
1870 int current_platform = GetCurrentPlatform();
1871
[email protected]a314ee5a2010-10-26 21:23:281872 for (size_t i = 0; i < num_experiments; ++i) {
1873 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051874
1875 DictionaryValue* data = new DictionaryValue();
1876 data->SetString("internal_name", experiment.internal_name);
1877 data->SetString("name",
1878 l10n_util::GetStringUTF16(experiment.visible_name_id));
1879 data->SetString("description",
1880 l10n_util::GetStringUTF16(
1881 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401882
1883 ListValue* supported_platforms = new ListValue();
1884 AddOsStrings(experiment.supported_platforms, supported_platforms);
1885 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051886
[email protected]28e35af2011-02-09 12:56:221887 switch (experiment.type) {
1888 case Experiment::SINGLE_VALUE:
1889 data->SetBoolean(
1890 "enabled",
1891 enabled_experiments.count(experiment.internal_name) > 0);
1892 break;
1893 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441894 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221895 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1896 break;
1897 default:
1898 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191899 }
1900
[email protected]ee28495a2013-05-20 04:10:521901 bool supported = (experiment.supported_platforms & current_platform) != 0;
1902#if defined(OS_CHROMEOS)
1903 if (access == kOwnerAccessToFlags &&
1904 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1905 supported = true;
1906 }
1907#endif
1908 if (supported)
1909 supported_experiments->Append(data);
1910 else
1911 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051912 }
[email protected]ad2a3ded2010-08-27 13:19:051913}
1914
[email protected]ad2a3ded2010-08-27 13:19:051915bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551916 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051917}
1918
[email protected]e6d1c4f2013-06-12 17:37:401919void SetExperimentEnabled(FlagsStorage* flags_storage,
1920 const std::string& internal_name,
1921 bool enable) {
1922 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1923 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071924}
1925
1926void RemoveFlagsSwitches(
1927 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551928 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071929}
1930
[email protected]e6d1c4f2013-06-12 17:37:401931void ResetAllFlags(FlagsStorage* flags_storage) {
1932 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001933}
1934
[email protected]a314ee5a2010-10-26 21:23:281935int GetCurrentPlatform() {
1936#if defined(OS_MACOSX)
1937 return kOsMac;
1938#elif defined(OS_WIN)
1939 return kOsWin;
1940#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1941 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211942#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281943 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401944#elif defined(OS_ANDROID)
1945 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281946#else
1947#error Unknown platform
1948#endif
1949}
1950
[email protected]e6d1c4f2013-06-12 17:37:401951void RecordUMAStatistics(FlagsStorage* flags_storage) {
1952 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541953 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1954 ++it) {
1955 std::string action("AboutFlags_");
1956 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381957 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541958 }
1959 // Since flag metrics are recorded every startup, add a tick so that the
1960 // stats can be made meaningful.
1961 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381962 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1963 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541964}
1965
[email protected]e2ddbc92010-10-15 20:02:071966//////////////////////////////////////////////////////////////////////////////
1967// FlagsState implementation.
1968
1969namespace {
1970
[email protected]83e9fa702013-02-25 19:30:441971typedef std::map<std::string, std::pair<std::string, std::string> >
1972 NameToSwitchAndValueMap;
1973
1974void SetFlagToSwitchMapping(const std::string& key,
1975 const std::string& switch_name,
1976 const std::string& switch_value,
1977 NameToSwitchAndValueMap* name_to_switch_map) {
1978 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1979 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1980}
1981
[email protected]e2ddbc92010-10-15 20:02:071982void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401983 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071984 if (command_line->HasSwitch(switches::kNoExperiments))
1985 return;
1986
1987 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001988
[email protected]e6d1c4f2013-06-12 17:37:401989 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1990 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071991
[email protected]a82744532011-02-11 16:15:531992 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191993 for (size_t i = 0; i < num_experiments; ++i) {
1994 const Experiment& e = experiments[i];
1995 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441996 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1997 e.command_line_value, &name_to_switch_map);
1998 } else if (e.type == Experiment::MULTI_VALUE) {
1999 for (int j = 0; j < e.num_choices; ++j) {
2000 SetFlagToSwitchMapping(e.NameForChoice(j),
2001 e.choices[j].command_line_switch,
2002 e.choices[j].command_line_value,
2003 &name_to_switch_map);
2004 }
[email protected]8a6ff28d2010-12-02 16:35:192005 } else {
[email protected]83e9fa702013-02-25 19:30:442006 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2007 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2008 &name_to_switch_map);
2009 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2010 e.command_line_value, &name_to_switch_map);
2011 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2012 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192013 }
2014 }
[email protected]e2ddbc92010-10-15 20:02:072015
2016 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:532017 flags_switches_.insert(
2018 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2019 std::string()));
[email protected]e2ddbc92010-10-15 20:02:072020 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2021 it != enabled_experiments.end();
2022 ++it) {
2023 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532024 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192025 name_to_switch_map.find(experiment_name);
2026 if (name_to_switch_it == name_to_switch_map.end()) {
2027 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072028 continue;
[email protected]8a6ff28d2010-12-02 16:35:192029 }
[email protected]e2ddbc92010-10-15 20:02:072030
[email protected]a82744532011-02-11 16:15:532031 const std::pair<std::string, std::string>&
2032 switch_and_value_pair = name_to_switch_it->second;
2033
[email protected]9737b3632013-08-26 09:23:232034 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532035 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2036 switch_and_value_pair.second);
2037 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072038 }
2039 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:532040 flags_switches_.insert(
2041 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2042 std::string()));
[email protected]e2ddbc92010-10-15 20:02:072043}
2044
2045bool FlagsState::IsRestartNeededToCommitChanges() {
2046 return needs_restart_;
2047}
2048
[email protected]e6d1c4f2013-06-12 17:37:402049void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2050 const std::string& internal_name,
2051 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442052 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192053 if (at_index != std::string::npos) {
2054 DCHECK(enable);
2055 // We're being asked to enable a multi-choice experiment. Disable the
2056 // currently selected choice.
2057 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222058 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402059 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192060
[email protected]28e35af2011-02-09 12:56:222061 // And enable the new choice, if it is not the default first choice.
2062 if (internal_name != experiment_name + "@0") {
2063 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402064 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082065 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402066 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222067 }
[email protected]8a6ff28d2010-12-02 16:35:192068 return;
2069 }
2070
[email protected]ad2a3ded2010-08-27 13:19:052071 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402072 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052073
[email protected]8a6ff28d2010-12-02 16:35:192074 const Experiment* e = NULL;
2075 for (size_t i = 0; i < num_experiments; ++i) {
2076 if (experiments[i].internal_name == internal_name) {
2077 e = experiments + i;
2078 break;
2079 }
2080 }
2081 DCHECK(e);
2082
2083 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592084 if (enable)
[email protected]147492b2013-03-19 23:52:082085 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592086 else
[email protected]147492b2013-03-19 23:52:082087 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192088 } else {
2089 if (enable) {
2090 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082091 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192092 } else {
2093 // Find the currently enabled choice and disable it.
2094 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442095 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192096 if (enabled_experiments.find(choice_name) !=
2097 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082098 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192099 enabled_experiments.erase(choice_name);
2100 // Continue on just in case there's a bug and more than one
2101 // experiment for this choice was enabled.
2102 }
2103 }
2104 }
2105 }
[email protected]ad2a3ded2010-08-27 13:19:052106
[email protected]e6d1c4f2013-06-12 17:37:402107 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052108}
2109
[email protected]e2ddbc92010-10-15 20:02:072110void FlagsState::RemoveFlagsSwitches(
2111 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532112 for (std::map<std::string, std::string>::const_iterator
2113 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2114 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072115 }
2116}
2117
[email protected]e6d1c4f2013-06-12 17:37:402118void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002119 needs_restart_ = true;
2120
2121 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402122 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002123}
2124
[email protected]e2ddbc92010-10-15 20:02:072125void FlagsState::reset() {
2126 needs_restart_ = false;
2127 flags_switches_.clear();
2128}
2129
[email protected]38e46812011-05-09 20:49:222130} // namespace
[email protected]e2ddbc92010-10-15 20:02:072131
2132namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192133
2134// WARNING: '@' is also used in the html file. If you update this constant you
2135// also need to update the html file.
2136const char kMultiSeparator[] = "@";
2137
[email protected]e2ddbc92010-10-15 20:02:072138void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552139 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072140}
[email protected]a314ee5a2010-10-26 21:23:282141
2142void SetExperiments(const Experiment* e, size_t count) {
2143 if (!e) {
2144 experiments = kExperiments;
2145 num_experiments = arraysize(kExperiments);
2146 } else {
2147 experiments = e;
2148 num_experiments = count;
2149 }
2150}
2151
[email protected]8a6ff28d2010-12-02 16:35:192152const Experiment* GetExperiments(size_t* count) {
2153 *count = num_experiments;
2154 return experiments;
2155}
2156
[email protected]e2ddbc92010-10-15 20:02:072157} // namespace testing
2158
[email protected]1a47d7e2010-10-15 00:37:242159} // namespace about_flags