Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / about_flags.cc
blobb41c3af29662e30a8ef510524f6989dbb1055864
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/compositor/compositor_switches.h"
35 #include "ui/events/event_switches.h"
36 #include "ui/gfx/switches.h"
37 #include "ui/gl/gl_switches.h"
38 #include "ui/keyboard/keyboard_switches.h"
39 #include "ui/message_center/message_center_switches.h"
40 #include "ui/surface/surface_switches.h"
41 #include "ui/views/views_switches.h"
43 #if defined(USE_ASH)
44 #include "ash/ash_switches.h"
45 #endif
47 #if defined(OS_CHROMEOS)
48 #include "chromeos/chromeos_switches.h"
49 #include "third_party/cros_system_api/switches/chrome_switches.h"
50 #endif
52 #if defined(ENABLE_APP_LIST)
53 #include "ui/app_list/app_list_switches.h"
54 #endif
56 using base::UserMetricsAction;
58 namespace about_flags {
60 // Macros to simplify specifying the type.
61 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
62 Experiment::SINGLE_VALUE, \
63 command_line_switch, switch_value, NULL, NULL, NULL, 0
64 #define SINGLE_VALUE_TYPE(command_line_switch) \
65 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
66 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
67 disable_switch, disable_value) \
68 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
69 disable_switch, disable_value, NULL, 3
70 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
71 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
72 #define MULTI_VALUE_TYPE(choices) \
73 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
75 namespace {
77 const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
78 const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
80 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
81 // whether the experiment is available on that platform.
82 void AddOsStrings(unsigned bitmask, base::ListValue* list) {
83 struct {
84 unsigned bit;
85 const char* const name;
86 } kBitsToOs[] = {
87 {kOsMac, "Mac"},
88 {kOsWin, "Windows"},
89 {kOsLinux, "Linux"},
90 {kOsCrOS, "Chrome OS"},
91 {kOsAndroid, "Android"},
92 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
94 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
95 if (bitmask & kBitsToOs[i].bit)
96 list->Append(new base::StringValue(kBitsToOs[i].name));
99 // Convert switch constants to proper CommandLine::StringType strings.
100 CommandLine::StringType GetSwitchString(const std::string& flag) {
101 CommandLine cmd_line(CommandLine::NO_PROGRAM);
102 cmd_line.AppendSwitch(flag);
103 DCHECK(cmd_line.argv().size() == 2);
104 return cmd_line.argv()[1];
107 // Scoops flags from a command line.
108 std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
109 const CommandLine& cmdline) {
110 std::set<CommandLine::StringType> flags;
111 // First do the ones between --flag-switches-begin and --flag-switches-end.
112 CommandLine::StringVector::const_iterator first =
113 std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(switches::kFlagSwitchesBegin));
115 CommandLine::StringVector::const_iterator last =
116 std::find(cmdline.argv().begin(), cmdline.argv().end(),
117 GetSwitchString(switches::kFlagSwitchesEnd));
118 if (first != cmdline.argv().end() && last != cmdline.argv().end())
119 flags.insert(first + 1, last);
120 #if defined(OS_CHROMEOS)
121 // Then add those between --policy-switches-begin and --policy-switches-end.
122 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
123 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
124 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
125 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
126 if (first != cmdline.argv().end() && last != cmdline.argv().end())
127 flags.insert(first + 1, last);
128 #endif
129 return flags;
132 const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
133 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
134 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
135 switches::kEnableCompositingForFixedPosition, ""},
136 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
137 switches::kDisableCompositingForFixedPosition, ""},
138 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
139 switches::kEnableHighDpiCompositingForFixedPosition, ""}
142 const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
143 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
144 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
145 switches::kEnableCompositingForTransition, ""},
146 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
147 switches::kDisableCompositingForTransition, ""},
150 const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
151 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
152 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
153 switches::kEnableAcceleratedFixedRootBackground, ""},
154 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
155 switches::kDisableAcceleratedFixedRootBackground, ""},
158 const Experiment::Choice kTouchEventsChoices[] = {
159 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
160 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
161 switches::kTouchEvents,
162 switches::kTouchEventsEnabled },
163 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
164 switches::kTouchEvents,
165 switches::kTouchEventsDisabled }
168 const Experiment::Choice kTouchOptimizedUIChoices[] = {
169 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
170 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
171 switches::kTouchOptimizedUI,
172 switches::kTouchOptimizedUIEnabled },
173 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
174 switches::kTouchOptimizedUI,
175 switches::kTouchOptimizedUIDisabled }
178 const Experiment::Choice kNaClDebugMaskChoices[] = {
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
180 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
181 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
182 // an option to switch off its debugging.
183 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
184 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
185 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
186 switches::kNaClDebugMask, "*://*/*debug.nmf" }
189 const Experiment::Choice kImplSidePaintingChoices[] = {
190 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
191 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
192 cc::switches::kEnableImplSidePainting, ""},
193 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
194 cc::switches::kDisableImplSidePainting, ""}
197 const Experiment::Choice kDeadlineSchedulingChoices[] = {
198 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
199 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
200 switches::kEnableDeadlineScheduling, ""},
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
202 switches::kDisableDeadlineScheduling, ""}
205 const Experiment::Choice kUIDeadlineSchedulingChoices[] = {
206 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
207 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
208 switches::kUIEnableDeadlineScheduling, ""},
209 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
210 switches::kUIDisableDeadlineScheduling, ""}
213 const Experiment::Choice kLCDTextChoices[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
215 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""},
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""}
219 const Experiment::Choice kDelegatedRendererChoices[] = {
220 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
221 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
222 switches::kEnableDelegatedRenderer, ""},
223 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
224 switches::kDisableDelegatedRenderer, ""}
227 const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
228 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
229 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
230 cc::switches::kMaxTilesForInterestArea, "64"},
231 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
232 cc::switches::kMaxTilesForInterestArea, "128"},
233 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
234 cc::switches::kMaxTilesForInterestArea, "256"},
235 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
236 cc::switches::kMaxTilesForInterestArea, "512"}
239 const Experiment::Choice kDefaultTileWidthChoices[] = {
240 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
241 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
242 switches::kDefaultTileWidth, "128"},
243 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
244 switches::kDefaultTileWidth, "256"},
245 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
246 switches::kDefaultTileWidth, "512"},
247 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
248 switches::kDefaultTileWidth, "1024"}
251 #if defined(USE_ASH)
252 const Experiment::Choice kAshOverviewDelayChoices[] = {
253 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
254 { IDS_FLAGS_OVERVIEW_DELAY_INSTANT,
255 ash::switches::kAshOverviewDelayOnAltTab, "0" },
256 { IDS_FLAGS_OVERVIEW_DELAY_SHORT,
257 ash::switches::kAshOverviewDelayOnAltTab, "100" },
258 { IDS_FLAGS_OVERVIEW_DELAY_LONG,
259 ash::switches::kAshOverviewDelayOnAltTab, "500" },
260 { IDS_FLAGS_OVERVIEW_DELAY_NEVER,
261 ash::switches::kAshOverviewDelayOnAltTab, "10000" },
263 #endif
265 const Experiment::Choice kDefaultTileHeightChoices[] = {
266 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
267 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
268 switches::kDefaultTileHeight, "128"},
269 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
270 switches::kDefaultTileHeight, "256"},
271 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
272 switches::kDefaultTileHeight, "512"},
273 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
274 switches::kDefaultTileHeight, "1024"}
277 const Experiment::Choice kSimpleCacheBackendChoices[] = {
278 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
279 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
280 switches::kUseSimpleCacheBackend, "off" },
281 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
282 switches::kUseSimpleCacheBackend, "on"}
285 #if defined(USE_AURA)
286 const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
287 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
288 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
289 switches::kTabCaptureUpscaleQuality, "fast" },
290 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
291 switches::kTabCaptureUpscaleQuality, "good" },
292 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
293 switches::kTabCaptureUpscaleQuality, "best" },
296 const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
297 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
298 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
299 switches::kTabCaptureDownscaleQuality, "fast" },
300 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
301 switches::kTabCaptureDownscaleQuality, "good" },
302 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
303 switches::kTabCaptureDownscaleQuality, "best" },
305 #endif
307 const Experiment::Choice kMapImageChoices[] = {
308 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
309 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
310 cc::switches::kEnableMapImage, ""},
311 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
312 cc::switches::kDisableMapImage, ""}
315 #if defined(OS_ANDROID)
316 const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
317 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
318 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
319 switches::kEnableZeroSuggestMostVisited, ""},
320 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
321 switches::kEnableZeroSuggestEtherSerp, ""},
322 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
323 switches::kEnableZeroSuggestEtherNoSerp, ""},
324 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
325 switches::kDisableZeroSuggest, ""}
327 #endif
329 const Experiment::Choice kNumRasterThreadsChoices[] = {
330 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
331 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, cc::switches::kNumRasterThreads, "1" },
332 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, cc::switches::kNumRasterThreads, "2" },
333 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, cc::switches::kNumRasterThreads, "3" },
334 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, cc::switches::kNumRasterThreads, "4" }
337 // We're using independent flags here (as opposed to a common flag with
338 // different values) to be able to enable/disable the entire experience
339 // associated with this feature server-side from the FieldTrial (the complete
340 // experience includes other flag changes as well). It is not currently possible
341 // to do that with "flag=value" flags.
342 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
343 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
344 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
345 switches::kDisableSearchButtonInOmnibox, ""},
346 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
347 switches::kEnableSearchButtonInOmniboxForStr, ""},
348 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
349 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
350 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
351 switches::kEnableSearchButtonInOmniboxAlways, ""}
354 // See comment above for kSearchButtonInOmniboxChoices. The same reasoning
355 // applies here.
356 const Experiment::Choice kOriginChipChoices[] = {
357 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
358 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
359 { IDS_FLAGS_ORIGIN_CHIP_TRAILING_LOCATION_BAR,
360 switches::kEnableOriginChipTrailingLocationBar, ""},
361 { IDS_FLAGS_ORIGIN_CHIP_LEADING_LOCATION_BAR,
362 switches::kEnableOriginChipLeadingLocationBar, ""},
363 { IDS_FLAGS_ORIGIN_CHIP_LEADING_MENU_BUTTON,
364 switches::kEnableOriginChipLeadingMenuButton, ""}
367 // RECORDING USER METRICS FOR FLAGS:
368 // -----------------------------------------------------------------------------
369 // The first line of the experiment is the internal name. If you'd like to
370 // gather statistics about the usage of your flag, you should append a marker
371 // comment to the end of the feature name, like so:
372 // "my-special-feature", // FLAGS:RECORD_UMA
374 // After doing that, run //tools/metrics/actions/extract_actions.py (see
375 // instructions at the top of that file for details) to update the
376 // chromeactions.txt file, which will enable UMA to record your feature flag.
378 // After your feature has shipped under a flag, you can locate the metrics under
379 // the action name AboutFlags_internal-action-name. Actions are recorded once
380 // per startup, so you should divide this number by AboutFlags_StartupTick to
381 // get a sense of usage. Note that this will not be the same as number of users
382 // with a given feature enabled because users can quit and relaunch the
383 // application multiple times over a given time interval. The dashboard also
384 // shows you how many (metrics reporting) users have enabled the flag over the
385 // last seven days. However, note that this is not the same as the number of
386 // users who have the flag enabled, since enabling the flag happens once,
387 // whereas running with the flag enabled happens until the user flips the flag
388 // again.
390 // To add a new experiment add to the end of kExperiments. There are two
391 // distinct types of experiments:
392 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
393 // macro for this type supplying the command line to the macro.
394 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
395 // deactivated state for this lab (i.e. no command line option). To specify
396 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
397 // array of choices.
398 // See the documentation of Experiment for details on the fields.
400 // When adding a new choice, add it to the end of the list.
401 const Experiment kExperiments[] = {
403 "expose-for-tabs", // FLAGS:RECORD_UMA
404 IDS_FLAGS_TABPOSE_NAME,
405 IDS_FLAGS_TABPOSE_DESCRIPTION,
406 kOsMac,
407 #if defined(OS_MACOSX)
408 // The switch exists only on OS X.
409 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
410 #else
411 SINGLE_VALUE_TYPE("")
412 #endif
415 "conflicting-modules-check", // FLAGS:RECORD_UMA
416 IDS_FLAGS_CONFLICTS_CHECK_NAME,
417 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
418 kOsWin,
419 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
422 "ignore-gpu-blacklist",
423 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
424 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
425 kOsAll,
426 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
429 "force-compositing-mode-2",
430 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
431 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
432 kOsMac | kOsLinux,
433 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
434 switches::kDisableForceCompositingMode)
437 "threaded-compositing-mode",
438 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
439 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
440 kOsMac | kOsLinux,
441 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
442 switches::kDisableThreadedCompositing)
445 "force-accelerated-composited-scrolling",
446 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
447 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
448 kOsAll,
449 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
450 switches::kDisableAcceleratedOverflowScroll)
453 "force-universal-accelerated-composited-scrolling",
454 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
455 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
456 kOsAll,
457 ENABLE_DISABLE_VALUE_TYPE(
458 switches::kEnableUniversalAcceleratedOverflowScroll,
459 switches::kDisableUniversalAcceleratedOverflowScroll)
461 #if defined(OS_WIN)
463 "enable-direct-write",
464 IDS_FLAGS_ENABLE_DIRECT_WRITE_NAME,
465 IDS_FLAGS_ENABLE_DIRECT_WRITE_DESCRIPTION,
466 kOsWin,
467 SINGLE_VALUE_TYPE(switches::kEnableDirectWrite)
469 #endif
471 "enable-experimental-canvas-features",
472 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
473 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
474 kOsAll,
475 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
478 "disable-accelerated-2d-canvas",
479 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
480 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
481 kOsAll,
482 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
485 "composited-layer-borders",
486 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
487 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
488 kOsAll,
489 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
492 "show-fps-counter",
493 IDS_FLAGS_SHOW_FPS_COUNTER,
494 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
495 kOsAll,
496 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
499 "accelerated-filters",
500 IDS_FLAGS_ACCELERATED_FILTERS,
501 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
502 kOsAll,
503 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
506 "disable-webgl",
507 IDS_FLAGS_DISABLE_WEBGL_NAME,
508 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
509 kOsAll,
510 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
513 "enable-d3d11",
514 IDS_FLAGS_ENABLE_D3D11_NAME,
515 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
516 kOsWin,
517 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
520 "disable-webrtc",
521 IDS_FLAGS_DISABLE_WEBRTC_NAME,
522 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
523 kOsAndroid,
524 #if defined(OS_ANDROID)
525 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
526 #else
527 SINGLE_VALUE_TYPE("")
528 #endif
530 #if defined(ENABLE_WEBRTC)
532 "disable-device-enumeration",
533 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
534 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
535 kOsAll,
536 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
539 "disable-sctp-data-channels",
540 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_NAME,
541 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
542 kOsAll,
543 SINGLE_VALUE_TYPE(switches::kDisableSCTPDataChannels)
546 "disable-webrtc-hw-decoding",
547 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
548 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
549 kOsAndroid | kOsCrOS,
550 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
553 "disable-webrtc-hw-encoding",
554 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
555 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
556 kOsAndroid | kOsCrOS,
557 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
559 #endif
560 #if defined(OS_ANDROID)
561 #if defined(ARCH_CPU_X86)
563 "enable-webaudio",
564 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
565 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
566 kOsAndroid,
567 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
569 #else
571 "disable-webaudio",
572 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
573 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
574 kOsAndroid,
575 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
577 #endif
578 #endif
580 "fixed-position-creates-stacking-context",
581 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
582 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
583 kOsAll,
584 ENABLE_DISABLE_VALUE_TYPE(
585 switches::kEnableFixedPositionCreatesStackingContext,
586 switches::kDisableFixedPositionCreatesStackingContext)
589 "enable-compositing-for-fixed-position",
590 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
591 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
592 kOsAll,
593 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
596 "enable-compositing-for-transition",
597 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
598 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
599 kOsAll,
600 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
603 "enable-accelerated-fixed-root-background",
604 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
605 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
606 kOsAll,
607 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
609 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
611 "enable-nacl", // FLAGS:RECORD_UMA
612 IDS_FLAGS_ENABLE_NACL_NAME,
613 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
614 kOsDesktop,
615 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
618 "enable-nacl-debug", // FLAGS:RECORD_UMA
619 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
620 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
621 kOsDesktop,
622 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
625 "disable-pnacl", // FLAGS:RECORD_UMA
626 IDS_FLAGS_DISABLE_PNACL_NAME,
627 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
628 kOsDesktop,
629 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
632 "nacl-debug-mask", // FLAGS:RECORD_UMA
633 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
634 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
635 kOsDesktop,
636 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
639 "extension-apis", // FLAGS:RECORD_UMA
640 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
641 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
642 kOsDesktop,
643 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
646 "extensions-on-chrome-urls",
647 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
648 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
649 kOsAll,
650 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
653 "enable-fast-unload",
654 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
655 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
656 kOsAll,
657 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
660 "enable-adview",
661 IDS_FLAGS_ENABLE_ADVIEW_NAME,
662 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
663 kOsDesktop,
664 SINGLE_VALUE_TYPE(switches::kEnableAdview)
667 "enable-adview-src-attribute",
668 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
669 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
670 kOsDesktop,
671 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
674 "enable-app-window-controls",
675 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
676 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
677 kOsDesktop,
678 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
681 "script-badges",
682 IDS_FLAGS_SCRIPT_BADGES_NAME,
683 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
684 kOsDesktop,
685 SINGLE_VALUE_TYPE(extensions::switches::kScriptBadges)
688 "script-bubble",
689 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
690 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
691 kOsDesktop,
692 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
693 extensions::switches::kScriptBubble, "1",
694 extensions::switches::kScriptBubble, "0")
697 "apps-new-install-bubble",
698 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
699 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
700 kOsDesktop,
701 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
704 "disable-hyperlink-auditing",
705 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
706 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
707 kOsAll,
708 SINGLE_VALUE_TYPE(switches::kNoPings)
711 "tab-groups-context-menu",
712 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
713 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
714 kOsWin,
715 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
717 #if defined(OS_ANDROID)
719 "enable-new-ntp",
720 IDS_FLAGS_ENABLE_NEW_NTP,
721 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
722 kOsAndroid,
723 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
724 switches::kDisableNewNTP)
726 #endif
728 "show-autofill-type-predictions",
729 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
730 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
731 kOsAll,
732 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
735 "enable-gesture-tap-highlight",
736 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
737 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
738 kOsLinux | kOsCrOS,
739 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
740 switches::kDisableGestureTapHighlight)
743 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
744 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
745 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
746 // Can't expose the switch unless the code is compiled in.
747 // On by default for the Mac (different implementation in WebKit).
748 kOsLinux,
749 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
752 "enable-overlay-scrollbars",
753 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
754 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
755 // Uses the system preference on Mac (a different implementation).
756 // On Android, this is always enabled.
757 kOsCrOS,
758 SINGLE_VALUE_TYPE(switches::kEnableOverlayScrollbars)
761 "enable-panels",
762 IDS_FLAGS_ENABLE_PANELS_NAME,
763 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
764 kOsDesktop,
765 SINGLE_VALUE_TYPE(switches::kEnablePanels)
768 // See http://crbug.com/120416 for how to remove this flag.
769 "save-page-as-mhtml", // FLAGS:RECORD_UMA
770 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
771 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
772 kOsMac | kOsWin | kOsLinux,
773 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
776 "enable-autologin",
777 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
778 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
779 kOsMac | kOsWin | kOsLinux,
780 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
783 "enable-quic",
784 IDS_FLAGS_ENABLE_QUIC_NAME,
785 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
786 kOsAll,
787 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
788 switches::kDisableQuic)
791 "enable-quic-https",
792 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
793 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
794 kOsAll,
795 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
796 switches::kDisableQuicHttps)
799 "enable-spdy4a2",
800 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
801 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
802 kOsAll,
803 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
806 "enable-http2-draft-04",
807 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
808 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
809 kOsAll,
810 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
813 "enable-async-dns",
814 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
815 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
816 kOsWin | kOsMac | kOsLinux | kOsCrOS,
817 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
818 switches::kDisableAsyncDns)
821 "disable-webkit-media-source",
822 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
823 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
824 kOsAll,
825 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
828 "disable-unprefixed-media-source",
829 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_NAME,
830 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_DESCRIPTION,
831 kOsAll,
832 SINGLE_VALUE_TYPE(switches::kDisableUnprefixedMediaSource)
835 "enable-encrypted-media",
836 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
837 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
838 kOsAll,
839 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
842 "disable-prefixed-encrypted-media",
843 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
844 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
845 kOsAll,
846 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
848 #if defined(OS_ANDROID)
850 "disable-infobar-for-protected-media-identifier",
851 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
852 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
853 kOsAndroid,
854 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
857 "mediadrm-enable-non-compositing",
858 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
859 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
860 kOsAndroid,
861 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
863 #endif // defined(OS_ANDROID)
865 "disable-opus-playback",
866 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_NAME,
867 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_DESCRIPTION,
868 kOsDesktop,
869 SINGLE_VALUE_TYPE(switches::kDisableOpusPlayback)
872 "disable-vp8-alpha-playback",
873 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_NAME,
874 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
875 kOsDesktop,
876 SINGLE_VALUE_TYPE(switches::kDisableVp8AlphaPlayback)
879 "per-tile-painting",
880 IDS_FLAGS_PER_TILE_PAINTING_NAME,
881 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
882 kOsMac | kOsLinux | kOsCrOS,
883 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
886 "enable-javascript-harmony",
887 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
888 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
889 kOsAll,
890 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
893 "disable-restore-session-state",
894 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
895 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
896 kOsAll,
897 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
900 "disable-software-rasterizer",
901 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
902 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
903 #if defined(ENABLE_SWIFTSHADER)
904 kOsAll,
905 #else
907 #endif
908 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
911 "enable-experimental-web-platform-features",
912 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
913 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
914 kOsAll,
915 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
918 "disable-ntp-other-sessions-menu",
919 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
920 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
921 kOsDesktop,
922 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
924 #if defined(USE_ASH)
926 "enable-ash-oak",
927 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
928 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
929 kOsAll,
930 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
932 #endif
934 "enable-devtools-experiments",
935 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
936 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
937 kOsDesktop,
938 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
941 "silent-debugger-extension-api",
942 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
943 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
944 kOsDesktop,
945 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
948 "enable-suggestions-ntp",
949 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
950 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
951 kOsDesktop,
952 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
955 "spellcheck-autocorrect",
956 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
957 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
958 kOsWin | kOsLinux | kOsCrOS,
959 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
962 "enable-scroll-prediction",
963 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
964 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
965 kOsDesktop,
966 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
969 "touch-events",
970 IDS_TOUCH_EVENTS_NAME,
971 IDS_TOUCH_EVENTS_DESCRIPTION,
972 kOsDesktop,
973 MULTI_VALUE_TYPE(kTouchEventsChoices)
976 "touch-optimized-ui",
977 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
978 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
979 kOsWin,
980 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
983 "disable-touch-adjustment",
984 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
985 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
986 kOsWin | kOsLinux | kOsCrOS,
987 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
989 #if defined(OS_CHROMEOS)
991 "ash-use-alternate-shelf",
992 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
993 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
994 kOsCrOS,
995 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
996 ash::switches::kAshDisableAlternateShelfLayout)
999 "ash-disable-drag-off-shelf",
1000 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
1001 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
1002 kOsCrOS,
1003 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
1006 "enable-background-loader",
1007 IDS_ENABLE_BACKLOADER_NAME,
1008 IDS_ENABLE_BACKLOADER_DESCRIPTION,
1009 kOsCrOS,
1010 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
1013 "ash-disable-docked-windows",
1014 IDS_FLAGS_DOCKED_WINDOWS_NAME,
1015 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
1016 kOsCrOS,
1017 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDockedWindows)
1020 "ash-enable-immersive-fullscreen-all-windows2",
1021 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_NAME,
1022 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_DESCRIPTION,
1023 kOsCrOS,
1024 ENABLE_DISABLE_VALUE_TYPE(
1025 ash::switches::kAshEnableImmersiveFullscreenForAllWindows,
1026 ash::switches::kAshEnableImmersiveFullscreenForBrowserOnly)
1028 #endif
1030 "enable-download-resumption",
1031 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
1032 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
1033 kOsDesktop,
1034 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1037 "allow-nacl-socket-api",
1038 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1039 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
1040 kOsDesktop,
1041 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1044 "stacked-tab-strip",
1045 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1046 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1047 kOsWin,
1048 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1051 "force-device-scale-factor",
1052 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1053 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1054 kOsCrOS,
1055 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
1057 #if defined(OS_CHROMEOS)
1059 "allow-touchpad-three-finger-click",
1060 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1061 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1062 kOsCrOS,
1063 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
1065 #endif
1066 #if defined(USE_ASH)
1068 "show-launcher-alignment-menu",
1069 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
1070 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
1071 kOsAll,
1072 ENABLE_DISABLE_VALUE_TYPE(
1073 ash::switches::kShowShelfAlignmentMenu,
1074 ash::switches::kHideShelfAlignmentMenu)
1077 "disable-minimize-on-second-launcher-item-click",
1078 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1079 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1080 kOsAll,
1081 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1084 "multiple-snap-window-widths",
1085 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_NAME,
1086 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_DESCRIPTION,
1087 kOsAll,
1088 SINGLE_VALUE_TYPE(ash::switches::kAshMultipleSnapWindowWidths)
1091 "disable-overview-mode",
1092 IDS_FLAGS_DISABLE_OVERVIEW_MODE_NAME,
1093 IDS_FLAGS_DISABLE_OVERVIEW_MODE_DESCRIPTION,
1094 kOsCrOS,
1095 SINGLE_VALUE_TYPE(ash::switches::kAshDisableOverviewMode)
1098 "overview-delay-on-alt-tab",
1099 IDS_FLAGS_OVERVIEW_DELAY_NAME,
1100 IDS_FLAGS_OVERVIEW_DELAY_DESCRIPTION,
1101 kOsCrOS,
1102 MULTI_VALUE_TYPE(kAshOverviewDelayChoices)
1105 "show-touch-hud",
1106 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1107 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1108 kOsAll,
1109 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1112 "enable-pinch",
1113 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1114 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
1115 kOsLinux | kOsWin | kOsCrOS,
1116 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1119 "enable-pinch-virtual-viewport",
1120 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1121 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1122 kOsLinux | kOsWin | kOsCrOS,
1123 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1125 #endif // defined(USE_ASH)
1127 "enable-viewport-meta",
1128 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
1129 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
1130 kOsLinux | kOsWin | kOsCrOS | kOsMac,
1131 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
1133 #if defined(OS_CHROMEOS)
1135 "disable-boot-animation",
1136 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1137 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
1138 kOsCrOSOwnerOnly,
1139 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
1142 "file-manager-show-checkboxes",
1143 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1144 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
1145 kOsCrOS,
1146 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
1149 "file-manager-enable-webstore-integration",
1150 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1151 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1156 "disable-quickoffice-component-app",
1157 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1158 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1163 "enable-saml-signin",
1164 IDS_FLAGS_ENABLE_SAML_SIGNIN_NAME,
1165 IDS_FLAGS_ENABLE_SAML_SIGNIN_DESCRIPTION,
1166 kOsCrOS,
1167 SINGLE_VALUE_TYPE(chromeos::switches::kEnableSamlSignin),
1170 "enable-multi-profiles",
1171 IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME,
1172 IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION,
1173 kOsCrOS,
1174 SINGLE_VALUE_TYPE(switches::kMultiProfiles),
1176 #endif // defined(OS_CHROMEOS)
1177 { "disable-accelerated-video-decode",
1178 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1179 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
1180 kOsWin | kOsCrOS,
1181 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
1184 "enable-contacts",
1185 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1186 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1187 kOsCrOS,
1188 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1190 #if defined(USE_ASH)
1192 "ash-debug-shortcuts",
1193 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1194 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1195 kOsAll,
1196 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1198 { "ash-enable-advanced-gestures",
1199 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1200 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1201 kOsCrOS,
1202 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1204 { "ash-alternate-caption-button",
1205 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_NAME,
1206 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_DESCRIPTION,
1207 kOsCrOS,
1208 ENABLE_DISABLE_VALUE_TYPE(
1209 ash::switches::kAshEnableAlternateFrameCaptionButtonStyle,
1210 ash::switches::kAshDisableAlternateFrameCaptionButtonStyle),
1213 "ash-disable-auto-maximizing",
1214 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
1215 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
1216 kOsWin | kOsLinux | kOsCrOS,
1217 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
1219 { "ash-disable-drag-and-drop-applist-to-launcher",
1220 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1221 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1222 kOsCrOS,
1223 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
1225 #if defined(OS_LINUX)
1226 { "ash-enable-memory-monitor",
1227 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1228 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1229 kOsCrOS,
1230 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1232 #endif
1233 #if defined(OS_CHROMEOS)
1234 { "ash-enable-full-multi-profile-mode",
1235 IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE,
1236 IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE_DESCRIPTION,
1237 kOsCrOS,
1238 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullMultiProfileMode),
1240 { "ash-enable-multi-user-tray",
1241 IDS_FLAGS_ENABLE_MULTI_USER_TRAY,
1242 IDS_FLAGS_ENABLE_MULTI_USER_TRAY_DESCRIPTION,
1243 kOsCrOS,
1244 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMultiUserTray),
1246 #endif
1247 #endif
1248 #if defined(OS_CHROMEOS)
1250 "ash-audio-device-menu",
1251 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1252 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1253 kOsCrOS,
1254 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1255 ash::switches::kAshDisableAudioDeviceMenu)
1258 "enable-carrier-switching",
1259 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1260 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1261 kOsCrOS,
1262 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
1265 "enable-request-tablet-site",
1266 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1267 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1268 kOsCrOS,
1269 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
1271 #endif
1273 "debug-packed-apps",
1274 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1275 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
1276 kOsDesktop,
1277 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1280 "enable-password-generation",
1281 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1282 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
1283 kOsDesktop,
1284 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1285 autofill::switches::kDisablePasswordGeneration)
1288 "password-manager-reauthentication",
1289 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1290 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
1291 kOsMac | kOsWin,
1292 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
1295 "password-autofill-public-suffix-domain-matching",
1296 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1297 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1298 kOsAndroid | kOsWin | kOsLinux,
1299 ENABLE_DISABLE_VALUE_TYPE(
1300 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1301 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
1304 "enable-deferred-image-decoding",
1305 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1306 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
1307 kOsMac | kOsLinux | kOsCrOS,
1308 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1311 "performance-monitor-gathering",
1312 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1313 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1314 kOsAll,
1315 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1318 "wallet-service-use-sandbox",
1319 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1320 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
1321 kOsCrOS | kOsWin | kOsMac,
1322 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1323 autofill::switches::kWalletServiceUseSandbox, "1",
1324 autofill::switches::kWalletServiceUseSandbox, "0")
1327 "enable-interactive-autocomplete",
1328 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1329 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
1330 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
1331 ENABLE_DISABLE_VALUE_TYPE(
1332 autofill::switches::kEnableInteractiveAutocomplete,
1333 autofill::switches::kDisableInteractiveAutocomplete)
1335 #if defined(USE_AURA)
1337 "overscroll-history-navigation",
1338 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1339 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1340 kOsAll,
1341 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1342 switches::kOverscrollHistoryNavigation, "1",
1343 switches::kOverscrollHistoryNavigation, "0")
1345 #endif
1347 "scroll-end-effect",
1348 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1349 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1350 kOsCrOS,
1351 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1352 switches::kScrollEndEffect, "1",
1353 switches::kScrollEndEffect, "0")
1356 "enable-touch-side-bezels",
1357 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1358 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1359 kOsCrOS,
1360 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1361 switches::kTouchSideBezels, "1",
1362 switches::kTouchSideBezels, "0")
1365 "enable-touch-drag-drop",
1366 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1367 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1368 kOsWin | kOsCrOS,
1369 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1370 switches::kDisableTouchDragDrop)
1373 "enable-touch-editing",
1374 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1375 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1376 kOsCrOS,
1377 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1378 switches::kDisableTouchEditing)
1381 "enable-rich-notifications",
1382 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1383 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1384 kOsWin | kOsMac,
1385 ENABLE_DISABLE_VALUE_TYPE(
1386 message_center::switches::kEnableRichNotifications,
1387 message_center::switches::kDisableRichNotifications)
1390 "enable-experimental-notification-ui",
1391 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_NAME,
1392 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_DESCRIPTION,
1393 kOsDesktop,
1394 SINGLE_VALUE_TYPE(
1395 message_center::switches::kEnableExperimentalNotificationUI)
1398 "enable-sync-synced-notifications",
1399 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1400 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1401 kOsDesktop,
1402 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1403 switches::kDisableSyncSyncedNotifications)
1405 #if defined(ENABLE_APP_LIST)
1407 "enable-sync-app-list",
1408 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1409 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
1410 kOsDesktop,
1411 SINGLE_VALUE_TYPE(switches::kEnableSyncAppList)
1413 #endif
1415 "disable-full-history-sync",
1416 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1417 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1418 kOsAll,
1419 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
1422 "enable-usermedia-screen-capture",
1423 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1424 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1425 kOsDesktop,
1426 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1429 "enable-apps-devtool-app",
1430 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1431 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1432 kOsDesktop,
1433 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1436 "impl-side-painting",
1437 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1438 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
1439 kOsAll,
1440 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1443 "deadline-scheduling",
1444 IDS_FLAGS_DEADLINE_SCHEDULING_NAME,
1445 IDS_FLAGS_DEADLINE_SCHEDULING_DESCRIPTION,
1446 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1447 MULTI_VALUE_TYPE(kDeadlineSchedulingChoices)
1450 "ui-deadline-scheduling",
1451 IDS_FLAGS_UI_DEADLINE_SCHEDULING_NAME,
1452 IDS_FLAGS_UI_DEADLINE_SCHEDULING_DESCRIPTION,
1453 #ifdef USE_AURA
1454 kOsWin | kOsLinux |
1455 #endif
1456 kOsCrOS,
1457 MULTI_VALUE_TYPE(kUIDeadlineSchedulingChoices)
1460 "lcd-text-aa",
1461 IDS_FLAGS_LCD_TEXT_NAME,
1462 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1463 kOsDesktop,
1464 MULTI_VALUE_TYPE(kLCDTextChoices)
1467 "delegated-renderer",
1468 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1469 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1470 #ifdef USE_AURA
1471 kOsWin | kOsLinux |
1472 #endif
1473 kOsAndroid | kOsCrOS,
1474 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1477 "enable-websocket-experimental-implementation",
1478 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1479 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1480 kOsAll,
1481 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1484 "max-tiles-for-interest-area",
1485 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1486 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1487 kOsAll,
1488 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1491 "enable-offline-mode",
1492 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1493 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1494 kOsAll,
1495 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1498 "enable-offline-auto-reload",
1499 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1500 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1501 kOsAll,
1502 SINGLE_VALUE_TYPE(switches::kEnableOfflineAutoReload)
1505 "default-tile-width",
1506 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1507 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1508 kOsAll,
1509 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1512 "default-tile-height",
1513 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1514 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1515 kOsAll,
1516 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1518 #if defined(OS_ANDROID)
1520 "disable-gesture-requirement-for-media-playback",
1521 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1522 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1523 kOsAndroid,
1524 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1526 #endif
1527 #if defined(ENABLE_GOOGLE_NOW)
1529 "enable-google-now",
1530 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1531 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1532 kOsWin | kOsCrOS | kOsMac,
1533 ENABLE_DISABLE_VALUE_TYPE(
1534 switches::kEnableGoogleNowIntegration,
1535 switches::kDisableGoogleNowIntegration)
1537 #endif
1538 #if defined(OS_CHROMEOS)
1540 "enable-virtual-keyboard",
1541 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1542 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1543 kOsCrOS,
1544 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1547 "enable-swipe-selection",
1548 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1549 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1550 kOsCrOS,
1551 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1553 #endif
1555 "enable-simple-cache-backend",
1556 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1557 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1558 kOsAll,
1559 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1562 "enable-tcp-fast-open",
1563 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1564 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
1565 kOsLinux | kOsCrOS | kOsAndroid,
1566 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1569 "apps-use-native-frame",
1570 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1571 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1572 kOsMac | kOsWin,
1573 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1576 "enable-syncfs-directory-operation",
1577 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1578 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1579 kOsAll,
1580 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1582 #if defined(ENABLE_MDNS)
1584 "disable-device-discovery",
1585 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1586 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1587 kOsWin | kOsLinux | kOsCrOS,
1588 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
1591 "device-discovery-notifications",
1592 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1593 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
1594 kOsWin | kOsLinux | kOsCrOS,
1595 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1596 switches::kDisableDeviceDiscoveryNotifications)
1599 "disable-privet-local-printing",
1600 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_NAME,
1601 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_DESCRIPTION,
1602 kOsWin | kOsLinux | kOsCrOS,
1603 SINGLE_VALUE_TYPE(switches::kDisablePrivetLocalPrinting)
1605 #endif // ENABLE_MDNS
1606 #if defined(OS_MACOSX)
1608 "disable-app-shims",
1609 IDS_FLAGS_DISABLE_APP_SHIMS_NAME,
1610 IDS_FLAGS_DISABLE_APP_SHIMS_DESCRIPTION,
1611 kOsMac,
1612 SINGLE_VALUE_TYPE(switches::kDisableAppShims)
1615 "enable-simplified-fullscreen",
1616 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1617 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1618 kOsMac,
1619 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1621 #endif
1622 #if defined(TOOLKIT_VIEWS)
1624 "omnibox-auto-completion-for-ime",
1625 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1626 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1627 kOsCrOS | kOsWin | kOsLinux,
1628 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1629 switches::kDisableOmniboxAutoCompletionForIme)
1631 #endif
1632 #if defined(USE_AURA)
1634 "tab-capture-upscale-quality",
1635 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1636 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1637 kOsAll,
1638 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1641 "tab-capture-downscale-quality",
1642 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1643 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1644 kOsAll,
1645 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1647 #endif
1649 "enable-spelling-feedback-field-trial",
1650 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1651 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
1652 kOsAll,
1653 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
1656 "enable-webgl-draft-extensions",
1657 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1658 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1659 kOsAll,
1660 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1663 "enable-html-imports",
1664 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1665 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1666 kOsAll,
1667 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1670 "high-dpi-support",
1671 IDS_FLAGS_HIDPI_NAME,
1672 IDS_FLAGS_HIDPI_DESCRIPTION,
1673 kOsWin,
1674 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
1675 switches::kHighDPISupport, "0")
1677 #if defined(OS_CHROMEOS)
1679 "enable-quickoffice-viewing",
1680 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_NAME,
1681 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_DESCRIPTION,
1682 kOsCrOS,
1683 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeViewing),
1686 "enable-sticky-keys",
1687 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1688 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1689 kOsCrOS,
1690 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableStickyKeys,
1691 switches::kDisableStickyKeys)
1693 #endif
1695 "enable-web-midi",
1696 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1697 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1698 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1699 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1702 "enable-new-profile-management",
1703 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1704 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1705 kOsMac | kOsWin | kOsLinux,
1706 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1709 "enable-web-based-signin",
1710 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1711 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
1712 kOsMac | kOsWin | kOsLinux,
1713 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
1716 "enable-google-profile-info",
1717 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1718 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
1719 kOsMac | kOsWin | kOsLinux,
1720 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
1723 "reset-app-list-install-state",
1724 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1725 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
1726 kOsMac | kOsWin | kOsLinux,
1727 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
1729 #if defined(ENABLE_APP_LIST)
1731 "enable-app-launcher-start-page",
1732 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_NAME,
1733 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_DESCRIPTION,
1734 kOsWin | kOsCrOS,
1735 SINGLE_VALUE_TYPE(switches::kShowAppListStartPage)
1737 #if defined(OS_LINUX)
1739 // This is compiled out on non-Linux platforms because otherwise it would be
1740 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1741 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1742 "enable-app-list",
1743 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1744 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1745 kOsLinux,
1746 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1748 #endif
1750 "enable-app-list-folder",
1751 IDS_FLAGS_ENABLE_APP_LIST_FOLDER,
1752 IDS_FLAGS_ENABLE_APP_LIST_FOLDER_DESCRIPTION,
1753 kOsWin | kOsCrOS,
1754 SINGLE_VALUE_TYPE(app_list::switches::kEnableFolderUI)
1757 "disable-app-list-voice-search",
1758 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH,
1759 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH_DESCRIPTION,
1760 kOsCrOS,
1761 SINGLE_VALUE_TYPE(app_list::switches::kDisableVoiceSearch)
1763 #endif
1764 #if defined(OS_CHROMEOS)
1766 "disable-user-image-sync",
1767 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1768 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1769 kOsCrOS,
1770 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1772 #endif
1773 #if defined(OS_ANDROID)
1775 "enable-accessibility-tab-switcher",
1776 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1777 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1778 kOsAndroid,
1779 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
1782 "disable-accessibility-script-injection",
1783 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1784 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
1785 kOsAndroid,
1786 // Java-only switch: ContentSwitches.DISABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1787 SINGLE_VALUE_TYPE("disable-accessibility-script-injection")
1789 #endif
1791 "map-image",
1792 IDS_FLAGS_MAP_IMAGE_NAME,
1793 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1794 kOsAll,
1795 MULTI_VALUE_TYPE(kMapImageChoices)
1798 "enable-add-to-homescreen",
1799 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_NAME,
1800 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_DESCRIPTION,
1801 kOsAndroid,
1802 #if defined(OS_ANDROID)
1803 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToHomescreen,
1804 switches::kDisableAddToHomescreen),
1805 #else
1806 SINGLE_VALUE_TYPE("")
1807 #endif
1809 #if defined(OS_CHROMEOS)
1811 "disable-first-run-ui",
1812 IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME,
1813 IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION,
1814 kOsCrOS,
1815 SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI)
1818 "enable-first-run-ui-transitions",
1819 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1820 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1821 kOsCrOS,
1822 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1824 #endif
1826 "disable-compositor-touch-hit-testing",
1827 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME,
1828 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION,
1829 kOsAll,
1830 SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting),
1833 "enable-accelerated-scrollable-frames",
1834 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_NAME,
1835 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_DESCRIPTION,
1836 kOsAll,
1837 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedScrollableFrames,
1838 switches::kDisableAcceleratedScrollableFrames)
1841 "enable-composited-scrolling-for-frames",
1842 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_NAME,
1843 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_DESCRIPTION,
1844 kOsAll,
1845 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableCompositedScrollingForFrames,
1846 switches::kDisableCompositedScrollingForFrames)
1849 "enable-streamlined-hosted-apps",
1850 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1851 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
1852 kOsWin | kOsCrOS | kOsLinux,
1853 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1856 "enable-ephemeral-apps",
1857 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1858 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
1859 kOsWin | kOsLinux | kOsCrOS,
1860 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1863 "enable-linkable-ephemeral-apps",
1864 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1865 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
1866 kOsWin | kOsLinux | kOsCrOS,
1867 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1870 "enable-service-worker",
1871 IDS_FLAGS_ENABLE_SERVICE_WORKER_NAME,
1872 IDS_FLAGS_ENABLE_SERVICE_WORKER_DESCRIPTION,
1873 kOsAll,
1874 SINGLE_VALUE_TYPE(switches::kEnableServiceWorker)
1876 #if defined(OS_ANDROID)
1878 "disable-click-delay",
1879 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1880 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1881 kOsAndroid,
1882 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1883 SINGLE_VALUE_TYPE("disable-click-delay")
1885 #endif
1886 #if defined(OS_CHROMEOS)
1888 "disable-ime-mode-indicator",
1889 IDS_FLAGS_DISABLE_IME_MODE_INDICATOR,
1890 IDS_FLAGS_DISABLE_IME_MODE_INDICATOR_DESCRIPTION,
1891 kOsCrOS,
1892 SINGLE_VALUE_TYPE(chromeos::switches::kDisableIMEModeIndicator)
1894 #endif
1896 "enable-translate-new-ux",
1897 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1898 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
1899 kOsDesktop,
1900 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1902 #if defined(TOOLKIT_VIEWS)
1904 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1905 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1906 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
1907 kOsCrOS | kOsWin,
1908 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
1910 #endif
1912 "enable-apps-show-on-first-paint",
1913 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1914 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1915 kOsDesktop,
1916 SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
1919 "enable-enhanced-bookmarks",
1920 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1921 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1922 kOsDesktop,
1923 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableEnhancedBookmarks, "1",
1924 switches::kEnableEnhancedBookmarks, "0")
1926 #if defined(OS_ANDROID)
1928 "enable-zero-suggest-experiment",
1929 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1930 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1931 kOsAndroid,
1932 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
1934 #endif
1936 "num-raster-threads",
1937 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1938 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1939 kOsAll,
1940 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
1943 "origin-chip",
1944 IDS_FLAGS_ORIGIN_CHIP_NAME,
1945 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
1946 kOsCrOS | kOsWin,
1947 MULTI_VALUE_TYPE(kOriginChipChoices)
1950 "search-button-in-omnibox",
1951 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1952 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
1953 kOsCrOS | kOsMac | kOsWin,
1954 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
1957 "enable-ignore-autocomplete-off",
1958 IDS_FLAGS_ENABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1959 IDS_FLAGS_ENABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
1960 kOsAll,
1961 SINGLE_VALUE_TYPE(autofill::switches::kEnableIgnoreAutocompleteOff)
1963 #if defined(USE_AURA) || defined(OS_WIN)
1965 "enable-save-password-bubble",
1966 IDS_FLAGS_ENABLE_PASSWORD_BUBBLE_NAME,
1967 IDS_FLAGS_ENABLE_PASSWORD_BUBBLE_DESCRIPTION,
1968 kOsWin | kOsCrOS,
1969 SINGLE_VALUE_TYPE(switches::kEnableSavePasswordBubble)
1971 #endif
1973 "embed-flash-fullscreen",
1974 IDS_FLAGS_EMBED_FLASH_FULLSCREEN_NAME,
1975 IDS_FLAGS_EMBED_FLASH_FULLSCREEN_DESCRIPTION,
1976 kOsDesktop,
1977 SINGLE_VALUE_TYPE(switches::kEmbedFlashFullscreen)
1979 #if defined(USE_ASH) && defined(OS_CHROMEOS)
1981 "enable-system-sounds",
1982 IDS_FLAGS_ENABLE_SYSTEM_SOUNDS_NAME,
1983 IDS_FLAGS_ENABLE_SYSTEM_SOUNDS_DESCRIPTION,
1984 kOsCrOS,
1985 SINGLE_VALUE_TYPE(ash::switches::kAshEnableSystemSounds)
1987 #endif
1990 const Experiment* experiments = kExperiments;
1991 size_t num_experiments = arraysize(kExperiments);
1993 // Stores and encapsulates the little state that about:flags has.
1994 class FlagsState {
1995 public:
1996 FlagsState() : needs_restart_(false) {}
1997 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1998 CommandLine* command_line,
1999 SentinelsMode sentinels);
2000 bool IsRestartNeededToCommitChanges();
2001 void SetExperimentEnabled(
2002 FlagsStorage* flags_storage,
2003 const std::string& internal_name,
2004 bool enable);
2005 void RemoveFlagsSwitches(
2006 std::map<std::string, CommandLine::StringType>* switch_list);
2007 void ResetAllFlags(FlagsStorage* flags_storage);
2008 void reset();
2010 // Returns the singleton instance of this class
2011 static FlagsState* GetInstance() {
2012 return Singleton<FlagsState>::get();
2015 private:
2016 bool needs_restart_;
2017 std::map<std::string, std::string> flags_switches_;
2019 DISALLOW_COPY_AND_ASSIGN(FlagsState);
2022 // Adds the internal names for the specified experiment to |names|.
2023 void AddInternalName(const Experiment& e, std::set<std::string>* names) {
2024 if (e.type == Experiment::SINGLE_VALUE) {
2025 names->insert(e.internal_name);
2026 } else {
2027 DCHECK(e.type == Experiment::MULTI_VALUE ||
2028 e.type == Experiment::ENABLE_DISABLE_VALUE);
2029 for (int i = 0; i < e.num_choices; ++i)
2030 names->insert(e.NameForChoice(i));
2034 // Confirms that an experiment is valid, used in a DCHECK in
2035 // SanitizeList below.
2036 bool ValidateExperiment(const Experiment& e) {
2037 switch (e.type) {
2038 case Experiment::SINGLE_VALUE:
2039 DCHECK_EQ(0, e.num_choices);
2040 DCHECK(!e.choices);
2041 break;
2042 case Experiment::MULTI_VALUE:
2043 DCHECK_GT(e.num_choices, 0);
2044 DCHECK(e.choices);
2045 DCHECK(e.choices[0].command_line_switch);
2046 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
2047 break;
2048 case Experiment::ENABLE_DISABLE_VALUE:
2049 DCHECK_EQ(3, e.num_choices);
2050 DCHECK(!e.choices);
2051 DCHECK(e.command_line_switch);
2052 DCHECK(e.command_line_value);
2053 DCHECK(e.disable_command_line_switch);
2054 DCHECK(e.disable_command_line_value);
2055 break;
2056 default:
2057 NOTREACHED();
2059 return true;
2062 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2063 // unknown, to prevent this list to become very long as experiments are added
2064 // and removed.
2065 void SanitizeList(FlagsStorage* flags_storage) {
2066 std::set<std::string> known_experiments;
2067 for (size_t i = 0; i < num_experiments; ++i) {
2068 DCHECK(ValidateExperiment(experiments[i]));
2069 AddInternalName(experiments[i], &known_experiments);
2072 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
2074 std::set<std::string> new_enabled_experiments;
2075 std::set_intersection(
2076 known_experiments.begin(), known_experiments.end(),
2077 enabled_experiments.begin(), enabled_experiments.end(),
2078 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2080 if (new_enabled_experiments != enabled_experiments)
2081 flags_storage->SetFlags(new_enabled_experiments);
2084 void GetSanitizedEnabledFlags(
2085 FlagsStorage* flags_storage, std::set<std::string>* result) {
2086 SanitizeList(flags_storage);
2087 *result = flags_storage->GetFlags();
2090 bool SkipConditionalExperiment(const Experiment& experiment) {
2091 if (experiment.internal_name == std::string("enable-enhanced-bookmarks")) {
2092 return !IsEnhancedBookmarksExperimentEnabled();
2094 return false;
2098 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2099 // enabled on the current platform.
2100 void GetSanitizedEnabledFlagsForCurrentPlatform(
2101 FlagsStorage* flags_storage, std::set<std::string>* result) {
2102 GetSanitizedEnabledFlags(flags_storage, result);
2104 // Filter out any experiments that aren't enabled on the current platform. We
2105 // don't remove these from prefs else syncing to a platform with a different
2106 // set of experiments would be lossy.
2107 std::set<std::string> platform_experiments;
2108 int current_platform = GetCurrentPlatform();
2109 for (size_t i = 0; i < num_experiments; ++i) {
2110 if (experiments[i].supported_platforms & current_platform)
2111 AddInternalName(experiments[i], &platform_experiments);
2112 #if defined(OS_CHROMEOS)
2113 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2114 AddInternalName(experiments[i], &platform_experiments);
2115 #endif
2118 std::set<std::string> new_enabled_experiments;
2119 std::set_intersection(
2120 platform_experiments.begin(), platform_experiments.end(),
2121 result->begin(), result->end(),
2122 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2124 result->swap(new_enabled_experiments);
2127 // Returns the Value representing the choice data in the specified experiment.
2128 base::Value* CreateChoiceData(
2129 const Experiment& experiment,
2130 const std::set<std::string>& enabled_experiments) {
2131 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2132 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
2133 base::ListValue* result = new base::ListValue;
2134 for (int i = 0; i < experiment.num_choices; ++i) {
2135 base::DictionaryValue* value = new base::DictionaryValue;
2136 const std::string name = experiment.NameForChoice(i);
2137 value->SetString("internal_name", name);
2138 value->SetString("description", experiment.DescriptionForChoice(i));
2139 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
2140 result->Append(value);
2142 return result;
2145 } // namespace
2147 std::string Experiment::NameForChoice(int index) const {
2148 DCHECK(type == Experiment::MULTI_VALUE ||
2149 type == Experiment::ENABLE_DISABLE_VALUE);
2150 DCHECK_LT(index, num_choices);
2151 return std::string(internal_name) + testing::kMultiSeparator +
2152 base::IntToString(index);
2155 base::string16 Experiment::DescriptionForChoice(int index) const {
2156 DCHECK(type == Experiment::MULTI_VALUE ||
2157 type == Experiment::ENABLE_DISABLE_VALUE);
2158 DCHECK_LT(index, num_choices);
2159 int description_id;
2160 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2161 const int kEnableDisableDescriptionIds[] = {
2162 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2163 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2164 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2166 description_id = kEnableDisableDescriptionIds[index];
2167 } else {
2168 description_id = choices[index].description_id;
2170 return l10n_util::GetStringUTF16(description_id);
2173 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2174 CommandLine* command_line,
2175 SentinelsMode sentinels) {
2176 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
2177 command_line,
2178 sentinels);
2181 bool AreSwitchesIdenticalToCurrentCommandLine(
2182 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
2183 std::set<CommandLine::StringType> new_flags =
2184 ExtractFlagsFromCommandLine(new_cmdline);
2185 std::set<CommandLine::StringType> active_flags =
2186 ExtractFlagsFromCommandLine(active_cmdline);
2188 // Needed because std::equal doesn't check if the 2nd set is empty.
2189 if (new_flags.size() != active_flags.size())
2190 return false;
2192 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2195 void GetFlagsExperimentsData(FlagsStorage* flags_storage,
2196 FlagAccess access,
2197 base::ListValue* supported_experiments,
2198 base::ListValue* unsupported_experiments) {
2199 std::set<std::string> enabled_experiments;
2200 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2202 int current_platform = GetCurrentPlatform();
2204 for (size_t i = 0; i < num_experiments; ++i) {
2205 const Experiment& experiment = experiments[i];
2206 if (SkipConditionalExperiment(experiment))
2207 continue;
2209 base::DictionaryValue* data = new base::DictionaryValue();
2210 data->SetString("internal_name", experiment.internal_name);
2211 data->SetString("name",
2212 l10n_util::GetStringUTF16(experiment.visible_name_id));
2213 data->SetString("description",
2214 l10n_util::GetStringUTF16(
2215 experiment.visible_description_id));
2217 base::ListValue* supported_platforms = new base::ListValue();
2218 AddOsStrings(experiment.supported_platforms, supported_platforms);
2219 data->Set("supported_platforms", supported_platforms);
2221 switch (experiment.type) {
2222 case Experiment::SINGLE_VALUE:
2223 data->SetBoolean(
2224 "enabled",
2225 enabled_experiments.count(experiment.internal_name) > 0);
2226 break;
2227 case Experiment::MULTI_VALUE:
2228 case Experiment::ENABLE_DISABLE_VALUE:
2229 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2230 break;
2231 default:
2232 NOTREACHED();
2235 bool supported = (experiment.supported_platforms & current_platform) != 0;
2236 #if defined(OS_CHROMEOS)
2237 if (access == kOwnerAccessToFlags &&
2238 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2239 supported = true;
2241 #endif
2242 if (supported)
2243 supported_experiments->Append(data);
2244 else
2245 unsupported_experiments->Append(data);
2249 bool IsRestartNeededToCommitChanges() {
2250 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2253 void SetExperimentEnabled(FlagsStorage* flags_storage,
2254 const std::string& internal_name,
2255 bool enable) {
2256 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2257 internal_name, enable);
2260 void RemoveFlagsSwitches(
2261 std::map<std::string, CommandLine::StringType>* switch_list) {
2262 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
2265 void ResetAllFlags(FlagsStorage* flags_storage) {
2266 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
2269 int GetCurrentPlatform() {
2270 #if defined(OS_MACOSX)
2271 return kOsMac;
2272 #elif defined(OS_WIN)
2273 return kOsWin;
2274 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2275 return kOsCrOS;
2276 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2277 return kOsLinux;
2278 #elif defined(OS_ANDROID)
2279 return kOsAndroid;
2280 #else
2281 #error Unknown platform
2282 #endif
2285 void RecordUMAStatistics(FlagsStorage* flags_storage) {
2286 std::set<std::string> flags = flags_storage->GetFlags();
2287 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2288 ++it) {
2289 std::string action("AboutFlags_");
2290 action += *it;
2291 content::RecordComputedAction(action);
2293 // Since flag metrics are recorded every startup, add a tick so that the
2294 // stats can be made meaningful.
2295 if (flags.size())
2296 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2297 content::RecordAction(UserMetricsAction("StartupTick"));
2300 //////////////////////////////////////////////////////////////////////////////
2301 // FlagsState implementation.
2303 namespace {
2305 typedef std::map<std::string, std::pair<std::string, std::string> >
2306 NameToSwitchAndValueMap;
2308 void SetFlagToSwitchMapping(const std::string& key,
2309 const std::string& switch_name,
2310 const std::string& switch_value,
2311 NameToSwitchAndValueMap* name_to_switch_map) {
2312 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2313 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2316 void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2317 CommandLine* command_line,
2318 SentinelsMode sentinels) {
2319 if (command_line->HasSwitch(switches::kNoExperiments))
2320 return;
2322 std::set<std::string> enabled_experiments;
2324 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2325 &enabled_experiments);
2327 NameToSwitchAndValueMap name_to_switch_map;
2328 for (size_t i = 0; i < num_experiments; ++i) {
2329 const Experiment& e = experiments[i];
2330 if (e.type == Experiment::SINGLE_VALUE) {
2331 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2332 e.command_line_value, &name_to_switch_map);
2333 } else if (e.type == Experiment::MULTI_VALUE) {
2334 for (int j = 0; j < e.num_choices; ++j) {
2335 SetFlagToSwitchMapping(e.NameForChoice(j),
2336 e.choices[j].command_line_switch,
2337 e.choices[j].command_line_value,
2338 &name_to_switch_map);
2340 } else {
2341 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2342 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2343 &name_to_switch_map);
2344 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2345 e.command_line_value, &name_to_switch_map);
2346 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2347 e.disable_command_line_value, &name_to_switch_map);
2351 if (sentinels == kAddSentinels) {
2352 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2353 flags_switches_.insert(
2354 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2355 std::string()));
2357 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2358 it != enabled_experiments.end();
2359 ++it) {
2360 const std::string& experiment_name = *it;
2361 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
2362 name_to_switch_map.find(experiment_name);
2363 if (name_to_switch_it == name_to_switch_map.end()) {
2364 NOTREACHED();
2365 continue;
2368 const std::pair<std::string, std::string>&
2369 switch_and_value_pair = name_to_switch_it->second;
2371 CHECK(!switch_and_value_pair.first.empty());
2372 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2373 switch_and_value_pair.second);
2374 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
2376 if (sentinels == kAddSentinels) {
2377 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2378 flags_switches_.insert(
2379 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2380 std::string()));
2384 bool FlagsState::IsRestartNeededToCommitChanges() {
2385 return needs_restart_;
2388 void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2389 const std::string& internal_name,
2390 bool enable) {
2391 size_t at_index = internal_name.find(testing::kMultiSeparator);
2392 if (at_index != std::string::npos) {
2393 DCHECK(enable);
2394 // We're being asked to enable a multi-choice experiment. Disable the
2395 // currently selected choice.
2396 DCHECK_NE(at_index, 0u);
2397 const std::string experiment_name = internal_name.substr(0, at_index);
2398 SetExperimentEnabled(flags_storage, experiment_name, false);
2400 // And enable the new choice, if it is not the default first choice.
2401 if (internal_name != experiment_name + "@0") {
2402 std::set<std::string> enabled_experiments;
2403 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2404 needs_restart_ |= enabled_experiments.insert(internal_name).second;
2405 flags_storage->SetFlags(enabled_experiments);
2407 return;
2410 std::set<std::string> enabled_experiments;
2411 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2413 const Experiment* e = NULL;
2414 for (size_t i = 0; i < num_experiments; ++i) {
2415 if (experiments[i].internal_name == internal_name) {
2416 e = experiments + i;
2417 break;
2420 DCHECK(e);
2422 if (e->type == Experiment::SINGLE_VALUE) {
2423 if (enable)
2424 needs_restart_ |= enabled_experiments.insert(internal_name).second;
2425 else
2426 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
2427 } else {
2428 if (enable) {
2429 // Enable the first choice.
2430 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
2431 } else {
2432 // Find the currently enabled choice and disable it.
2433 for (int i = 0; i < e->num_choices; ++i) {
2434 std::string choice_name = e->NameForChoice(i);
2435 if (enabled_experiments.find(choice_name) !=
2436 enabled_experiments.end()) {
2437 needs_restart_ = true;
2438 enabled_experiments.erase(choice_name);
2439 // Continue on just in case there's a bug and more than one
2440 // experiment for this choice was enabled.
2446 flags_storage->SetFlags(enabled_experiments);
2449 void FlagsState::RemoveFlagsSwitches(
2450 std::map<std::string, CommandLine::StringType>* switch_list) {
2451 for (std::map<std::string, std::string>::const_iterator
2452 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2453 switch_list->erase(it->first);
2457 void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
2458 needs_restart_ = true;
2460 std::set<std::string> no_experiments;
2461 flags_storage->SetFlags(no_experiments);
2464 void FlagsState::reset() {
2465 needs_restart_ = false;
2466 flags_switches_.clear();
2469 } // namespace
2471 namespace testing {
2473 // WARNING: '@' is also used in the html file. If you update this constant you
2474 // also need to update the html file.
2475 const char kMultiSeparator[] = "@";
2477 void ClearState() {
2478 FlagsState::GetInstance()->reset();
2481 void SetExperiments(const Experiment* e, size_t count) {
2482 if (!e) {
2483 experiments = kExperiments;
2484 num_experiments = arraysize(kExperiments);
2485 } else {
2486 experiments = e;
2487 num_experiments = count;
2491 const Experiment* GetExperiments(size_t* count) {
2492 *count = num_experiments;
2493 return experiments;
2496 } // namespace testing
2498 } // namespace about_flags