blob: 119f32ead07f833850e1c08e40c3cb9ec1dd3437 [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 },
645 {
[email protected]354e33b2011-06-15 00:29:10646 "static-ip-config",
647 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
648 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
649 kOsCrOS,
650#if defined(OS_CHROMEOS)
651 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24652 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10653#else
654 SINGLE_VALUE_TYPE("")
655#endif
656 },
[email protected]3eb5728c2011-06-20 22:32:24657 {
658 "show-autofill-type-predictions",
659 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
660 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
661 kOsAll,
[email protected]e217c5632013-04-12 19:11:48662 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24663 },
[email protected]bff4d3e2011-06-21 23:58:52664 {
[email protected]e755a382012-09-13 17:16:35665 "enable-gesture-tap-highlight",
666 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
667 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
668 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47669 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
670 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35671 },
672 {
[email protected]a22ebd812011-06-23 00:05:39673 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
674 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
675 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
676 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40677 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25678 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39679 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
680 },
[email protected]81a6b0b2011-06-24 17:55:40681 {
[email protected]7e7a28092011-12-09 22:24:55682 "enable-panels",
683 IDS_FLAGS_ENABLE_PANELS_NAME,
684 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56685 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55686 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54687 },
[email protected]e3749d12011-07-25 22:22:12688 {
[email protected]27c14f02012-06-22 17:29:58689 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27690 "save-page-as-mhtml", // FLAGS:RECORD_UMA
691 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
692 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
693 kOsMac | kOsWin | kOsLinux,
694 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
695 },
696 {
[email protected]b7bb44f2011-09-01 05:17:03697 "enable-autologin",
698 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
699 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
700 kOsMac | kOsWin | kOsLinux,
701 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
702 },
[email protected]b9841172011-09-26 23:36:09703 {
[email protected]903e63382013-06-01 00:40:58704 "enable-quic",
705 IDS_FLAGS_ENABLE_QUIC_NAME,
706 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
707 kOsAll,
708 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
709 switches::kDisableQuic)
710 },
711 {
[email protected]eb8f88e2013-07-15 09:52:17712 "enable-quic-https",
713 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
714 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
715 kOsAll,
716 SINGLE_VALUE_TYPE(switches::kEnableQuicHttps)
717 },
718 {
[email protected]bca09b9982013-06-27 22:30:46719 "enable-spdy4a2",
720 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
721 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
722 kOsAll,
723 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
724 },
725 {
[email protected]27b3fe92012-03-21 05:35:06726 "enable-async-dns",
727 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
728 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46729 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44730 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
731 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06732 },
[email protected]85dd7ca2013-05-30 23:53:00733#if defined(ANDROID) && !defined(GOOGLE_TV)
734 {
735 "enable-media-source",
736 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
737 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
738 kOsAll,
739 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
740 },
741#else
[email protected]27b3fe92012-03-21 05:35:06742 {
[email protected]1eb93802012-09-11 18:57:56743 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31744 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
745 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32746 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31747 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44748 },
[email protected]85dd7ca2013-05-30 23:53:00749#endif
[email protected]e4e68dbb2011-11-18 01:50:22750 {
[email protected]16c242d2013-05-31 23:56:47751 "enable-encrypted-media",
752 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
753 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56754 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47755 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
756 },
757 {
758 "disable-encrypted-media",
759 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
760 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
761 kOsDesktop,
762 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03763 },
[email protected]f88628792012-12-18 07:07:50764 {
[email protected]d21ead42013-06-24 06:35:06765 "override-encrypted-media-canplaytype",
766 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
767 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
768 kOsMac | kOsWin,
769 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
770 },
771 {
[email protected]f88628792012-12-18 07:07:50772 "enable-opus-playback",
773 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
774 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56775 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50776 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
777 },
[email protected]b150b5532013-06-15 00:50:54778 {
[email protected]6ac955b2013-04-19 23:43:32779 "enable-vp8-alpha-playback",
780 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
781 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
782 kOsDesktop,
783 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
784 },
785 {
[email protected]ca6eaa5a2013-01-24 16:16:04786 "enable-managed-users",
787 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
788 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08789 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04790 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
791 },
[email protected]dc04be7c2012-03-15 23:57:49792#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50793 {
[email protected]2a13a9a2013-04-19 04:00:21794 "ash-disable-auto-maximizing",
795 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
796 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
797 kOsWin | kOsLinux | kOsCrOS,
798 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
799 },
800 {
[email protected]cda278d2012-10-30 20:31:40801 "ash-disable-auto-window-placement",
802 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
803 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
804 kOsWin | kOsLinux | kOsCrOS,
805 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
806 },
[email protected]b4e4ec42012-11-29 21:42:40807 {
[email protected]16f55a22013-02-13 23:47:34808 "ash-disable-per-app-launcher",
809 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
810 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40811 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34812 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40813 },
[email protected]dc04be7c2012-03-15 23:57:49814#endif
[email protected]eaae8b462012-01-20 22:20:39815 {
[email protected]db543d322011-12-15 20:40:15816 "per-tile-painting",
817 IDS_FLAGS_PER_TILE_PAINTING_NAME,
818 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37819 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37820 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15821 },
[email protected]bf88c032011-12-22 19:05:47822 {
823 "enable-javascript-harmony",
824 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
825 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
826 kOsAll,
827 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
828 },
[email protected]7e7f378a2012-01-05 14:35:37829 {
[email protected]85646172012-01-09 22:45:54830 "enable-tab-browser-dragging",
831 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
832 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
833 kOsWin,
834 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
835 },
836 {
[email protected]068b7b52012-02-27 12:41:44837 "disable-restore-session-state",
838 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
839 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37840 kOsAll,
[email protected]068b7b52012-02-27 12:41:44841 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37842 },
[email protected]88864db2012-01-18 20:56:35843 {
844 "disable-software-rasterizer",
845 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
846 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
847#if defined(ENABLE_SWIFTSHADER)
848 kOsAll,
849#else
850 0,
851#endif
852 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
853 },
[email protected]15a5d722012-01-23 09:11:14854 {
[email protected]c1b18ea2013-07-10 13:01:16855 "enable-experimental-web-platform-features",
856 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
857 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16858 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16859 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49860 },
861 {
[email protected]0f95a252012-09-13 22:30:04862 "enable-css-shaders",
863 IDS_FLAGS_CSS_SHADERS_NAME,
864 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
865 kOsAll,
866 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
867 },
868 {
[email protected]3e8befc2012-03-13 01:17:03869 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16870 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
871 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56872 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03873 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16874 },
[email protected]dc04be7c2012-03-15 23:57:49875#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01876 {
[email protected]3cd198a22012-03-12 20:38:01877 "enable-ash-oak",
878 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
879 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
880 kOsAll,
881 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
882 },
[email protected]31cf1c52012-02-29 20:55:01883#endif
[email protected]184ec592012-03-01 11:54:28884 {
885 "enable-devtools-experiments",
886 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
887 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56888 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28889 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
890 },
[email protected]76d1854e2012-03-02 23:57:44891 {
[email protected]3db81f242013-07-12 08:56:17892 "remote-debugging-raw-usb",
893 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
894 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
[email protected]be99de42013-07-12 13:51:16895 kOsDesktop,
[email protected]3db81f242013-07-12 08:56:17896 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
897 },
898 {
[email protected]2fefdb32013-02-26 14:28:10899 "silent-debugger-extension-api",
900 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
901 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
902 kOsDesktop,
903 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
904 },
905 {
[email protected]76d1854e2012-03-02 23:57:44906 "enable-suggestions-ntp",
907 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
908 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56909 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44910 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
911 },
[email protected]a3d54252012-04-05 20:04:13912 {
[email protected]1dbaf5e2012-11-30 05:51:32913 "spellcheck-autocorrect",
914 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
915 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
916 kOsWin | kOsLinux | kOsCrOS,
917 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
918 },
919 {
[email protected]e27137282013-06-20 02:38:35920 "enable-scroll-prediction",
921 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
922 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
923 kOsDesktop,
924 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
925 },
926 {
[email protected]d7932532012-11-21 21:10:31927 "touch-events",
928 IDS_TOUCH_EVENTS_NAME,
929 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56930 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31931 MULTI_VALUE_TYPE(kTouchEventsChoices)
932 },
933 {
[email protected]c9c73ad42012-04-18 03:35:59934 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06935 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
936 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55937 kOsWin,
[email protected]347a0c72012-05-14 20:28:06938 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59939 },
[email protected]8a6aaa72012-04-20 20:53:58940 {
[email protected]b9c96ff2012-11-26 22:24:40941 "disable-touch-adjustment",
942 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
943 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
944 kOsWin | kOsLinux | kOsCrOS,
945 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
946 },
947 {
[email protected]0b9383a2012-10-26 00:58:16948 "enable-tab-capture",
949 IDS_ENABLE_TAB_CAPTURE_NAME,
950 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25951 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44952 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
953 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16954 },
[email protected]0b60afa2012-04-19 17:36:39955#if defined(OS_CHROMEOS)
956 {
[email protected]690de0f2013-06-26 00:51:16957 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31958 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
959 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
960 kOsCrOS,
961 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
962 },
963 {
[email protected]7c4a9bc2012-09-11 22:10:05964 "enable-background-loader",
965 IDS_ENABLE_BACKLOADER_NAME,
966 IDS_ENABLE_BACKLOADER_DESCRIPTION,
967 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24968 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05969 },
970 {
[email protected]3f4181a2013-02-01 21:31:07971 "enable-screensaver-extension",
972 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
973 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
974 kOsCrOS,
975 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
976 },
977 {
[email protected]0b60afa2012-04-19 17:36:39978 "no-discard-tabs",
979 IDS_FLAGS_NO_DISCARD_TABS_NAME,
980 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
981 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24982 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39983 },
984#endif
[email protected]79be6d32012-04-24 20:47:44985 {
[email protected]8d68a3e02013-01-12 15:57:10986 "enable-download-resumption",
987 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
988 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56989 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10990 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
991 },
992 {
[email protected]9a5940d2012-04-27 19:16:23993 "allow-nacl-socket-api",
994 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
995 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56996 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23997 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
998 },
[email protected]85333732012-05-01 19:02:24999 {
[email protected]60673ad72012-05-02 06:16:331000 "stacked-tab-strip",
1001 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1002 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1003 kOsWin,
1004 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1005 },
1006 {
[email protected]4bd20202012-06-14 17:35:011007 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241008 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1009 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1010 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011011 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241012 },
[email protected]190349fd2012-05-02 00:10:471013#if defined(OS_CHROMEOS)
1014 {
1015 "allow-touchpad-three-finger-click",
1016 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1017 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1018 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241019 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471020 },
[email protected]190349fd2012-05-02 00:10:471021#endif
[email protected]1992a2f42012-10-23 18:32:211022 {
[email protected]8ee02242012-12-04 15:23:321023 "enable-desktop-guest-mode",
1024 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1025 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1026 kOsMac | kOsWin | kOsLinux,
1027 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1028 },
[email protected]53520b1b2012-05-07 21:43:371029#if defined(USE_ASH)
1030 {
[email protected]8257d382013-03-26 13:08:421031 "show-launcher-alignment-menu",
1032 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1033 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421034 kOsAll,
[email protected]8257d382013-03-26 13:08:421035 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421036 },
1037 {
[email protected]2ddf37b2013-04-20 01:15:581038 "disable-minimize-on-second-launcher-item-click",
1039 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1040 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1041 kOsAll,
1042 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1043 },
1044 {
[email protected]73074742012-05-17 01:44:411045 "show-touch-hud",
1046 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1047 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1048 kOsAll,
1049 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1050 },
1051 {
[email protected]9f0940b62012-05-23 22:56:351052 "enable-pinch",
1053 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1054 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061055 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381056 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1057 },
1058 {
[email protected]de0aaed2013-05-27 18:16:431059 "enable-pinch-virtual-viewport",
1060 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1061 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1062 kOsLinux | kOsWin | kOsCrOS,
1063 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1064 },
1065 {
[email protected]a4016f12013-05-02 07:53:471066 "forced-maximize-mode",
1067 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1068 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1069 kOsLinux | kOsWin | kOsCrOS,
1070 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1071 },
[email protected]73074742012-05-17 01:44:411072#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281073#if defined(OS_CHROMEOS)
1074 {
[email protected]8b04a1652012-08-04 02:59:491075 "disable-boot-animation",
1076 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1077 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581078 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241079 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491080 },
[email protected]95058572012-08-20 14:57:291081 {
[email protected]d96aef22012-10-30 11:47:021082 "captive-portal-detector",
1083 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1084 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581085 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021086 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1087 },
1088 {
[email protected]c11aa8f12012-12-18 18:43:141089 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571090 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1091 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1092 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141093 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571094 },
[email protected]f0280952012-11-06 20:30:501095 {
[email protected]53bc4352013-06-24 10:22:371096 "file-manager-show-checkboxes",
1097 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1098 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491099 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371100 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491101 },
1102 {
[email protected]50a3f5a2013-06-24 14:36:151103 "file-manager-enable-sharing",
1104 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_NAME,
1105 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_DESCRIPTION,
1106 kOsCrOS,
1107 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableSharing)
1108 },
1109 {
[email protected]099b890c2013-04-25 19:16:261110 "disable-quickoffice-component-app",
1111 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1112 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1113 kOsCrOS,
1114 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1115 },
[email protected]62018dc2012-12-13 00:37:351116#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391117 {
[email protected]6247aba2013-03-04 22:57:181118 "views-textfield",
1119 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1120 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391121 kOsWin,
[email protected]6247aba2013-03-04 22:57:181122 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1123 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391124 },
[email protected]bd0cd3bb2012-06-14 03:03:381125 {
[email protected]ffbe5782013-05-09 23:22:081126 "new-dialog-style",
1127 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1128 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321129 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081130 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1131 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321132 },
[email protected]7db8893a2012-07-26 00:49:401133 { "disable-accelerated-video-decode",
1134 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1135 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191136 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401137 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151138 },
[email protected]66ae9fc2012-06-19 21:33:521139#if defined(USE_ASH)
1140 {
1141 "ash-debug-shortcuts",
1142 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1143 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1144 kOsAll,
1145 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1146 },
1147#endif
[email protected]37fee0942012-08-07 21:07:451148 {
[email protected]ad3f6d22012-08-29 02:34:191149 "enable-contacts",
1150 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1151 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1154 },
[email protected]1d9bb9cd2012-08-28 22:02:501155#if defined(USE_ASH)
1156 { "ash-enable-advanced-gestures",
1157 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1158 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1161 },
[email protected]cfa24e62013-02-13 21:19:111162 { "ash-disable-tab-scrubbing",
1163 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1164 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161165 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111166 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161167 },
[email protected]ad6fcc32013-05-30 03:46:481168 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081169 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1170 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1171 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481172 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081173 },
[email protected]83eef802012-12-02 07:43:521174 { "ash-enable-workspace-scrubbing",
1175 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1176 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1177 kOsCrOS,
1178 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1179 },
[email protected]cf2b1a82013-04-20 01:05:431180 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111181 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1182 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241183 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431184 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1185 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241186 },
[email protected]316708a2012-11-05 22:57:021187#if defined(OS_LINUX)
1188 { "ash-enable-memory-monitor",
1189 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1190 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1191 kOsCrOS,
1192 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1193 },
1194#endif
[email protected]1d9bb9cd2012-08-28 22:02:501195#endif
[email protected]9b7ab882012-09-10 23:46:361196#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131197 { "use-new-network-configuration-handlers",
1198 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1199 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1200 kOsCrOS,
1201 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1202 },
[email protected]ce98ef82013-05-31 22:43:241203 { "use-new-network-connection-handler",
1204 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1205 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1206 kOsCrOS,
1207 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1208 },
[email protected]9b7ab882012-09-10 23:46:361209 {
[email protected]354ff2d2013-05-01 17:06:311210 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121211 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1212 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1213 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311214 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1215 },
1216 {
1217 "ash-audio-device-menu",
1218 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1219 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1220 kOsCrOS,
1221 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121222 },
1223 {
[email protected]205f07892012-10-16 20:26:221224 "enable-carrier-switching",
1225 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1226 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1227 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241228 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221229 },
1230 {
[email protected]9b7ab882012-09-10 23:46:361231 "enable-request-tablet-site",
1232 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1233 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1234 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241235 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361236 },
1237#endif
[email protected]dab49c0b2012-10-04 05:55:351238 {
1239 "debug-packed-apps",
1240 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1241 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561242 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351243 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1244 },
[email protected]d1459ed2012-10-10 01:29:331245 {
1246 "enable-password-generation",
1247 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1248 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561249 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331250 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1251 },
[email protected]26d045f2012-10-18 21:18:431252 {
[email protected]17b9c742013-06-22 13:48:421253 "enable-password-autofill-public-suffix-domain-matching",
1254 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1255 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1256 kOsAndroid,
1257 SINGLE_VALUE_TYPE(
1258 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1259 },
1260 {
[email protected]76f7d4882012-10-26 21:09:221261 "enable-deferred-image-decoding",
1262 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1263 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221264 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221265 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1266 },
1267 {
[email protected]075543d2012-10-24 01:29:141268 "performance-monitor-gathering",
1269 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1270 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1271 kOsAll,
1272 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1273 },
[email protected]783d5bb2012-10-24 03:47:141274 {
[email protected]a7259fb2012-11-08 06:22:231275 "enable-experimental-form-filling",
1276 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1277 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1278 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481279 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231280 },
[email protected]6e6efe42013-01-30 00:04:501281 {
[email protected]db3178c2013-03-21 14:54:541282 "wallet-service-use-prod",
1283 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1284 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1285 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481286 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541287 },
1288 {
[email protected]6e6efe42013-01-30 00:04:501289 "enable-interactive-autocomplete",
1290 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1291 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061292 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171293 ENABLE_DISABLE_VALUE_TYPE(
1294 autofill::switches::kEnableInteractiveAutocomplete,
1295 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501296 },
[email protected]177260c2013-04-24 01:47:381297#if defined(USE_AURA)
1298 {
1299 "overscroll-history-navigation",
1300 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1301 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1302 kOsAll,
1303 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1304 switches::kOverscrollHistoryNavigation, "1",
1305 switches::kOverscrollHistoryNavigation, "0")
1306 },
1307#endif
[email protected]edbea622012-11-28 20:39:381308 {
1309 "enable-touch-drag-drop",
1310 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1311 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1312 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271313 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1314 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381315 },
[email protected]0e2f43b62013-02-21 00:47:151316 {
1317 "enable-touch-editing",
1318 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1319 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1320 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271321 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1322 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151323 },
[email protected]92e12dd92012-12-11 03:33:201324 {
1325 "enable-rich-notifications",
1326 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1327 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361328 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231329 ENABLE_DISABLE_VALUE_TYPE(
1330 message_center::switches::kEnableRichNotifications,
1331 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201332 },
[email protected]4d51c682012-12-11 11:34:551333 {
[email protected]ddec1aa2013-04-28 23:22:451334 "enable-sync-synced-notifications",
1335 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1336 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181337 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451338 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1339 switches::kDisableSyncSyncedNotifications)
1340 },
1341 {
[email protected]a50e16a2013-04-25 14:07:171342 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551343 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1344 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1345 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171346 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551347 },
[email protected]628a69a92012-12-23 04:09:341348 {
[email protected]fd030142013-02-08 02:04:381349 "enable-usermedia-screen-capture",
1350 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1351 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1352 kOsDesktop,
1353 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1354 },
[email protected]5b93e162013-02-19 06:33:091355 {
1356 "enable-apps-devtool-app",
1357 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1358 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1359 kOsDesktop,
1360 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1361 },
[email protected]9323fdd12013-02-23 00:31:361362 {
1363 "impl-side-painting",
1364 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1365 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041366 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361367 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1368 },
[email protected]a42c85f2013-04-04 18:15:121369 {
[email protected]0c04d1c2013-07-10 00:02:321370 "delegated-renderer",
1371 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1372 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1373#ifdef USE_AURA
1374 kOsWin | kOsLinux |
1375#endif
1376 kOsAndroid | kOsCrOS,
1377 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1378 },
1379 {
[email protected]1c92d3e2013-04-18 05:31:391380 "enable-websocket-experimental-implementation",
1381 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1382 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1383 kOsAll,
1384 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1385 },
1386 {
[email protected]a42c85f2013-04-04 18:15:121387 "max-tiles-for-interest-area",
1388 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1389 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1390 kOsAndroid | kOsLinux | kOsCrOS,
1391 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1392 },
[email protected]7cf7ccb2013-04-20 02:53:081393 {
1394 "enable-offline-mode",
1395 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1396 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1397 kOsAll,
1398 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1399 },
[email protected]a3618122013-04-26 21:15:341400 {
1401 "default-tile-width",
1402 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1403 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1404 kOsAll,
1405 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1406 },
1407 {
1408 "default-tile-height",
1409 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1410 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1411 kOsAll,
1412 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1413 },
[email protected]2f2f72b2013-03-08 22:37:311414 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1415#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371416 {
1417 "track-active-visit-time",
1418 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1419 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1420 kOsWin,
1421 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1422 },
[email protected]2f2f72b2013-03-08 22:37:311423#endif
[email protected]8cc71d42013-03-02 17:26:081424#if defined(OS_ANDROID)
1425 {
1426 "disable-gesture-requirement-for-media-playback",
1427 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1428 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1429 kOsAndroid,
1430 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1431 },
1432#endif
[email protected]6077cab2013-03-11 19:36:141433#if defined(ENABLE_GOOGLE_NOW)
1434 {
1435 "enable-google-now",
1436 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1437 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361438 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141439 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1440 },
1441#endif
[email protected]86459e2c2013-04-10 13:39:241442#if defined(OS_CHROMEOS)
1443 {
1444 "enable-virtual-keyboard",
1445 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1446 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1447 kOsCrOS,
1448 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1449 },
1450#endif
[email protected]38484df12013-04-10 16:42:031451 {
1452 "enable-simple-cache-backend",
1453 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1454 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251455 kOsAll,
[email protected]38484df12013-04-10 16:42:031456 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1457 },
[email protected]717e4e22013-04-10 20:52:231458 {
1459 "enable-tcp-fast-open",
1460 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1461 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111462 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231463 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1464 },
[email protected]8027acd2013-04-18 08:35:151465 {
[email protected]58c740f2013-05-06 05:25:441466 "apps-use-native-frame",
1467 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1468 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1469 kOsWin,
1470 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1471 },
[email protected]896d86b32013-05-09 19:36:441472 {
1473 "enable-syncfs-directory-operation",
1474 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1475 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1476 kOsAll,
1477 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1478 },
[email protected]a4ed7e12013-05-24 01:00:281479 {
[email protected]380532aa2013-05-24 11:59:351480 "enable-reset-profile-settings",
1481 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1482 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1483 kOsAll,
1484 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1485 },
[email protected]9f94a6c42013-07-11 18:49:151486 {
1487 "enable-device-discovery",
1488 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1489 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1490 kOsDesktop,
1491 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1492 },
[email protected]56d3c6e42013-05-29 11:28:011493#if defined(OS_MACOSX)
1494 {
1495 "enable-app-list-shim",
1496 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1497 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1498 kOsMac,
1499 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1500 },
[email protected]cb29e162013-05-31 07:47:021501 {
1502 "enable-app-shims",
1503 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1504 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1505 kOsMac,
1506 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1507 },
[email protected]67604442013-06-15 00:04:331508 {
1509 "enable-simplified-fullscreen",
1510 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1511 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1512 kOsMac,
1513 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1514 },
[email protected]56d3c6e42013-05-29 11:28:011515#endif
[email protected]13177832013-05-31 07:46:051516#if defined(OS_CHROMEOS) || defined(OS_WIN)
1517 {
1518 "enable-omnibox-auto-completion-for-ime",
1519 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1520 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1521 kOsCrOS,
1522 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1523 },
1524#endif
[email protected]910ecfe2013-06-03 23:38:141525#if defined(USE_AURA)
1526 {
1527 "tab-capture-upscale-quality",
1528 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1529 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1530 kOsAll,
1531 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1532 },
1533 {
1534 "tab-capture-downscale-quality",
1535 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1536 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1537 kOsAll,
1538 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1539 },
1540#endif
[email protected]71d4f602013-06-04 23:21:101541 {
[email protected]5e099c62013-06-08 05:46:231542 "enable-spelling-service-feedback",
1543 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1544 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1545 kOsAll,
1546 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1547 },
1548 {
[email protected]71d4f602013-06-04 23:21:101549 "enable-webgl-draft-extensions",
1550 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1551 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1552 kOsAll,
1553 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1554 },
[email protected]deadc492013-06-07 21:39:281555 {
1556 "high-dpi-support",
1557 IDS_FLAGS_HIDPI_NAME,
1558 IDS_FLAGS_HIDPI_DESCRIPTION,
1559 kOsWin,
1560 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1561 switches::kHighDPISupport,"0")
1562 },
[email protected]77e69a512013-06-08 05:56:451563#if defined(OS_CHROMEOS)
1564 {
1565 "enable-quickoffice-editing",
1566 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1567 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1568 kOsCrOS,
1569 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1570 },
1571#endif
[email protected]82ca4212013-06-11 12:09:171572 {
1573 "enable-translate-settings",
1574 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1575 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1576 kOsAll,
1577 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1578 },
[email protected]bc1697a82013-06-27 15:48:311579 {
1580 "enable-web-midi",
1581 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1582 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1583 kOsMac,
1584 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1585 },
[email protected]020df792013-06-29 14:26:211586 {
1587 "enable-new-profile-management",
1588 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1589 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1590 kOsWin,
1591 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1592 },
1593 {
1594 "enable-gaia-profile-info",
1595 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1596 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221597 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211598 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1599 },
[email protected]dcf6cf32013-07-03 10:53:281600#if defined(OS_WIN)
1601 {
1602 "disable-app-launcher",
1603 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1604 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
1605 kOsAll,
1606 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1607 },
1608#endif
[email protected]57b6f6e2013-07-13 03:03:351609 {
1610 "enable-device-motion",
1611 IDS_FLAGS_ENABLE_DEVICE_MOTION_NAME,
1612 IDS_FLAGS_ENABLE_DEVICE_MOTION_DESCRIPTION,
1613 kOsAndroid,
1614 SINGLE_VALUE_TYPE(switches::kEnableDeviceMotion)
1615 },
[email protected]a0e4b072011-08-17 01:47:071616};
[email protected]ad2a3ded2010-08-27 13:19:051617
[email protected]a314ee5a2010-10-26 21:23:281618const Experiment* experiments = kExperiments;
1619size_t num_experiments = arraysize(kExperiments);
1620
[email protected]e2ddbc92010-10-15 20:02:071621// Stores and encapsulates the little state that about:flags has.
1622class FlagsState {
1623 public:
1624 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401625 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1626 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071627 bool IsRestartNeededToCommitChanges();
1628 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401629 FlagsStorage* flags_storage,
1630 const std::string& internal_name,
1631 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071632 void RemoveFlagsSwitches(
1633 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401634 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071635 void reset();
1636
1637 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551638 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071639 return Singleton<FlagsState>::get();
1640 }
1641
1642 private:
1643 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531644 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071645
1646 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1647};
1648
[email protected]8a6ff28d2010-12-02 16:35:191649// Adds the internal names for the specified experiment to |names|.
1650void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1651 if (e.type == Experiment::SINGLE_VALUE) {
1652 names->insert(e.internal_name);
1653 } else {
[email protected]83e9fa702013-02-25 19:30:441654 DCHECK(e.type == Experiment::MULTI_VALUE ||
1655 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191656 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441657 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191658 }
1659}
1660
[email protected]28e35af2011-02-09 12:56:221661// Confirms that an experiment is valid, used in a DCHECK in
1662// SanitizeList below.
1663bool ValidateExperiment(const Experiment& e) {
1664 switch (e.type) {
1665 case Experiment::SINGLE_VALUE:
1666 DCHECK_EQ(0, e.num_choices);
1667 DCHECK(!e.choices);
1668 break;
1669 case Experiment::MULTI_VALUE:
1670 DCHECK_GT(e.num_choices, 0);
1671 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531672 DCHECK(e.choices[0].command_line_switch);
1673 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221674 break;
[email protected]83e9fa702013-02-25 19:30:441675 case Experiment::ENABLE_DISABLE_VALUE:
1676 DCHECK_EQ(3, e.num_choices);
1677 DCHECK(!e.choices);
1678 DCHECK(e.command_line_switch);
1679 DCHECK(e.command_line_value);
1680 DCHECK(e.disable_command_line_switch);
1681 DCHECK(e.disable_command_line_value);
1682 break;
[email protected]28e35af2011-02-09 12:56:221683 default:
1684 NOTREACHED();
1685 }
1686 return true;
1687}
1688
[email protected]ad2a3ded2010-08-27 13:19:051689// Removes all experiments from prefs::kEnabledLabsExperiments that are
1690// unknown, to prevent this list to become very long as experiments are added
1691// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401692void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051693 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221694 for (size_t i = 0; i < num_experiments; ++i) {
1695 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191696 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221697 }
[email protected]ad2a3ded2010-08-27 13:19:051698
[email protected]e6d1c4f2013-06-12 17:37:401699 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051700
1701 std::set<std::string> new_enabled_experiments;
1702 std::set_intersection(
1703 known_experiments.begin(), known_experiments.end(),
1704 enabled_experiments.begin(), enabled_experiments.end(),
1705 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1706
[email protected]4c8853f2012-07-23 01:29:161707 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401708 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051709}
1710
[email protected]1a47d7e2010-10-15 00:37:241711void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401712 FlagsStorage* flags_storage, std::set<std::string>* result) {
1713 SanitizeList(flags_storage);
1714 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051715}
1716
[email protected]a314ee5a2010-10-26 21:23:281717// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1718// enabled on the current platform.
1719void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401720 FlagsStorage* flags_storage, std::set<std::string>* result) {
1721 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281722
1723 // Filter out any experiments that aren't enabled on the current platform. We
1724 // don't remove these from prefs else syncing to a platform with a different
1725 // set of experiments would be lossy.
1726 std::set<std::string> platform_experiments;
1727 int current_platform = GetCurrentPlatform();
1728 for (size_t i = 0; i < num_experiments; ++i) {
1729 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191730 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581731#if defined(OS_CHROMEOS)
1732 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1733 AddInternalName(experiments[i], &platform_experiments);
1734#endif
[email protected]a314ee5a2010-10-26 21:23:281735 }
1736
1737 std::set<std::string> new_enabled_experiments;
1738 std::set_intersection(
1739 platform_experiments.begin(), platform_experiments.end(),
1740 result->begin(), result->end(),
1741 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1742
1743 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051744}
1745
[email protected]8a6ff28d2010-12-02 16:35:191746// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191747Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221748 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441749 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1750 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191751 ListValue* result = new ListValue;
1752 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191753 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441754 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191755 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441756 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221757 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191758 result->Append(value);
1759 }
1760 return result;
1761}
1762
[email protected]e2ddbc92010-10-15 20:02:071763} // namespace
1764
[email protected]83e9fa702013-02-25 19:30:441765std::string Experiment::NameForChoice(int index) const {
1766 DCHECK(type == Experiment::MULTI_VALUE ||
1767 type == Experiment::ENABLE_DISABLE_VALUE);
1768 DCHECK_LT(index, num_choices);
1769 return std::string(internal_name) + testing::kMultiSeparator +
1770 base::IntToString(index);
1771}
1772
1773string16 Experiment::DescriptionForChoice(int index) const {
1774 DCHECK(type == Experiment::MULTI_VALUE ||
1775 type == Experiment::ENABLE_DISABLE_VALUE);
1776 DCHECK_LT(index, num_choices);
1777 int description_id;
1778 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1779 const int kEnableDisableDescriptionIds[] = {
1780 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1781 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1782 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1783 };
1784 description_id = kEnableDisableDescriptionIds[index];
1785 } else {
1786 description_id = choices[index].description_id;
1787 }
1788 return l10n_util::GetStringUTF16(description_id);
1789}
1790
[email protected]e6d1c4f2013-06-12 17:37:401791void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1792 CommandLine* command_line) {
1793 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1794 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051795}
1796
[email protected]6d98abf2013-06-17 23:35:511797bool AreSwitchesIdenticalToCurrentCommandLine(
1798 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1799 std::set<CommandLine::StringType> new_flags =
1800 ExtractFlagsFromCommandLine(new_cmdline);
1801 std::set<CommandLine::StringType> active_flags =
1802 ExtractFlagsFromCommandLine(active_cmdline);
1803
1804 // Needed because std::equal doesn't check if the 2nd set is empty.
1805 if (new_flags.size() != active_flags.size())
1806 return false;
1807
1808 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1809}
1810
[email protected]e6d1c4f2013-06-12 17:37:401811void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521812 FlagAccess access,
1813 base::ListValue* supported_experiments,
1814 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051815 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401816 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051817
1818 int current_platform = GetCurrentPlatform();
1819
[email protected]a314ee5a2010-10-26 21:23:281820 for (size_t i = 0; i < num_experiments; ++i) {
1821 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051822
1823 DictionaryValue* data = new DictionaryValue();
1824 data->SetString("internal_name", experiment.internal_name);
1825 data->SetString("name",
1826 l10n_util::GetStringUTF16(experiment.visible_name_id));
1827 data->SetString("description",
1828 l10n_util::GetStringUTF16(
1829 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401830
1831 ListValue* supported_platforms = new ListValue();
1832 AddOsStrings(experiment.supported_platforms, supported_platforms);
1833 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051834
[email protected]28e35af2011-02-09 12:56:221835 switch (experiment.type) {
1836 case Experiment::SINGLE_VALUE:
1837 data->SetBoolean(
1838 "enabled",
1839 enabled_experiments.count(experiment.internal_name) > 0);
1840 break;
1841 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441842 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221843 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1844 break;
1845 default:
1846 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191847 }
1848
[email protected]ee28495a2013-05-20 04:10:521849 bool supported = (experiment.supported_platforms & current_platform) != 0;
1850#if defined(OS_CHROMEOS)
1851 if (access == kOwnerAccessToFlags &&
1852 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1853 supported = true;
1854 }
1855#endif
1856 if (supported)
1857 supported_experiments->Append(data);
1858 else
1859 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051860 }
[email protected]ad2a3ded2010-08-27 13:19:051861}
1862
[email protected]ad2a3ded2010-08-27 13:19:051863bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551864 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051865}
1866
[email protected]e6d1c4f2013-06-12 17:37:401867void SetExperimentEnabled(FlagsStorage* flags_storage,
1868 const std::string& internal_name,
1869 bool enable) {
1870 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1871 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071872}
1873
1874void RemoveFlagsSwitches(
1875 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551876 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071877}
1878
[email protected]e6d1c4f2013-06-12 17:37:401879void ResetAllFlags(FlagsStorage* flags_storage) {
1880 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001881}
1882
[email protected]a314ee5a2010-10-26 21:23:281883int GetCurrentPlatform() {
1884#if defined(OS_MACOSX)
1885 return kOsMac;
1886#elif defined(OS_WIN)
1887 return kOsWin;
1888#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1889 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211890#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281891 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401892#elif defined(OS_ANDROID)
1893 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281894#else
1895#error Unknown platform
1896#endif
1897}
1898
[email protected]e6d1c4f2013-06-12 17:37:401899void RecordUMAStatistics(FlagsStorage* flags_storage) {
1900 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541901 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1902 ++it) {
1903 std::string action("AboutFlags_");
1904 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381905 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541906 }
1907 // Since flag metrics are recorded every startup, add a tick so that the
1908 // stats can be made meaningful.
1909 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381910 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1911 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541912}
1913
[email protected]e2ddbc92010-10-15 20:02:071914//////////////////////////////////////////////////////////////////////////////
1915// FlagsState implementation.
1916
1917namespace {
1918
[email protected]83e9fa702013-02-25 19:30:441919typedef std::map<std::string, std::pair<std::string, std::string> >
1920 NameToSwitchAndValueMap;
1921
1922void SetFlagToSwitchMapping(const std::string& key,
1923 const std::string& switch_name,
1924 const std::string& switch_value,
1925 NameToSwitchAndValueMap* name_to_switch_map) {
1926 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1927 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1928}
1929
[email protected]e2ddbc92010-10-15 20:02:071930void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401931 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071932 if (command_line->HasSwitch(switches::kNoExperiments))
1933 return;
1934
1935 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001936
[email protected]e6d1c4f2013-06-12 17:37:401937 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1938 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071939
[email protected]a82744532011-02-11 16:15:531940 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191941 for (size_t i = 0; i < num_experiments; ++i) {
1942 const Experiment& e = experiments[i];
1943 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441944 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1945 e.command_line_value, &name_to_switch_map);
1946 } else if (e.type == Experiment::MULTI_VALUE) {
1947 for (int j = 0; j < e.num_choices; ++j) {
1948 SetFlagToSwitchMapping(e.NameForChoice(j),
1949 e.choices[j].command_line_switch,
1950 e.choices[j].command_line_value,
1951 &name_to_switch_map);
1952 }
[email protected]8a6ff28d2010-12-02 16:35:191953 } else {
[email protected]83e9fa702013-02-25 19:30:441954 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1955 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1956 &name_to_switch_map);
1957 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1958 e.command_line_value, &name_to_switch_map);
1959 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1960 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191961 }
1962 }
[email protected]e2ddbc92010-10-15 20:02:071963
1964 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531965 flags_switches_.insert(
1966 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1967 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071968 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1969 it != enabled_experiments.end();
1970 ++it) {
1971 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531972 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191973 name_to_switch_map.find(experiment_name);
1974 if (name_to_switch_it == name_to_switch_map.end()) {
1975 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071976 continue;
[email protected]8a6ff28d2010-12-02 16:35:191977 }
[email protected]e2ddbc92010-10-15 20:02:071978
[email protected]a82744532011-02-11 16:15:531979 const std::pair<std::string, std::string>&
1980 switch_and_value_pair = name_to_switch_it->second;
1981
1982 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1983 switch_and_value_pair.second);
1984 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071985 }
1986 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531987 flags_switches_.insert(
1988 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1989 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071990}
1991
1992bool FlagsState::IsRestartNeededToCommitChanges() {
1993 return needs_restart_;
1994}
1995
[email protected]e6d1c4f2013-06-12 17:37:401996void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1997 const std::string& internal_name,
1998 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441999 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192000 if (at_index != std::string::npos) {
2001 DCHECK(enable);
2002 // We're being asked to enable a multi-choice experiment. Disable the
2003 // currently selected choice.
2004 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222005 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402006 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192007
[email protected]28e35af2011-02-09 12:56:222008 // And enable the new choice, if it is not the default first choice.
2009 if (internal_name != experiment_name + "@0") {
2010 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402011 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082012 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402013 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222014 }
[email protected]8a6ff28d2010-12-02 16:35:192015 return;
2016 }
2017
[email protected]ad2a3ded2010-08-27 13:19:052018 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402019 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052020
[email protected]8a6ff28d2010-12-02 16:35:192021 const Experiment* e = NULL;
2022 for (size_t i = 0; i < num_experiments; ++i) {
2023 if (experiments[i].internal_name == internal_name) {
2024 e = experiments + i;
2025 break;
2026 }
2027 }
2028 DCHECK(e);
2029
2030 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592031 if (enable)
[email protected]147492b2013-03-19 23:52:082032 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592033 else
[email protected]147492b2013-03-19 23:52:082034 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192035 } else {
2036 if (enable) {
2037 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082038 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192039 } else {
2040 // Find the currently enabled choice and disable it.
2041 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442042 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192043 if (enabled_experiments.find(choice_name) !=
2044 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082045 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192046 enabled_experiments.erase(choice_name);
2047 // Continue on just in case there's a bug and more than one
2048 // experiment for this choice was enabled.
2049 }
2050 }
2051 }
2052 }
[email protected]ad2a3ded2010-08-27 13:19:052053
[email protected]e6d1c4f2013-06-12 17:37:402054 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052055}
2056
[email protected]e2ddbc92010-10-15 20:02:072057void FlagsState::RemoveFlagsSwitches(
2058 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532059 for (std::map<std::string, std::string>::const_iterator
2060 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2061 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072062 }
2063}
2064
[email protected]e6d1c4f2013-06-12 17:37:402065void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002066 needs_restart_ = true;
2067
2068 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402069 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002070}
2071
[email protected]e2ddbc92010-10-15 20:02:072072void FlagsState::reset() {
2073 needs_restart_ = false;
2074 flags_switches_.clear();
2075}
2076
[email protected]38e46812011-05-09 20:49:222077} // namespace
[email protected]e2ddbc92010-10-15 20:02:072078
2079namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192080
2081// WARNING: '@' is also used in the html file. If you update this constant you
2082// also need to update the html file.
2083const char kMultiSeparator[] = "@";
2084
[email protected]e2ddbc92010-10-15 20:02:072085void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552086 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072087}
[email protected]a314ee5a2010-10-26 21:23:282088
2089void SetExperiments(const Experiment* e, size_t count) {
2090 if (!e) {
2091 experiments = kExperiments;
2092 num_experiments = arraysize(kExperiments);
2093 } else {
2094 experiments = e;
2095 num_experiments = count;
2096 }
2097}
2098
[email protected]8a6ff28d2010-12-02 16:35:192099const Experiment* GetExperiments(size_t* count) {
2100 *count = num_experiments;
2101 return experiments;
2102}
2103
[email protected]e2ddbc92010-10-15 20:02:072104} // namespace testing
2105
[email protected]1a47d7e2010-10-15 00:37:242106} // namespace about_flags