Added enable-cast to about:flags
[chromium-blink-merge.git] / chrome / browser / about_flags.cc
blob377b91321816d9ebf56991735e9d1ee96d84cf4b
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/about_flags.h"
7 #include <algorithm>
8 #include <iterator>
9 #include <map>
10 #include <set>
11 #include <utility>
13 #include "ash/ash_switches.h"
14 #include "base/command_line.h"
15 #include "base/memory/singleton.h"
16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/utf_string_conversions.h"
18 #include "base/values.h"
19 #include "cc/base/switches.h"
20 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
21 #include "chrome/browser/flags_storage.h"
22 #include "chrome/common/chrome_content_client.h"
23 #include "chrome/common/chrome_switches.h"
24 #include "components/autofill/core/common/autofill_switches.h"
25 #include "components/nacl/common/nacl_switches.h"
26 #include "content/public/browser/user_metrics.h"
27 #include "extensions/common/switches.h"
28 #include "grit/chromium_strings.h"
29 #include "grit/generated_resources.h"
30 #include "grit/google_chrome_strings.h"
31 #include "media/base/media_switches.h"
32 #include "ui/base/l10n/l10n_util.h"
33 #include "ui/base/ui_base_switches.h"
34 #include "ui/events/event_switches.h"
35 #include "ui/gfx/switches.h"
36 #include "ui/gl/gl_switches.h"
37 #include "ui/keyboard/keyboard_switches.h"
38 #include "ui/message_center/message_center_switches.h"
39 #include "ui/views/views_switches.h"
41 #if defined(USE_ASH)
42 #include "ash/ash_switches.h"
43 #endif
45 #if defined(OS_CHROMEOS)
46 #include "chromeos/chromeos_switches.h"
47 #include "third_party/cros_system_api/switches/chrome_switches.h"
48 #endif
50 #if defined(ENABLE_APP_LIST)
51 #include "ui/app_list/app_list_switches.h"
52 #endif
54 using base::UserMetricsAction;
56 namespace about_flags {
58 // Macros to simplify specifying the type.
59 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
60 Experiment::SINGLE_VALUE, \
61 command_line_switch, switch_value, NULL, NULL, NULL, 0
62 #define SINGLE_VALUE_TYPE(command_line_switch) \
63 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
64 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
65 disable_switch, disable_value) \
66 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
67 disable_switch, disable_value, NULL, 3
68 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
69 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
70 #define MULTI_VALUE_TYPE(choices) \
71 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
73 namespace {
75 const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
76 const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
78 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
79 // whether the experiment is available on that platform.
80 void AddOsStrings(unsigned bitmask, base::ListValue* list) {
81 struct {
82 unsigned bit;
83 const char* const name;
84 } kBitsToOs[] = {
85 {kOsMac, "Mac"},
86 {kOsWin, "Windows"},
87 {kOsLinux, "Linux"},
88 {kOsCrOS, "Chrome OS"},
89 {kOsAndroid, "Android"},
90 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
92 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
93 if (bitmask & kBitsToOs[i].bit)
94 list->Append(new base::StringValue(kBitsToOs[i].name));
97 // Convert switch constants to proper CommandLine::StringType strings.
98 CommandLine::StringType GetSwitchString(const std::string& flag) {
99 CommandLine cmd_line(CommandLine::NO_PROGRAM);
100 cmd_line.AppendSwitch(flag);
101 DCHECK(cmd_line.argv().size() == 2);
102 return cmd_line.argv()[1];
105 // Scoops flags from a command line.
106 std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
107 const CommandLine& cmdline) {
108 std::set<CommandLine::StringType> flags;
109 // First do the ones between --flag-switches-begin and --flag-switches-end.
110 CommandLine::StringVector::const_iterator first =
111 std::find(cmdline.argv().begin(), cmdline.argv().end(),
112 GetSwitchString(switches::kFlagSwitchesBegin));
113 CommandLine::StringVector::const_iterator last =
114 std::find(cmdline.argv().begin(), cmdline.argv().end(),
115 GetSwitchString(switches::kFlagSwitchesEnd));
116 if (first != cmdline.argv().end() && last != cmdline.argv().end())
117 flags.insert(first + 1, last);
118 #if defined(OS_CHROMEOS)
119 // Then add those between --policy-switches-begin and --policy-switches-end.
120 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
121 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
122 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
123 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
124 if (first != cmdline.argv().end() && last != cmdline.argv().end())
125 flags.insert(first + 1, last);
126 #endif
127 return flags;
130 const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
131 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
132 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
133 switches::kEnableCompositingForFixedPosition, ""},
134 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
135 switches::kDisableCompositingForFixedPosition, ""},
136 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
137 switches::kEnableHighDpiCompositingForFixedPosition, ""}
140 const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
141 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
142 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
143 switches::kEnableCompositingForTransition, ""},
144 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
145 switches::kDisableCompositingForTransition, ""},
148 const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
149 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
150 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
151 switches::kEnableAcceleratedFixedRootBackground, ""},
152 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
153 switches::kDisableAcceleratedFixedRootBackground, ""},
156 const Experiment::Choice kTouchEventsChoices[] = {
157 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
158 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
159 switches::kTouchEvents,
160 switches::kTouchEventsEnabled },
161 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
162 switches::kTouchEvents,
163 switches::kTouchEventsDisabled }
166 const Experiment::Choice kTouchOptimizedUIChoices[] = {
167 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
168 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
169 switches::kTouchOptimizedUI,
170 switches::kTouchOptimizedUIEnabled },
171 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
172 switches::kTouchOptimizedUI,
173 switches::kTouchOptimizedUIDisabled }
176 #if defined(USE_AURA)
177 const Experiment::Choice kOverscrollHistoryNavigationChoices[] = {
178 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" },
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
180 switches::kOverscrollHistoryNavigation,
181 "0" },
182 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI,
183 switches::kOverscrollHistoryNavigation,
184 "2" }
186 #endif
188 const Experiment::Choice kNaClDebugMaskChoices[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
190 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
191 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
192 // an option to switch off its debugging.
193 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
194 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
195 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
196 switches::kNaClDebugMask, "*://*/*debug.nmf" }
199 const Experiment::Choice kImplSidePaintingChoices[] = {
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
201 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
202 cc::switches::kEnableImplSidePainting, ""},
203 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
204 cc::switches::kDisableImplSidePainting, ""}
207 const Experiment::Choice kLCDTextChoices[] = {
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
209 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""},
210 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""}
213 const Experiment::Choice kDelegatedRendererChoices[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
215 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
216 switches::kEnableDelegatedRenderer, ""},
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
218 switches::kDisableDelegatedRenderer, ""}
221 const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
223 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
224 cc::switches::kMaxTilesForInterestArea, "64"},
225 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
226 cc::switches::kMaxTilesForInterestArea, "128"},
227 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
228 cc::switches::kMaxTilesForInterestArea, "256"},
229 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
230 cc::switches::kMaxTilesForInterestArea, "512"}
233 const Experiment::Choice kDefaultTileWidthChoices[] = {
234 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
235 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
236 switches::kDefaultTileWidth, "128"},
237 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
238 switches::kDefaultTileWidth, "256"},
239 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
240 switches::kDefaultTileWidth, "512"},
241 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
242 switches::kDefaultTileWidth, "1024"}
245 #if defined(USE_ASH)
246 const Experiment::Choice kAshOverviewDelayChoices[] = {
247 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
248 { IDS_FLAGS_OVERVIEW_DELAY_INSTANT,
249 ash::switches::kAshOverviewDelayOnAltTab, "0" },
250 { IDS_FLAGS_OVERVIEW_DELAY_SHORT,
251 ash::switches::kAshOverviewDelayOnAltTab, "100" },
252 { IDS_FLAGS_OVERVIEW_DELAY_LONG,
253 ash::switches::kAshOverviewDelayOnAltTab, "500" },
254 { IDS_FLAGS_OVERVIEW_DELAY_NEVER,
255 ash::switches::kAshOverviewDelayOnAltTab, "10000" },
257 #endif
259 const Experiment::Choice kDefaultTileHeightChoices[] = {
260 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
261 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
262 switches::kDefaultTileHeight, "128"},
263 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
264 switches::kDefaultTileHeight, "256"},
265 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
266 switches::kDefaultTileHeight, "512"},
267 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
268 switches::kDefaultTileHeight, "1024"}
271 const Experiment::Choice kSimpleCacheBackendChoices[] = {
272 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
273 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
274 switches::kUseSimpleCacheBackend, "off" },
275 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
276 switches::kUseSimpleCacheBackend, "on"}
279 #if defined(USE_AURA)
280 const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
281 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
282 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
283 switches::kTabCaptureUpscaleQuality, "fast" },
284 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
285 switches::kTabCaptureUpscaleQuality, "good" },
286 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
287 switches::kTabCaptureUpscaleQuality, "best" },
290 const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
291 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
292 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
293 switches::kTabCaptureDownscaleQuality, "fast" },
294 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
295 switches::kTabCaptureDownscaleQuality, "good" },
296 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
297 switches::kTabCaptureDownscaleQuality, "best" },
299 #endif
301 #if defined(USE_AURA) || defined(OS_LINUX)
302 const Experiment::Choice kOverlayScrollbarChoices[] = {
303 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
304 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
305 switches::kEnableOverlayScrollbar, ""},
306 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
307 switches::kDisableOverlayScrollbar, ""}
309 #endif
311 const Experiment::Choice kMapImageChoices[] = {
312 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
313 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
314 cc::switches::kEnableMapImage, ""},
315 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
316 cc::switches::kDisableMapImage, ""}
319 #if defined(OS_ANDROID)
320 const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
321 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
322 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
323 switches::kEnableZeroSuggestMostVisited, ""},
324 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
325 switches::kEnableZeroSuggestEtherSerp, ""},
326 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
327 switches::kEnableZeroSuggestEtherNoSerp, ""},
328 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
329 switches::kDisableZeroSuggest, ""}
331 #endif
333 const Experiment::Choice kNumRasterThreadsChoices[] = {
334 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
335 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
336 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
337 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
338 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
341 // We're using independent flags here (as opposed to a common flag with
342 // different values) to be able to enable/disable the entire experience
343 // associated with this feature server-side from the FieldTrial (the complete
344 // experience includes other flag changes as well). It is not currently possible
345 // to do that with "flag=value" flags.
346 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
347 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
348 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
349 switches::kDisableSearchButtonInOmnibox, ""},
350 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
351 switches::kEnableSearchButtonInOmniboxForStr, ""},
352 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
353 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
354 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
355 switches::kEnableSearchButtonInOmniboxAlways, ""}
358 // See comment above for kSearchButtonInOmniboxChoices. The same reasoning
359 // applies here.
360 const Experiment::Choice kOriginChipChoices[] = {
361 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
362 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
363 { IDS_FLAGS_ORIGIN_CHIP_TRAILING_LOCATION_BAR,
364 switches::kEnableOriginChipTrailingLocationBar, ""},
365 { IDS_FLAGS_ORIGIN_CHIP_LEADING_LOCATION_BAR,
366 switches::kEnableOriginChipLeadingLocationBar, ""},
367 { IDS_FLAGS_ORIGIN_CHIP_LEADING_MENU_BUTTON,
368 switches::kEnableOriginChipLeadingMenuButton, ""}
370 const Experiment::Choice kOriginChipV2Choices[] = {
371 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
372 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChipV2, ""},
373 { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE,
374 switches::kEnableOriginChipV2HideOnMouseRelease, ""},
375 { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_USER_INPUT,
376 switches::kEnableOriginChipV2HideOnUserInput, ""}
379 const Experiment::Choice kNotificationCenterTrayBehaviorChoices[] = {
380 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
381 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NEVER,
382 message_center::switches::kNotificationCenterTrayBehavior, "never" },
383 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_ALWAYS,
384 message_center::switches::kNotificationCenterTrayBehavior, "always" },
385 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_UNREAD,
386 message_center::switches::kNotificationCenterTrayBehavior, "unread" }
389 // RECORDING USER METRICS FOR FLAGS:
390 // -----------------------------------------------------------------------------
391 // The first line of the experiment is the internal name. If you'd like to
392 // gather statistics about the usage of your flag, you should append a marker
393 // comment to the end of the feature name, like so:
394 // "my-special-feature", // FLAGS:RECORD_UMA
396 // After doing that, run //tools/metrics/actions/extract_actions.py (see
397 // instructions at the top of that file for details) to update the
398 // chromeactions.txt file, which will enable UMA to record your feature flag.
400 // After your feature has shipped under a flag, you can locate the metrics under
401 // the action name AboutFlags_internal-action-name. Actions are recorded once
402 // per startup, so you should divide this number by AboutFlags_StartupTick to
403 // get a sense of usage. Note that this will not be the same as number of users
404 // with a given feature enabled because users can quit and relaunch the
405 // application multiple times over a given time interval. The dashboard also
406 // shows you how many (metrics reporting) users have enabled the flag over the
407 // last seven days. However, note that this is not the same as the number of
408 // users who have the flag enabled, since enabling the flag happens once,
409 // whereas running with the flag enabled happens until the user flips the flag
410 // again.
412 // To add a new experiment add to the end of kExperiments. There are two
413 // distinct types of experiments:
414 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
415 // macro for this type supplying the command line to the macro.
416 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
417 // deactivated state for this lab (i.e. no command line option). To specify
418 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
419 // array of choices.
420 // See the documentation of Experiment for details on the fields.
422 // When adding a new choice, add it to the end of the list.
423 const Experiment kExperiments[] = {
425 "conflicting-modules-check", // FLAGS:RECORD_UMA
426 IDS_FLAGS_CONFLICTS_CHECK_NAME,
427 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
428 kOsWin,
429 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
432 "ignore-gpu-blacklist",
433 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
434 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
435 kOsAll,
436 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
439 "force-compositing-mode-2",
440 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
441 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
442 kOsLinux,
443 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
444 switches::kDisableForceCompositingMode)
447 "threaded-compositing-mode",
448 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
449 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
450 kOsLinux,
451 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
452 switches::kDisableThreadedCompositing)
455 "force-accelerated-composited-scrolling",
456 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
457 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
458 kOsAll,
459 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
460 switches::kDisableAcceleratedOverflowScroll)
463 "force-universal-accelerated-composited-scrolling",
464 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
465 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
466 kOsAll,
467 ENABLE_DISABLE_VALUE_TYPE(
468 switches::kEnableUniversalAcceleratedOverflowScroll,
469 switches::kDisableUniversalAcceleratedOverflowScroll)
471 #if defined(OS_WIN)
473 "enable-direct-write",
474 IDS_FLAGS_ENABLE_DIRECT_WRITE_NAME,
475 IDS_FLAGS_ENABLE_DIRECT_WRITE_DESCRIPTION,
476 kOsWin,
477 SINGLE_VALUE_TYPE(switches::kEnableDirectWrite)
479 #endif
481 "enable-experimental-canvas-features",
482 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
483 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
484 kOsAll,
485 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
488 "disable-accelerated-2d-canvas",
489 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
490 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
491 kOsAll,
492 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
495 "composited-layer-borders",
496 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
497 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
498 kOsAll,
499 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
502 "show-fps-counter",
503 IDS_FLAGS_SHOW_FPS_COUNTER,
504 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
505 kOsAll,
506 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
509 "accelerated-filters",
510 IDS_FLAGS_ACCELERATED_FILTERS,
511 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
512 kOsAll,
513 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
516 "disable-webgl",
517 IDS_FLAGS_DISABLE_WEBGL_NAME,
518 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
519 kOsAll,
520 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
523 "enable-d3d11",
524 IDS_FLAGS_ENABLE_D3D11_NAME,
525 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
526 kOsWin,
527 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
530 "disable-webrtc",
531 IDS_FLAGS_DISABLE_WEBRTC_NAME,
532 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
533 kOsAndroid,
534 #if defined(OS_ANDROID)
535 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
536 #else
537 SINGLE_VALUE_TYPE("")
538 #endif
540 #if defined(ENABLE_WEBRTC)
542 "disable-device-enumeration",
543 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
544 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
545 kOsAll,
546 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
549 "disable-sctp-data-channels",
550 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_NAME,
551 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
552 kOsAll,
553 SINGLE_VALUE_TYPE(switches::kDisableSCTPDataChannels)
556 "disable-webrtc-hw-decoding",
557 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
558 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
559 kOsAndroid | kOsCrOS,
560 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
563 "disable-webrtc-hw-encoding",
564 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
565 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
566 kOsAndroid | kOsCrOS,
567 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
569 #endif
570 #if defined(OS_ANDROID)
571 #if defined(ARCH_CPU_X86)
573 "enable-webaudio",
574 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
575 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
576 kOsAndroid,
577 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
579 #else
581 "disable-webaudio",
582 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
583 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
584 kOsAndroid,
585 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
587 #endif
588 #endif
590 "fixed-position-creates-stacking-context",
591 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
592 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
593 kOsAll,
594 ENABLE_DISABLE_VALUE_TYPE(
595 switches::kEnableFixedPositionCreatesStackingContext,
596 switches::kDisableFixedPositionCreatesStackingContext)
599 "enable-compositing-for-fixed-position",
600 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
601 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
602 kOsAll,
603 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
606 "enable-compositing-for-transition",
607 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
608 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
609 kOsAll,
610 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
613 "enable-accelerated-fixed-root-background",
614 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
615 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
616 kOsAll,
617 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
619 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
621 "enable-nacl", // FLAGS:RECORD_UMA
622 IDS_FLAGS_ENABLE_NACL_NAME,
623 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
624 kOsDesktop,
625 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
628 "enable-nacl-debug", // FLAGS:RECORD_UMA
629 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
630 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
631 kOsDesktop,
632 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
635 "disable-pnacl", // FLAGS:RECORD_UMA
636 IDS_FLAGS_DISABLE_PNACL_NAME,
637 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
638 kOsDesktop,
639 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
642 "nacl-debug-mask", // FLAGS:RECORD_UMA
643 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
644 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
645 kOsDesktop,
646 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
649 "extension-apis", // FLAGS:RECORD_UMA
650 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
651 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
652 kOsDesktop,
653 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
656 "extensions-on-chrome-urls",
657 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
658 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
659 kOsAll,
660 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
663 "enable-fast-unload",
664 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
665 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
666 kOsAll,
667 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
670 "enable-adview",
671 IDS_FLAGS_ENABLE_ADVIEW_NAME,
672 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
673 kOsDesktop,
674 SINGLE_VALUE_TYPE(switches::kEnableAdview)
677 "enable-app-window-controls",
678 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
679 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
680 kOsDesktop,
681 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
684 "apps-new-install-bubble",
685 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
686 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
687 kOsDesktop,
688 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
691 "disable-hyperlink-auditing",
692 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
693 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
694 kOsAll,
695 SINGLE_VALUE_TYPE(switches::kNoPings)
698 "tab-groups-context-menu",
699 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
700 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
701 kOsWin,
702 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
704 #if defined(OS_ANDROID)
706 "enable-new-ntp",
707 IDS_FLAGS_ENABLE_NEW_NTP,
708 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
709 kOsAndroid,
710 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
711 switches::kDisableNewNTP)
714 "contextual-search",
715 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
716 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
717 kOsAndroid,
718 SINGLE_VALUE_TYPE(switches::kEnableContextualSearch)
720 #endif
722 "show-autofill-type-predictions",
723 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
724 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
725 kOsAll,
726 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
729 "enable-gesture-tap-highlight",
730 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
731 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
732 kOsLinux | kOsCrOS,
733 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
734 switches::kDisableGestureTapHighlight)
737 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
738 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
739 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
740 // Can't expose the switch unless the code is compiled in.
741 // On by default for the Mac (different implementation in WebKit).
742 kOsLinux,
743 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
745 #if defined(USE_AURA) || defined(OS_LINUX)
747 "overlay-scrollbars",
748 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
749 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
750 // Uses the system preference on Mac (a different implementation).
751 // On Android, this is always enabled.
752 kOsLinux | kOsCrOS | kOsWin,
753 MULTI_VALUE_TYPE(kOverlayScrollbarChoices)
755 #endif
757 "enable-panels",
758 IDS_FLAGS_ENABLE_PANELS_NAME,
759 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
760 kOsDesktop,
761 SINGLE_VALUE_TYPE(switches::kEnablePanels)
764 // See http://crbug.com/120416 for how to remove this flag.
765 "save-page-as-mhtml", // FLAGS:RECORD_UMA
766 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
767 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
768 kOsMac | kOsWin | kOsLinux,
769 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
772 "enable-autologin",
773 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
774 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
775 kOsMac | kOsWin | kOsLinux,
776 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
779 "enable-quic",
780 IDS_FLAGS_ENABLE_QUIC_NAME,
781 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
782 kOsAll,
783 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
784 switches::kDisableQuic)
787 "enable-quic-https",
788 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
789 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
790 kOsAll,
791 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
792 switches::kDisableQuicHttps)
795 "enable-spdy4a2",
796 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
797 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
798 kOsAll,
799 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
802 "enable-http2-draft-04",
803 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
804 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
805 kOsAll,
806 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
809 "enable-async-dns",
810 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
811 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
812 kOsWin | kOsMac | kOsLinux | kOsCrOS,
813 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
814 switches::kDisableAsyncDns)
817 "disable-webkit-media-source",
818 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
819 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
820 kOsAll,
821 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
824 "disable-unprefixed-media-source",
825 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_NAME,
826 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_DESCRIPTION,
827 kOsAll,
828 SINGLE_VALUE_TYPE(switches::kDisableUnprefixedMediaSource)
831 "enable-encrypted-media",
832 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
833 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
834 kOsAll,
835 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
838 "disable-prefixed-encrypted-media",
839 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
840 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
841 kOsAll,
842 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
844 #if defined(OS_ANDROID)
846 "disable-infobar-for-protected-media-identifier",
847 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
848 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
849 kOsAndroid,
850 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
853 "mediadrm-enable-non-compositing",
854 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
855 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
856 kOsAndroid,
857 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
859 #endif // defined(OS_ANDROID)
861 "disable-opus-playback",
862 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_NAME,
863 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_DESCRIPTION,
864 kOsDesktop,
865 SINGLE_VALUE_TYPE(switches::kDisableOpusPlayback)
868 "disable-vp8-alpha-playback",
869 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_NAME,
870 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
871 kOsDesktop,
872 SINGLE_VALUE_TYPE(switches::kDisableVp8AlphaPlayback)
875 "enable-javascript-harmony",
876 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
877 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
878 kOsAll,
879 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
882 "disable-restore-session-state",
883 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
884 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
885 kOsAll,
886 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
889 "disable-software-rasterizer",
890 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
891 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
892 #if defined(ENABLE_SWIFTSHADER)
893 kOsAll,
894 #else
896 #endif
897 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
900 "enable-gpu-rasterization",
901 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
902 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
903 kOsAll,
904 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization)
907 "enable-experimental-web-platform-features",
908 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
909 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
910 kOsAll,
911 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
914 "disable-ntp-other-sessions-menu",
915 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
916 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
917 kOsDesktop,
918 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
921 "enable-devtools-experiments",
922 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
923 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
924 kOsDesktop,
925 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
928 "silent-debugger-extension-api",
929 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
930 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
931 kOsDesktop,
932 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
935 "enable-suggestions-ntp",
936 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
937 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
938 kOsDesktop,
939 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
942 "spellcheck-autocorrect",
943 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
944 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
945 kOsWin | kOsLinux | kOsCrOS,
946 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
949 "enable-scroll-prediction",
950 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
951 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
952 kOsDesktop,
953 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
956 "touch-events",
957 IDS_TOUCH_EVENTS_NAME,
958 IDS_TOUCH_EVENTS_DESCRIPTION,
959 kOsDesktop,
960 MULTI_VALUE_TYPE(kTouchEventsChoices)
963 "touch-optimized-ui",
964 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
965 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
966 kOsWin,
967 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
970 "disable-touch-adjustment",
971 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
972 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
973 kOsWin | kOsLinux | kOsCrOS,
974 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
976 #if defined(OS_CHROMEOS)
978 "ash-use-alternate-shelf",
979 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
980 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
981 kOsCrOS,
982 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
983 ash::switches::kAshDisableAlternateShelfLayout)
986 "ash-disable-drag-off-shelf",
987 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
988 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
989 kOsCrOS,
990 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
993 "enable-background-loader",
994 IDS_ENABLE_BACKLOADER_NAME,
995 IDS_ENABLE_BACKLOADER_DESCRIPTION,
996 kOsCrOS,
997 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
1000 "ash-disable-docked-windows",
1001 IDS_FLAGS_DOCKED_WINDOWS_NAME,
1002 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
1003 kOsCrOS,
1004 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDockedWindows)
1007 "ash-enable-immersive-fullscreen-all-windows2",
1008 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_NAME,
1009 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_DESCRIPTION,
1010 kOsCrOS,
1011 ENABLE_DISABLE_VALUE_TYPE(
1012 ash::switches::kAshEnableImmersiveFullscreenForAllWindows,
1013 ash::switches::kAshEnableImmersiveFullscreenForBrowserOnly)
1016 "network-portal-notification",
1017 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME,
1018 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION,
1019 kOsCrOS,
1020 ENABLE_DISABLE_VALUE_TYPE(
1021 chromeos::switches::kEnableNetworkPortalNotification,
1022 chromeos::switches::kDisableNetworkPortalNotification)
1024 #endif
1026 "enable-download-resumption",
1027 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
1028 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
1029 kOsDesktop,
1030 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1033 "allow-nacl-socket-api",
1034 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1035 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
1036 kOsDesktop,
1037 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1040 "stacked-tab-strip",
1041 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1042 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1043 kOsWin,
1044 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1047 "force-device-scale-factor",
1048 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1049 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1050 kOsCrOS,
1051 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
1053 #if defined(OS_CHROMEOS)
1055 "allow-touchpad-three-finger-click",
1056 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1057 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1058 kOsCrOS,
1059 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
1061 #endif
1062 #if defined(USE_ASH)
1064 "disable-minimize-on-second-launcher-item-click",
1065 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1066 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1067 kOsAll,
1068 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1071 "multiple-snap-window-widths",
1072 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_NAME,
1073 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_DESCRIPTION,
1074 kOsAll,
1075 SINGLE_VALUE_TYPE(ash::switches::kAshMultipleSnapWindowWidths)
1078 "disable-overview-mode",
1079 IDS_FLAGS_DISABLE_OVERVIEW_MODE_NAME,
1080 IDS_FLAGS_DISABLE_OVERVIEW_MODE_DESCRIPTION,
1081 kOsCrOS,
1082 SINGLE_VALUE_TYPE(ash::switches::kAshDisableOverviewMode)
1085 "overview-delay-on-alt-tab",
1086 IDS_FLAGS_OVERVIEW_DELAY_NAME,
1087 IDS_FLAGS_OVERVIEW_DELAY_DESCRIPTION,
1088 kOsCrOS,
1089 MULTI_VALUE_TYPE(kAshOverviewDelayChoices)
1092 "show-touch-hud",
1093 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1094 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1095 kOsAll,
1096 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1099 "enable-pinch",
1100 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1101 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
1102 kOsLinux | kOsWin | kOsCrOS,
1103 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1106 "enable-pinch-virtual-viewport",
1107 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1108 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1109 kOsLinux | kOsWin | kOsCrOS,
1110 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1112 #endif // defined(USE_ASH)
1114 "enable-viewport-meta",
1115 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
1116 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
1117 kOsLinux | kOsWin | kOsCrOS | kOsMac,
1118 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
1120 #if defined(OS_CHROMEOS)
1122 "disable-boot-animation",
1123 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1124 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
1125 kOsCrOSOwnerOnly,
1126 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
1129 "file-manager-show-checkboxes",
1130 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1131 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
1132 kOsCrOS,
1133 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
1136 "enable-new-audio-player",
1137 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_NAME,
1138 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_DESCRIPTION,
1139 kOsCrOS,
1140 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableNewAudioPlayer)
1143 "disable-quickoffice-component-app",
1144 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1145 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1146 kOsCrOS,
1147 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1150 "disable-saml-signin",
1151 IDS_FLAGS_DISABLE_SAML_SIGNIN_NAME,
1152 IDS_FLAGS_DISABLE_SAML_SIGNIN_DESCRIPTION,
1153 kOsCrOS,
1154 SINGLE_VALUE_TYPE(chromeos::switches::kDisableSamlSignin),
1157 "enable-multi-profiles",
1158 IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME,
1159 IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION,
1160 kOsCrOS,
1161 SINGLE_VALUE_TYPE(switches::kMultiProfiles),
1163 #endif // defined(OS_CHROMEOS)
1164 { "disable-accelerated-video-decode",
1165 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1166 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
1167 kOsWin | kOsCrOS,
1168 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
1171 "enable-contacts",
1172 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1173 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1174 kOsCrOS,
1175 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1177 #if defined(USE_ASH)
1179 "ash-debug-shortcuts",
1180 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1181 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1182 kOsAll,
1183 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1185 { "ash-enable-advanced-gestures",
1186 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1187 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1188 kOsCrOS,
1189 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1191 { "ash-alternate-caption-button",
1192 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_NAME,
1193 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_DESCRIPTION,
1194 kOsCrOS,
1195 ENABLE_DISABLE_VALUE_TYPE(
1196 ash::switches::kAshEnableAlternateFrameCaptionButtonStyle,
1197 ash::switches::kAshDisableAlternateFrameCaptionButtonStyle),
1200 "ash-disable-auto-maximizing",
1201 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
1202 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
1203 kOsWin | kOsLinux | kOsCrOS,
1204 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
1206 { "ash-disable-drag-and-drop-applist-to-launcher",
1207 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1208 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1209 kOsCrOS,
1210 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
1212 #if defined(OS_LINUX)
1213 { "ash-enable-memory-monitor",
1214 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1215 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1216 kOsCrOS,
1217 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1219 #endif
1220 #if defined(OS_CHROMEOS)
1221 { "ash-enable-multi-user-tray",
1222 IDS_FLAGS_ENABLE_MULTI_USER_TRAY,
1223 IDS_FLAGS_ENABLE_MULTI_USER_TRAY_DESCRIPTION,
1224 kOsCrOS,
1225 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMultiUserTray),
1227 #endif
1228 #endif
1229 #if defined(OS_CHROMEOS)
1231 "ash-audio-device-menu",
1232 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1233 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1234 kOsCrOS,
1235 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1236 ash::switches::kAshDisableAudioDeviceMenu)
1239 "enable-carrier-switching",
1240 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1241 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1242 kOsCrOS,
1243 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
1246 "enable-request-tablet-site",
1247 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1248 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1249 kOsCrOS,
1250 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
1252 #endif
1254 "debug-packed-apps",
1255 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1256 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
1257 kOsDesktop,
1258 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1261 "enable-password-generation",
1262 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1263 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
1264 kOsDesktop,
1265 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1266 autofill::switches::kDisablePasswordGeneration)
1269 "password-manager-reauthentication",
1270 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1271 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
1272 kOsMac | kOsWin,
1273 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
1276 "password-autofill-public-suffix-domain-matching",
1277 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1278 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1279 kOsAll,
1280 ENABLE_DISABLE_VALUE_TYPE(
1281 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1282 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
1285 "enable-deferred-image-decoding",
1286 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1287 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
1288 kOsMac | kOsLinux | kOsCrOS,
1289 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1292 "performance-monitor-gathering",
1293 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1294 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1295 kOsAll,
1296 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1299 "wallet-service-use-sandbox",
1300 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1301 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
1302 kOsCrOS | kOsWin | kOsMac,
1303 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1304 autofill::switches::kWalletServiceUseSandbox, "1",
1305 autofill::switches::kWalletServiceUseSandbox, "0")
1308 "enable-interactive-autocomplete",
1309 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1310 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
1311 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
1312 ENABLE_DISABLE_VALUE_TYPE(
1313 autofill::switches::kEnableInteractiveAutocomplete,
1314 autofill::switches::kDisableInteractiveAutocomplete)
1316 #if defined(USE_AURA)
1318 "overscroll-history-navigation",
1319 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1320 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1321 kOsAll,
1322 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices)
1324 #endif
1326 "scroll-end-effect",
1327 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1328 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1329 kOsCrOS,
1330 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1331 switches::kScrollEndEffect, "1",
1332 switches::kScrollEndEffect, "0")
1335 "enable-touch-side-bezels",
1336 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1337 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1338 kOsCrOS,
1339 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1340 switches::kTouchSideBezels, "1",
1341 switches::kTouchSideBezels, "0")
1344 "enable-touch-drag-drop",
1345 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1346 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1347 kOsWin | kOsCrOS,
1348 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1349 switches::kDisableTouchDragDrop)
1352 "enable-touch-editing",
1353 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1354 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1355 kOsCrOS,
1356 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1357 switches::kDisableTouchEditing)
1360 "enable-rich-notifications",
1361 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1362 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1363 kOsWin | kOsMac,
1364 ENABLE_DISABLE_VALUE_TYPE(
1365 message_center::switches::kEnableRichNotifications,
1366 message_center::switches::kDisableRichNotifications)
1369 "enable-experimental-notification-ui",
1370 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_NAME,
1371 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_DESCRIPTION,
1372 kOsDesktop,
1373 SINGLE_VALUE_TYPE(
1374 message_center::switches::kEnableExperimentalNotificationUI)
1377 "enable-sync-synced-notifications",
1378 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1379 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1380 kOsDesktop,
1381 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1382 switches::kDisableSyncSyncedNotifications)
1384 #if defined(ENABLE_APP_LIST)
1386 "enable-sync-app-list",
1387 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1388 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
1389 kOsDesktop,
1390 SINGLE_VALUE_TYPE(switches::kEnableSyncAppList)
1392 #endif
1394 "disable-full-history-sync",
1395 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1396 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1397 kOsAll,
1398 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
1401 "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)
1407 #if defined(OS_MACOSX)
1409 "disable-avfoundation",
1410 IDS_FLAGS_DISABLE_AVFOUNDATION_NAME,
1411 IDS_FLAGS_DISABLE_AVFOUNDATION_DESCRIPTION,
1412 kOsMac,
1413 SINGLE_VALUE_TYPE(switches::kDisableAVFoundation)
1415 #endif
1417 "impl-side-painting",
1418 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1419 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
1420 kOsAll,
1421 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1424 "lcd-text-aa",
1425 IDS_FLAGS_LCD_TEXT_NAME,
1426 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1427 kOsDesktop,
1428 MULTI_VALUE_TYPE(kLCDTextChoices)
1431 "delegated-renderer",
1432 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1433 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1434 #ifdef USE_AURA
1435 kOsWin | kOsLinux |
1436 #endif
1437 kOsAndroid | kOsCrOS,
1438 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1441 "enable-websocket-experimental-implementation",
1442 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1443 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1444 kOsAll,
1445 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1448 "max-tiles-for-interest-area",
1449 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1450 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1451 kOsAll,
1452 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1455 "enable-offline-mode",
1456 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1457 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1458 kOsAll,
1459 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1462 "enable-offline-auto-reload",
1463 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1464 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1465 kOsAll,
1466 SINGLE_VALUE_TYPE(switches::kEnableOfflineAutoReload)
1469 "default-tile-width",
1470 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1471 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1472 kOsAll,
1473 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1476 "default-tile-height",
1477 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1478 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1479 kOsAll,
1480 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1482 #if defined(OS_ANDROID)
1484 "disable-gesture-requirement-for-media-playback",
1485 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1486 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1487 kOsAndroid,
1488 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1490 #endif
1491 #if defined(ENABLE_GOOGLE_NOW)
1493 "enable-google-now",
1494 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1495 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1496 kOsDesktop,
1497 ENABLE_DISABLE_VALUE_TYPE(
1498 switches::kEnableGoogleNowIntegration,
1499 switches::kDisableGoogleNowIntegration)
1501 #endif
1502 #if defined(OS_CHROMEOS)
1504 "enable-virtual-keyboard",
1505 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1506 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1507 kOsCrOS,
1508 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1511 "enable-swipe-selection",
1512 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1513 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1514 kOsCrOS,
1515 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1517 #endif
1519 "enable-simple-cache-backend",
1520 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1521 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1522 kOsAll,
1523 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1526 "enable-tcp-fast-open",
1527 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1528 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
1529 kOsLinux | kOsCrOS | kOsAndroid,
1530 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1533 "apps-use-native-frame",
1534 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1535 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1536 kOsMac,
1537 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1540 "enable-syncfs-directory-operation",
1541 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1542 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1543 kOsAll,
1544 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1546 #if defined(ENABLE_MDNS)
1548 "disable-device-discovery",
1549 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1550 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1551 kOsWin | kOsLinux | kOsCrOS,
1552 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
1555 "device-discovery-notifications",
1556 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1557 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
1558 kOsWin | kOsLinux | kOsCrOS,
1559 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1560 switches::kDisableDeviceDiscoveryNotifications)
1563 "disable-privet-local-printing",
1564 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_NAME,
1565 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_DESCRIPTION,
1566 kOsWin | kOsLinux | kOsCrOS,
1567 SINGLE_VALUE_TYPE(switches::kDisablePrivetLocalPrinting)
1569 #endif // ENABLE_MDNS
1570 #if defined(OS_MACOSX)
1572 "disable-app-shims",
1573 IDS_FLAGS_DISABLE_APP_SHIMS_NAME,
1574 IDS_FLAGS_DISABLE_APP_SHIMS_DESCRIPTION,
1575 kOsMac,
1576 SINGLE_VALUE_TYPE(switches::kDisableAppShims)
1579 "enable-simplified-fullscreen",
1580 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1581 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1582 kOsMac,
1583 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1585 #endif
1586 #if defined(TOOLKIT_VIEWS)
1588 "omnibox-auto-completion-for-ime",
1589 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1590 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1591 kOsCrOS | kOsWin | kOsLinux,
1592 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1593 switches::kDisableOmniboxAutoCompletionForIme)
1595 #endif
1596 #if defined(USE_AURA)
1598 "tab-capture-upscale-quality",
1599 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1600 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1601 kOsAll,
1602 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1605 "tab-capture-downscale-quality",
1606 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1607 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1608 kOsAll,
1609 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1611 #endif
1613 "enable-spelling-feedback-field-trial",
1614 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1615 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
1616 kOsAll,
1617 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
1620 "enable-webgl-draft-extensions",
1621 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1622 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1623 kOsAll,
1624 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1627 "enable-html-imports",
1628 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1629 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1630 kOsAll,
1631 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1634 "high-dpi-support",
1635 IDS_FLAGS_HIDPI_NAME,
1636 IDS_FLAGS_HIDPI_DESCRIPTION,
1637 kOsWin,
1638 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
1639 switches::kHighDPISupport, "0")
1642 "enable-web-midi",
1643 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1644 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1645 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1646 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1649 "enable-new-profile-management",
1650 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1651 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1652 kOsAndroid | kOsMac | kOsWin | kOsLinux,
1653 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1656 "enable-web-based-signin",
1657 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1658 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
1659 kOsMac | kOsWin | kOsLinux,
1660 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
1663 "enable-google-profile-info",
1664 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1665 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
1666 kOsMac | kOsWin | kOsLinux,
1667 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
1670 "reset-app-list-install-state",
1671 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1672 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
1673 kOsMac | kOsWin | kOsLinux,
1674 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
1676 #if defined(ENABLE_APP_LIST)
1678 "enable-app-launcher-start-page",
1679 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_NAME,
1680 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_DESCRIPTION,
1681 kOsWin | kOsCrOS,
1682 SINGLE_VALUE_TYPE(switches::kShowAppListStartPage)
1684 #if defined(OS_LINUX)
1686 // This is compiled out on non-Linux platforms because otherwise it would be
1687 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1688 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1689 "enable-app-list",
1690 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1691 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1692 kOsLinux,
1693 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1695 #endif
1697 "enable-app-list-folder",
1698 IDS_FLAGS_ENABLE_APP_LIST_FOLDER,
1699 IDS_FLAGS_ENABLE_APP_LIST_FOLDER_DESCRIPTION,
1700 kOsWin | kOsLinux | kOsCrOS,
1701 SINGLE_VALUE_TYPE(app_list::switches::kEnableFolderUI)
1704 "disable-app-list-voice-search",
1705 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH,
1706 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH_DESCRIPTION,
1707 kOsCrOS,
1708 SINGLE_VALUE_TYPE(app_list::switches::kDisableVoiceSearch)
1711 "enable-app-list-app-info",
1712 IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST,
1713 IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1714 kOsLinux | kOsWin | kOsCrOS,
1715 SINGLE_VALUE_TYPE(app_list::switches::kEnableAppInfo)
1717 #endif
1718 #if defined(OS_CHROMEOS)
1720 "disable-user-image-sync",
1721 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1722 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1723 kOsCrOS,
1724 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1726 #endif
1727 #if defined(OS_ANDROID)
1729 "enable-accessibility-tab-switcher",
1730 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1731 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1732 kOsAndroid,
1733 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
1736 "disable-accessibility-script-injection",
1737 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1738 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
1739 kOsAndroid,
1740 // Java-only switch: ContentSwitches.DISABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1741 SINGLE_VALUE_TYPE("disable-accessibility-script-injection")
1743 #endif
1745 "map-image",
1746 IDS_FLAGS_MAP_IMAGE_NAME,
1747 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1748 kOsAll,
1749 MULTI_VALUE_TYPE(kMapImageChoices)
1751 #if defined(OS_CHROMEOS)
1753 "disable-first-run-ui",
1754 IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME,
1755 IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION,
1756 kOsCrOS,
1757 SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI)
1760 "enable-first-run-ui-transitions",
1761 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1762 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1763 kOsCrOS,
1764 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1766 #endif
1768 "disable-compositor-touch-hit-testing",
1769 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME,
1770 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION,
1771 kOsAll,
1772 SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting),
1775 "enable-accelerated-scrollable-frames",
1776 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_NAME,
1777 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_DESCRIPTION,
1778 kOsAll,
1779 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedScrollableFrames,
1780 switches::kDisableAcceleratedScrollableFrames)
1783 "enable-composited-scrolling-for-frames",
1784 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_NAME,
1785 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_DESCRIPTION,
1786 kOsAll,
1787 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableCompositedScrollingForFrames,
1788 switches::kDisableCompositedScrollingForFrames)
1791 "enable-streamlined-hosted-apps",
1792 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1793 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
1794 kOsWin | kOsCrOS | kOsLinux,
1795 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1798 "enable-ephemeral-apps",
1799 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1800 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
1801 kOsWin | kOsLinux | kOsCrOS,
1802 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1805 "enable-linkable-ephemeral-apps",
1806 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1807 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
1808 kOsWin | kOsLinux | kOsCrOS,
1809 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1812 "enable-service-worker",
1813 IDS_FLAGS_ENABLE_SERVICE_WORKER_NAME,
1814 IDS_FLAGS_ENABLE_SERVICE_WORKER_DESCRIPTION,
1815 kOsAll,
1816 SINGLE_VALUE_TYPE(switches::kEnableServiceWorker)
1818 #if defined(OS_ANDROID)
1820 "disable-click-delay",
1821 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1822 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1823 kOsAndroid,
1824 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1825 SINGLE_VALUE_TYPE("disable-click-delay")
1827 #endif
1828 #if defined(OS_MACOSX)
1830 "enable-translate-new-ux",
1831 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1832 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
1833 kOsMac,
1834 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1836 #endif
1837 #if defined(TOOLKIT_VIEWS)
1839 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1840 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1841 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
1842 kOsCrOS | kOsWin,
1843 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
1845 #endif
1847 "enable-apps-show-on-first-paint",
1848 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1849 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1850 kOsDesktop,
1851 SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
1854 "enable-enhanced-bookmarks",
1855 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1856 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1857 kOsDesktop,
1858 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableEnhancedBookmarks, "1",
1859 switches::kEnableEnhancedBookmarks, "0")
1861 #if defined(OS_ANDROID)
1863 "enable-zero-suggest-experiment",
1864 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1865 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1866 kOsAndroid,
1867 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
1869 #endif
1871 "num-raster-threads",
1872 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1873 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1874 kOsAll,
1875 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
1878 "origin-chip",
1879 IDS_FLAGS_ORIGIN_CHIP_NAME,
1880 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
1881 kOsCrOS | kOsWin,
1882 MULTI_VALUE_TYPE(kOriginChipChoices)
1885 "origin-chip-in-omnibox",
1886 IDS_FLAGS_ORIGIN_CHIP_V2_NAME,
1887 IDS_FLAGS_ORIGIN_CHIP_V2_DESCRIPTION,
1888 kOsCrOS | kOsMac | kOsWin,
1889 MULTI_VALUE_TYPE(kOriginChipV2Choices)
1892 "search-button-in-omnibox",
1893 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1894 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
1895 kOsCrOS | kOsMac | kOsWin,
1896 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
1899 "disable-ignore-autocomplete-off",
1900 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1901 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
1902 kOsAll,
1903 SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff)
1905 #if defined(USE_AURA) || defined(OS_WIN)
1907 "enable-save-password-bubble",
1908 IDS_FLAGS_ENABLE_PASSWORD_BUBBLE_NAME,
1909 IDS_FLAGS_ENABLE_PASSWORD_BUBBLE_DESCRIPTION,
1910 kOsWin | kOsCrOS,
1911 SINGLE_VALUE_TYPE(switches::kEnableSavePasswordBubble)
1913 #endif
1915 "fullscreen-within-tab",
1916 IDS_FLAGS_FULLSCREEN_WITHIN_TAB_NAME,
1917 IDS_FLAGS_FULLSCREEN_WITHIN_TAB_DESCRIPTION,
1918 kOsDesktop,
1919 SINGLE_VALUE_TYPE(switches::kEmbedFlashFullscreen)
1921 #if defined(USE_AURA) || defined(OS_WIN)
1923 "enable-permissions-bubbles",
1924 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1925 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
1926 kOsCrOS | kOsWin,
1927 SINGLE_VALUE_TYPE(switches::kEnablePermissionsBubbles)
1929 #endif
1931 "notification-center-tray-behavior",
1932 IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NAME,
1933 IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_DESCRIPTION,
1934 kOsMac,
1935 MULTI_VALUE_TYPE(kNotificationCenterTrayBehaviorChoices)
1938 "out-of-process-pdf",
1939 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1940 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1941 kOsDesktop,
1942 SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf)
1944 #if defined(OS_ANDROID)
1946 "enable-fast-text-autosizing",
1947 IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_NAME,
1948 IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_DESCRIPTION,
1949 kOsAndroid,
1950 SINGLE_VALUE_TYPE(switches::kEnableFastTextAutosizing)
1953 "enable-cast",
1954 IDS_FLAGS_ENABLE_CAST_NAME,
1955 IDS_FLAGS_ENABLE_CAST_DESCRIPTION,
1956 kOsAndroid,
1957 SINGLE_VALUE_TYPE(switches::kEnableCast)
1959 #endif
1961 "prefetch-search-results",
1962 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1963 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
1964 kOsDesktop,
1965 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
1967 #if defined(ENABLE_APP_LIST)
1969 "enable-experimental-app-list",
1970 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1971 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1972 kOsWin | kOsLinux | kOsCrOS,
1973 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList)
1975 #endif
1978 const Experiment* experiments = kExperiments;
1979 size_t num_experiments = arraysize(kExperiments);
1981 // Stores and encapsulates the little state that about:flags has.
1982 class FlagsState {
1983 public:
1984 FlagsState() : needs_restart_(false) {}
1985 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1986 CommandLine* command_line,
1987 SentinelsMode sentinels);
1988 bool IsRestartNeededToCommitChanges();
1989 void SetExperimentEnabled(
1990 FlagsStorage* flags_storage,
1991 const std::string& internal_name,
1992 bool enable);
1993 void RemoveFlagsSwitches(
1994 std::map<std::string, CommandLine::StringType>* switch_list);
1995 void ResetAllFlags(FlagsStorage* flags_storage);
1996 void reset();
1998 // Returns the singleton instance of this class
1999 static FlagsState* GetInstance() {
2000 return Singleton<FlagsState>::get();
2003 private:
2004 bool needs_restart_;
2005 std::map<std::string, std::string> flags_switches_;
2007 DISALLOW_COPY_AND_ASSIGN(FlagsState);
2010 // Adds the internal names for the specified experiment to |names|.
2011 void AddInternalName(const Experiment& e, std::set<std::string>* names) {
2012 if (e.type == Experiment::SINGLE_VALUE) {
2013 names->insert(e.internal_name);
2014 } else {
2015 DCHECK(e.type == Experiment::MULTI_VALUE ||
2016 e.type == Experiment::ENABLE_DISABLE_VALUE);
2017 for (int i = 0; i < e.num_choices; ++i)
2018 names->insert(e.NameForChoice(i));
2022 // Confirms that an experiment is valid, used in a DCHECK in
2023 // SanitizeList below.
2024 bool ValidateExperiment(const Experiment& e) {
2025 switch (e.type) {
2026 case Experiment::SINGLE_VALUE:
2027 DCHECK_EQ(0, e.num_choices);
2028 DCHECK(!e.choices);
2029 break;
2030 case Experiment::MULTI_VALUE:
2031 DCHECK_GT(e.num_choices, 0);
2032 DCHECK(e.choices);
2033 DCHECK(e.choices[0].command_line_switch);
2034 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
2035 break;
2036 case Experiment::ENABLE_DISABLE_VALUE:
2037 DCHECK_EQ(3, e.num_choices);
2038 DCHECK(!e.choices);
2039 DCHECK(e.command_line_switch);
2040 DCHECK(e.command_line_value);
2041 DCHECK(e.disable_command_line_switch);
2042 DCHECK(e.disable_command_line_value);
2043 break;
2044 default:
2045 NOTREACHED();
2047 return true;
2050 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2051 // unknown, to prevent this list to become very long as experiments are added
2052 // and removed.
2053 void SanitizeList(FlagsStorage* flags_storage) {
2054 std::set<std::string> known_experiments;
2055 for (size_t i = 0; i < num_experiments; ++i) {
2056 DCHECK(ValidateExperiment(experiments[i]));
2057 AddInternalName(experiments[i], &known_experiments);
2060 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
2062 std::set<std::string> new_enabled_experiments;
2063 std::set_intersection(
2064 known_experiments.begin(), known_experiments.end(),
2065 enabled_experiments.begin(), enabled_experiments.end(),
2066 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2068 if (new_enabled_experiments != enabled_experiments)
2069 flags_storage->SetFlags(new_enabled_experiments);
2072 void GetSanitizedEnabledFlags(
2073 FlagsStorage* flags_storage, std::set<std::string>* result) {
2074 SanitizeList(flags_storage);
2075 *result = flags_storage->GetFlags();
2078 bool SkipConditionalExperiment(const Experiment& experiment) {
2079 if (experiment.internal_name == std::string("enable-enhanced-bookmarks")) {
2080 return !IsEnhancedBookmarksExperimentEnabled();
2082 return false;
2086 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2087 // enabled on the current platform.
2088 void GetSanitizedEnabledFlagsForCurrentPlatform(
2089 FlagsStorage* flags_storage, std::set<std::string>* result) {
2090 GetSanitizedEnabledFlags(flags_storage, result);
2092 // Filter out any experiments that aren't enabled on the current platform. We
2093 // don't remove these from prefs else syncing to a platform with a different
2094 // set of experiments would be lossy.
2095 std::set<std::string> platform_experiments;
2096 int current_platform = GetCurrentPlatform();
2097 for (size_t i = 0; i < num_experiments; ++i) {
2098 if (experiments[i].supported_platforms & current_platform)
2099 AddInternalName(experiments[i], &platform_experiments);
2100 #if defined(OS_CHROMEOS)
2101 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2102 AddInternalName(experiments[i], &platform_experiments);
2103 #endif
2106 std::set<std::string> new_enabled_experiments;
2107 std::set_intersection(
2108 platform_experiments.begin(), platform_experiments.end(),
2109 result->begin(), result->end(),
2110 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2112 result->swap(new_enabled_experiments);
2115 // Returns the Value representing the choice data in the specified experiment.
2116 base::Value* CreateChoiceData(
2117 const Experiment& experiment,
2118 const std::set<std::string>& enabled_experiments) {
2119 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2120 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
2121 base::ListValue* result = new base::ListValue;
2122 for (int i = 0; i < experiment.num_choices; ++i) {
2123 base::DictionaryValue* value = new base::DictionaryValue;
2124 const std::string name = experiment.NameForChoice(i);
2125 value->SetString("internal_name", name);
2126 value->SetString("description", experiment.DescriptionForChoice(i));
2127 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
2128 result->Append(value);
2130 return result;
2133 } // namespace
2135 std::string Experiment::NameForChoice(int index) const {
2136 DCHECK(type == Experiment::MULTI_VALUE ||
2137 type == Experiment::ENABLE_DISABLE_VALUE);
2138 DCHECK_LT(index, num_choices);
2139 return std::string(internal_name) + testing::kMultiSeparator +
2140 base::IntToString(index);
2143 base::string16 Experiment::DescriptionForChoice(int index) const {
2144 DCHECK(type == Experiment::MULTI_VALUE ||
2145 type == Experiment::ENABLE_DISABLE_VALUE);
2146 DCHECK_LT(index, num_choices);
2147 int description_id;
2148 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2149 const int kEnableDisableDescriptionIds[] = {
2150 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2151 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2152 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2154 description_id = kEnableDisableDescriptionIds[index];
2155 } else {
2156 description_id = choices[index].description_id;
2158 return l10n_util::GetStringUTF16(description_id);
2161 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2162 CommandLine* command_line,
2163 SentinelsMode sentinels) {
2164 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
2165 command_line,
2166 sentinels);
2169 bool AreSwitchesIdenticalToCurrentCommandLine(
2170 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
2171 std::set<CommandLine::StringType> new_flags =
2172 ExtractFlagsFromCommandLine(new_cmdline);
2173 std::set<CommandLine::StringType> active_flags =
2174 ExtractFlagsFromCommandLine(active_cmdline);
2176 // Needed because std::equal doesn't check if the 2nd set is empty.
2177 if (new_flags.size() != active_flags.size())
2178 return false;
2180 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2183 void GetFlagsExperimentsData(FlagsStorage* flags_storage,
2184 FlagAccess access,
2185 base::ListValue* supported_experiments,
2186 base::ListValue* unsupported_experiments) {
2187 std::set<std::string> enabled_experiments;
2188 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2190 int current_platform = GetCurrentPlatform();
2192 for (size_t i = 0; i < num_experiments; ++i) {
2193 const Experiment& experiment = experiments[i];
2194 if (SkipConditionalExperiment(experiment))
2195 continue;
2197 base::DictionaryValue* data = new base::DictionaryValue();
2198 data->SetString("internal_name", experiment.internal_name);
2199 data->SetString("name",
2200 l10n_util::GetStringUTF16(experiment.visible_name_id));
2201 data->SetString("description",
2202 l10n_util::GetStringUTF16(
2203 experiment.visible_description_id));
2205 base::ListValue* supported_platforms = new base::ListValue();
2206 AddOsStrings(experiment.supported_platforms, supported_platforms);
2207 data->Set("supported_platforms", supported_platforms);
2209 switch (experiment.type) {
2210 case Experiment::SINGLE_VALUE:
2211 data->SetBoolean(
2212 "enabled",
2213 enabled_experiments.count(experiment.internal_name) > 0);
2214 break;
2215 case Experiment::MULTI_VALUE:
2216 case Experiment::ENABLE_DISABLE_VALUE:
2217 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2218 break;
2219 default:
2220 NOTREACHED();
2223 bool supported = (experiment.supported_platforms & current_platform) != 0;
2224 #if defined(OS_CHROMEOS)
2225 if (access == kOwnerAccessToFlags &&
2226 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2227 supported = true;
2229 #endif
2230 if (supported)
2231 supported_experiments->Append(data);
2232 else
2233 unsupported_experiments->Append(data);
2237 bool IsRestartNeededToCommitChanges() {
2238 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2241 void SetExperimentEnabled(FlagsStorage* flags_storage,
2242 const std::string& internal_name,
2243 bool enable) {
2244 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2245 internal_name, enable);
2248 void RemoveFlagsSwitches(
2249 std::map<std::string, CommandLine::StringType>* switch_list) {
2250 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
2253 void ResetAllFlags(FlagsStorage* flags_storage) {
2254 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
2257 int GetCurrentPlatform() {
2258 #if defined(OS_MACOSX)
2259 return kOsMac;
2260 #elif defined(OS_WIN)
2261 return kOsWin;
2262 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2263 return kOsCrOS;
2264 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2265 return kOsLinux;
2266 #elif defined(OS_ANDROID)
2267 return kOsAndroid;
2268 #else
2269 #error Unknown platform
2270 #endif
2273 void RecordUMAStatistics(FlagsStorage* flags_storage) {
2274 std::set<std::string> flags = flags_storage->GetFlags();
2275 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2276 ++it) {
2277 std::string action("AboutFlags_");
2278 action += *it;
2279 content::RecordComputedAction(action);
2281 // Since flag metrics are recorded every startup, add a tick so that the
2282 // stats can be made meaningful.
2283 if (flags.size())
2284 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2285 content::RecordAction(UserMetricsAction("StartupTick"));
2288 //////////////////////////////////////////////////////////////////////////////
2289 // FlagsState implementation.
2291 namespace {
2293 typedef std::map<std::string, std::pair<std::string, std::string> >
2294 NameToSwitchAndValueMap;
2296 void SetFlagToSwitchMapping(const std::string& key,
2297 const std::string& switch_name,
2298 const std::string& switch_value,
2299 NameToSwitchAndValueMap* name_to_switch_map) {
2300 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2301 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2304 void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2305 CommandLine* command_line,
2306 SentinelsMode sentinels) {
2307 if (command_line->HasSwitch(switches::kNoExperiments))
2308 return;
2310 std::set<std::string> enabled_experiments;
2312 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2313 &enabled_experiments);
2315 NameToSwitchAndValueMap name_to_switch_map;
2316 for (size_t i = 0; i < num_experiments; ++i) {
2317 const Experiment& e = experiments[i];
2318 if (e.type == Experiment::SINGLE_VALUE) {
2319 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2320 e.command_line_value, &name_to_switch_map);
2321 } else if (e.type == Experiment::MULTI_VALUE) {
2322 for (int j = 0; j < e.num_choices; ++j) {
2323 SetFlagToSwitchMapping(e.NameForChoice(j),
2324 e.choices[j].command_line_switch,
2325 e.choices[j].command_line_value,
2326 &name_to_switch_map);
2328 } else {
2329 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2330 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2331 &name_to_switch_map);
2332 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2333 e.command_line_value, &name_to_switch_map);
2334 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2335 e.disable_command_line_value, &name_to_switch_map);
2339 if (sentinels == kAddSentinels) {
2340 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2341 flags_switches_.insert(
2342 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2343 std::string()));
2345 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2346 it != enabled_experiments.end();
2347 ++it) {
2348 const std::string& experiment_name = *it;
2349 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
2350 name_to_switch_map.find(experiment_name);
2351 if (name_to_switch_it == name_to_switch_map.end()) {
2352 NOTREACHED();
2353 continue;
2356 const std::pair<std::string, std::string>&
2357 switch_and_value_pair = name_to_switch_it->second;
2359 CHECK(!switch_and_value_pair.first.empty());
2360 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2361 switch_and_value_pair.second);
2362 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
2364 if (sentinels == kAddSentinels) {
2365 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2366 flags_switches_.insert(
2367 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2368 std::string()));
2372 bool FlagsState::IsRestartNeededToCommitChanges() {
2373 return needs_restart_;
2376 void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2377 const std::string& internal_name,
2378 bool enable) {
2379 size_t at_index = internal_name.find(testing::kMultiSeparator);
2380 if (at_index != std::string::npos) {
2381 DCHECK(enable);
2382 // We're being asked to enable a multi-choice experiment. Disable the
2383 // currently selected choice.
2384 DCHECK_NE(at_index, 0u);
2385 const std::string experiment_name = internal_name.substr(0, at_index);
2386 SetExperimentEnabled(flags_storage, experiment_name, false);
2388 // And enable the new choice, if it is not the default first choice.
2389 if (internal_name != experiment_name + "@0") {
2390 std::set<std::string> enabled_experiments;
2391 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2392 needs_restart_ |= enabled_experiments.insert(internal_name).second;
2393 flags_storage->SetFlags(enabled_experiments);
2395 return;
2398 std::set<std::string> enabled_experiments;
2399 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2401 const Experiment* e = NULL;
2402 for (size_t i = 0; i < num_experiments; ++i) {
2403 if (experiments[i].internal_name == internal_name) {
2404 e = experiments + i;
2405 break;
2408 DCHECK(e);
2410 if (e->type == Experiment::SINGLE_VALUE) {
2411 if (enable)
2412 needs_restart_ |= enabled_experiments.insert(internal_name).second;
2413 else
2414 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
2415 } else {
2416 if (enable) {
2417 // Enable the first choice.
2418 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
2419 } else {
2420 // Find the currently enabled choice and disable it.
2421 for (int i = 0; i < e->num_choices; ++i) {
2422 std::string choice_name = e->NameForChoice(i);
2423 if (enabled_experiments.find(choice_name) !=
2424 enabled_experiments.end()) {
2425 needs_restart_ = true;
2426 enabled_experiments.erase(choice_name);
2427 // Continue on just in case there's a bug and more than one
2428 // experiment for this choice was enabled.
2434 flags_storage->SetFlags(enabled_experiments);
2437 void FlagsState::RemoveFlagsSwitches(
2438 std::map<std::string, CommandLine::StringType>* switch_list) {
2439 for (std::map<std::string, std::string>::const_iterator
2440 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2441 switch_list->erase(it->first);
2445 void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
2446 needs_restart_ = true;
2448 std::set<std::string> no_experiments;
2449 flags_storage->SetFlags(no_experiments);
2452 void FlagsState::reset() {
2453 needs_restart_ = false;
2454 flags_switches_.clear();
2457 } // namespace
2459 namespace testing {
2461 // WARNING: '@' is also used in the html file. If you update this constant you
2462 // also need to update the html file.
2463 const char kMultiSeparator[] = "@";
2465 void ClearState() {
2466 FlagsState::GetInstance()->reset();
2469 void SetExperiments(const Experiment* e, size_t count) {
2470 if (!e) {
2471 experiments = kExperiments;
2472 num_experiments = arraysize(kExperiments);
2473 } else {
2474 experiments = e;
2475 num_experiments = count;
2479 const Experiment* GetExperiments(size_t* count) {
2480 *count = num_experiments;
2481 return experiments;
2484 } // namespace testing
2486 } // namespace about_flags