blob: f208b142d9de1587d6cf49d1fbfe48194f77b9c0 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4115#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2016#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5218#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4019#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1022#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3823#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0224#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0227#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1728#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5929#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4830#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2731#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2432#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5633#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2434#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5635
[email protected]dc04be7c2012-03-15 23:57:4936#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3137#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4938#endif
39
[email protected]badba1ad2012-11-16 17:21:4640#if defined(OS_CHROMEOS)
41#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5142#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4643#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]6d98abf2013-06-17 23:35:5188// Convert switch constants to proper CommandLine::StringType strings.
89CommandLine::StringType GetSwitchString(const std::string& flag) {
90 CommandLine cmd_line(CommandLine::NO_PROGRAM);
91 cmd_line.AppendSwitch(flag);
92 DCHECK(cmd_line.argv().size() == 2);
93 return cmd_line.argv()[1];
94}
95
96// Scoops flags from a command line.
97std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
98 const CommandLine& cmdline) {
99 std::set<CommandLine::StringType> flags;
100 // First do the ones between --flag-switches-begin and --flag-switches-end.
101 CommandLine::StringVector::const_iterator first =
102 std::find(cmdline.argv().begin(), cmdline.argv().end(),
103 GetSwitchString(switches::kFlagSwitchesBegin));
104 CommandLine::StringVector::const_iterator last =
105 std::find(cmdline.argv().begin(), cmdline.argv().end(),
106 GetSwitchString(switches::kFlagSwitchesEnd));
107 if (first != cmdline.argv().end() && last != cmdline.argv().end())
108 flags.insert(first + 1, last);
109#if defined(OS_CHROMEOS)
110 // Then add those between --policy-switches-begin and --policy-switches-end.
111 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
112 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
113 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
115 if (first != cmdline.argv().end() && last != cmdline.argv().end())
116 flags.insert(first + 1, last);
117#endif
118 return flags;
119}
120
[email protected]fb854192013-02-06 01:30:04121const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
122 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
123 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
124 switches::kEnableCompositingForFixedPosition, ""},
125 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
126 switches::kDisableCompositingForFixedPosition, ""},
127 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
128 switches::kEnableHighDpiCompositingForFixedPosition, ""}
129};
130
[email protected]d8221b22013-05-23 05:35:43131const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
132 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
133 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
134 switches::kEnableCompositingForTransition, ""},
135 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
136 switches::kDisableCompositingForTransition, ""},
137};
138
[email protected]06fc4d3b2013-07-08 21:07:24139const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
140 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
141 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
142 switches::kEnableAcceleratedFixedRootBackground, ""},
143 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
144 switches::kDisableAcceleratedFixedRootBackground, ""},
145};
146
[email protected]8b1c3c72013-01-25 01:48:43147const Experiment::Choice kGDIPresentChoices[] = {
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
149 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
150 switches::kDoFirstShowPresentWithGDI, ""},
151 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
152 switches::kDoAllShowPresentWithGDI, ""}
153};
154
[email protected]d7932532012-11-21 21:10:31155const Experiment::Choice kTouchEventsChoices[] = {
156 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
157 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
158 switches::kTouchEvents,
159 switches::kTouchEventsEnabled },
160 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
161 switches::kTouchEvents,
162 switches::kTouchEventsDisabled }
163};
164
[email protected]347a0c72012-05-14 20:28:06165const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31166 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20167 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06168 switches::kTouchOptimizedUI,
169 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20170 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06171 switches::kTouchOptimizedUI,
172 switches::kTouchOptimizedUIDisabled }
173};
174
[email protected]66f409c2012-10-04 20:59:04175const Experiment::Choice kNaClDebugMaskChoices[] = {
176 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
177 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
178 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
179 // an option to switch off its debugging.
180 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
181 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
182 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
183 switches::kNaClDebugMask, "*://*/*debug.nmf" }
184};
185
[email protected]ea2f3342012-09-21 21:13:36186#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02187
188const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02190 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24191 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19192 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24193 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02194};
[email protected]a78c7432013-03-13 06:22:43195
[email protected]ea2f3342012-09-21 21:13:36196#endif
197
[email protected]9323fdd12013-02-23 00:31:36198const Experiment::Choice kImplSidePaintingChoices[] = {
199 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
200 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
201 cc::switches::kEnableImplSidePainting, ""},
202 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
203 cc::switches::kDisableImplSidePainting, ""}
204};
205
[email protected]0c04d1c2013-07-10 00:02:32206const Experiment::Choice kDelegatedRendererChoices[] = {
207 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
208 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
209 switches::kEnableDelegatedRenderer, ""},
210 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
211 switches::kDisableDelegatedRenderer, ""}
212};
213
[email protected]a42c85f2013-04-04 18:15:12214const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
215 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
216 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
217 cc::switches::kMaxTilesForInterestArea, "64"},
218 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
219 cc::switches::kMaxTilesForInterestArea, "128"},
220 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
221 cc::switches::kMaxTilesForInterestArea, "256"},
222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
223 cc::switches::kMaxTilesForInterestArea, "512"}
224};
225
[email protected]a3618122013-04-26 21:15:34226const Experiment::Choice kDefaultTileWidthChoices[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
228 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
229 switches::kDefaultTileWidth, "128"},
230 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
231 switches::kDefaultTileWidth, "256"},
232 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
233 switches::kDefaultTileWidth, "512"},
234 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
235 switches::kDefaultTileWidth, "1024"}
236};
237
238const Experiment::Choice kDefaultTileHeightChoices[] = {
239 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
240 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
241 switches::kDefaultTileHeight, "128"},
242 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
243 switches::kDefaultTileHeight, "256"},
244 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
245 switches::kDefaultTileHeight, "512"},
246 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
247 switches::kDefaultTileHeight, "1024"}
248};
249
[email protected]38484df12013-04-10 16:42:03250const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21251 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
252 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
253 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03254 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
255 switches::kUseSimpleCacheBackend, "on"}
256};
257
[email protected]910ecfe2013-06-03 23:38:14258const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
259 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
260 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
261 switches::kTabCaptureUpscaleQuality, "fast" },
262 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
263 switches::kTabCaptureUpscaleQuality, "good" },
264 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
265 switches::kTabCaptureUpscaleQuality, "best" },
266};
267
268const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
269 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
270 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
271 switches::kTabCaptureDownscaleQuality, "fast" },
272 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
273 switches::kTabCaptureDownscaleQuality, "good" },
274 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
275 switches::kTabCaptureDownscaleQuality, "best" },
276};
277
[email protected]4bc5050c2010-11-18 17:55:54278// RECORDING USER METRICS FOR FLAGS:
279// -----------------------------------------------------------------------------
280// The first line of the experiment is the internal name. If you'd like to
281// gather statistics about the usage of your flag, you should append a marker
282// comment to the end of the feature name, like so:
283// "my-special-feature", // FLAGS:RECORD_UMA
284//
285// After doing that, run //chrome/tools/extract_actions.py (see instructions at
286// the top of that file for details) to update the chromeactions.txt file, which
287// will enable UMA to record your feature flag.
288//
[email protected]783d5bb2012-10-24 03:47:14289// After your feature has shipped under a flag, you can locate the metrics under
290// the action name AboutFlags_internal-action-name. Actions are recorded once
291// per startup, so you should divide this number by AboutFlags_StartupTick to
292// get a sense of usage. Note that this will not be the same as number of users
293// with a given feature enabled because users can quit and relaunch the
294// application multiple times over a given time interval. The dashboard also
295// shows you how many (metrics reporting) users have enabled the flag over the
296// last seven days. However, note that this is not the same as the number of
297// users who have the flag enabled, since enabling the flag happens once,
298// whereas running with the flag enabled happens until the user flips the flag
299// again.
[email protected]4bc5050c2010-11-18 17:55:54300
[email protected]8a6ff28d2010-12-02 16:35:19301// To add a new experiment add to the end of kExperiments. There are two
302// distinct types of experiments:
303// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
304// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22305// . MULTI_VALUE: a list of choices, the first of which should correspond to a
306// deactivated state for this lab (i.e. no command line option). To specify
307// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
308// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19309// See the documentation of Experiment for details on the fields.
310//
311// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05312const Experiment kExperiments[] = {
313 {
[email protected]aac169d2011-03-18 19:53:03314 "expose-for-tabs", // FLAGS:RECORD_UMA
315 IDS_FLAGS_TABPOSE_NAME,
316 IDS_FLAGS_TABPOSE_DESCRIPTION,
317 kOsMac,
318#if defined(OS_MACOSX)
319 // The switch exists only on OS X.
320 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
321#else
322 SINGLE_VALUE_TYPE("")
323#endif
324 },
325 {
[email protected]4bc5050c2010-11-18 17:55:54326 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05327 IDS_FLAGS_CONFLICTS_CHECK_NAME,
328 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
329 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19330 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05331 },
332 {
[email protected]96c6f4c2011-05-18 19:36:22333 "ignore-gpu-blacklist",
334 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
335 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
336 kOsAll,
337 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
338 },
339 {
[email protected]0110cf112011-07-02 00:39:43340 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22341 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
342 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23343 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44344 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
345 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22346 },
347 {
[email protected]72787e392012-03-23 05:55:43348 "threaded-compositing-mode",
349 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
350 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58351 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44352 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
353 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59354 },
355 {
[email protected]17e27692013-02-06 17:02:09356 "force-accelerated-composited-scrolling",
357 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
358 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
359 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44360 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
361 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09362 },
363 {
[email protected]8b1c3c72013-01-25 01:48:43364 "present-with-GDI",
365 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
366 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
367 kOsWin,
368 MULTI_VALUE_TYPE(kGDIPresentChoices)
369 },
370 {
[email protected]2b608752013-05-01 03:34:36371 "enable-experimental-canvas-features",
372 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
373 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
374 kOsAll,
375 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
376 },
377 {
[email protected]81c64af62012-06-06 20:15:52378 "disable-accelerated-2d-canvas",
379 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
380 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
381 kOsAll,
382 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
383 },
384 {
[email protected]efcde132012-05-30 01:05:18385 "disable-threaded-animation",
386 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
387 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59388 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37389 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59390 },
391 {
[email protected]5963b772011-02-09 22:55:38392 "composited-layer-borders",
393 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
394 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
395 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57396 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38397 },
398 {
[email protected]a8f1eaa2011-03-07 19:00:58399 "show-fps-counter",
400 IDS_FLAGS_SHOW_FPS_COUNTER,
401 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
402 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57403 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58404 },
[email protected]8ff7f342011-05-25 01:49:47405 {
[email protected]70c98a332011-12-21 20:51:52406 "accelerated-filters",
407 IDS_FLAGS_ACCELERATED_FILTERS,
408 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
409 kOsAll,
410 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
411 },
412 {
[email protected]8ff7f342011-05-25 01:49:47413 "disable-gpu-vsync",
414 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
415 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56416 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47417 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
418 },
[email protected]deaba6d52011-09-23 14:47:12419 {
[email protected]4052d832013-01-16 05:31:01420 "enable-webgl",
421 IDS_FLAGS_ENABLE_WEBGL_NAME,
422 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
423 kOsAndroid,
424#if defined(OS_ANDROID)
425 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
426#else
427 SINGLE_VALUE_TYPE("")
428#endif
429 },
430 {
[email protected]deaba6d52011-09-23 14:47:12431 "disable-webgl",
432 IDS_FLAGS_DISABLE_WEBGL_NAME,
433 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56434 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01435#if defined(OS_ANDROID)
436 SINGLE_VALUE_TYPE("")
437#else
[email protected]deaba6d52011-09-23 14:47:12438 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01439#endif
[email protected]deaba6d52011-09-23 14:47:12440 },
[email protected]09096e02012-05-24 11:12:04441 {
[email protected]7ef205952013-07-09 02:14:41442 "enable-d3d11",
443 IDS_FLAGS_ENABLE_D3D11_NAME,
444 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
445 kOsWin,
446 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
447 },
448 {
[email protected]ce585bf2013-03-14 16:25:16449 "disable-webrtc",
450 IDS_FLAGS_DISABLE_WEBRTC_NAME,
451 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05452 kOsAndroid,
453#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16454 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05455#else
456 SINGLE_VALUE_TYPE("")
457#endif
458 },
[email protected]5e2bc8c2013-05-28 22:59:57459#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30460 {
461 "enable-sctp-data-channels",
462 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
463 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
464 kOsAll,
465 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
466 },
[email protected]5e2bc8c2013-05-28 22:59:57467#endif
[email protected]34cb5292013-04-15 06:06:31468#if defined(OS_ANDROID)
469 {
[email protected]7b8a31632013-06-13 22:42:37470 "disable-webaudio",
471 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
472 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31473 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37474 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31475 },
476#endif
[email protected]d9da9582013-01-31 04:59:05477 {
[email protected]96bcdc102012-05-24 23:42:10478 "fixed-position-creates-stacking-context",
479 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
480 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
481 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44482 ENABLE_DISABLE_VALUE_TYPE(
483 switches::kEnableFixedPositionCreatesStackingContext,
484 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10485 },
[email protected]fb854192013-02-06 01:30:04486 {
487 "enable-compositing-for-fixed-position",
488 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
489 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
490 kOsAll,
491 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
492 },
[email protected]d8221b22013-05-23 05:35:43493 {
494 "enable-compositing-for-transition",
495 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
496 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
497 kOsAll,
498 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
499 },
[email protected]06fc4d3b2013-07-08 21:07:24500 {
501 "enable-accelerated-fixed-root-background",
502 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
503 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
504 kOsAll,
505 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
506 },
[email protected]a7640ef22012-10-06 00:52:08507 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53508 {
[email protected]e3791ce92011-08-09 01:03:32509 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40510 IDS_FLAGS_ENABLE_NACL_NAME,
511 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56512 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19513 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40514 },
515 {
[email protected]9addd1c2012-09-15 14:28:24516 "enable-nacl-debug", // FLAGS:RECORD_UMA
517 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
518 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56519 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24520 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13521 },
522 {
[email protected]66f409c2012-10-04 20:59:04523 "nacl-debug-mask", // FLAGS:RECORD_UMA
524 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
525 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56526 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04527 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
528 },
529 {
[email protected]7babd1c2012-08-08 20:35:29530 "enable-pnacl", // FLAGS:RECORD_UMA
531 IDS_FLAGS_ENABLE_PNACL_NAME,
532 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56533 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29534 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
535 },
536 {
[email protected]4bc5050c2010-11-18 17:55:54537 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32538 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
539 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56540 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19541 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32542 },
[email protected]3627b06d2010-11-12 16:36:16543 {
[email protected]ac2e2acd2013-03-21 12:57:29544 "extensions-on-chrome-urls",
545 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
546 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
547 kOsAll,
548 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
549 },
550 {
[email protected]88c92012013-07-02 11:56:34551 "enable-fast-unload",
552 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
553 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
554 kOsAll,
555 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
556 },
557 {
[email protected]e9cddd52013-03-23 17:37:53558 "enable-adview",
559 IDS_FLAGS_ENABLE_ADVIEW_NAME,
560 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
561 kOsDesktop,
562 SINGLE_VALUE_TYPE(switches::kEnableAdview)
563 },
564 {
565 "enable-adview-src-attribute",
566 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
567 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
568 kOsDesktop,
569 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
570 },
571 {
[email protected]1f4da9e2013-06-27 05:23:44572 "enable-app-window-controls",
573 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
574 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
575 kOsDesktop,
576 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
577 },
578 {
[email protected]544471a2012-10-13 05:27:09579 "action-box",
[email protected]cab18ef2012-04-27 07:22:03580 IDS_FLAGS_ACTION_BOX_NAME,
581 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56582 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44583 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
584 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03585 },
586 {
[email protected]3a362432012-06-18 20:39:51587 "script-badges",
588 IDS_FLAGS_SCRIPT_BADGES_NAME,
589 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56590 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09591 SINGLE_VALUE_TYPE(switches::kScriptBadges)
592 },
593 {
594 "script-bubble",
595 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
596 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56597 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44598 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
599 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51600 },
601 {
[email protected]cbe224d2011-08-04 22:12:49602 "apps-new-install-bubble",
603 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
604 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56605 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49606 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
607 },
608 {
[email protected]80bd24e2010-11-30 09:34:38609 "disable-hyperlink-auditing",
610 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
611 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
612 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19613 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51614 },
615 {
616 "experimental-location-features", // FLAGS:RECORD_UMA
617 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
618 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
619 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19620 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
621 },
622 {
[email protected]5aea1862011-03-23 23:55:39623 "tab-groups-context-menu",
624 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
625 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
626 kOsWin,
627 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
628 },
[email protected]c94cebd2012-06-21 00:55:28629 {
630 "enable-instant-extended-api",
631 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
632 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46633 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51634 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
635 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28636 },
[email protected]e9bf9d92011-03-31 20:57:15637 {
[email protected]8cc9e532013-05-06 21:01:47638 "enable-local-first-load-ntp",
639 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
640 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46641 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47642 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
643 switches::kDisableLocalFirstLoadNTP)
644 },
[email protected]333bdc52013-07-16 00:37:04645#if defined(OS_ANDROID)
646 {
647 "enable-new-ntp",
648 IDS_FLAGS_ENABLE_NEW_NTP,
649 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
650 kOsAndroid,
651 SINGLE_VALUE_TYPE(switches::kEnableNewNTP)
652 },
653#endif
[email protected]8cc9e532013-05-06 21:01:47654 {
[email protected]354e33b2011-06-15 00:29:10655 "static-ip-config",
656 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
657 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
658 kOsCrOS,
659#if defined(OS_CHROMEOS)
660 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24661 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10662#else
663 SINGLE_VALUE_TYPE("")
664#endif
665 },
[email protected]3eb5728c2011-06-20 22:32:24666 {
667 "show-autofill-type-predictions",
668 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
669 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
670 kOsAll,
[email protected]e217c5632013-04-12 19:11:48671 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24672 },
[email protected]bff4d3e2011-06-21 23:58:52673 {
[email protected]e755a382012-09-13 17:16:35674 "enable-gesture-tap-highlight",
675 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
676 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
677 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47678 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
679 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35680 },
681 {
[email protected]a22ebd812011-06-23 00:05:39682 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
683 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
684 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
685 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40686 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25687 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39688 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
689 },
[email protected]81a6b0b2011-06-24 17:55:40690 {
[email protected]7e7a28092011-12-09 22:24:55691 "enable-panels",
692 IDS_FLAGS_ENABLE_PANELS_NAME,
693 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56694 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55695 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54696 },
[email protected]e3749d12011-07-25 22:22:12697 {
[email protected]27c14f02012-06-22 17:29:58698 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27699 "save-page-as-mhtml", // FLAGS:RECORD_UMA
700 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
701 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
702 kOsMac | kOsWin | kOsLinux,
703 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
704 },
705 {
[email protected]b7bb44f2011-09-01 05:17:03706 "enable-autologin",
707 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
708 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
709 kOsMac | kOsWin | kOsLinux,
710 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
711 },
[email protected]b9841172011-09-26 23:36:09712 {
[email protected]903e63382013-06-01 00:40:58713 "enable-quic",
714 IDS_FLAGS_ENABLE_QUIC_NAME,
715 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
716 kOsAll,
717 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
718 switches::kDisableQuic)
719 },
720 {
[email protected]eb8f88e2013-07-15 09:52:17721 "enable-quic-https",
722 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
723 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
724 kOsAll,
725 SINGLE_VALUE_TYPE(switches::kEnableQuicHttps)
726 },
727 {
[email protected]bca09b9982013-06-27 22:30:46728 "enable-spdy4a2",
729 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
730 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
731 kOsAll,
732 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
733 },
734 {
[email protected]27b3fe92012-03-21 05:35:06735 "enable-async-dns",
736 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
737 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46738 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44739 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
740 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06741 },
[email protected]85dd7ca2013-05-30 23:53:00742#if defined(ANDROID) && !defined(GOOGLE_TV)
743 {
744 "enable-media-source",
745 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
746 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
747 kOsAll,
748 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
749 },
750#else
[email protected]27b3fe92012-03-21 05:35:06751 {
[email protected]1eb93802012-09-11 18:57:56752 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31753 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
754 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32755 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31756 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44757 },
[email protected]85dd7ca2013-05-30 23:53:00758#endif
[email protected]e4e68dbb2011-11-18 01:50:22759 {
[email protected]16c242d2013-05-31 23:56:47760 "enable-encrypted-media",
761 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
762 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56763 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47764 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
765 },
766 {
767 "disable-encrypted-media",
768 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
769 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
770 kOsDesktop,
771 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03772 },
[email protected]f88628792012-12-18 07:07:50773 {
[email protected]d21ead42013-06-24 06:35:06774 "override-encrypted-media-canplaytype",
775 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
776 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
777 kOsMac | kOsWin,
778 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
779 },
780 {
[email protected]f88628792012-12-18 07:07:50781 "enable-opus-playback",
782 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
783 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56784 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50785 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
786 },
[email protected]b150b5532013-06-15 00:50:54787 {
[email protected]6ac955b2013-04-19 23:43:32788 "enable-vp8-alpha-playback",
789 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
790 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
791 kOsDesktop,
792 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
793 },
794 {
[email protected]ca6eaa5a2013-01-24 16:16:04795 "enable-managed-users",
796 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
797 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08798 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04799 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
800 },
[email protected]dc04be7c2012-03-15 23:57:49801#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50802 {
[email protected]2a13a9a2013-04-19 04:00:21803 "ash-disable-auto-maximizing",
804 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
805 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
806 kOsWin | kOsLinux | kOsCrOS,
807 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
808 },
809 {
[email protected]cda278d2012-10-30 20:31:40810 "ash-disable-auto-window-placement",
811 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
812 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
813 kOsWin | kOsLinux | kOsCrOS,
814 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
815 },
[email protected]b4e4ec42012-11-29 21:42:40816 {
[email protected]16f55a22013-02-13 23:47:34817 "ash-disable-per-app-launcher",
818 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
819 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40820 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34821 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40822 },
[email protected]dc04be7c2012-03-15 23:57:49823#endif
[email protected]eaae8b462012-01-20 22:20:39824 {
[email protected]db543d322011-12-15 20:40:15825 "per-tile-painting",
826 IDS_FLAGS_PER_TILE_PAINTING_NAME,
827 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37828 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37829 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15830 },
[email protected]bf88c032011-12-22 19:05:47831 {
832 "enable-javascript-harmony",
833 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
834 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
835 kOsAll,
836 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
837 },
[email protected]7e7f378a2012-01-05 14:35:37838 {
[email protected]85646172012-01-09 22:45:54839 "enable-tab-browser-dragging",
840 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
841 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
842 kOsWin,
843 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
844 },
845 {
[email protected]068b7b52012-02-27 12:41:44846 "disable-restore-session-state",
847 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
848 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37849 kOsAll,
[email protected]068b7b52012-02-27 12:41:44850 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37851 },
[email protected]88864db2012-01-18 20:56:35852 {
853 "disable-software-rasterizer",
854 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
855 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
856#if defined(ENABLE_SWIFTSHADER)
857 kOsAll,
858#else
859 0,
860#endif
861 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
862 },
[email protected]15a5d722012-01-23 09:11:14863 {
[email protected]c1b18ea2013-07-10 13:01:16864 "enable-experimental-web-platform-features",
865 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
866 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16867 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16868 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49869 },
870 {
[email protected]0f95a252012-09-13 22:30:04871 "enable-css-shaders",
872 IDS_FLAGS_CSS_SHADERS_NAME,
873 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
874 kOsAll,
875 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
876 },
877 {
[email protected]3e8befc2012-03-13 01:17:03878 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16879 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
880 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56881 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03882 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16883 },
[email protected]dc04be7c2012-03-15 23:57:49884#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01885 {
[email protected]3cd198a22012-03-12 20:38:01886 "enable-ash-oak",
887 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
888 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
889 kOsAll,
890 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
891 },
[email protected]31cf1c52012-02-29 20:55:01892#endif
[email protected]184ec592012-03-01 11:54:28893 {
894 "enable-devtools-experiments",
895 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
896 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56897 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28898 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
899 },
[email protected]76d1854e2012-03-02 23:57:44900 {
[email protected]3db81f242013-07-12 08:56:17901 "remote-debugging-raw-usb",
902 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
903 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
[email protected]be99de42013-07-12 13:51:16904 kOsDesktop,
[email protected]3db81f242013-07-12 08:56:17905 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
906 },
907 {
[email protected]2fefdb32013-02-26 14:28:10908 "silent-debugger-extension-api",
909 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
910 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
911 kOsDesktop,
912 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
913 },
914 {
[email protected]76d1854e2012-03-02 23:57:44915 "enable-suggestions-ntp",
916 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
917 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56918 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44919 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
920 },
[email protected]a3d54252012-04-05 20:04:13921 {
[email protected]1dbaf5e2012-11-30 05:51:32922 "spellcheck-autocorrect",
923 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
924 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
925 kOsWin | kOsLinux | kOsCrOS,
926 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
927 },
928 {
[email protected]e27137282013-06-20 02:38:35929 "enable-scroll-prediction",
930 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
931 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
932 kOsDesktop,
933 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
934 },
935 {
[email protected]d7932532012-11-21 21:10:31936 "touch-events",
937 IDS_TOUCH_EVENTS_NAME,
938 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56939 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31940 MULTI_VALUE_TYPE(kTouchEventsChoices)
941 },
942 {
[email protected]c9c73ad42012-04-18 03:35:59943 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06944 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
945 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55946 kOsWin,
[email protected]347a0c72012-05-14 20:28:06947 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59948 },
[email protected]8a6aaa72012-04-20 20:53:58949 {
[email protected]b9c96ff2012-11-26 22:24:40950 "disable-touch-adjustment",
951 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
952 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
953 kOsWin | kOsLinux | kOsCrOS,
954 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
955 },
956 {
[email protected]0b9383a2012-10-26 00:58:16957 "enable-tab-capture",
958 IDS_ENABLE_TAB_CAPTURE_NAME,
959 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25960 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44961 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
962 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16963 },
[email protected]0b60afa2012-04-19 17:36:39964#if defined(OS_CHROMEOS)
965 {
[email protected]690de0f2013-06-26 00:51:16966 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31967 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
968 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
969 kOsCrOS,
970 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
971 },
972 {
[email protected]7c4a9bc2012-09-11 22:10:05973 "enable-background-loader",
974 IDS_ENABLE_BACKLOADER_NAME,
975 IDS_ENABLE_BACKLOADER_DESCRIPTION,
976 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24977 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05978 },
979 {
[email protected]3f4181a2013-02-01 21:31:07980 "enable-screensaver-extension",
981 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
982 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
983 kOsCrOS,
984 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
985 },
986 {
[email protected]0b60afa2012-04-19 17:36:39987 "no-discard-tabs",
988 IDS_FLAGS_NO_DISCARD_TABS_NAME,
989 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
990 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24991 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39992 },
993#endif
[email protected]79be6d32012-04-24 20:47:44994 {
[email protected]8d68a3e02013-01-12 15:57:10995 "enable-download-resumption",
996 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
997 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56998 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10999 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1000 },
1001 {
[email protected]9a5940d2012-04-27 19:16:231002 "allow-nacl-socket-api",
1003 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1004 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561005 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:231006 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1007 },
[email protected]85333732012-05-01 19:02:241008 {
[email protected]60673ad72012-05-02 06:16:331009 "stacked-tab-strip",
1010 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1011 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1012 kOsWin,
1013 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1014 },
1015 {
[email protected]4bd20202012-06-14 17:35:011016 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241017 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1018 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1019 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011020 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241021 },
[email protected]190349fd2012-05-02 00:10:471022#if defined(OS_CHROMEOS)
1023 {
1024 "allow-touchpad-three-finger-click",
1025 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1026 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1027 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241028 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471029 },
[email protected]190349fd2012-05-02 00:10:471030#endif
[email protected]1992a2f42012-10-23 18:32:211031 {
[email protected]8ee02242012-12-04 15:23:321032 "enable-desktop-guest-mode",
1033 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1034 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1035 kOsMac | kOsWin | kOsLinux,
1036 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1037 },
[email protected]53520b1b2012-05-07 21:43:371038#if defined(USE_ASH)
1039 {
[email protected]8257d382013-03-26 13:08:421040 "show-launcher-alignment-menu",
1041 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1042 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421043 kOsAll,
[email protected]8257d382013-03-26 13:08:421044 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421045 },
1046 {
[email protected]2ddf37b2013-04-20 01:15:581047 "disable-minimize-on-second-launcher-item-click",
1048 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1049 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1050 kOsAll,
1051 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1052 },
1053 {
[email protected]73074742012-05-17 01:44:411054 "show-touch-hud",
1055 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1056 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1057 kOsAll,
1058 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1059 },
1060 {
[email protected]9f0940b62012-05-23 22:56:351061 "enable-pinch",
1062 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1063 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061064 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381065 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1066 },
1067 {
[email protected]de0aaed2013-05-27 18:16:431068 "enable-pinch-virtual-viewport",
1069 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1070 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1071 kOsLinux | kOsWin | kOsCrOS,
1072 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1073 },
1074 {
[email protected]a4016f12013-05-02 07:53:471075 "forced-maximize-mode",
1076 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1077 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1078 kOsLinux | kOsWin | kOsCrOS,
1079 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1080 },
[email protected]73074742012-05-17 01:44:411081#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281082#if defined(OS_CHROMEOS)
1083 {
[email protected]8b04a1652012-08-04 02:59:491084 "disable-boot-animation",
1085 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1086 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581087 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241088 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491089 },
[email protected]95058572012-08-20 14:57:291090 {
[email protected]d96aef22012-10-30 11:47:021091 "captive-portal-detector",
1092 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1093 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581094 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021095 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1096 },
1097 {
[email protected]c11aa8f12012-12-18 18:43:141098 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571099 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1100 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1101 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141102 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571103 },
[email protected]f0280952012-11-06 20:30:501104 {
[email protected]53bc4352013-06-24 10:22:371105 "file-manager-show-checkboxes",
1106 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1107 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491108 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371109 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491110 },
1111 {
[email protected]50a3f5a2013-06-24 14:36:151112 "file-manager-enable-sharing",
1113 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_NAME,
1114 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_DESCRIPTION,
1115 kOsCrOS,
1116 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableSharing)
1117 },
1118 {
[email protected]099b890c2013-04-25 19:16:261119 "disable-quickoffice-component-app",
1120 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1121 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1122 kOsCrOS,
1123 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1124 },
[email protected]62018dc2012-12-13 00:37:351125#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391126 {
[email protected]6247aba2013-03-04 22:57:181127 "views-textfield",
1128 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1129 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391130 kOsWin,
[email protected]6247aba2013-03-04 22:57:181131 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1132 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391133 },
[email protected]bd0cd3bb2012-06-14 03:03:381134 {
[email protected]ffbe5782013-05-09 23:22:081135 "new-dialog-style",
1136 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1137 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321138 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081139 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1140 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321141 },
[email protected]7db8893a2012-07-26 00:49:401142 { "disable-accelerated-video-decode",
1143 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1144 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191145 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401146 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151147 },
[email protected]66ae9fc2012-06-19 21:33:521148#if defined(USE_ASH)
1149 {
1150 "ash-debug-shortcuts",
1151 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1152 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1153 kOsAll,
1154 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1155 },
1156#endif
[email protected]37fee0942012-08-07 21:07:451157 {
[email protected]ad3f6d22012-08-29 02:34:191158 "enable-contacts",
1159 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1160 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1161 kOsCrOS,
1162 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1163 },
[email protected]1d9bb9cd2012-08-28 22:02:501164#if defined(USE_ASH)
1165 { "ash-enable-advanced-gestures",
1166 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1167 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1168 kOsCrOS,
1169 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1170 },
[email protected]cfa24e62013-02-13 21:19:111171 { "ash-disable-tab-scrubbing",
1172 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1173 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161174 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111175 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161176 },
[email protected]ad6fcc32013-05-30 03:46:481177 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081178 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1179 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1180 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481181 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081182 },
[email protected]83eef802012-12-02 07:43:521183 { "ash-enable-workspace-scrubbing",
1184 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1185 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1186 kOsCrOS,
1187 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1188 },
[email protected]cf2b1a82013-04-20 01:05:431189 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111190 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1191 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241192 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431193 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1194 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241195 },
[email protected]316708a2012-11-05 22:57:021196#if defined(OS_LINUX)
1197 { "ash-enable-memory-monitor",
1198 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1199 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1200 kOsCrOS,
1201 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1202 },
1203#endif
[email protected]1d9bb9cd2012-08-28 22:02:501204#endif
[email protected]9b7ab882012-09-10 23:46:361205#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131206 { "use-new-network-configuration-handlers",
1207 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1208 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1209 kOsCrOS,
1210 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1211 },
[email protected]ce98ef82013-05-31 22:43:241212 { "use-new-network-connection-handler",
1213 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1214 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1215 kOsCrOS,
1216 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1217 },
[email protected]9b7ab882012-09-10 23:46:361218 {
[email protected]354ff2d2013-05-01 17:06:311219 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121220 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1221 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1222 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311223 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1224 },
1225 {
1226 "ash-audio-device-menu",
1227 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1228 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1229 kOsCrOS,
1230 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121231 },
1232 {
[email protected]205f07892012-10-16 20:26:221233 "enable-carrier-switching",
1234 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1235 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1236 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241237 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221238 },
1239 {
[email protected]9b7ab882012-09-10 23:46:361240 "enable-request-tablet-site",
1241 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1242 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1243 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241244 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361245 },
1246#endif
[email protected]dab49c0b2012-10-04 05:55:351247 {
1248 "debug-packed-apps",
1249 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1250 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561251 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351252 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1253 },
[email protected]d1459ed2012-10-10 01:29:331254 {
1255 "enable-password-generation",
1256 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1257 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561258 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331259 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1260 },
[email protected]26d045f2012-10-18 21:18:431261 {
[email protected]17b9c742013-06-22 13:48:421262 "enable-password-autofill-public-suffix-domain-matching",
1263 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1264 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1265 kOsAndroid,
1266 SINGLE_VALUE_TYPE(
1267 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1268 },
1269 {
[email protected]76f7d4882012-10-26 21:09:221270 "enable-deferred-image-decoding",
1271 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1272 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221273 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221274 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1275 },
1276 {
[email protected]075543d2012-10-24 01:29:141277 "performance-monitor-gathering",
1278 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1279 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1280 kOsAll,
1281 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1282 },
[email protected]783d5bb2012-10-24 03:47:141283 {
[email protected]a7259fb2012-11-08 06:22:231284 "enable-experimental-form-filling",
1285 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1286 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1287 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481288 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231289 },
[email protected]6e6efe42013-01-30 00:04:501290 {
[email protected]db3178c2013-03-21 14:54:541291 "wallet-service-use-prod",
1292 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1293 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1294 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481295 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541296 },
1297 {
[email protected]6e6efe42013-01-30 00:04:501298 "enable-interactive-autocomplete",
1299 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1300 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061301 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171302 ENABLE_DISABLE_VALUE_TYPE(
1303 autofill::switches::kEnableInteractiveAutocomplete,
1304 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501305 },
[email protected]177260c2013-04-24 01:47:381306#if defined(USE_AURA)
1307 {
1308 "overscroll-history-navigation",
1309 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1310 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1311 kOsAll,
1312 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1313 switches::kOverscrollHistoryNavigation, "1",
1314 switches::kOverscrollHistoryNavigation, "0")
1315 },
1316#endif
[email protected]edbea622012-11-28 20:39:381317 {
1318 "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,
1478 kOsWin,
1479 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]380532aa2013-05-24 11:59:351489 "enable-reset-profile-settings",
1490 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1491 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1492 kOsAll,
1493 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1494 },
[email protected]9f94a6c42013-07-11 18:49:151495 {
1496 "enable-device-discovery",
1497 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1498 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1499 kOsDesktop,
1500 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1501 },
[email protected]56d3c6e42013-05-29 11:28:011502#if defined(OS_MACOSX)
1503 {
1504 "enable-app-list-shim",
1505 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1506 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1507 kOsMac,
1508 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1509 },
[email protected]cb29e162013-05-31 07:47:021510 {
1511 "enable-app-shims",
1512 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1513 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1514 kOsMac,
1515 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1516 },
[email protected]67604442013-06-15 00:04:331517 {
1518 "enable-simplified-fullscreen",
1519 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1520 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1521 kOsMac,
1522 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1523 },
[email protected]56d3c6e42013-05-29 11:28:011524#endif
[email protected]13177832013-05-31 07:46:051525#if defined(OS_CHROMEOS) || defined(OS_WIN)
1526 {
1527 "enable-omnibox-auto-completion-for-ime",
1528 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1529 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1530 kOsCrOS,
1531 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1532 },
1533#endif
[email protected]910ecfe2013-06-03 23:38:141534#if defined(USE_AURA)
1535 {
1536 "tab-capture-upscale-quality",
1537 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1538 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1539 kOsAll,
1540 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1541 },
1542 {
1543 "tab-capture-downscale-quality",
1544 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1545 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1546 kOsAll,
1547 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1548 },
1549#endif
[email protected]71d4f602013-06-04 23:21:101550 {
[email protected]5e099c62013-06-08 05:46:231551 "enable-spelling-service-feedback",
1552 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1553 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1554 kOsAll,
1555 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1556 },
1557 {
[email protected]71d4f602013-06-04 23:21:101558 "enable-webgl-draft-extensions",
1559 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1560 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1561 kOsAll,
1562 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1563 },
[email protected]deadc492013-06-07 21:39:281564 {
1565 "high-dpi-support",
1566 IDS_FLAGS_HIDPI_NAME,
1567 IDS_FLAGS_HIDPI_DESCRIPTION,
1568 kOsWin,
1569 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1570 switches::kHighDPISupport,"0")
1571 },
[email protected]77e69a512013-06-08 05:56:451572#if defined(OS_CHROMEOS)
1573 {
1574 "enable-quickoffice-editing",
1575 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1576 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1577 kOsCrOS,
1578 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1579 },
1580#endif
[email protected]82ca4212013-06-11 12:09:171581 {
1582 "enable-translate-settings",
1583 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1584 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1585 kOsAll,
1586 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1587 },
[email protected]bc1697a82013-06-27 15:48:311588 {
1589 "enable-web-midi",
1590 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1591 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1592 kOsMac,
1593 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1594 },
[email protected]020df792013-06-29 14:26:211595 {
1596 "enable-new-profile-management",
1597 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1598 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1599 kOsWin,
1600 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1601 },
1602 {
1603 "enable-gaia-profile-info",
1604 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1605 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221606 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211607 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1608 },
[email protected]dcf6cf32013-07-03 10:53:281609#if defined(OS_WIN)
1610 {
1611 "disable-app-launcher",
1612 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1613 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
1614 kOsAll,
1615 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1616 },
1617#endif
[email protected]57b6f6e2013-07-13 03:03:351618 {
1619 "enable-device-motion",
1620 IDS_FLAGS_ENABLE_DEVICE_MOTION_NAME,
1621 IDS_FLAGS_ENABLE_DEVICE_MOTION_DESCRIPTION,
1622 kOsAndroid,
1623 SINGLE_VALUE_TYPE(switches::kEnableDeviceMotion)
1624 },
[email protected]a0e4b072011-08-17 01:47:071625};
[email protected]ad2a3ded2010-08-27 13:19:051626
[email protected]a314ee5a2010-10-26 21:23:281627const Experiment* experiments = kExperiments;
1628size_t num_experiments = arraysize(kExperiments);
1629
[email protected]e2ddbc92010-10-15 20:02:071630// Stores and encapsulates the little state that about:flags has.
1631class FlagsState {
1632 public:
1633 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401634 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1635 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071636 bool IsRestartNeededToCommitChanges();
1637 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401638 FlagsStorage* flags_storage,
1639 const std::string& internal_name,
1640 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071641 void RemoveFlagsSwitches(
1642 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401643 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071644 void reset();
1645
1646 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551647 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071648 return Singleton<FlagsState>::get();
1649 }
1650
1651 private:
1652 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531653 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071654
1655 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1656};
1657
[email protected]8a6ff28d2010-12-02 16:35:191658// Adds the internal names for the specified experiment to |names|.
1659void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1660 if (e.type == Experiment::SINGLE_VALUE) {
1661 names->insert(e.internal_name);
1662 } else {
[email protected]83e9fa702013-02-25 19:30:441663 DCHECK(e.type == Experiment::MULTI_VALUE ||
1664 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191665 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441666 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191667 }
1668}
1669
[email protected]28e35af2011-02-09 12:56:221670// Confirms that an experiment is valid, used in a DCHECK in
1671// SanitizeList below.
1672bool ValidateExperiment(const Experiment& e) {
1673 switch (e.type) {
1674 case Experiment::SINGLE_VALUE:
1675 DCHECK_EQ(0, e.num_choices);
1676 DCHECK(!e.choices);
1677 break;
1678 case Experiment::MULTI_VALUE:
1679 DCHECK_GT(e.num_choices, 0);
1680 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531681 DCHECK(e.choices[0].command_line_switch);
1682 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221683 break;
[email protected]83e9fa702013-02-25 19:30:441684 case Experiment::ENABLE_DISABLE_VALUE:
1685 DCHECK_EQ(3, e.num_choices);
1686 DCHECK(!e.choices);
1687 DCHECK(e.command_line_switch);
1688 DCHECK(e.command_line_value);
1689 DCHECK(e.disable_command_line_switch);
1690 DCHECK(e.disable_command_line_value);
1691 break;
[email protected]28e35af2011-02-09 12:56:221692 default:
1693 NOTREACHED();
1694 }
1695 return true;
1696}
1697
[email protected]ad2a3ded2010-08-27 13:19:051698// Removes all experiments from prefs::kEnabledLabsExperiments that are
1699// unknown, to prevent this list to become very long as experiments are added
1700// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401701void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051702 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221703 for (size_t i = 0; i < num_experiments; ++i) {
1704 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191705 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221706 }
[email protected]ad2a3ded2010-08-27 13:19:051707
[email protected]e6d1c4f2013-06-12 17:37:401708 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051709
1710 std::set<std::string> new_enabled_experiments;
1711 std::set_intersection(
1712 known_experiments.begin(), known_experiments.end(),
1713 enabled_experiments.begin(), enabled_experiments.end(),
1714 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1715
[email protected]4c8853f2012-07-23 01:29:161716 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401717 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051718}
1719
[email protected]1a47d7e2010-10-15 00:37:241720void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401721 FlagsStorage* flags_storage, std::set<std::string>* result) {
1722 SanitizeList(flags_storage);
1723 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051724}
1725
[email protected]a314ee5a2010-10-26 21:23:281726// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1727// enabled on the current platform.
1728void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401729 FlagsStorage* flags_storage, std::set<std::string>* result) {
1730 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281731
1732 // Filter out any experiments that aren't enabled on the current platform. We
1733 // don't remove these from prefs else syncing to a platform with a different
1734 // set of experiments would be lossy.
1735 std::set<std::string> platform_experiments;
1736 int current_platform = GetCurrentPlatform();
1737 for (size_t i = 0; i < num_experiments; ++i) {
1738 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191739 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581740#if defined(OS_CHROMEOS)
1741 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1742 AddInternalName(experiments[i], &platform_experiments);
1743#endif
[email protected]a314ee5a2010-10-26 21:23:281744 }
1745
1746 std::set<std::string> new_enabled_experiments;
1747 std::set_intersection(
1748 platform_experiments.begin(), platform_experiments.end(),
1749 result->begin(), result->end(),
1750 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1751
1752 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051753}
1754
[email protected]8a6ff28d2010-12-02 16:35:191755// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191756Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221757 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441758 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1759 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191760 ListValue* result = new ListValue;
1761 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191762 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441763 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191764 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441765 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221766 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191767 result->Append(value);
1768 }
1769 return result;
1770}
1771
[email protected]e2ddbc92010-10-15 20:02:071772} // namespace
1773
[email protected]83e9fa702013-02-25 19:30:441774std::string Experiment::NameForChoice(int index) const {
1775 DCHECK(type == Experiment::MULTI_VALUE ||
1776 type == Experiment::ENABLE_DISABLE_VALUE);
1777 DCHECK_LT(index, num_choices);
1778 return std::string(internal_name) + testing::kMultiSeparator +
1779 base::IntToString(index);
1780}
1781
1782string16 Experiment::DescriptionForChoice(int index) const {
1783 DCHECK(type == Experiment::MULTI_VALUE ||
1784 type == Experiment::ENABLE_DISABLE_VALUE);
1785 DCHECK_LT(index, num_choices);
1786 int description_id;
1787 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1788 const int kEnableDisableDescriptionIds[] = {
1789 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1790 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1791 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1792 };
1793 description_id = kEnableDisableDescriptionIds[index];
1794 } else {
1795 description_id = choices[index].description_id;
1796 }
1797 return l10n_util::GetStringUTF16(description_id);
1798}
1799
[email protected]e6d1c4f2013-06-12 17:37:401800void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1801 CommandLine* command_line) {
1802 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1803 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051804}
1805
[email protected]6d98abf2013-06-17 23:35:511806bool AreSwitchesIdenticalToCurrentCommandLine(
1807 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1808 std::set<CommandLine::StringType> new_flags =
1809 ExtractFlagsFromCommandLine(new_cmdline);
1810 std::set<CommandLine::StringType> active_flags =
1811 ExtractFlagsFromCommandLine(active_cmdline);
1812
1813 // Needed because std::equal doesn't check if the 2nd set is empty.
1814 if (new_flags.size() != active_flags.size())
1815 return false;
1816
1817 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1818}
1819
[email protected]e6d1c4f2013-06-12 17:37:401820void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521821 FlagAccess access,
1822 base::ListValue* supported_experiments,
1823 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051824 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401825 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051826
1827 int current_platform = GetCurrentPlatform();
1828
[email protected]a314ee5a2010-10-26 21:23:281829 for (size_t i = 0; i < num_experiments; ++i) {
1830 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051831
1832 DictionaryValue* data = new DictionaryValue();
1833 data->SetString("internal_name", experiment.internal_name);
1834 data->SetString("name",
1835 l10n_util::GetStringUTF16(experiment.visible_name_id));
1836 data->SetString("description",
1837 l10n_util::GetStringUTF16(
1838 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401839
1840 ListValue* supported_platforms = new ListValue();
1841 AddOsStrings(experiment.supported_platforms, supported_platforms);
1842 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051843
[email protected]28e35af2011-02-09 12:56:221844 switch (experiment.type) {
1845 case Experiment::SINGLE_VALUE:
1846 data->SetBoolean(
1847 "enabled",
1848 enabled_experiments.count(experiment.internal_name) > 0);
1849 break;
1850 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441851 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221852 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1853 break;
1854 default:
1855 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191856 }
1857
[email protected]ee28495a2013-05-20 04:10:521858 bool supported = (experiment.supported_platforms & current_platform) != 0;
1859#if defined(OS_CHROMEOS)
1860 if (access == kOwnerAccessToFlags &&
1861 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1862 supported = true;
1863 }
1864#endif
1865 if (supported)
1866 supported_experiments->Append(data);
1867 else
1868 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051869 }
[email protected]ad2a3ded2010-08-27 13:19:051870}
1871
[email protected]ad2a3ded2010-08-27 13:19:051872bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551873 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051874}
1875
[email protected]e6d1c4f2013-06-12 17:37:401876void SetExperimentEnabled(FlagsStorage* flags_storage,
1877 const std::string& internal_name,
1878 bool enable) {
1879 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1880 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071881}
1882
1883void RemoveFlagsSwitches(
1884 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551885 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071886}
1887
[email protected]e6d1c4f2013-06-12 17:37:401888void ResetAllFlags(FlagsStorage* flags_storage) {
1889 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001890}
1891
[email protected]a314ee5a2010-10-26 21:23:281892int GetCurrentPlatform() {
1893#if defined(OS_MACOSX)
1894 return kOsMac;
1895#elif defined(OS_WIN)
1896 return kOsWin;
1897#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1898 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211899#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281900 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401901#elif defined(OS_ANDROID)
1902 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281903#else
1904#error Unknown platform
1905#endif
1906}
1907
[email protected]e6d1c4f2013-06-12 17:37:401908void RecordUMAStatistics(FlagsStorage* flags_storage) {
1909 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541910 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1911 ++it) {
1912 std::string action("AboutFlags_");
1913 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381914 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541915 }
1916 // Since flag metrics are recorded every startup, add a tick so that the
1917 // stats can be made meaningful.
1918 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381919 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1920 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541921}
1922
[email protected]e2ddbc92010-10-15 20:02:071923//////////////////////////////////////////////////////////////////////////////
1924// FlagsState implementation.
1925
1926namespace {
1927
[email protected]83e9fa702013-02-25 19:30:441928typedef std::map<std::string, std::pair<std::string, std::string> >
1929 NameToSwitchAndValueMap;
1930
1931void SetFlagToSwitchMapping(const std::string& key,
1932 const std::string& switch_name,
1933 const std::string& switch_value,
1934 NameToSwitchAndValueMap* name_to_switch_map) {
1935 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1936 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1937}
1938
[email protected]e2ddbc92010-10-15 20:02:071939void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401940 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071941 if (command_line->HasSwitch(switches::kNoExperiments))
1942 return;
1943
1944 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001945
[email protected]e6d1c4f2013-06-12 17:37:401946 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1947 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071948
[email protected]a82744532011-02-11 16:15:531949 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191950 for (size_t i = 0; i < num_experiments; ++i) {
1951 const Experiment& e = experiments[i];
1952 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441953 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1954 e.command_line_value, &name_to_switch_map);
1955 } else if (e.type == Experiment::MULTI_VALUE) {
1956 for (int j = 0; j < e.num_choices; ++j) {
1957 SetFlagToSwitchMapping(e.NameForChoice(j),
1958 e.choices[j].command_line_switch,
1959 e.choices[j].command_line_value,
1960 &name_to_switch_map);
1961 }
[email protected]8a6ff28d2010-12-02 16:35:191962 } else {
[email protected]83e9fa702013-02-25 19:30:441963 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1964 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1965 &name_to_switch_map);
1966 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1967 e.command_line_value, &name_to_switch_map);
1968 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1969 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191970 }
1971 }
[email protected]e2ddbc92010-10-15 20:02:071972
1973 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531974 flags_switches_.insert(
1975 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1976 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071977 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1978 it != enabled_experiments.end();
1979 ++it) {
1980 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531981 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191982 name_to_switch_map.find(experiment_name);
1983 if (name_to_switch_it == name_to_switch_map.end()) {
1984 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071985 continue;
[email protected]8a6ff28d2010-12-02 16:35:191986 }
[email protected]e2ddbc92010-10-15 20:02:071987
[email protected]a82744532011-02-11 16:15:531988 const std::pair<std::string, std::string>&
1989 switch_and_value_pair = name_to_switch_it->second;
1990
1991 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1992 switch_and_value_pair.second);
1993 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071994 }
1995 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531996 flags_switches_.insert(
1997 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1998 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071999}
2000
2001bool FlagsState::IsRestartNeededToCommitChanges() {
2002 return needs_restart_;
2003}
2004
[email protected]e6d1c4f2013-06-12 17:37:402005void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2006 const std::string& internal_name,
2007 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442008 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192009 if (at_index != std::string::npos) {
2010 DCHECK(enable);
2011 // We're being asked to enable a multi-choice experiment. Disable the
2012 // currently selected choice.
2013 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222014 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402015 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192016
[email protected]28e35af2011-02-09 12:56:222017 // And enable the new choice, if it is not the default first choice.
2018 if (internal_name != experiment_name + "@0") {
2019 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402020 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082021 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402022 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222023 }
[email protected]8a6ff28d2010-12-02 16:35:192024 return;
2025 }
2026
[email protected]ad2a3ded2010-08-27 13:19:052027 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402028 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052029
[email protected]8a6ff28d2010-12-02 16:35:192030 const Experiment* e = NULL;
2031 for (size_t i = 0; i < num_experiments; ++i) {
2032 if (experiments[i].internal_name == internal_name) {
2033 e = experiments + i;
2034 break;
2035 }
2036 }
2037 DCHECK(e);
2038
2039 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592040 if (enable)
[email protected]147492b2013-03-19 23:52:082041 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592042 else
[email protected]147492b2013-03-19 23:52:082043 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192044 } else {
2045 if (enable) {
2046 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082047 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192048 } else {
2049 // Find the currently enabled choice and disable it.
2050 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442051 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192052 if (enabled_experiments.find(choice_name) !=
2053 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082054 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192055 enabled_experiments.erase(choice_name);
2056 // Continue on just in case there's a bug and more than one
2057 // experiment for this choice was enabled.
2058 }
2059 }
2060 }
2061 }
[email protected]ad2a3ded2010-08-27 13:19:052062
[email protected]e6d1c4f2013-06-12 17:37:402063 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052064}
2065
[email protected]e2ddbc92010-10-15 20:02:072066void FlagsState::RemoveFlagsSwitches(
2067 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532068 for (std::map<std::string, std::string>::const_iterator
2069 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2070 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072071 }
2072}
2073
[email protected]e6d1c4f2013-06-12 17:37:402074void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002075 needs_restart_ = true;
2076
2077 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402078 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002079}
2080
[email protected]e2ddbc92010-10-15 20:02:072081void FlagsState::reset() {
2082 needs_restart_ = false;
2083 flags_switches_.clear();
2084}
2085
[email protected]38e46812011-05-09 20:49:222086} // namespace
[email protected]e2ddbc92010-10-15 20:02:072087
2088namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192089
2090// WARNING: '@' is also used in the html file. If you update this constant you
2091// also need to update the html file.
2092const char kMultiSeparator[] = "@";
2093
[email protected]e2ddbc92010-10-15 20:02:072094void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552095 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072096}
[email protected]a314ee5a2010-10-26 21:23:282097
2098void SetExperiments(const Experiment* e, size_t count) {
2099 if (!e) {
2100 experiments = kExperiments;
2101 num_experiments = arraysize(kExperiments);
2102 } else {
2103 experiments = e;
2104 num_experiments = count;
2105 }
2106}
2107
[email protected]8a6ff28d2010-12-02 16:35:192108const Experiment* GetExperiments(size_t* count) {
2109 *count = num_experiments;
2110 return experiments;
2111}
2112
[email protected]e2ddbc92010-10-15 20:02:072113} // namespace testing
2114
[email protected]1a47d7e2010-10-15 00:37:242115} // namespace about_flags