blob: c7c14debed6650c6601c1aa42c6594f63958b06b [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]265fd7b2013-08-13 02:32:1013#include "ash/ash_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0514#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1515#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2017#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4020#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1023#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2725#include "extensions/common/switches.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0527#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0228#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0229#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1730#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5931#include "ui/base/ui_base_switches.h"
[email protected]8b52c1b2013-09-23 07:28:2232#include "ui/compositor/compositor_switches.h"
[email protected]a6147a22013-09-26 06:55:0933#include "ui/events/event_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4834#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2735#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2436#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5637#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2438#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5639
[email protected]dc04be7c2012-03-15 23:57:4940#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3141#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4942#endif
43
[email protected]badba1ad2012-11-16 17:21:4644#if defined(OS_CHROMEOS)
45#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5146#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4647#endif
48
[email protected]7f6f44c2011-12-14 13:23:3849using content::UserMetricsAction;
50
[email protected]1a47d7e2010-10-15 00:37:2451namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0552
[email protected]8a6ff28d2010-12-02 16:35:1953// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5354#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4455 Experiment::SINGLE_VALUE, \
56 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5357#define SINGLE_VALUE_TYPE(command_line_switch) \
58 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4459#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
60 disable_switch, disable_value) \
61 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
62 disable_switch, disable_value, NULL, 3
63#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
64 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5365#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4466 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1967
[email protected]e2ddbc92010-10-15 20:02:0768namespace {
69
[email protected]9c7453d2012-01-21 00:45:4070const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5671const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0572
[email protected]cc3e2052011-12-20 01:01:4073// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
74// whether the experiment is available on that platform.
75void AddOsStrings(unsigned bitmask, ListValue* list) {
76 struct {
77 unsigned bit;
78 const char* const name;
79 } kBitsToOs[] = {
80 {kOsMac, "Mac"},
81 {kOsWin, "Windows"},
82 {kOsLinux, "Linux"},
83 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0184 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5885 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4086 };
87 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
88 if (bitmask & kBitsToOs[i].bit)
89 list->Append(new StringValue(kBitsToOs[i].name));
90}
91
[email protected]6d98abf2013-06-17 23:35:5192// Convert switch constants to proper CommandLine::StringType strings.
93CommandLine::StringType GetSwitchString(const std::string& flag) {
94 CommandLine cmd_line(CommandLine::NO_PROGRAM);
95 cmd_line.AppendSwitch(flag);
96 DCHECK(cmd_line.argv().size() == 2);
97 return cmd_line.argv()[1];
98}
99
100// Scoops flags from a command line.
101std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
102 const CommandLine& cmdline) {
103 std::set<CommandLine::StringType> flags;
104 // First do the ones between --flag-switches-begin and --flag-switches-end.
105 CommandLine::StringVector::const_iterator first =
106 std::find(cmdline.argv().begin(), cmdline.argv().end(),
107 GetSwitchString(switches::kFlagSwitchesBegin));
108 CommandLine::StringVector::const_iterator last =
109 std::find(cmdline.argv().begin(), cmdline.argv().end(),
110 GetSwitchString(switches::kFlagSwitchesEnd));
111 if (first != cmdline.argv().end() && last != cmdline.argv().end())
112 flags.insert(first + 1, last);
113#if defined(OS_CHROMEOS)
114 // Then add those between --policy-switches-begin and --policy-switches-end.
115 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
116 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
117 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
118 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
119 if (first != cmdline.argv().end() && last != cmdline.argv().end())
120 flags.insert(first + 1, last);
121#endif
122 return flags;
123}
124
[email protected]fb854192013-02-06 01:30:04125const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
126 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
127 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
128 switches::kEnableCompositingForFixedPosition, ""},
129 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
130 switches::kDisableCompositingForFixedPosition, ""},
131 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
132 switches::kEnableHighDpiCompositingForFixedPosition, ""}
133};
134
[email protected]d8221b22013-05-23 05:35:43135const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
136 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
137 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
138 switches::kEnableCompositingForTransition, ""},
139 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
140 switches::kDisableCompositingForTransition, ""},
141};
142
[email protected]06fc4d3b2013-07-08 21:07:24143const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
144 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
145 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
146 switches::kEnableAcceleratedFixedRootBackground, ""},
147 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
148 switches::kDisableAcceleratedFixedRootBackground, ""},
149};
150
[email protected]8b1c3c72013-01-25 01:48:43151const Experiment::Choice kGDIPresentChoices[] = {
152 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
153 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
154 switches::kDoFirstShowPresentWithGDI, ""},
155 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
156 switches::kDoAllShowPresentWithGDI, ""}
157};
158
[email protected]d7932532012-11-21 21:10:31159const Experiment::Choice kTouchEventsChoices[] = {
160 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
161 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
162 switches::kTouchEvents,
163 switches::kTouchEventsEnabled },
164 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
165 switches::kTouchEvents,
166 switches::kTouchEventsDisabled }
167};
168
[email protected]347a0c72012-05-14 20:28:06169const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31170 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20171 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06172 switches::kTouchOptimizedUI,
173 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20174 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06175 switches::kTouchOptimizedUI,
176 switches::kTouchOptimizedUIDisabled }
177};
178
[email protected]66f409c2012-10-04 20:59:04179const Experiment::Choice kNaClDebugMaskChoices[] = {
180 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
181 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
182 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
183 // an option to switch off its debugging.
184 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
185 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
186 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
187 switches::kNaClDebugMask, "*://*/*debug.nmf" }
188};
189
[email protected]ea2f3342012-09-21 21:13:36190#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02191
192const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24193 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02194 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24195 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19196 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24197 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02198};
[email protected]a78c7432013-03-13 06:22:43199
[email protected]ea2f3342012-09-21 21:13:36200#endif
201
[email protected]9323fdd12013-02-23 00:31:36202const Experiment::Choice kImplSidePaintingChoices[] = {
203 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
204 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
205 cc::switches::kEnableImplSidePainting, ""},
206 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
207 cc::switches::kDisableImplSidePainting, ""}
208};
209
[email protected]8b52c1b2013-09-23 07:28:22210const Experiment::Choice kDeadlineSchedulingChoices[] = {
211 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
212 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
213 switches::kEnableDeadlineScheduling, ""},
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
215 switches::kDisableDeadlineScheduling, ""}
216};
217
218const Experiment::Choice kUIDeadlineSchedulingChoices[] = {
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
220 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
221 switches::kUIEnableDeadlineScheduling, ""},
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
223 switches::kUIDisableDeadlineScheduling, ""}
224};
225
[email protected]7621af22013-09-12 23:06:33226const Experiment::Choice kLCDTextChoices[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""},
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""}
230};
231
[email protected]0c04d1c2013-07-10 00:02:32232const Experiment::Choice kDelegatedRendererChoices[] = {
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
234 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
235 switches::kEnableDelegatedRenderer, ""},
236 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
237 switches::kDisableDelegatedRenderer, ""}
238};
239
[email protected]a42c85f2013-04-04 18:15:12240const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
241 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
242 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
243 cc::switches::kMaxTilesForInterestArea, "64"},
244 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
245 cc::switches::kMaxTilesForInterestArea, "128"},
246 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
247 cc::switches::kMaxTilesForInterestArea, "256"},
248 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
249 cc::switches::kMaxTilesForInterestArea, "512"}
250};
251
[email protected]a3618122013-04-26 21:15:34252const Experiment::Choice kDefaultTileWidthChoices[] = {
253 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
254 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
255 switches::kDefaultTileWidth, "128"},
256 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
257 switches::kDefaultTileWidth, "256"},
258 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
259 switches::kDefaultTileWidth, "512"},
260 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
261 switches::kDefaultTileWidth, "1024"}
262};
263
264const Experiment::Choice kDefaultTileHeightChoices[] = {
265 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
266 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
267 switches::kDefaultTileHeight, "128"},
268 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
269 switches::kDefaultTileHeight, "256"},
270 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
271 switches::kDefaultTileHeight, "512"},
272 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
273 switches::kDefaultTileHeight, "1024"}
274};
275
[email protected]38484df12013-04-10 16:42:03276const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21277 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
278 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
279 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03280 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
281 switches::kUseSimpleCacheBackend, "on"}
282};
283
[email protected]9afc14e22013-09-25 22:34:14284#if defined(USE_AURA)
[email protected]910ecfe2013-06-03 23:38:14285const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
286 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
287 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
288 switches::kTabCaptureUpscaleQuality, "fast" },
289 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
290 switches::kTabCaptureUpscaleQuality, "good" },
291 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
292 switches::kTabCaptureUpscaleQuality, "best" },
293};
294
295const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
296 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
297 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
298 switches::kTabCaptureDownscaleQuality, "fast" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
300 switches::kTabCaptureDownscaleQuality, "good" },
301 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
302 switches::kTabCaptureDownscaleQuality, "best" },
303};
[email protected]9afc14e22013-09-25 22:34:14304#endif
[email protected]910ecfe2013-06-03 23:38:14305
[email protected]be2e40a2013-08-27 02:49:20306const Experiment::Choice kMapImageChoices[] = {
307 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
308 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
309 cc::switches::kEnableMapImage, ""},
310 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
311 cc::switches::kDisableMapImage, ""}
312};
313
[email protected]4bc5050c2010-11-18 17:55:54314// RECORDING USER METRICS FOR FLAGS:
315// -----------------------------------------------------------------------------
316// The first line of the experiment is the internal name. If you'd like to
317// gather statistics about the usage of your flag, you should append a marker
318// comment to the end of the feature name, like so:
319// "my-special-feature", // FLAGS:RECORD_UMA
320//
321// After doing that, run //chrome/tools/extract_actions.py (see instructions at
322// the top of that file for details) to update the chromeactions.txt file, which
323// will enable UMA to record your feature flag.
324//
[email protected]783d5bb2012-10-24 03:47:14325// After your feature has shipped under a flag, you can locate the metrics under
326// the action name AboutFlags_internal-action-name. Actions are recorded once
327// per startup, so you should divide this number by AboutFlags_StartupTick to
328// get a sense of usage. Note that this will not be the same as number of users
329// with a given feature enabled because users can quit and relaunch the
330// application multiple times over a given time interval. The dashboard also
331// shows you how many (metrics reporting) users have enabled the flag over the
332// last seven days. However, note that this is not the same as the number of
333// users who have the flag enabled, since enabling the flag happens once,
334// whereas running with the flag enabled happens until the user flips the flag
335// again.
[email protected]4bc5050c2010-11-18 17:55:54336
[email protected]8a6ff28d2010-12-02 16:35:19337// To add a new experiment add to the end of kExperiments. There are two
338// distinct types of experiments:
339// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
340// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22341// . MULTI_VALUE: a list of choices, the first of which should correspond to a
342// deactivated state for this lab (i.e. no command line option). To specify
343// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
344// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19345// See the documentation of Experiment for details on the fields.
346//
347// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05348const Experiment kExperiments[] = {
349 {
[email protected]aac169d2011-03-18 19:53:03350 "expose-for-tabs", // FLAGS:RECORD_UMA
351 IDS_FLAGS_TABPOSE_NAME,
352 IDS_FLAGS_TABPOSE_DESCRIPTION,
353 kOsMac,
354#if defined(OS_MACOSX)
355 // The switch exists only on OS X.
356 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
357#else
358 SINGLE_VALUE_TYPE("")
359#endif
360 },
361 {
[email protected]4bc5050c2010-11-18 17:55:54362 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05363 IDS_FLAGS_CONFLICTS_CHECK_NAME,
364 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
365 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19366 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05367 },
368 {
[email protected]96c6f4c2011-05-18 19:36:22369 "ignore-gpu-blacklist",
370 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
371 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
372 kOsAll,
373 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
374 },
375 {
[email protected]0110cf112011-07-02 00:39:43376 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22377 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
378 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23379 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44380 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
381 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22382 },
383 {
[email protected]72787e392012-03-23 05:55:43384 "threaded-compositing-mode",
385 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
386 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58387 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44388 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
389 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59390 },
391 {
[email protected]17e27692013-02-06 17:02:09392 "force-accelerated-composited-scrolling",
393 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
394 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
395 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44396 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
397 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09398 },
399 {
[email protected]8b1c3c72013-01-25 01:48:43400 "present-with-GDI",
401 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
402 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
403 kOsWin,
404 MULTI_VALUE_TYPE(kGDIPresentChoices)
405 },
406 {
[email protected]2b608752013-05-01 03:34:36407 "enable-experimental-canvas-features",
408 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
409 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
410 kOsAll,
411 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
412 },
413 {
[email protected]81c64af62012-06-06 20:15:52414 "disable-accelerated-2d-canvas",
415 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
416 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
417 kOsAll,
418 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
419 },
420 {
[email protected]efcde132012-05-30 01:05:18421 "disable-threaded-animation",
422 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
423 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59424 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37425 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59426 },
427 {
[email protected]5963b772011-02-09 22:55:38428 "composited-layer-borders",
429 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
430 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
431 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57432 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38433 },
434 {
[email protected]a8f1eaa2011-03-07 19:00:58435 "show-fps-counter",
436 IDS_FLAGS_SHOW_FPS_COUNTER,
437 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
438 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57439 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58440 },
[email protected]8ff7f342011-05-25 01:49:47441 {
[email protected]70c98a332011-12-21 20:51:52442 "accelerated-filters",
443 IDS_FLAGS_ACCELERATED_FILTERS,
444 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
445 kOsAll,
446 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
447 },
448 {
[email protected]deaba6d52011-09-23 14:47:12449 "disable-webgl",
450 IDS_FLAGS_DISABLE_WEBGL_NAME,
451 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28452 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12453 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
454 },
[email protected]09096e02012-05-24 11:12:04455 {
[email protected]e4e49272013-09-17 22:27:28456 "enable-d3d11",
457 IDS_FLAGS_ENABLE_D3D11_NAME,
458 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
459 kOsWin,
460 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
461 },
462 {
[email protected]ce585bf2013-03-14 16:25:16463 "disable-webrtc",
464 IDS_FLAGS_DISABLE_WEBRTC_NAME,
465 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05466 kOsAndroid,
467#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16468 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05469#else
470 SINGLE_VALUE_TYPE("")
471#endif
472 },
[email protected]5e2bc8c2013-05-28 22:59:57473#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30474 {
[email protected]f1045f02013-08-02 23:19:35475 "disable-device-enumeration",
476 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
477 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
[email protected]c1298742013-07-17 04:06:32478 kOsAll,
[email protected]f1045f02013-08-02 23:19:35479 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
[email protected]c1298742013-07-17 04:06:32480 },
[email protected]96cbf422013-09-11 12:42:22481 {
[email protected]fdf631e2013-09-13 09:06:07482 "disable-sctp-data-channels",
483 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_NAME,
484 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
485 kOsAll,
486 SINGLE_VALUE_TYPE(switches::kDisableSCTPDataChannels)
487 },
488 {
489 "disable-webrtc-hw-decoding",
490 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
491 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
492 kOsCrOS,
493 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
494 },
495 {
[email protected]96cbf422013-09-11 12:42:22496 "disable-webrtc-hw-encoding",
497 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
498 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
499 kOsCrOS,
500 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
501 },
[email protected]5e2bc8c2013-05-28 22:59:57502#endif
[email protected]34cb5292013-04-15 06:06:31503#if defined(OS_ANDROID)
504 {
[email protected]7b8a31632013-06-13 22:42:37505 "disable-webaudio",
506 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
507 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31508 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37509 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31510 },
511#endif
[email protected]d9da9582013-01-31 04:59:05512 {
[email protected]96bcdc102012-05-24 23:42:10513 "fixed-position-creates-stacking-context",
514 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
515 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
516 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44517 ENABLE_DISABLE_VALUE_TYPE(
518 switches::kEnableFixedPositionCreatesStackingContext,
519 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10520 },
[email protected]fb854192013-02-06 01:30:04521 {
522 "enable-compositing-for-fixed-position",
523 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
524 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
525 kOsAll,
526 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
527 },
[email protected]d8221b22013-05-23 05:35:43528 {
529 "enable-compositing-for-transition",
530 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
531 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
532 kOsAll,
533 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
534 },
[email protected]06fc4d3b2013-07-08 21:07:24535 {
536 "enable-accelerated-fixed-root-background",
537 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
538 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
539 kOsAll,
540 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
541 },
[email protected]a7640ef22012-10-06 00:52:08542 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53543 {
[email protected]e3791ce92011-08-09 01:03:32544 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40545 IDS_FLAGS_ENABLE_NACL_NAME,
546 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56547 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19548 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40549 },
550 {
[email protected]9addd1c2012-09-15 14:28:24551 "enable-nacl-debug", // FLAGS:RECORD_UMA
552 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
553 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56554 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24555 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13556 },
557 {
[email protected]7de24f52013-08-29 10:02:55558 "disable-pnacl", // FLAGS:RECORD_UMA
559 IDS_FLAGS_DISABLE_PNACL_NAME,
560 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
561 kOsDesktop,
562 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
563 },
564 {
[email protected]66f409c2012-10-04 20:59:04565 "nacl-debug-mask", // FLAGS:RECORD_UMA
566 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
567 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56568 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04569 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
570 },
571 {
[email protected]4bc5050c2010-11-18 17:55:54572 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32573 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
574 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56575 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51576 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32577 },
[email protected]3627b06d2010-11-12 16:36:16578 {
[email protected]ac2e2acd2013-03-21 12:57:29579 "extensions-on-chrome-urls",
580 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
581 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
582 kOsAll,
[email protected]49d9b142013-07-19 08:50:27583 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29584 },
585 {
[email protected]88c92012013-07-02 11:56:34586 "enable-fast-unload",
587 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
588 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
589 kOsAll,
590 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
591 },
592 {
[email protected]e9cddd52013-03-23 17:37:53593 "enable-adview",
594 IDS_FLAGS_ENABLE_ADVIEW_NAME,
595 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
596 kOsDesktop,
597 SINGLE_VALUE_TYPE(switches::kEnableAdview)
598 },
599 {
600 "enable-adview-src-attribute",
601 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
602 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
603 kOsDesktop,
604 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
605 },
606 {
[email protected]1f4da9e2013-06-27 05:23:44607 "enable-app-window-controls",
608 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
609 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
610 kOsDesktop,
611 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
612 },
613 {
[email protected]3a362432012-06-18 20:39:51614 "script-badges",
615 IDS_FLAGS_SCRIPT_BADGES_NAME,
616 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56617 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09618 SINGLE_VALUE_TYPE(switches::kScriptBadges)
619 },
620 {
621 "script-bubble",
622 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
623 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56624 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44625 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
626 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51627 },
628 {
[email protected]cbe224d2011-08-04 22:12:49629 "apps-new-install-bubble",
630 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
631 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56632 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49633 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
634 },
635 {
[email protected]80bd24e2010-11-30 09:34:38636 "disable-hyperlink-auditing",
637 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
638 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
639 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19640 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51641 },
642 {
[email protected]5aea1862011-03-23 23:55:39643 "tab-groups-context-menu",
644 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
645 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
646 kOsWin,
647 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
648 },
[email protected]c94cebd2012-06-21 00:55:28649 {
650 "enable-instant-extended-api",
651 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
652 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46653 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51654 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
655 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28656 },
[email protected]e9bf9d92011-03-31 20:57:15657 {
[email protected]fc28c972013-09-20 21:30:29658 "use-cacheable-new-tab-page",
659 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_CACHEABLE_NTP,
660 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_CACHEABLE_NTP_DESCRIPTION,
661 kOsMac | kOsWin | kOsCrOS,
662 SINGLE_VALUE_TYPE(switches::kUseCacheableNewTabPage)
663 },
664 {
[email protected]8cc9e532013-05-06 21:01:47665 "enable-local-first-load-ntp",
666 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
667 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46668 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47669 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
670 switches::kDisableLocalFirstLoadNTP)
671 },
[email protected]333bdc52013-07-16 00:37:04672#if defined(OS_ANDROID)
673 {
674 "enable-new-ntp",
675 IDS_FLAGS_ENABLE_NEW_NTP,
676 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
677 kOsAndroid,
[email protected]6bab2e32013-09-11 00:09:03678 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
679 switches::kDisableNewNTP)
[email protected]333bdc52013-07-16 00:37:04680 },
681#endif
[email protected]8cc9e532013-05-06 21:01:47682 {
[email protected]3eb5728c2011-06-20 22:32:24683 "show-autofill-type-predictions",
684 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
685 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
686 kOsAll,
[email protected]e217c5632013-04-12 19:11:48687 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24688 },
[email protected]bff4d3e2011-06-21 23:58:52689 {
[email protected]e755a382012-09-13 17:16:35690 "enable-gesture-tap-highlight",
691 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
692 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
693 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47694 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
695 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35696 },
697 {
[email protected]a22ebd812011-06-23 00:05:39698 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
699 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
700 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
701 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40702 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25703 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39704 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
705 },
[email protected]81a6b0b2011-06-24 17:55:40706 {
[email protected]23eecbd02013-09-19 18:13:37707 "enable-overlay-scrollbars",
708 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
709 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
710 // Uses the system preference on Mac (a different implementation).
711 // On Android, this is always enabled.
[email protected]bc1b6bc2013-09-24 17:04:16712 kOsCrOS,
[email protected]23eecbd02013-09-19 18:13:37713 SINGLE_VALUE_TYPE(switches::kEnableOverlayScrollbars)
714 },
715 {
[email protected]7e7a28092011-12-09 22:24:55716 "enable-panels",
717 IDS_FLAGS_ENABLE_PANELS_NAME,
718 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56719 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55720 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54721 },
[email protected]e3749d12011-07-25 22:22:12722 {
[email protected]27c14f02012-06-22 17:29:58723 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27724 "save-page-as-mhtml", // FLAGS:RECORD_UMA
725 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
726 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
727 kOsMac | kOsWin | kOsLinux,
728 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
729 },
730 {
[email protected]b7bb44f2011-09-01 05:17:03731 "enable-autologin",
732 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
733 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
734 kOsMac | kOsWin | kOsLinux,
735 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
736 },
[email protected]b9841172011-09-26 23:36:09737 {
[email protected]903e63382013-06-01 00:40:58738 "enable-quic",
739 IDS_FLAGS_ENABLE_QUIC_NAME,
740 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
741 kOsAll,
742 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
743 switches::kDisableQuic)
744 },
745 {
[email protected]eb8f88e2013-07-15 09:52:17746 "enable-quic-https",
747 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
748 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
749 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00750 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
751 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17752 },
753 {
[email protected]bca09b9982013-06-27 22:30:46754 "enable-spdy4a2",
755 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
756 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
757 kOsAll,
758 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
759 },
760 {
[email protected]88a332622013-07-30 07:13:32761 "enable-http2-draft-04",
762 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
763 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
764 kOsAll,
765 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
766 },
767 {
[email protected]27b3fe92012-03-21 05:35:06768 "enable-async-dns",
769 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
770 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46771 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44772 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
773 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06774 },
775 {
[email protected]bc9235c22013-09-24 07:32:44776 "disable-webkit-media-source",
[email protected]5bf1223a52013-05-14 21:42:31777 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
778 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32779 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31780 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44781 },
[email protected]e4e68dbb2011-11-18 01:50:22782 {
[email protected]722b4d484f2013-10-08 20:33:59783 "disable-unprefixed-media-source",
784 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_NAME,
785 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_DESCRIPTION,
786 kOsAll,
787 SINGLE_VALUE_TYPE(switches::kDisableUnprefixedMediaSource)
788 },
789 {
[email protected]16c242d2013-05-31 23:56:47790 "enable-encrypted-media",
791 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
792 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50793 kOsAll,
[email protected]16c242d2013-05-31 23:56:47794 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
795 },
796 {
[email protected]e76d92f2013-09-26 20:03:35797 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47798 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
799 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50800 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35801 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03802 },
[email protected]f88628792012-12-18 07:07:50803 {
[email protected]d21ead42013-06-24 06:35:06804 "override-encrypted-media-canplaytype",
805 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
806 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
[email protected]e90b52d2013-09-06 00:03:51807 kOsMac | kOsWin | kOsAndroid,
[email protected]d21ead42013-06-24 06:35:06808 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
809 },
[email protected]ce3934bb2013-09-10 02:02:56810#if defined(OS_ANDROID)
811 {
[email protected]3c56ec12013-09-25 02:03:42812 "disable-infobar-for-protected-media-identifier",
813 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
814 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
815 kOsAndroid,
816 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
817 },
818 {
[email protected]ce3934bb2013-09-10 02:02:56819 "mediadrm-enable-non-compositing",
820 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
821 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
822 kOsAndroid,
823 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
824 },
825#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06826 {
[email protected]f88628792012-12-18 07:07:50827 "enable-opus-playback",
828 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
829 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56830 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50831 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
832 },
[email protected]b150b5532013-06-15 00:50:54833 {
[email protected]fb53f262013-09-03 20:52:42834 "disable-vp8-alpha-playback",
835 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_NAME,
836 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
[email protected]6ac955b2013-04-19 23:43:32837 kOsDesktop,
[email protected]fb53f262013-09-03 20:52:42838 SINGLE_VALUE_TYPE(switches::kDisableVp8AlphaPlayback)
[email protected]6ac955b2013-04-19 23:43:32839 },
840 {
[email protected]ca6eaa5a2013-01-24 16:16:04841 "enable-managed-users",
842 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
843 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08844 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04845 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
846 },
[email protected]eaae8b462012-01-20 22:20:39847 {
[email protected]db543d322011-12-15 20:40:15848 "per-tile-painting",
849 IDS_FLAGS_PER_TILE_PAINTING_NAME,
850 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37851 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37852 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15853 },
[email protected]bf88c032011-12-22 19:05:47854 {
855 "enable-javascript-harmony",
856 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
857 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
858 kOsAll,
859 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
860 },
[email protected]7e7f378a2012-01-05 14:35:37861 {
[email protected]85646172012-01-09 22:45:54862 "enable-tab-browser-dragging",
863 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
864 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
865 kOsWin,
866 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
867 },
868 {
[email protected]068b7b52012-02-27 12:41:44869 "disable-restore-session-state",
870 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
871 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37872 kOsAll,
[email protected]068b7b52012-02-27 12:41:44873 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37874 },
[email protected]88864db2012-01-18 20:56:35875 {
876 "disable-software-rasterizer",
877 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
878 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
879#if defined(ENABLE_SWIFTSHADER)
880 kOsAll,
881#else
882 0,
883#endif
884 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
885 },
[email protected]15a5d722012-01-23 09:11:14886 {
[email protected]c1b18ea2013-07-10 13:01:16887 "enable-experimental-web-platform-features",
888 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
889 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16890 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16891 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49892 },
893 {
[email protected]0f95a252012-09-13 22:30:04894 "enable-css-shaders",
895 IDS_FLAGS_CSS_SHADERS_NAME,
896 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
897 kOsAll,
898 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
899 },
900 {
[email protected]3e8befc2012-03-13 01:17:03901 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16902 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
903 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56904 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03905 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16906 },
[email protected]dc04be7c2012-03-15 23:57:49907#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01908 {
[email protected]3cd198a22012-03-12 20:38:01909 "enable-ash-oak",
910 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
911 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
912 kOsAll,
913 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
914 },
[email protected]31cf1c52012-02-29 20:55:01915#endif
[email protected]184ec592012-03-01 11:54:28916 {
917 "enable-devtools-experiments",
918 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
919 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56920 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28921 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
922 },
[email protected]76d1854e2012-03-02 23:57:44923 {
[email protected]2fefdb32013-02-26 14:28:10924 "silent-debugger-extension-api",
925 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
926 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
927 kOsDesktop,
928 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
929 },
930 {
[email protected]76d1854e2012-03-02 23:57:44931 "enable-suggestions-ntp",
932 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
933 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56934 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44935 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
936 },
[email protected]a3d54252012-04-05 20:04:13937 {
[email protected]1dbaf5e2012-11-30 05:51:32938 "spellcheck-autocorrect",
939 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
940 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
941 kOsWin | kOsLinux | kOsCrOS,
942 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
943 },
944 {
[email protected]e27137282013-06-20 02:38:35945 "enable-scroll-prediction",
946 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
947 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
948 kOsDesktop,
949 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
950 },
951 {
[email protected]d7932532012-11-21 21:10:31952 "touch-events",
953 IDS_TOUCH_EVENTS_NAME,
954 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56955 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31956 MULTI_VALUE_TYPE(kTouchEventsChoices)
957 },
958 {
[email protected]c9c73ad42012-04-18 03:35:59959 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06960 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
961 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55962 kOsWin,
[email protected]347a0c72012-05-14 20:28:06963 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59964 },
[email protected]8a6aaa72012-04-20 20:53:58965 {
[email protected]b9c96ff2012-11-26 22:24:40966 "disable-touch-adjustment",
967 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
968 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
969 kOsWin | kOsLinux | kOsCrOS,
970 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
971 },
[email protected]0b60afa2012-04-19 17:36:39972#if defined(OS_CHROMEOS)
973 {
[email protected]690de0f2013-06-26 00:51:16974 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31975 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
976 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
977 kOsCrOS,
[email protected]f54effe2013-09-05 01:09:02978 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
979 ash::switches::kAshDisableAlternateShelfLayout)
[email protected]1dd46bd2013-06-14 07:08:31980 },
981 {
[email protected]58fb96a2013-09-04 23:43:06982 "ash-disable-drag-off-shelf",
[email protected]28fb77a62013-08-24 14:37:57983 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
984 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
985 kOsCrOS,
[email protected]58fb96a2013-09-04 23:43:06986 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
[email protected]28fb77a62013-08-24 14:37:57987 },
988 {
[email protected]7c4a9bc2012-09-11 22:10:05989 "enable-background-loader",
990 IDS_ENABLE_BACKLOADER_NAME,
991 IDS_ENABLE_BACKLOADER_DESCRIPTION,
992 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24993 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05994 },
995 {
[email protected]3f4181a2013-02-01 21:31:07996 "enable-screensaver-extension",
997 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
998 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
999 kOsCrOS,
1000 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
1001 },
1002 {
[email protected]0b60afa2012-04-19 17:36:391003 "no-discard-tabs",
1004 IDS_FLAGS_NO_DISCARD_TABS_NAME,
1005 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
1006 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241007 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:391008 },
[email protected]ba7df7e2013-07-18 21:49:591009 {
1010 "ash-enable-docked-windows",
1011 IDS_FLAGS_DOCKED_WINDOWS_NAME,
1012 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
1013 kOsCrOS,
1014 SINGLE_VALUE_TYPE(ash::switches::kAshEnableDockedWindows)
1015 },
[email protected]0b60afa2012-04-19 17:36:391016#endif
[email protected]79be6d32012-04-24 20:47:441017 {
[email protected]8d68a3e02013-01-12 15:57:101018 "enable-download-resumption",
1019 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
1020 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561021 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:101022 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1023 },
1024 {
[email protected]9a5940d2012-04-27 19:16:231025 "allow-nacl-socket-api",
1026 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1027 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561028 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:231029 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1030 },
[email protected]85333732012-05-01 19:02:241031 {
[email protected]60673ad72012-05-02 06:16:331032 "stacked-tab-strip",
1033 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1034 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1035 kOsWin,
1036 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1037 },
1038 {
[email protected]4bd20202012-06-14 17:35:011039 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241040 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1041 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1042 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011043 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241044 },
[email protected]190349fd2012-05-02 00:10:471045#if defined(OS_CHROMEOS)
1046 {
1047 "allow-touchpad-three-finger-click",
1048 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1049 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1050 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241051 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471052 },
1053#endif
[email protected]53520b1b2012-05-07 21:43:371054#if defined(USE_ASH)
1055 {
[email protected]8257d382013-03-26 13:08:421056 "show-launcher-alignment-menu",
[email protected]81dd43d2013-08-06 05:58:271057 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
1058 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421059 kOsAll,
[email protected]265fd7b2013-08-13 02:32:101060 ENABLE_DISABLE_VALUE_TYPE(
1061 ash::switches::kShowShelfAlignmentMenu,
1062 ash::switches::kHideShelfAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421063 },
1064 {
[email protected]2ddf37b2013-04-20 01:15:581065 "disable-minimize-on-second-launcher-item-click",
1066 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1067 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1068 kOsAll,
1069 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1070 },
1071 {
[email protected]cf21af62013-09-27 19:36:031072 "disable-overview-mode",
1073 IDS_FLAGS_DISABLE_OVERVIEW_MODE_NAME,
1074 IDS_FLAGS_DISABLE_OVERVIEW_MODE_DESCRIPTION,
[email protected]d24ce2c2013-08-01 15:14:191075 kOsCrOS,
[email protected]cf21af62013-09-27 19:36:031076 SINGLE_VALUE_TYPE(ash::switches::kAshDisableOverviewMode)
[email protected]d24ce2c2013-08-01 15:14:191077 },
1078 {
[email protected]73074742012-05-17 01:44:411079 "show-touch-hud",
1080 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1081 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1082 kOsAll,
1083 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1084 },
1085 {
[email protected]9f0940b62012-05-23 22:56:351086 "enable-pinch",
1087 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1088 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061089 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381090 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1091 },
1092 {
[email protected]de0aaed2013-05-27 18:16:431093 "enable-pinch-virtual-viewport",
1094 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1095 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1096 kOsLinux | kOsWin | kOsCrOS,
1097 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1098 },
[email protected]73074742012-05-17 01:44:411099#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281100#if defined(OS_CHROMEOS)
1101 {
[email protected]8b04a1652012-08-04 02:59:491102 "disable-boot-animation",
1103 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1104 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581105 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241106 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491107 },
[email protected]95058572012-08-20 14:57:291108 {
[email protected]d96aef22012-10-30 11:47:021109 "captive-portal-detector",
1110 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1111 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581112 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021113 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1114 },
1115 {
[email protected]53bc4352013-06-24 10:22:371116 "file-manager-show-checkboxes",
1117 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1118 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491119 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371120 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491121 },
1122 {
[email protected]f6ded872013-07-23 09:41:361123 "file-manager-enable-webstore-integration",
1124 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1125 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1126 kOsCrOS,
1127 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1128 },
1129 {
[email protected]099b890c2013-04-25 19:16:261130 "disable-quickoffice-component-app",
1131 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1132 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1133 kOsCrOS,
1134 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1135 },
[email protected]31cf1472013-09-13 00:36:421136 {
1137 "enable-saml-signin",
1138 IDS_FLAGS_ENABLE_SAML_SIGNIN_NAME,
1139 IDS_FLAGS_ENABLE_SAML_SIGNIN_DESCRIPTION,
1140 kOsCrOS,
1141 SINGLE_VALUE_TYPE(chromeos::switches::kEnableSamlSignin),
1142 },
[email protected]d81240b2013-09-20 21:05:281143 {
1144 "enable-multi-profiles",
1145 IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME,
1146 IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION,
1147 kOsCrOS,
1148 SINGLE_VALUE_TYPE(switches::kMultiProfiles),
1149 },
[email protected]62018dc2012-12-13 00:37:351150#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391151 {
[email protected]6247aba2013-03-04 22:57:181152 "views-textfield",
1153 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1154 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391155 kOsWin,
[email protected]6247aba2013-03-04 22:57:181156 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1157 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391158 },
[email protected]7db8893a2012-07-26 00:49:401159 { "disable-accelerated-video-decode",
1160 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1161 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191162 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401163 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151164 },
[email protected]37fee0942012-08-07 21:07:451165 {
[email protected]ad3f6d22012-08-29 02:34:191166 "enable-contacts",
1167 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1168 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1169 kOsCrOS,
1170 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1171 },
[email protected]1d9bb9cd2012-08-28 22:02:501172#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:381173 {
1174 "ash-debug-shortcuts",
1175 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1176 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1177 kOsAll,
1178 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1179 },
[email protected]1d9bb9cd2012-08-28 22:02:501180 { "ash-enable-advanced-gestures",
1181 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1182 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1183 kOsCrOS,
1184 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1185 },
[email protected]35c9a4e2013-09-14 01:32:381186 { "ash-alternate-caption-button",
1187 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_NAME,
1188 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_DESCRIPTION,
1189 kOsCrOS,
1190 ENABLE_DISABLE_VALUE_TYPE(
1191 ash::switches::kAshEnableAlternateFrameCaptionButtonStyle,
1192 ash::switches::kAshDisableAlternateFrameCaptionButtonStyle),
1193 },
[email protected]35c9a4e2013-09-14 01:32:381194 {
1195 "ash-disable-auto-maximizing",
1196 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
1197 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
1198 kOsWin | kOsLinux | kOsCrOS,
1199 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
1200 },
[email protected]ad6fcc32013-05-30 03:46:481201 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081202 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1203 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1204 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481205 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081206 },
[email protected]cf2b1a82013-04-20 01:05:431207 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111208 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1209 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241210 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431211 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1212 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241213 },
[email protected]316708a2012-11-05 22:57:021214#if defined(OS_LINUX)
1215 { "ash-enable-memory-monitor",
1216 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1217 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1218 kOsCrOS,
1219 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1220 },
1221#endif
[email protected]91731532013-09-21 16:01:401222#if defined(OS_CHROMEOS)
[email protected]a5c01be2013-10-08 18:40:461223 { "ash-enable-full-multi-profile-mode",
1224 IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE,
1225 IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE_DESCRIPTION,
1226 kOsCrOS,
1227 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullMultiProfileMode),
1228 },
[email protected]91731532013-09-21 16:01:401229 { "ash-enable-multi-profile-shelf",
1230 IDS_FLAGS_ENABLE_MULTI_PROFILE_SHELF_NAME,
1231 IDS_FLAGS_ENABLE_MULTI_PROFILE_SHELF_DESCRIPTION,
1232 kOsCrOS,
1233 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMultiProfileShelfMenu),
1234 },
1235#endif
[email protected]1d9bb9cd2012-08-28 22:02:501236#endif
[email protected]9b7ab882012-09-10 23:46:361237#if defined(OS_CHROMEOS)
1238 {
[email protected]354ff2d2013-05-01 17:06:311239 "ash-audio-device-menu",
1240 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1241 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1242 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431243 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1244 ash::switches::kAshDisableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121245 },
1246 {
[email protected]205f07892012-10-16 20:26:221247 "enable-carrier-switching",
1248 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1249 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1250 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241251 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221252 },
1253 {
[email protected]9b7ab882012-09-10 23:46:361254 "enable-request-tablet-site",
1255 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1256 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1257 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241258 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361259 },
1260#endif
[email protected]dab49c0b2012-10-04 05:55:351261 {
1262 "debug-packed-apps",
1263 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1264 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561265 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351266 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1267 },
[email protected]d1459ed2012-10-10 01:29:331268 {
1269 "enable-password-generation",
1270 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1271 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561272 kOsDesktop,
[email protected]c3cc0632013-10-03 21:54:431273 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1274 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331275 },
[email protected]26d045f2012-10-18 21:18:431276 {
[email protected]374c7b22013-09-06 08:20:061277 "enable-people-search",
1278 IDS_FLAGS_ENABLE_PEOPLE_SEARCH_NAME,
1279 IDS_FLAGS_ENABLE_PEOPLE_SEARCH_DESCRIPTION,
1280 kOsMac | kOsWin | kOsCrOS,
1281 SINGLE_VALUE_TYPE(switches::kEnablePeopleSearch)
1282 },
1283 {
[email protected]283cc562013-07-18 08:25:431284 "password-autofill-public-suffix-domain-matching",
1285 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1286 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
[email protected]17b9c742013-06-22 13:48:421287 kOsAndroid,
[email protected]283cc562013-07-18 08:25:431288 ENABLE_DISABLE_VALUE_TYPE(
1289 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1290 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
[email protected]17b9c742013-06-22 13:48:421291 },
1292 {
[email protected]76f7d4882012-10-26 21:09:221293 "enable-deferred-image-decoding",
1294 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1295 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221296 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221297 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1298 },
1299 {
[email protected]075543d2012-10-24 01:29:141300 "performance-monitor-gathering",
1301 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1302 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1303 kOsAll,
1304 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1305 },
[email protected]783d5bb2012-10-24 03:47:141306 {
[email protected]a7259fb2012-11-08 06:22:231307 "enable-experimental-form-filling",
1308 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1309 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1310 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481311 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231312 },
[email protected]6e6efe42013-01-30 00:04:501313 {
[email protected]45476982013-10-01 03:22:291314 "wallet-service-use-sandbox",
1315 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1316 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
1317 kOsCrOS | kOsWin | kOsMac,
1318 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1319 autofill::switches::kWalletServiceUseSandbox, "1",
1320 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541321 },
1322 {
[email protected]6e6efe42013-01-30 00:04:501323 "enable-interactive-autocomplete",
1324 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1325 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]2a9b0c12013-08-15 02:38:391326 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171327 ENABLE_DISABLE_VALUE_TYPE(
1328 autofill::switches::kEnableInteractiveAutocomplete,
1329 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501330 },
[email protected]177260c2013-04-24 01:47:381331#if defined(USE_AURA)
1332 {
1333 "overscroll-history-navigation",
1334 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1335 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1336 kOsAll,
1337 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1338 switches::kOverscrollHistoryNavigation, "1",
1339 switches::kOverscrollHistoryNavigation, "0")
1340 },
1341#endif
[email protected]edbea622012-11-28 20:39:381342 {
[email protected]888878e82013-07-24 22:49:401343 "scroll-end-effect",
1344 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1345 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1346 kOsCrOS,
1347 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1348 switches::kScrollEndEffect, "1",
1349 switches::kScrollEndEffect, "0")
1350 },
1351 {
[email protected]0222b1b42013-07-26 09:57:001352 "enable-touch-side-bezels",
1353 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1354 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1355 kOsCrOS,
1356 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1357 switches::kTouchSideBezels, "1",
1358 switches::kTouchSideBezels, "0")
1359 },
1360 {
[email protected]edbea622012-11-28 20:39:381361 "enable-touch-drag-drop",
1362 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1363 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1364 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271365 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1366 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381367 },
[email protected]0e2f43b62013-02-21 00:47:151368 {
1369 "enable-touch-editing",
1370 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1371 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1372 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271373 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1374 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151375 },
[email protected]92e12dd92012-12-11 03:33:201376 {
1377 "enable-rich-notifications",
1378 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1379 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361380 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231381 ENABLE_DISABLE_VALUE_TYPE(
1382 message_center::switches::kEnableRichNotifications,
1383 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201384 },
[email protected]4d51c682012-12-11 11:34:551385 {
[email protected]ddec1aa2013-04-28 23:22:451386 "enable-sync-synced-notifications",
1387 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1388 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181389 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451390 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1391 switches::kDisableSyncSyncedNotifications)
1392 },
1393 {
[email protected]a50e16a2013-04-25 14:07:171394 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551395 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1396 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1397 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171398 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551399 },
[email protected]628a69a92012-12-23 04:09:341400 {
[email protected]fd030142013-02-08 02:04:381401 "enable-usermedia-screen-capture",
1402 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1403 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1404 kOsDesktop,
1405 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1406 },
[email protected]5b93e162013-02-19 06:33:091407 {
1408 "enable-apps-devtool-app",
1409 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1410 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1411 kOsDesktop,
1412 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1413 },
[email protected]9323fdd12013-02-23 00:31:361414 {
1415 "impl-side-painting",
1416 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1417 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041418 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361419 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1420 },
[email protected]a42c85f2013-04-04 18:15:121421 {
[email protected]8b52c1b2013-09-23 07:28:221422 "deadline-scheduling",
1423 IDS_FLAGS_DEADLINE_SCHEDULING_NAME,
1424 IDS_FLAGS_DEADLINE_SCHEDULING_DESCRIPTION,
1425 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1426 MULTI_VALUE_TYPE(kDeadlineSchedulingChoices)
1427 },
1428 {
1429 "ui-deadline-scheduling",
1430 IDS_FLAGS_UI_DEADLINE_SCHEDULING_NAME,
1431 IDS_FLAGS_UI_DEADLINE_SCHEDULING_DESCRIPTION,
1432#ifdef USE_AURA
1433 kOsWin | kOsLinux |
1434#endif
1435 kOsCrOS,
1436 MULTI_VALUE_TYPE(kUIDeadlineSchedulingChoices)
1437 },
1438 {
[email protected]7621af22013-09-12 23:06:331439 "lcd-text-aa",
1440 IDS_FLAGS_LCD_TEXT_NAME,
1441 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1442 kOsDesktop,
1443 MULTI_VALUE_TYPE(kLCDTextChoices)
1444 },
1445 {
[email protected]0c04d1c2013-07-10 00:02:321446 "delegated-renderer",
1447 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1448 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1449#ifdef USE_AURA
1450 kOsWin | kOsLinux |
1451#endif
1452 kOsAndroid | kOsCrOS,
1453 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1454 },
1455 {
[email protected]1c92d3e2013-04-18 05:31:391456 "enable-websocket-experimental-implementation",
1457 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1458 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1459 kOsAll,
1460 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1461 },
1462 {
[email protected]a42c85f2013-04-04 18:15:121463 "max-tiles-for-interest-area",
1464 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1465 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1466 kOsAndroid | kOsLinux | kOsCrOS,
1467 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1468 },
[email protected]7cf7ccb2013-04-20 02:53:081469 {
1470 "enable-offline-mode",
1471 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1472 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1473 kOsAll,
1474 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1475 },
[email protected]a3618122013-04-26 21:15:341476 {
1477 "default-tile-width",
1478 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1479 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1480 kOsAll,
1481 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1482 },
1483 {
1484 "default-tile-height",
1485 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1486 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1487 kOsAll,
1488 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1489 },
[email protected]2f2f72b2013-03-08 22:37:311490 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1491#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371492 {
1493 "track-active-visit-time",
1494 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1495 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1496 kOsWin,
1497 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1498 },
[email protected]2f2f72b2013-03-08 22:37:311499#endif
[email protected]8cc71d42013-03-02 17:26:081500#if defined(OS_ANDROID)
1501 {
1502 "disable-gesture-requirement-for-media-playback",
1503 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1504 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1505 kOsAndroid,
1506 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1507 },
1508#endif
[email protected]6077cab2013-03-11 19:36:141509#if defined(ENABLE_GOOGLE_NOW)
1510 {
1511 "enable-google-now",
1512 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1513 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361514 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141515 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1516 },
1517#endif
[email protected]86459e2c2013-04-10 13:39:241518#if defined(OS_CHROMEOS)
1519 {
1520 "enable-virtual-keyboard",
1521 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1522 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1523 kOsCrOS,
1524 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1525 },
1526#endif
[email protected]38484df12013-04-10 16:42:031527 {
1528 "enable-simple-cache-backend",
1529 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1530 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251531 kOsAll,
[email protected]38484df12013-04-10 16:42:031532 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1533 },
[email protected]717e4e22013-04-10 20:52:231534 {
1535 "enable-tcp-fast-open",
1536 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1537 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111538 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231539 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1540 },
[email protected]8027acd2013-04-18 08:35:151541 {
[email protected]58c740f2013-05-06 05:25:441542 "apps-use-native-frame",
1543 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1544 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
[email protected]fa39ebda2013-08-06 08:42:581545 kOsMac | kOsWin,
[email protected]58c740f2013-05-06 05:25:441546 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1547 },
[email protected]896d86b32013-05-09 19:36:441548 {
1549 "enable-syncfs-directory-operation",
1550 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1551 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1552 kOsAll,
1553 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1554 },
[email protected]94868922013-09-19 18:00:551555#if defined(ENABLE_MDNS)
[email protected]a4ed7e12013-05-24 01:00:281556 {
[email protected]2f7992ba2013-09-08 23:44:571557 "disable-device-discovery",
1558 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1559 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1560 kOsWin | kOsLinux | kOsCrOS,
1561 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
[email protected]9f94a6c42013-07-11 18:49:151562 },
[email protected]94868922013-09-19 18:00:551563 {
[email protected]d394d9762013-09-22 06:00:251564 "device-discovery-notifications",
1565 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1566 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]94868922013-09-19 18:00:551567 kOsWin | kOsLinux | kOsCrOS,
[email protected]d394d9762013-09-22 06:00:251568 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1569 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551570 },
1571#endif // ENABLE_MDNS
[email protected]56d3c6e42013-05-29 11:28:011572#if defined(OS_MACOSX)
1573 {
[email protected]cb29e162013-05-31 07:47:021574 "enable-app-shims",
1575 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1576 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1577 kOsMac,
1578 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1579 },
[email protected]67604442013-06-15 00:04:331580 {
1581 "enable-simplified-fullscreen",
1582 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1583 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1584 kOsMac,
1585 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1586 },
[email protected]56d3c6e42013-05-29 11:28:011587#endif
[email protected]13177832013-05-31 07:46:051588#if defined(OS_CHROMEOS) || defined(OS_WIN)
1589 {
[email protected]6d9087b2013-07-30 08:25:461590 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051591 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1592 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]6d9087b2013-07-30 08:25:461593 kOsCrOS | kOsWin,
1594 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1595 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051596 },
1597#endif
[email protected]910ecfe2013-06-03 23:38:141598#if defined(USE_AURA)
1599 {
1600 "tab-capture-upscale-quality",
1601 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1602 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1603 kOsAll,
1604 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1605 },
1606 {
1607 "tab-capture-downscale-quality",
1608 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1609 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1610 kOsAll,
1611 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1612 },
1613#endif
[email protected]71d4f602013-06-04 23:21:101614 {
[email protected]5e099c62013-06-08 05:46:231615 "enable-spelling-service-feedback",
1616 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1617 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1618 kOsAll,
1619 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1620 },
1621 {
[email protected]71d4f602013-06-04 23:21:101622 "enable-webgl-draft-extensions",
1623 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1624 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1625 kOsAll,
1626 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1627 },
[email protected]deadc492013-06-07 21:39:281628 {
[email protected]962dd6d92013-08-08 22:20:491629 "enable-html-imports",
1630 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1631 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1632 kOsAll,
1633 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1634 },
1635 {
[email protected]deadc492013-06-07 21:39:281636 "high-dpi-support",
1637 IDS_FLAGS_HIDPI_NAME,
1638 IDS_FLAGS_HIDPI_DESCRIPTION,
1639 kOsWin,
[email protected]bde885b2013-09-12 20:55:531640 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
1641 switches::kHighDPISupport, "0")
[email protected]deadc492013-06-07 21:39:281642 },
[email protected]77e69a512013-06-08 05:56:451643#if defined(OS_CHROMEOS)
1644 {
[email protected]0a5dd632013-08-06 23:10:451645 "enable-quickoffice-viewing",
1646 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_NAME,
1647 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_DESCRIPTION,
[email protected]77e69a512013-06-08 05:56:451648 kOsCrOS,
[email protected]0a5dd632013-08-06 23:10:451649 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeViewing),
[email protected]77e69a512013-06-08 05:56:451650 },
[email protected]4b8e2502013-07-23 18:34:361651 {
1652 "enable-sticky-keys",
1653 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1654 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1655 kOsCrOS,
[email protected]f311449d2013-08-01 19:51:241656 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableStickyKeys,
1657 switches::kDisableStickyKeys)
[email protected]4b8e2502013-07-23 18:34:361658 },
[email protected]77e69a512013-06-08 05:56:451659#endif
[email protected]82ca4212013-06-11 12:09:171660 {
[email protected]bc1697a82013-06-27 15:48:311661 "enable-web-midi",
1662 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1663 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1664 kOsMac,
1665 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1666 },
[email protected]020df792013-06-29 14:26:211667 {
1668 "enable-new-profile-management",
1669 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1670 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1671 kOsWin,
1672 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1673 },
1674 {
1675 "enable-gaia-profile-info",
1676 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1677 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221678 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211679 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1680 },
[email protected]dcf6cf32013-07-03 10:53:281681 {
1682 "disable-app-launcher",
1683 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1684 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
[email protected]3be26972013-08-22 08:43:021685 kOsMac | kOsWin,
[email protected]dcf6cf32013-07-03 10:53:281686 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1687 },
[email protected]919b2f82013-10-04 03:11:261688#if defined(ENABLE_APP_LIST)
1689 {
1690 "enable-app-launcher-start-page",
1691 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_NAME,
1692 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_DESCRIPTION,
1693 kOsWin | kOsCrOS,
1694 SINGLE_VALUE_TYPE(switches::kShowAppListStartPage)
1695 },
1696#endif
[email protected]d4839992013-08-13 05:41:091697#if defined(OS_CHROMEOS)
1698 {
1699 "disable-user-image-sync",
1700 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1701 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1702 kOsCrOS,
1703 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1704 },
1705#endif
[email protected]0e38c3252013-08-14 22:18:511706#if defined(OS_ANDROID)
1707 {
1708 "enable-accessibility-tab-switcher",
1709 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1710 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1711 kOsAndroid,
1712 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561713 },
[email protected]0e38c3252013-08-14 22:18:511714#endif
[email protected]2e9d79f2013-08-16 05:45:561715 {
[email protected]fb7aea62013-10-08 06:40:191716 "disable-batched-shutdown",
1717 IDS_FLAGS_DISABLE_BATCHED_SHUTDOWN_NAME,
1718 IDS_FLAGS_DISABLE_BATCHED_SHUTDOWN_DESCRIPTION,
[email protected]2e9d79f2013-08-16 05:45:561719 kOsDesktop,
[email protected]fb7aea62013-10-08 06:40:191720 SINGLE_VALUE_TYPE(switches::kDisableBatchedShutdown)
[email protected]2e9d79f2013-08-16 05:45:561721 },
[email protected]be2e40a2013-08-27 02:49:201722 {
1723 "map-image",
1724 IDS_FLAGS_MAP_IMAGE_NAME,
1725 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1726 kOsAll,
1727 MULTI_VALUE_TYPE(kMapImageChoices)
[email protected]4fdc518f2013-08-28 21:37:271728 },
1729 {
[email protected]9af61ee92013-09-06 20:31:371730 "enable-add-to-homescreen",
1731 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_NAME,
1732 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_DESCRIPTION,
1733 kOsAndroid,
1734#if defined(OS_ANDROID)
[email protected]dccb6c7a2013-09-13 00:15:281735 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToHomescreen,
1736 switches::kDisableAddToHomescreen),
[email protected]9af61ee92013-09-06 20:31:371737#else
1738 SINGLE_VALUE_TYPE("")
1739#endif
1740 },
[email protected]3bfcfc342013-10-01 14:34:371741#if defined(OS_ANDROID)
1742 {
1743 "enable-cast",
1744 IDS_FLAGS_ENABLE_CAST_NAME,
1745 IDS_FLAGS_ENABLE_CAST_DESCRIPTION,
1746 kOsAndroid,
1747 SINGLE_VALUE_TYPE(switches::kEnableCast)
1748 },
1749#endif
[email protected]bbb4beae2013-09-27 17:20:311750#if defined(OS_CHROMEOS)
1751 {
1752 "enable-first-run-ui",
1753 IDS_FLAGS_ENABLE_FIRST_RUN_UI_NAME,
1754 IDS_FLAGS_ENABLE_FIRST_RUN_UI_DESCRIPTION,
1755 kOsCrOS,
1756 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUI)
1757 },
1758#endif
[email protected]ed1aab12013-10-08 14:27:071759 {
1760 "disable-compositor-touch-hit-testing",
1761 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME,
1762 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION,
1763 kOsAll,
1764 SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting),
1765 },
[email protected]a0e4b072011-08-17 01:47:071766};
[email protected]ad2a3ded2010-08-27 13:19:051767
[email protected]a314ee5a2010-10-26 21:23:281768const Experiment* experiments = kExperiments;
1769size_t num_experiments = arraysize(kExperiments);
1770
[email protected]e2ddbc92010-10-15 20:02:071771// Stores and encapsulates the little state that about:flags has.
1772class FlagsState {
1773 public:
1774 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401775 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211776 CommandLine* command_line,
1777 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:071778 bool IsRestartNeededToCommitChanges();
1779 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401780 FlagsStorage* flags_storage,
1781 const std::string& internal_name,
1782 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071783 void RemoveFlagsSwitches(
1784 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401785 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071786 void reset();
1787
1788 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551789 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071790 return Singleton<FlagsState>::get();
1791 }
1792
1793 private:
1794 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531795 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071796
1797 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1798};
1799
[email protected]8a6ff28d2010-12-02 16:35:191800// Adds the internal names for the specified experiment to |names|.
1801void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1802 if (e.type == Experiment::SINGLE_VALUE) {
1803 names->insert(e.internal_name);
1804 } else {
[email protected]83e9fa702013-02-25 19:30:441805 DCHECK(e.type == Experiment::MULTI_VALUE ||
1806 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191807 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441808 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191809 }
1810}
1811
[email protected]28e35af2011-02-09 12:56:221812// Confirms that an experiment is valid, used in a DCHECK in
1813// SanitizeList below.
1814bool ValidateExperiment(const Experiment& e) {
1815 switch (e.type) {
1816 case Experiment::SINGLE_VALUE:
1817 DCHECK_EQ(0, e.num_choices);
1818 DCHECK(!e.choices);
1819 break;
1820 case Experiment::MULTI_VALUE:
1821 DCHECK_GT(e.num_choices, 0);
1822 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531823 DCHECK(e.choices[0].command_line_switch);
1824 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221825 break;
[email protected]83e9fa702013-02-25 19:30:441826 case Experiment::ENABLE_DISABLE_VALUE:
1827 DCHECK_EQ(3, e.num_choices);
1828 DCHECK(!e.choices);
1829 DCHECK(e.command_line_switch);
1830 DCHECK(e.command_line_value);
1831 DCHECK(e.disable_command_line_switch);
1832 DCHECK(e.disable_command_line_value);
1833 break;
[email protected]28e35af2011-02-09 12:56:221834 default:
1835 NOTREACHED();
1836 }
1837 return true;
1838}
1839
[email protected]ad2a3ded2010-08-27 13:19:051840// Removes all experiments from prefs::kEnabledLabsExperiments that are
1841// unknown, to prevent this list to become very long as experiments are added
1842// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401843void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051844 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221845 for (size_t i = 0; i < num_experiments; ++i) {
1846 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191847 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221848 }
[email protected]ad2a3ded2010-08-27 13:19:051849
[email protected]07d666d2013-07-21 23:56:261850 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051851
1852 std::set<std::string> new_enabled_experiments;
1853 std::set_intersection(
1854 known_experiments.begin(), known_experiments.end(),
1855 enabled_experiments.begin(), enabled_experiments.end(),
1856 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1857
[email protected]07d666d2013-07-21 23:56:261858 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401859 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051860}
1861
[email protected]1a47d7e2010-10-15 00:37:241862void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401863 FlagsStorage* flags_storage, std::set<std::string>* result) {
1864 SanitizeList(flags_storage);
1865 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051866}
1867
[email protected]a314ee5a2010-10-26 21:23:281868// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1869// enabled on the current platform.
1870void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401871 FlagsStorage* flags_storage, std::set<std::string>* result) {
1872 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281873
1874 // Filter out any experiments that aren't enabled on the current platform. We
1875 // don't remove these from prefs else syncing to a platform with a different
1876 // set of experiments would be lossy.
1877 std::set<std::string> platform_experiments;
1878 int current_platform = GetCurrentPlatform();
1879 for (size_t i = 0; i < num_experiments; ++i) {
1880 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191881 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581882#if defined(OS_CHROMEOS)
1883 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1884 AddInternalName(experiments[i], &platform_experiments);
1885#endif
[email protected]a314ee5a2010-10-26 21:23:281886 }
1887
1888 std::set<std::string> new_enabled_experiments;
1889 std::set_intersection(
1890 platform_experiments.begin(), platform_experiments.end(),
1891 result->begin(), result->end(),
1892 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1893
1894 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051895}
1896
[email protected]8a6ff28d2010-12-02 16:35:191897// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191898Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221899 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441900 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1901 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191902 ListValue* result = new ListValue;
1903 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191904 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441905 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191906 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441907 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221908 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191909 result->Append(value);
1910 }
1911 return result;
1912}
1913
[email protected]e2ddbc92010-10-15 20:02:071914} // namespace
1915
[email protected]83e9fa702013-02-25 19:30:441916std::string Experiment::NameForChoice(int index) const {
1917 DCHECK(type == Experiment::MULTI_VALUE ||
1918 type == Experiment::ENABLE_DISABLE_VALUE);
1919 DCHECK_LT(index, num_choices);
1920 return std::string(internal_name) + testing::kMultiSeparator +
1921 base::IntToString(index);
1922}
1923
1924string16 Experiment::DescriptionForChoice(int index) const {
1925 DCHECK(type == Experiment::MULTI_VALUE ||
1926 type == Experiment::ENABLE_DISABLE_VALUE);
1927 DCHECK_LT(index, num_choices);
1928 int description_id;
1929 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1930 const int kEnableDisableDescriptionIds[] = {
1931 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1932 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1933 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1934 };
1935 description_id = kEnableDisableDescriptionIds[index];
1936 } else {
1937 description_id = choices[index].description_id;
1938 }
1939 return l10n_util::GetStringUTF16(description_id);
1940}
1941
[email protected]e6d1c4f2013-06-12 17:37:401942void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211943 CommandLine* command_line,
1944 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:401945 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:211946 command_line,
1947 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:051948}
1949
[email protected]6d98abf2013-06-17 23:35:511950bool AreSwitchesIdenticalToCurrentCommandLine(
1951 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1952 std::set<CommandLine::StringType> new_flags =
1953 ExtractFlagsFromCommandLine(new_cmdline);
1954 std::set<CommandLine::StringType> active_flags =
1955 ExtractFlagsFromCommandLine(active_cmdline);
1956
1957 // Needed because std::equal doesn't check if the 2nd set is empty.
1958 if (new_flags.size() != active_flags.size())
1959 return false;
1960
1961 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1962}
1963
[email protected]e6d1c4f2013-06-12 17:37:401964void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521965 FlagAccess access,
1966 base::ListValue* supported_experiments,
1967 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051968 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401969 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051970
1971 int current_platform = GetCurrentPlatform();
1972
[email protected]a314ee5a2010-10-26 21:23:281973 for (size_t i = 0; i < num_experiments; ++i) {
1974 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051975
1976 DictionaryValue* data = new DictionaryValue();
1977 data->SetString("internal_name", experiment.internal_name);
1978 data->SetString("name",
1979 l10n_util::GetStringUTF16(experiment.visible_name_id));
1980 data->SetString("description",
1981 l10n_util::GetStringUTF16(
1982 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401983
1984 ListValue* supported_platforms = new ListValue();
1985 AddOsStrings(experiment.supported_platforms, supported_platforms);
1986 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051987
[email protected]28e35af2011-02-09 12:56:221988 switch (experiment.type) {
1989 case Experiment::SINGLE_VALUE:
1990 data->SetBoolean(
1991 "enabled",
1992 enabled_experiments.count(experiment.internal_name) > 0);
1993 break;
1994 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441995 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221996 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1997 break;
1998 default:
1999 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192000 }
2001
[email protected]ee28495a2013-05-20 04:10:522002 bool supported = (experiment.supported_platforms & current_platform) != 0;
2003#if defined(OS_CHROMEOS)
2004 if (access == kOwnerAccessToFlags &&
2005 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2006 supported = true;
2007 }
2008#endif
2009 if (supported)
2010 supported_experiments->Append(data);
2011 else
2012 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052013 }
[email protected]ad2a3ded2010-08-27 13:19:052014}
2015
[email protected]ad2a3ded2010-08-27 13:19:052016bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552017 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052018}
2019
[email protected]e6d1c4f2013-06-12 17:37:402020void SetExperimentEnabled(FlagsStorage* flags_storage,
2021 const std::string& internal_name,
2022 bool enable) {
2023 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2024 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072025}
2026
2027void RemoveFlagsSwitches(
2028 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552029 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072030}
2031
[email protected]e6d1c4f2013-06-12 17:37:402032void ResetAllFlags(FlagsStorage* flags_storage) {
2033 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002034}
2035
[email protected]a314ee5a2010-10-26 21:23:282036int GetCurrentPlatform() {
2037#if defined(OS_MACOSX)
2038 return kOsMac;
2039#elif defined(OS_WIN)
2040 return kOsWin;
2041#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2042 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212043#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282044 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402045#elif defined(OS_ANDROID)
2046 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282047#else
2048#error Unknown platform
2049#endif
2050}
2051
[email protected]e6d1c4f2013-06-12 17:37:402052void RecordUMAStatistics(FlagsStorage* flags_storage) {
2053 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:542054 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2055 ++it) {
2056 std::string action("AboutFlags_");
2057 action += *it;
[email protected]7f6f44c2011-12-14 13:23:382058 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542059 }
2060 // Since flag metrics are recorded every startup, add a tick so that the
2061 // stats can be made meaningful.
2062 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:382063 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2064 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542065}
2066
[email protected]e2ddbc92010-10-15 20:02:072067//////////////////////////////////////////////////////////////////////////////
2068// FlagsState implementation.
2069
2070namespace {
2071
[email protected]83e9fa702013-02-25 19:30:442072typedef std::map<std::string, std::pair<std::string, std::string> >
2073 NameToSwitchAndValueMap;
2074
2075void SetFlagToSwitchMapping(const std::string& key,
2076 const std::string& switch_name,
2077 const std::string& switch_value,
2078 NameToSwitchAndValueMap* name_to_switch_map) {
2079 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2080 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2081}
2082
[email protected]578f2092013-09-16 17:16:212083void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2084 CommandLine* command_line,
2085 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072086 if (command_line->HasSwitch(switches::kNoExperiments))
2087 return;
2088
2089 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002090
[email protected]e6d1c4f2013-06-12 17:37:402091 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2092 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072093
[email protected]a82744532011-02-11 16:15:532094 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192095 for (size_t i = 0; i < num_experiments; ++i) {
2096 const Experiment& e = experiments[i];
2097 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442098 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2099 e.command_line_value, &name_to_switch_map);
2100 } else if (e.type == Experiment::MULTI_VALUE) {
2101 for (int j = 0; j < e.num_choices; ++j) {
2102 SetFlagToSwitchMapping(e.NameForChoice(j),
2103 e.choices[j].command_line_switch,
2104 e.choices[j].command_line_value,
2105 &name_to_switch_map);
2106 }
[email protected]8a6ff28d2010-12-02 16:35:192107 } else {
[email protected]83e9fa702013-02-25 19:30:442108 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2109 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2110 &name_to_switch_map);
2111 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2112 e.command_line_value, &name_to_switch_map);
2113 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2114 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192115 }
2116 }
[email protected]e2ddbc92010-10-15 20:02:072117
[email protected]578f2092013-09-16 17:16:212118 if (sentinels == kAddSentinels) {
2119 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2120 flags_switches_.insert(
2121 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2122 std::string()));
2123 }
[email protected]e2ddbc92010-10-15 20:02:072124 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2125 it != enabled_experiments.end();
2126 ++it) {
2127 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532128 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192129 name_to_switch_map.find(experiment_name);
2130 if (name_to_switch_it == name_to_switch_map.end()) {
2131 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072132 continue;
[email protected]8a6ff28d2010-12-02 16:35:192133 }
[email protected]e2ddbc92010-10-15 20:02:072134
[email protected]a82744532011-02-11 16:15:532135 const std::pair<std::string, std::string>&
2136 switch_and_value_pair = name_to_switch_it->second;
2137
[email protected]9737b3632013-08-26 09:23:232138 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532139 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2140 switch_and_value_pair.second);
2141 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072142 }
[email protected]578f2092013-09-16 17:16:212143 if (sentinels == kAddSentinels) {
2144 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2145 flags_switches_.insert(
2146 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2147 std::string()));
2148 }
[email protected]e2ddbc92010-10-15 20:02:072149}
2150
2151bool FlagsState::IsRestartNeededToCommitChanges() {
2152 return needs_restart_;
2153}
2154
[email protected]e6d1c4f2013-06-12 17:37:402155void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2156 const std::string& internal_name,
2157 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442158 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192159 if (at_index != std::string::npos) {
2160 DCHECK(enable);
2161 // We're being asked to enable a multi-choice experiment. Disable the
2162 // currently selected choice.
2163 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222164 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402165 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192166
[email protected]28e35af2011-02-09 12:56:222167 // And enable the new choice, if it is not the default first choice.
2168 if (internal_name != experiment_name + "@0") {
2169 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402170 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082171 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402172 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222173 }
[email protected]8a6ff28d2010-12-02 16:35:192174 return;
2175 }
2176
[email protected]ad2a3ded2010-08-27 13:19:052177 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402178 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052179
[email protected]8a6ff28d2010-12-02 16:35:192180 const Experiment* e = NULL;
2181 for (size_t i = 0; i < num_experiments; ++i) {
2182 if (experiments[i].internal_name == internal_name) {
2183 e = experiments + i;
2184 break;
2185 }
2186 }
2187 DCHECK(e);
2188
2189 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592190 if (enable)
[email protected]147492b2013-03-19 23:52:082191 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592192 else
[email protected]147492b2013-03-19 23:52:082193 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192194 } else {
2195 if (enable) {
2196 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082197 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192198 } else {
2199 // Find the currently enabled choice and disable it.
2200 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442201 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192202 if (enabled_experiments.find(choice_name) !=
2203 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082204 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192205 enabled_experiments.erase(choice_name);
2206 // Continue on just in case there's a bug and more than one
2207 // experiment for this choice was enabled.
2208 }
2209 }
2210 }
2211 }
[email protected]ad2a3ded2010-08-27 13:19:052212
[email protected]e6d1c4f2013-06-12 17:37:402213 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052214}
2215
[email protected]e2ddbc92010-10-15 20:02:072216void FlagsState::RemoveFlagsSwitches(
2217 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532218 for (std::map<std::string, std::string>::const_iterator
2219 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2220 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072221 }
2222}
2223
[email protected]e6d1c4f2013-06-12 17:37:402224void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002225 needs_restart_ = true;
2226
2227 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402228 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002229}
2230
[email protected]e2ddbc92010-10-15 20:02:072231void FlagsState::reset() {
2232 needs_restart_ = false;
2233 flags_switches_.clear();
2234}
2235
[email protected]38e46812011-05-09 20:49:222236} // namespace
[email protected]e2ddbc92010-10-15 20:02:072237
2238namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192239
2240// WARNING: '@' is also used in the html file. If you update this constant you
2241// also need to update the html file.
2242const char kMultiSeparator[] = "@";
2243
[email protected]e2ddbc92010-10-15 20:02:072244void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552245 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072246}
[email protected]a314ee5a2010-10-26 21:23:282247
2248void SetExperiments(const Experiment* e, size_t count) {
2249 if (!e) {
2250 experiments = kExperiments;
2251 num_experiments = arraysize(kExperiments);
2252 } else {
2253 experiments = e;
2254 num_experiments = count;
2255 }
2256}
2257
[email protected]8a6ff28d2010-12-02 16:35:192258const Experiment* GetExperiments(size_t* count) {
2259 *count = num_experiments;
2260 return experiments;
2261}
2262
[email protected]e2ddbc92010-10-15 20:02:072263} // namespace testing
2264
[email protected]1a47d7e2010-10-15 00:37:242265} // namespace about_flags