NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / about_flags.cc
blob8d8cbcf066533808de8422410f6a810a1818524a
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/views/views_switches.h"
42 #if defined(USE_ASH)
43 #include "ash/ash_switches.h"
44 #endif
46 #if defined(OS_CHROMEOS)
47 #include "chromeos/chromeos_switches.h"
48 #include "third_party/cros_system_api/switches/chrome_switches.h"
49 #endif
51 #if defined(ENABLE_APP_LIST)
52 #include "ui/app_list/app_list_switches.h"
53 #endif
55 using base::UserMetricsAction;
57 namespace about_flags {
59 // Macros to simplify specifying the type.
60 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
61 Experiment::SINGLE_VALUE, \
62 command_line_switch, switch_value, NULL, NULL, NULL, 0
63 #define SINGLE_VALUE_TYPE(command_line_switch) \
64 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
65 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
66 disable_switch, disable_value) \
67 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
68 disable_switch, disable_value, NULL, 3
69 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
70 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
71 #define MULTI_VALUE_TYPE(choices) \
72 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
74 namespace {
76 const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
77 const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
79 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
80 // whether the experiment is available on that platform.
81 void AddOsStrings(unsigned bitmask, base::ListValue* list) {
82 struct {
83 unsigned bit;
84 const char* const name;
85 } kBitsToOs[] = {
86 {kOsMac, "Mac"},
87 {kOsWin, "Windows"},
88 {kOsLinux, "Linux"},
89 {kOsCrOS, "Chrome OS"},
90 {kOsAndroid, "Android"},
91 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
93 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
94 if (bitmask & kBitsToOs[i].bit)
95 list->Append(new base::StringValue(kBitsToOs[i].name));
98 // Convert switch constants to proper CommandLine::StringType strings.
99 CommandLine::StringType GetSwitchString(const std::string& flag) {
100 CommandLine cmd_line(CommandLine::NO_PROGRAM);
101 cmd_line.AppendSwitch(flag);
102 DCHECK(cmd_line.argv().size() == 2);
103 return cmd_line.argv()[1];
106 // Scoops flags from a command line.
107 std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
108 const CommandLine& cmdline) {
109 std::set<CommandLine::StringType> flags;
110 // First do the ones between --flag-switches-begin and --flag-switches-end.
111 CommandLine::StringVector::const_iterator first =
112 std::find(cmdline.argv().begin(), cmdline.argv().end(),
113 GetSwitchString(switches::kFlagSwitchesBegin));
114 CommandLine::StringVector::const_iterator last =
115 std::find(cmdline.argv().begin(), cmdline.argv().end(),
116 GetSwitchString(switches::kFlagSwitchesEnd));
117 if (first != cmdline.argv().end() && last != cmdline.argv().end())
118 flags.insert(first + 1, last);
119 #if defined(OS_CHROMEOS)
120 // Then add those between --policy-switches-begin and --policy-switches-end.
121 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
122 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
123 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
124 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
125 if (first != cmdline.argv().end() && last != cmdline.argv().end())
126 flags.insert(first + 1, last);
127 #endif
128 return flags;
131 const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
132 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
133 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
134 switches::kEnableCompositingForFixedPosition, ""},
135 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
136 switches::kDisableCompositingForFixedPosition, ""},
137 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
138 switches::kEnableHighDpiCompositingForFixedPosition, ""}
141 const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
143 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
144 switches::kEnableCompositingForTransition, ""},
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
146 switches::kDisableCompositingForTransition, ""},
149 const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
150 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
151 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
152 switches::kEnableAcceleratedFixedRootBackground, ""},
153 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
154 switches::kDisableAcceleratedFixedRootBackground, ""},
157 const Experiment::Choice kTouchEventsChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
159 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
160 switches::kTouchEvents,
161 switches::kTouchEventsEnabled },
162 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
163 switches::kTouchEvents,
164 switches::kTouchEventsDisabled }
167 const Experiment::Choice kTouchOptimizedUIChoices[] = {
168 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
169 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
170 switches::kTouchOptimizedUI,
171 switches::kTouchOptimizedUIEnabled },
172 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
173 switches::kTouchOptimizedUI,
174 switches::kTouchOptimizedUIDisabled }
177 const Experiment::Choice kNaClDebugMaskChoices[] = {
178 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
179 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
180 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
181 // an option to switch off its debugging.
182 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
183 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
184 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
185 switches::kNaClDebugMask, "*://*/*debug.nmf" }
188 const Experiment::Choice kImplSidePaintingChoices[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
190 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
191 cc::switches::kEnableImplSidePainting, ""},
192 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
193 cc::switches::kDisableImplSidePainting, ""}
196 const Experiment::Choice kDeadlineSchedulingChoices[] = {
197 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
198 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
199 switches::kEnableDeadlineScheduling, ""},
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
201 switches::kDisableDeadlineScheduling, ""}
204 const Experiment::Choice kUIDeadlineSchedulingChoices[] = {
205 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
206 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
207 switches::kUIEnableDeadlineScheduling, ""},
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
209 switches::kUIDisableDeadlineScheduling, ""}
212 const Experiment::Choice kLCDTextChoices[] = {
213 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
214 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""},
215 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""}
218 const Experiment::Choice kDelegatedRendererChoices[] = {
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
220 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
221 switches::kEnableDelegatedRenderer, ""},
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
223 switches::kDisableDelegatedRenderer, ""}
226 const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
228 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
229 cc::switches::kMaxTilesForInterestArea, "64"},
230 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
231 cc::switches::kMaxTilesForInterestArea, "128"},
232 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
233 cc::switches::kMaxTilesForInterestArea, "256"},
234 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
235 cc::switches::kMaxTilesForInterestArea, "512"}
238 const Experiment::Choice kDefaultTileWidthChoices[] = {
239 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
240 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
241 switches::kDefaultTileWidth, "128"},
242 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
243 switches::kDefaultTileWidth, "256"},
244 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
245 switches::kDefaultTileWidth, "512"},
246 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
247 switches::kDefaultTileWidth, "1024"}
250 #if defined(USE_ASH)
251 const Experiment::Choice kAshOverviewDelayChoices[] = {
252 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
253 { IDS_FLAGS_OVERVIEW_DELAY_INSTANT,
254 ash::switches::kAshOverviewDelayOnAltTab, "0" },
255 { IDS_FLAGS_OVERVIEW_DELAY_SHORT,
256 ash::switches::kAshOverviewDelayOnAltTab, "100" },
257 { IDS_FLAGS_OVERVIEW_DELAY_LONG,
258 ash::switches::kAshOverviewDelayOnAltTab, "500" },
259 { IDS_FLAGS_OVERVIEW_DELAY_NEVER,
260 ash::switches::kAshOverviewDelayOnAltTab, "10000" },
262 #endif
264 const Experiment::Choice kDefaultTileHeightChoices[] = {
265 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
266 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
267 switches::kDefaultTileHeight, "128"},
268 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
269 switches::kDefaultTileHeight, "256"},
270 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
271 switches::kDefaultTileHeight, "512"},
272 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
273 switches::kDefaultTileHeight, "1024"}
276 const Experiment::Choice kSimpleCacheBackendChoices[] = {
277 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
278 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
279 switches::kUseSimpleCacheBackend, "off" },
280 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
281 switches::kUseSimpleCacheBackend, "on"}
284 #if defined(USE_AURA)
285 const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
286 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
287 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
288 switches::kTabCaptureUpscaleQuality, "fast" },
289 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
290 switches::kTabCaptureUpscaleQuality, "good" },
291 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
292 switches::kTabCaptureUpscaleQuality, "best" },
295 const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
296 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
297 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
298 switches::kTabCaptureDownscaleQuality, "fast" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
300 switches::kTabCaptureDownscaleQuality, "good" },
301 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
302 switches::kTabCaptureDownscaleQuality, "best" },
304 #endif
306 #if defined(USE_AURA) || defined(OS_LINUX)
307 const Experiment::Choice kOverlayScrollbarChoices[] = {
308 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
309 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
310 switches::kEnableOverlayScrollbar, ""},
311 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
312 switches::kDisableOverlayScrollbar, ""}
314 #endif
316 const Experiment::Choice kMapImageChoices[] = {
317 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
318 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
319 cc::switches::kEnableMapImage, ""},
320 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
321 cc::switches::kDisableMapImage, ""}
324 #if defined(OS_ANDROID)
325 const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
326 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
327 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
328 switches::kEnableZeroSuggestMostVisited, ""},
329 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
330 switches::kEnableZeroSuggestEtherSerp, ""},
331 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
332 switches::kEnableZeroSuggestEtherNoSerp, ""},
333 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
334 switches::kDisableZeroSuggest, ""}
336 #endif
338 const Experiment::Choice kNumRasterThreadsChoices[] = {
339 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
340 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
341 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
342 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
343 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
346 // We're using independent flags here (as opposed to a common flag with
347 // different values) to be able to enable/disable the entire experience
348 // associated with this feature server-side from the FieldTrial (the complete
349 // experience includes other flag changes as well). It is not currently possible
350 // to do that with "flag=value" flags.
351 const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
352 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
353 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
354 switches::kDisableSearchButtonInOmnibox, ""},
355 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
356 switches::kEnableSearchButtonInOmniboxForStr, ""},
357 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
358 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
359 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
360 switches::kEnableSearchButtonInOmniboxAlways, ""}
363 // See comment above for kSearchButtonInOmniboxChoices. The same reasoning
364 // applies here.
365 const Experiment::Choice kOriginChipChoices[] = {
366 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
367 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
368 { IDS_FLAGS_ORIGIN_CHIP_TRAILING_LOCATION_BAR,
369 switches::kEnableOriginChipTrailingLocationBar, ""},
370 { IDS_FLAGS_ORIGIN_CHIP_LEADING_LOCATION_BAR,
371 switches::kEnableOriginChipLeadingLocationBar, ""},
372 { IDS_FLAGS_ORIGIN_CHIP_LEADING_MENU_BUTTON,
373 switches::kEnableOriginChipLeadingMenuButton, ""}
375 const Experiment::Choice kOriginChipV2Choices[] = {
376 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
377 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChipV2, ""},
378 { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE,
379 switches::kEnableOriginChipV2HideOnMouseRelease, ""},
380 { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_USER_INPUT,
381 switches::kEnableOriginChipV2HideOnUserInput, ""}
384 const Experiment::Choice kNotificationCenterTrayBehaviorChoices[] = {
385 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
386 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NEVER,
387 message_center::switches::kNotificationCenterTrayBehavior, "never" },
388 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_ALWAYS,
389 message_center::switches::kNotificationCenterTrayBehavior, "always" },
390 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_UNREAD,
391 message_center::switches::kNotificationCenterTrayBehavior, "unread" }
394 // RECORDING USER METRICS FOR FLAGS:
395 // -----------------------------------------------------------------------------
396 // The first line of the experiment is the internal name. If you'd like to
397 // gather statistics about the usage of your flag, you should append a marker
398 // comment to the end of the feature name, like so:
399 // "my-special-feature", // FLAGS:RECORD_UMA
401 // After doing that, run //tools/metrics/actions/extract_actions.py (see
402 // instructions at the top of that file for details) to update the
403 // chromeactions.txt file, which will enable UMA to record your feature flag.
405 // After your feature has shipped under a flag, you can locate the metrics under
406 // the action name AboutFlags_internal-action-name. Actions are recorded once
407 // per startup, so you should divide this number by AboutFlags_StartupTick to
408 // get a sense of usage. Note that this will not be the same as number of users
409 // with a given feature enabled because users can quit and relaunch the
410 // application multiple times over a given time interval. The dashboard also
411 // shows you how many (metrics reporting) users have enabled the flag over the
412 // last seven days. However, note that this is not the same as the number of
413 // users who have the flag enabled, since enabling the flag happens once,
414 // whereas running with the flag enabled happens until the user flips the flag
415 // again.
417 // To add a new experiment add to the end of kExperiments. There are two
418 // distinct types of experiments:
419 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
420 // macro for this type supplying the command line to the macro.
421 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
422 // deactivated state for this lab (i.e. no command line option). To specify
423 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
424 // array of choices.
425 // See the documentation of Experiment for details on the fields.
427 // When adding a new choice, add it to the end of the list.
428 const Experiment kExperiments[] = {
430 "conflicting-modules-check", // FLAGS:RECORD_UMA
431 IDS_FLAGS_CONFLICTS_CHECK_NAME,
432 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
433 kOsWin,
434 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
437 "ignore-gpu-blacklist",
438 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
439 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
440 kOsAll,
441 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
444 "force-compositing-mode-2",
445 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
446 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
447 kOsLinux,
448 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
449 switches::kDisableForceCompositingMode)
452 "threaded-compositing-mode",
453 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
454 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
455 kOsLinux,
456 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
457 switches::kDisableThreadedCompositing)
460 "force-accelerated-composited-scrolling",
461 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
462 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
463 kOsAll,
464 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
465 switches::kDisableAcceleratedOverflowScroll)
468 "force-universal-accelerated-composited-scrolling",
469 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
470 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
471 kOsAll,
472 ENABLE_DISABLE_VALUE_TYPE(
473 switches::kEnableUniversalAcceleratedOverflowScroll,
474 switches::kDisableUniversalAcceleratedOverflowScroll)
476 #if defined(OS_WIN)
478 "enable-direct-write",
479 IDS_FLAGS_ENABLE_DIRECT_WRITE_NAME,
480 IDS_FLAGS_ENABLE_DIRECT_WRITE_DESCRIPTION,
481 kOsWin,
482 SINGLE_VALUE_TYPE(switches::kEnableDirectWrite)
484 #endif
486 "enable-experimental-canvas-features",
487 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
488 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
489 kOsAll,
490 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
493 "disable-accelerated-2d-canvas",
494 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
495 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
496 kOsAll,
497 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
500 "composited-layer-borders",
501 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
502 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
503 kOsAll,
504 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
507 "show-fps-counter",
508 IDS_FLAGS_SHOW_FPS_COUNTER,
509 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
510 kOsAll,
511 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
514 "accelerated-filters",
515 IDS_FLAGS_ACCELERATED_FILTERS,
516 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
517 kOsAll,
518 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
521 "disable-webgl",
522 IDS_FLAGS_DISABLE_WEBGL_NAME,
523 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
524 kOsAll,
525 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
528 "enable-d3d11",
529 IDS_FLAGS_ENABLE_D3D11_NAME,
530 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
531 kOsWin,
532 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
535 "disable-webrtc",
536 IDS_FLAGS_DISABLE_WEBRTC_NAME,
537 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
538 kOsAndroid,
539 #if defined(OS_ANDROID)
540 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
541 #else
542 SINGLE_VALUE_TYPE("")
543 #endif
545 #if defined(ENABLE_WEBRTC)
547 "disable-device-enumeration",
548 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
549 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
550 kOsAll,
551 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
554 "disable-sctp-data-channels",
555 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_NAME,
556 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
557 kOsAll,
558 SINGLE_VALUE_TYPE(switches::kDisableSCTPDataChannels)
561 "disable-webrtc-hw-decoding",
562 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
563 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
564 kOsAndroid | kOsCrOS,
565 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
568 "disable-webrtc-hw-encoding",
569 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
570 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
571 kOsAndroid | kOsCrOS,
572 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
574 #endif
575 #if defined(OS_ANDROID)
576 #if defined(ARCH_CPU_X86)
578 "enable-webaudio",
579 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
580 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
581 kOsAndroid,
582 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
584 #else
586 "disable-webaudio",
587 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
588 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
589 kOsAndroid,
590 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
592 #endif
593 #endif
595 "fixed-position-creates-stacking-context",
596 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
597 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
598 kOsAll,
599 ENABLE_DISABLE_VALUE_TYPE(
600 switches::kEnableFixedPositionCreatesStackingContext,
601 switches::kDisableFixedPositionCreatesStackingContext)
604 "enable-compositing-for-fixed-position",
605 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
606 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
607 kOsAll,
608 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
611 "enable-compositing-for-transition",
612 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
613 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
614 kOsAll,
615 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
618 "enable-accelerated-fixed-root-background",
619 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
620 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
621 kOsAll,
622 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
624 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
626 "enable-nacl", // FLAGS:RECORD_UMA
627 IDS_FLAGS_ENABLE_NACL_NAME,
628 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
629 kOsDesktop,
630 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
633 "enable-nacl-debug", // FLAGS:RECORD_UMA
634 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
635 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
636 kOsDesktop,
637 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
640 "disable-pnacl", // FLAGS:RECORD_UMA
641 IDS_FLAGS_DISABLE_PNACL_NAME,
642 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
643 kOsDesktop,
644 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
647 "nacl-debug-mask", // FLAGS:RECORD_UMA
648 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
649 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
650 kOsDesktop,
651 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
654 "extension-apis", // FLAGS:RECORD_UMA
655 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
656 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
657 kOsDesktop,
658 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
661 "extensions-on-chrome-urls",
662 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
663 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
664 kOsAll,
665 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
668 "enable-fast-unload",
669 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
670 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
671 kOsAll,
672 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
675 "enable-adview",
676 IDS_FLAGS_ENABLE_ADVIEW_NAME,
677 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
678 kOsDesktop,
679 SINGLE_VALUE_TYPE(switches::kEnableAdview)
682 "enable-app-window-controls",
683 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
684 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
685 kOsDesktop,
686 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
689 "apps-new-install-bubble",
690 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
691 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
692 kOsDesktop,
693 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
696 "disable-hyperlink-auditing",
697 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
698 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
699 kOsAll,
700 SINGLE_VALUE_TYPE(switches::kNoPings)
703 "tab-groups-context-menu",
704 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
705 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
706 kOsWin,
707 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
709 #if defined(OS_ANDROID)
711 "enable-new-ntp",
712 IDS_FLAGS_ENABLE_NEW_NTP,
713 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
714 kOsAndroid,
715 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
716 switches::kDisableNewNTP)
719 "contextual-search",
720 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
721 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
722 kOsAndroid,
723 SINGLE_VALUE_TYPE(switches::kEnableContextualSearch)
725 #endif
727 "show-autofill-type-predictions",
728 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
729 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
730 kOsAll,
731 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
734 "enable-gesture-tap-highlight",
735 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
736 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
737 kOsLinux | kOsCrOS,
738 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
739 switches::kDisableGestureTapHighlight)
742 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
743 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
744 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
745 // Can't expose the switch unless the code is compiled in.
746 // On by default for the Mac (different implementation in WebKit).
747 kOsLinux,
748 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
750 #if defined(USE_AURA) || defined(OS_LINUX)
752 "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 kOsLinux | kOsCrOS | kOsWin,
758 MULTI_VALUE_TYPE(kOverlayScrollbarChoices)
760 #endif
762 "enable-panels",
763 IDS_FLAGS_ENABLE_PANELS_NAME,
764 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
765 kOsDesktop,
766 SINGLE_VALUE_TYPE(switches::kEnablePanels)
769 // See http://crbug.com/120416 for how to remove this flag.
770 "save-page-as-mhtml", // FLAGS:RECORD_UMA
771 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
772 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
773 kOsMac | kOsWin | kOsLinux,
774 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
777 "enable-autologin",
778 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
779 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
780 kOsMac | kOsWin | kOsLinux,
781 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
784 "enable-quic",
785 IDS_FLAGS_ENABLE_QUIC_NAME,
786 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
787 kOsAll,
788 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
789 switches::kDisableQuic)
792 "enable-quic-https",
793 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
794 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
795 kOsAll,
796 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
797 switches::kDisableQuicHttps)
800 "enable-spdy4a2",
801 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
802 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
803 kOsAll,
804 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
807 "enable-http2-draft-04",
808 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
809 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
810 kOsAll,
811 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
814 "enable-async-dns",
815 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
816 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
817 kOsWin | kOsMac | kOsLinux | kOsCrOS,
818 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
819 switches::kDisableAsyncDns)
822 "disable-webkit-media-source",
823 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
824 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
825 kOsAll,
826 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
829 "disable-unprefixed-media-source",
830 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_NAME,
831 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_DESCRIPTION,
832 kOsAll,
833 SINGLE_VALUE_TYPE(switches::kDisableUnprefixedMediaSource)
836 "enable-encrypted-media",
837 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
838 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
839 kOsAll,
840 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
843 "disable-prefixed-encrypted-media",
844 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
845 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
846 kOsAll,
847 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
849 #if defined(OS_ANDROID)
851 "disable-infobar-for-protected-media-identifier",
852 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
853 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
854 kOsAndroid,
855 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
858 "mediadrm-enable-non-compositing",
859 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
860 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
861 kOsAndroid,
862 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
864 #endif // defined(OS_ANDROID)
866 "disable-opus-playback",
867 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_NAME,
868 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_DESCRIPTION,
869 kOsDesktop,
870 SINGLE_VALUE_TYPE(switches::kDisableOpusPlayback)
873 "disable-vp8-alpha-playback",
874 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_NAME,
875 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
876 kOsDesktop,
877 SINGLE_VALUE_TYPE(switches::kDisableVp8AlphaPlayback)
880 "per-tile-painting",
881 IDS_FLAGS_PER_TILE_PAINTING_NAME,
882 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
883 kOsMac | kOsLinux | kOsCrOS,
884 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
887 "enable-javascript-harmony",
888 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
889 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
890 kOsAll,
891 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
894 "disable-restore-session-state",
895 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
896 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
897 kOsAll,
898 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
901 "disable-software-rasterizer",
902 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
903 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
904 #if defined(ENABLE_SWIFTSHADER)
905 kOsAll,
906 #else
908 #endif
909 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
912 "enable-gpu-rasterization",
913 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
914 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
915 kOsAll,
916 SINGLE_VALUE_TYPE(cc::switches::kEnableGPURasterization)
919 "enable-experimental-web-platform-features",
920 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
921 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
922 kOsAll,
923 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
926 "disable-ntp-other-sessions-menu",
927 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
928 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
929 kOsDesktop,
930 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
932 #if defined(USE_ASH)
934 "enable-ash-oak",
935 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
936 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
937 kOsAll,
938 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
940 #endif
942 "enable-devtools-experiments",
943 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
944 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
945 kOsDesktop,
946 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
949 "silent-debugger-extension-api",
950 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
951 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
952 kOsDesktop,
953 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
956 "enable-suggestions-ntp",
957 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
958 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
959 kOsDesktop,
960 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
963 "spellcheck-autocorrect",
964 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
965 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
966 kOsWin | kOsLinux | kOsCrOS,
967 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
970 "enable-scroll-prediction",
971 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
972 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
973 kOsDesktop,
974 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
977 "touch-events",
978 IDS_TOUCH_EVENTS_NAME,
979 IDS_TOUCH_EVENTS_DESCRIPTION,
980 kOsDesktop,
981 MULTI_VALUE_TYPE(kTouchEventsChoices)
984 "touch-optimized-ui",
985 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
986 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
987 kOsWin,
988 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
991 "disable-touch-adjustment",
992 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
993 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
994 kOsWin | kOsLinux | kOsCrOS,
995 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
997 #if defined(OS_CHROMEOS)
999 "ash-use-alternate-shelf",
1000 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
1001 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
1002 kOsCrOS,
1003 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
1004 ash::switches::kAshDisableAlternateShelfLayout)
1007 "ash-disable-drag-off-shelf",
1008 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
1009 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
1010 kOsCrOS,
1011 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
1014 "enable-background-loader",
1015 IDS_ENABLE_BACKLOADER_NAME,
1016 IDS_ENABLE_BACKLOADER_DESCRIPTION,
1017 kOsCrOS,
1018 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
1021 "ash-disable-docked-windows",
1022 IDS_FLAGS_DOCKED_WINDOWS_NAME,
1023 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
1024 kOsCrOS,
1025 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDockedWindows)
1028 "ash-enable-immersive-fullscreen-all-windows2",
1029 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_NAME,
1030 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_DESCRIPTION,
1031 kOsCrOS,
1032 ENABLE_DISABLE_VALUE_TYPE(
1033 ash::switches::kAshEnableImmersiveFullscreenForAllWindows,
1034 ash::switches::kAshEnableImmersiveFullscreenForBrowserOnly)
1036 #endif
1038 "enable-download-resumption",
1039 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
1040 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
1041 kOsDesktop,
1042 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1045 "allow-nacl-socket-api",
1046 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1047 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
1048 kOsDesktop,
1049 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1052 "stacked-tab-strip",
1053 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1054 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1055 kOsWin,
1056 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1059 "force-device-scale-factor",
1060 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1061 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1062 kOsCrOS,
1063 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
1065 #if defined(OS_CHROMEOS)
1067 "allow-touchpad-three-finger-click",
1068 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1069 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1070 kOsCrOS,
1071 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
1073 #endif
1074 #if defined(USE_ASH)
1076 "show-launcher-alignment-menu",
1077 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
1078 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
1079 kOsAll,
1080 ENABLE_DISABLE_VALUE_TYPE(
1081 ash::switches::kShowShelfAlignmentMenu,
1082 ash::switches::kHideShelfAlignmentMenu)
1085 "disable-minimize-on-second-launcher-item-click",
1086 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1087 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1088 kOsAll,
1089 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1092 "multiple-snap-window-widths",
1093 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_NAME,
1094 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_DESCRIPTION,
1095 kOsAll,
1096 SINGLE_VALUE_TYPE(ash::switches::kAshMultipleSnapWindowWidths)
1099 "disable-overview-mode",
1100 IDS_FLAGS_DISABLE_OVERVIEW_MODE_NAME,
1101 IDS_FLAGS_DISABLE_OVERVIEW_MODE_DESCRIPTION,
1102 kOsCrOS,
1103 SINGLE_VALUE_TYPE(ash::switches::kAshDisableOverviewMode)
1106 "overview-delay-on-alt-tab",
1107 IDS_FLAGS_OVERVIEW_DELAY_NAME,
1108 IDS_FLAGS_OVERVIEW_DELAY_DESCRIPTION,
1109 kOsCrOS,
1110 MULTI_VALUE_TYPE(kAshOverviewDelayChoices)
1113 "show-touch-hud",
1114 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1115 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1116 kOsAll,
1117 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1120 "enable-pinch",
1121 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1122 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
1123 kOsLinux | kOsWin | kOsCrOS,
1124 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1127 "enable-pinch-virtual-viewport",
1128 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1129 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1130 kOsLinux | kOsWin | kOsCrOS,
1131 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1133 #endif // defined(USE_ASH)
1135 "enable-viewport-meta",
1136 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
1137 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
1138 kOsLinux | kOsWin | kOsCrOS | kOsMac,
1139 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
1141 #if defined(OS_CHROMEOS)
1143 "disable-boot-animation",
1144 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1145 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
1146 kOsCrOSOwnerOnly,
1147 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
1150 "file-manager-show-checkboxes",
1151 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1152 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
1153 kOsCrOS,
1154 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
1157 "enable-new-audio-player",
1158 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_NAME,
1159 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_DESCRIPTION,
1160 kOsCrOS,
1161 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableNewAudioPlayer)
1164 "disable-quickoffice-component-app",
1165 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1166 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1167 kOsCrOS,
1168 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1171 "disable-saml-signin",
1172 IDS_FLAGS_DISABLE_SAML_SIGNIN_NAME,
1173 IDS_FLAGS_DISABLE_SAML_SIGNIN_DESCRIPTION,
1174 kOsCrOS,
1175 SINGLE_VALUE_TYPE(chromeos::switches::kDisableSamlSignin),
1178 "enable-multi-profiles",
1179 IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME,
1180 IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION,
1181 kOsCrOS,
1182 SINGLE_VALUE_TYPE(switches::kMultiProfiles),
1184 #endif // defined(OS_CHROMEOS)
1185 { "disable-accelerated-video-decode",
1186 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1187 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
1188 kOsWin | kOsCrOS,
1189 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
1192 "enable-contacts",
1193 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1194 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1195 kOsCrOS,
1196 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1198 #if defined(USE_ASH)
1200 "ash-debug-shortcuts",
1201 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1202 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1203 kOsAll,
1204 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1206 { "ash-enable-advanced-gestures",
1207 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1208 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1209 kOsCrOS,
1210 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1212 { "ash-alternate-caption-button",
1213 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_NAME,
1214 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_DESCRIPTION,
1215 kOsCrOS,
1216 ENABLE_DISABLE_VALUE_TYPE(
1217 ash::switches::kAshEnableAlternateFrameCaptionButtonStyle,
1218 ash::switches::kAshDisableAlternateFrameCaptionButtonStyle),
1221 "ash-disable-auto-maximizing",
1222 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
1223 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
1224 kOsWin | kOsLinux | kOsCrOS,
1225 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
1227 { "ash-disable-drag-and-drop-applist-to-launcher",
1228 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1229 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1230 kOsCrOS,
1231 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
1233 #if defined(OS_LINUX)
1234 { "ash-enable-memory-monitor",
1235 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1236 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1237 kOsCrOS,
1238 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1240 #endif
1241 #if defined(OS_CHROMEOS)
1242 { "ash-enable-multi-user-tray",
1243 IDS_FLAGS_ENABLE_MULTI_USER_TRAY,
1244 IDS_FLAGS_ENABLE_MULTI_USER_TRAY_DESCRIPTION,
1245 kOsCrOS,
1246 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMultiUserTray),
1248 #endif
1249 #endif
1250 #if defined(OS_CHROMEOS)
1252 "ash-audio-device-menu",
1253 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1254 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1255 kOsCrOS,
1256 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1257 ash::switches::kAshDisableAudioDeviceMenu)
1260 "enable-carrier-switching",
1261 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1262 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1263 kOsCrOS,
1264 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
1267 "enable-request-tablet-site",
1268 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1269 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1270 kOsCrOS,
1271 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
1273 #endif
1275 "debug-packed-apps",
1276 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1277 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
1278 kOsDesktop,
1279 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1282 "enable-password-generation",
1283 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1284 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
1285 kOsDesktop,
1286 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1287 autofill::switches::kDisablePasswordGeneration)
1290 "password-manager-reauthentication",
1291 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1292 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
1293 kOsMac | kOsWin,
1294 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
1297 "password-autofill-public-suffix-domain-matching",
1298 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1299 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1300 kOsAll,
1301 ENABLE_DISABLE_VALUE_TYPE(
1302 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1303 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
1306 "enable-deferred-image-decoding",
1307 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1308 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
1309 kOsMac | kOsLinux | kOsCrOS,
1310 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1313 "performance-monitor-gathering",
1314 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1315 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1316 kOsAll,
1317 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1320 "wallet-service-use-sandbox",
1321 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1322 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
1323 kOsCrOS | kOsWin | kOsMac,
1324 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1325 autofill::switches::kWalletServiceUseSandbox, "1",
1326 autofill::switches::kWalletServiceUseSandbox, "0")
1329 "enable-interactive-autocomplete",
1330 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1331 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
1332 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
1333 ENABLE_DISABLE_VALUE_TYPE(
1334 autofill::switches::kEnableInteractiveAutocomplete,
1335 autofill::switches::kDisableInteractiveAutocomplete)
1337 #if defined(USE_AURA)
1339 "overscroll-history-navigation",
1340 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1341 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1342 kOsAll,
1343 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1344 switches::kOverscrollHistoryNavigation, "1",
1345 switches::kOverscrollHistoryNavigation, "0")
1347 #endif
1349 "scroll-end-effect",
1350 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1351 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1352 kOsCrOS,
1353 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1354 switches::kScrollEndEffect, "1",
1355 switches::kScrollEndEffect, "0")
1358 "enable-touch-side-bezels",
1359 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1360 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1361 kOsCrOS,
1362 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1363 switches::kTouchSideBezels, "1",
1364 switches::kTouchSideBezels, "0")
1367 "enable-touch-drag-drop",
1368 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1369 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1370 kOsWin | kOsCrOS,
1371 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1372 switches::kDisableTouchDragDrop)
1375 "enable-touch-editing",
1376 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1377 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1378 kOsCrOS,
1379 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1380 switches::kDisableTouchEditing)
1383 "enable-rich-notifications",
1384 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1385 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1386 kOsWin | kOsMac,
1387 ENABLE_DISABLE_VALUE_TYPE(
1388 message_center::switches::kEnableRichNotifications,
1389 message_center::switches::kDisableRichNotifications)
1392 "enable-experimental-notification-ui",
1393 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_NAME,
1394 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_DESCRIPTION,
1395 kOsDesktop,
1396 SINGLE_VALUE_TYPE(
1397 message_center::switches::kEnableExperimentalNotificationUI)
1400 "enable-sync-synced-notifications",
1401 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1402 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1403 kOsDesktop,
1404 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1405 switches::kDisableSyncSyncedNotifications)
1407 #if defined(ENABLE_APP_LIST)
1409 "enable-sync-app-list",
1410 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1411 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
1412 kOsDesktop,
1413 SINGLE_VALUE_TYPE(switches::kEnableSyncAppList)
1415 #endif
1417 "disable-full-history-sync",
1418 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1419 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1420 kOsAll,
1421 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
1424 "enable-usermedia-screen-capture",
1425 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1426 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1427 kOsDesktop,
1428 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1431 "impl-side-painting",
1432 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1433 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
1434 kOsAll,
1435 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1438 "deadline-scheduling",
1439 IDS_FLAGS_DEADLINE_SCHEDULING_NAME,
1440 IDS_FLAGS_DEADLINE_SCHEDULING_DESCRIPTION,
1441 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1442 MULTI_VALUE_TYPE(kDeadlineSchedulingChoices)
1445 "ui-deadline-scheduling",
1446 IDS_FLAGS_UI_DEADLINE_SCHEDULING_NAME,
1447 IDS_FLAGS_UI_DEADLINE_SCHEDULING_DESCRIPTION,
1448 #ifdef USE_AURA
1449 kOsWin | kOsLinux |
1450 #endif
1451 kOsCrOS,
1452 MULTI_VALUE_TYPE(kUIDeadlineSchedulingChoices)
1455 "lcd-text-aa",
1456 IDS_FLAGS_LCD_TEXT_NAME,
1457 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1458 kOsDesktop,
1459 MULTI_VALUE_TYPE(kLCDTextChoices)
1462 "delegated-renderer",
1463 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1464 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1465 #ifdef USE_AURA
1466 kOsWin | kOsLinux |
1467 #endif
1468 kOsAndroid | kOsCrOS,
1469 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1472 "enable-websocket-experimental-implementation",
1473 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1474 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1475 kOsAll,
1476 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1479 "max-tiles-for-interest-area",
1480 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1481 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1482 kOsAll,
1483 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1486 "enable-offline-mode",
1487 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1488 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1489 kOsAll,
1490 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1493 "enable-offline-auto-reload",
1494 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1495 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1496 kOsAll,
1497 SINGLE_VALUE_TYPE(switches::kEnableOfflineAutoReload)
1500 "default-tile-width",
1501 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1502 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1503 kOsAll,
1504 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1507 "default-tile-height",
1508 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1509 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1510 kOsAll,
1511 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1513 #if defined(OS_ANDROID)
1515 "disable-gesture-requirement-for-media-playback",
1516 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1517 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1518 kOsAndroid,
1519 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1521 #endif
1522 #if defined(ENABLE_GOOGLE_NOW)
1524 "enable-google-now",
1525 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1526 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1527 kOsDesktop,
1528 ENABLE_DISABLE_VALUE_TYPE(
1529 switches::kEnableGoogleNowIntegration,
1530 switches::kDisableGoogleNowIntegration)
1532 #endif
1533 #if defined(OS_CHROMEOS)
1535 "enable-virtual-keyboard",
1536 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1537 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1538 kOsCrOS,
1539 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1542 "enable-swipe-selection",
1543 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1544 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1545 kOsCrOS,
1546 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1548 #endif
1550 "enable-simple-cache-backend",
1551 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1552 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1553 kOsAll,
1554 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1557 "enable-tcp-fast-open",
1558 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1559 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
1560 kOsLinux | kOsCrOS | kOsAndroid,
1561 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1564 "apps-use-native-frame",
1565 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1566 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1567 kOsMac | kOsWin,
1568 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1571 "enable-syncfs-directory-operation",
1572 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1573 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1574 kOsAll,
1575 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1577 #if defined(ENABLE_MDNS)
1579 "disable-device-discovery",
1580 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1581 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1582 kOsWin | kOsLinux | kOsCrOS,
1583 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
1586 "device-discovery-notifications",
1587 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1588 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
1589 kOsWin | kOsLinux | kOsCrOS,
1590 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1591 switches::kDisableDeviceDiscoveryNotifications)
1594 "disable-privet-local-printing",
1595 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_NAME,
1596 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_DESCRIPTION,
1597 kOsWin | kOsLinux | kOsCrOS,
1598 SINGLE_VALUE_TYPE(switches::kDisablePrivetLocalPrinting)
1600 #endif // ENABLE_MDNS
1601 #if defined(OS_MACOSX)
1603 "disable-app-shims",
1604 IDS_FLAGS_DISABLE_APP_SHIMS_NAME,
1605 IDS_FLAGS_DISABLE_APP_SHIMS_DESCRIPTION,
1606 kOsMac,
1607 SINGLE_VALUE_TYPE(switches::kDisableAppShims)
1610 "enable-simplified-fullscreen",
1611 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1612 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1613 kOsMac,
1614 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1616 #endif
1617 #if defined(TOOLKIT_VIEWS)
1619 "omnibox-auto-completion-for-ime",
1620 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1621 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1622 kOsCrOS | kOsWin | kOsLinux,
1623 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1624 switches::kDisableOmniboxAutoCompletionForIme)
1626 #endif
1627 #if defined(USE_AURA)
1629 "tab-capture-upscale-quality",
1630 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1631 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1632 kOsAll,
1633 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1636 "tab-capture-downscale-quality",
1637 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1638 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1639 kOsAll,
1640 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1642 #endif
1644 "enable-spelling-feedback-field-trial",
1645 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1646 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
1647 kOsAll,
1648 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
1651 "enable-webgl-draft-extensions",
1652 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1653 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1654 kOsAll,
1655 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1658 "enable-html-imports",
1659 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1660 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1661 kOsAll,
1662 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1665 "high-dpi-support",
1666 IDS_FLAGS_HIDPI_NAME,
1667 IDS_FLAGS_HIDPI_DESCRIPTION,
1668 kOsWin,
1669 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
1670 switches::kHighDPISupport, "0")
1673 "enable-web-midi",
1674 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1675 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1676 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1677 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1680 "enable-new-profile-management",
1681 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1682 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1683 kOsAndroid | kOsMac | kOsWin | kOsLinux,
1684 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1687 "enable-web-based-signin",
1688 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1689 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
1690 kOsMac | kOsWin | kOsLinux,
1691 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
1694 "enable-google-profile-info",
1695 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1696 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
1697 kOsMac | kOsWin | kOsLinux,
1698 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
1701 "reset-app-list-install-state",
1702 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1703 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
1704 kOsMac | kOsWin | kOsLinux,
1705 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
1707 #if defined(ENABLE_APP_LIST)
1709 "enable-app-launcher-start-page",
1710 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_NAME,
1711 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_DESCRIPTION,
1712 kOsWin | kOsCrOS,
1713 SINGLE_VALUE_TYPE(switches::kShowAppListStartPage)
1715 #if defined(OS_LINUX)
1717 // This is compiled out on non-Linux platforms because otherwise it would be
1718 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1719 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1720 "enable-app-list",
1721 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1722 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1723 kOsLinux,
1724 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1726 #endif
1728 "enable-app-list-folder",
1729 IDS_FLAGS_ENABLE_APP_LIST_FOLDER,
1730 IDS_FLAGS_ENABLE_APP_LIST_FOLDER_DESCRIPTION,
1731 kOsWin | kOsCrOS,
1732 SINGLE_VALUE_TYPE(app_list::switches::kEnableFolderUI)
1735 "disable-app-list-voice-search",
1736 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH,
1737 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH_DESCRIPTION,
1738 kOsCrOS,
1739 SINGLE_VALUE_TYPE(app_list::switches::kDisableVoiceSearch)
1742 "enable-app-list-app-info",
1743 IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST,
1744 IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1745 kOsLinux | kOsWin | kOsCrOS,
1746 SINGLE_VALUE_TYPE(app_list::switches::kEnableAppInfo)
1748 #endif
1749 #if defined(OS_CHROMEOS)
1751 "disable-user-image-sync",
1752 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1753 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1754 kOsCrOS,
1755 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1757 #endif
1758 #if defined(OS_ANDROID)
1760 "enable-accessibility-tab-switcher",
1761 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1762 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1763 kOsAndroid,
1764 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
1767 "disable-accessibility-script-injection",
1768 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1769 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
1770 kOsAndroid,
1771 // Java-only switch: ContentSwitches.DISABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1772 SINGLE_VALUE_TYPE("disable-accessibility-script-injection")
1774 #endif
1776 "map-image",
1777 IDS_FLAGS_MAP_IMAGE_NAME,
1778 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1779 kOsAll,
1780 MULTI_VALUE_TYPE(kMapImageChoices)
1782 #if defined(OS_CHROMEOS)
1784 "disable-first-run-ui",
1785 IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME,
1786 IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION,
1787 kOsCrOS,
1788 SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI)
1791 "enable-first-run-ui-transitions",
1792 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1793 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1794 kOsCrOS,
1795 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1797 #endif
1799 "disable-compositor-touch-hit-testing",
1800 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME,
1801 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION,
1802 kOsAll,
1803 SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting),
1806 "enable-accelerated-scrollable-frames",
1807 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_NAME,
1808 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_DESCRIPTION,
1809 kOsAll,
1810 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedScrollableFrames,
1811 switches::kDisableAcceleratedScrollableFrames)
1814 "enable-composited-scrolling-for-frames",
1815 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_NAME,
1816 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_DESCRIPTION,
1817 kOsAll,
1818 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableCompositedScrollingForFrames,
1819 switches::kDisableCompositedScrollingForFrames)
1822 "enable-streamlined-hosted-apps",
1823 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1824 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
1825 kOsWin | kOsCrOS | kOsLinux,
1826 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1829 "enable-ephemeral-apps",
1830 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1831 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
1832 kOsWin | kOsLinux | kOsCrOS,
1833 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1836 "enable-linkable-ephemeral-apps",
1837 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1838 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
1839 kOsWin | kOsLinux | kOsCrOS,
1840 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1843 "enable-service-worker",
1844 IDS_FLAGS_ENABLE_SERVICE_WORKER_NAME,
1845 IDS_FLAGS_ENABLE_SERVICE_WORKER_DESCRIPTION,
1846 kOsAll,
1847 SINGLE_VALUE_TYPE(switches::kEnableServiceWorker)
1849 #if defined(OS_ANDROID)
1851 "disable-click-delay",
1852 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1853 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1854 kOsAndroid,
1855 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1856 SINGLE_VALUE_TYPE("disable-click-delay")
1858 #endif
1859 #if defined(OS_CHROMEOS)
1861 "disable-ime-mode-indicator",
1862 IDS_FLAGS_DISABLE_IME_MODE_INDICATOR,
1863 IDS_FLAGS_DISABLE_IME_MODE_INDICATOR_DESCRIPTION,
1864 kOsCrOS,
1865 SINGLE_VALUE_TYPE(chromeos::switches::kDisableIMEModeIndicator)
1867 #endif
1868 #if defined(OS_MACOSX)
1870 "enable-translate-new-ux",
1871 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1872 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
1873 kOsMac,
1874 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1876 #endif
1877 #if defined(TOOLKIT_VIEWS)
1879 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1880 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1881 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
1882 kOsCrOS | kOsWin,
1883 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
1885 #endif
1887 "enable-apps-show-on-first-paint",
1888 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1889 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1890 kOsDesktop,
1891 SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
1894 "enable-enhanced-bookmarks",
1895 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1896 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1897 kOsDesktop,
1898 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableEnhancedBookmarks, "1",
1899 switches::kEnableEnhancedBookmarks, "0")
1901 #if defined(OS_ANDROID)
1903 "enable-zero-suggest-experiment",
1904 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1905 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1906 kOsAndroid,
1907 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
1909 #endif
1911 "num-raster-threads",
1912 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1913 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1914 kOsAll,
1915 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
1918 "origin-chip",
1919 IDS_FLAGS_ORIGIN_CHIP_NAME,
1920 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
1921 kOsCrOS | kOsWin,
1922 MULTI_VALUE_TYPE(kOriginChipChoices)
1925 "origin-chip-in-omnibox",
1926 IDS_FLAGS_ORIGIN_CHIP_V2_NAME,
1927 IDS_FLAGS_ORIGIN_CHIP_V2_DESCRIPTION,
1928 kOsCrOS | kOsMac | kOsWin,
1929 MULTI_VALUE_TYPE(kOriginChipV2Choices)
1932 "search-button-in-omnibox",
1933 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1934 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
1935 kOsCrOS | kOsMac | kOsWin,
1936 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
1939 "disable-ignore-autocomplete-off",
1940 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1941 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
1942 kOsAll,
1943 SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff)
1945 #if defined(USE_AURA) || defined(OS_WIN)
1947 "enable-save-password-bubble",
1948 IDS_FLAGS_ENABLE_PASSWORD_BUBBLE_NAME,
1949 IDS_FLAGS_ENABLE_PASSWORD_BUBBLE_DESCRIPTION,
1950 kOsWin | kOsCrOS,
1951 SINGLE_VALUE_TYPE(switches::kEnableSavePasswordBubble)
1953 #endif
1955 "fullscreen-within-tab",
1956 IDS_FLAGS_FULLSCREEN_WITHIN_TAB_NAME,
1957 IDS_FLAGS_FULLSCREEN_WITHIN_TAB_DESCRIPTION,
1958 kOsDesktop,
1959 SINGLE_VALUE_TYPE(switches::kEmbedFlashFullscreen)
1961 #if defined(USE_AURA) || defined(OS_WIN)
1963 "enable-permissions-bubbles",
1964 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1965 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
1966 kOsCrOS | kOsWin,
1967 SINGLE_VALUE_TYPE(switches::kEnablePermissionsBubbles)
1969 #endif
1971 "notification-center-tray-behavior",
1972 IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NAME,
1973 IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_DESCRIPTION,
1974 kOsMac,
1975 MULTI_VALUE_TYPE(kNotificationCenterTrayBehaviorChoices)
1978 "out-of-process-pdf",
1979 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1980 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1981 kOsDesktop,
1982 SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf)
1984 #if defined(OS_ANDROID)
1986 "enable-fast-text-autosizing",
1987 IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_NAME,
1988 IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_DESCRIPTION,
1989 kOsAndroid,
1990 SINGLE_VALUE_TYPE(switches::kEnableFastTextAutosizing)
1992 #endif
1994 "prefetch-search-results",
1995 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1996 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
1997 kOsDesktop,
1998 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
2002 const Experiment* experiments = kExperiments;
2003 size_t num_experiments = arraysize(kExperiments);
2005 // Stores and encapsulates the little state that about:flags has.
2006 class FlagsState {
2007 public:
2008 FlagsState() : needs_restart_(false) {}
2009 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2010 CommandLine* command_line,
2011 SentinelsMode sentinels);
2012 bool IsRestartNeededToCommitChanges();
2013 void SetExperimentEnabled(
2014 FlagsStorage* flags_storage,
2015 const std::string& internal_name,
2016 bool enable);
2017 void RemoveFlagsSwitches(
2018 std::map<std::string, CommandLine::StringType>* switch_list);
2019 void ResetAllFlags(FlagsStorage* flags_storage);
2020 void reset();
2022 // Returns the singleton instance of this class
2023 static FlagsState* GetInstance() {
2024 return Singleton<FlagsState>::get();
2027 private:
2028 bool needs_restart_;
2029 std::map<std::string, std::string> flags_switches_;
2031 DISALLOW_COPY_AND_ASSIGN(FlagsState);
2034 // Adds the internal names for the specified experiment to |names|.
2035 void AddInternalName(const Experiment& e, std::set<std::string>* names) {
2036 if (e.type == Experiment::SINGLE_VALUE) {
2037 names->insert(e.internal_name);
2038 } else {
2039 DCHECK(e.type == Experiment::MULTI_VALUE ||
2040 e.type == Experiment::ENABLE_DISABLE_VALUE);
2041 for (int i = 0; i < e.num_choices; ++i)
2042 names->insert(e.NameForChoice(i));
2046 // Confirms that an experiment is valid, used in a DCHECK in
2047 // SanitizeList below.
2048 bool ValidateExperiment(const Experiment& e) {
2049 switch (e.type) {
2050 case Experiment::SINGLE_VALUE:
2051 DCHECK_EQ(0, e.num_choices);
2052 DCHECK(!e.choices);
2053 break;
2054 case Experiment::MULTI_VALUE:
2055 DCHECK_GT(e.num_choices, 0);
2056 DCHECK(e.choices);
2057 DCHECK(e.choices[0].command_line_switch);
2058 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
2059 break;
2060 case Experiment::ENABLE_DISABLE_VALUE:
2061 DCHECK_EQ(3, e.num_choices);
2062 DCHECK(!e.choices);
2063 DCHECK(e.command_line_switch);
2064 DCHECK(e.command_line_value);
2065 DCHECK(e.disable_command_line_switch);
2066 DCHECK(e.disable_command_line_value);
2067 break;
2068 default:
2069 NOTREACHED();
2071 return true;
2074 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2075 // unknown, to prevent this list to become very long as experiments are added
2076 // and removed.
2077 void SanitizeList(FlagsStorage* flags_storage) {
2078 std::set<std::string> known_experiments;
2079 for (size_t i = 0; i < num_experiments; ++i) {
2080 DCHECK(ValidateExperiment(experiments[i]));
2081 AddInternalName(experiments[i], &known_experiments);
2084 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
2086 std::set<std::string> new_enabled_experiments;
2087 std::set_intersection(
2088 known_experiments.begin(), known_experiments.end(),
2089 enabled_experiments.begin(), enabled_experiments.end(),
2090 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2092 if (new_enabled_experiments != enabled_experiments)
2093 flags_storage->SetFlags(new_enabled_experiments);
2096 void GetSanitizedEnabledFlags(
2097 FlagsStorage* flags_storage, std::set<std::string>* result) {
2098 SanitizeList(flags_storage);
2099 *result = flags_storage->GetFlags();
2102 bool SkipConditionalExperiment(const Experiment& experiment) {
2103 if (experiment.internal_name == std::string("enable-enhanced-bookmarks")) {
2104 return !IsEnhancedBookmarksExperimentEnabled();
2106 return false;
2110 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2111 // enabled on the current platform.
2112 void GetSanitizedEnabledFlagsForCurrentPlatform(
2113 FlagsStorage* flags_storage, std::set<std::string>* result) {
2114 GetSanitizedEnabledFlags(flags_storage, result);
2116 // Filter out any experiments that aren't enabled on the current platform. We
2117 // don't remove these from prefs else syncing to a platform with a different
2118 // set of experiments would be lossy.
2119 std::set<std::string> platform_experiments;
2120 int current_platform = GetCurrentPlatform();
2121 for (size_t i = 0; i < num_experiments; ++i) {
2122 if (experiments[i].supported_platforms & current_platform)
2123 AddInternalName(experiments[i], &platform_experiments);
2124 #if defined(OS_CHROMEOS)
2125 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2126 AddInternalName(experiments[i], &platform_experiments);
2127 #endif
2130 std::set<std::string> new_enabled_experiments;
2131 std::set_intersection(
2132 platform_experiments.begin(), platform_experiments.end(),
2133 result->begin(), result->end(),
2134 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2136 result->swap(new_enabled_experiments);
2139 // Returns the Value representing the choice data in the specified experiment.
2140 base::Value* CreateChoiceData(
2141 const Experiment& experiment,
2142 const std::set<std::string>& enabled_experiments) {
2143 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2144 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
2145 base::ListValue* result = new base::ListValue;
2146 for (int i = 0; i < experiment.num_choices; ++i) {
2147 base::DictionaryValue* value = new base::DictionaryValue;
2148 const std::string name = experiment.NameForChoice(i);
2149 value->SetString("internal_name", name);
2150 value->SetString("description", experiment.DescriptionForChoice(i));
2151 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
2152 result->Append(value);
2154 return result;
2157 } // namespace
2159 std::string Experiment::NameForChoice(int index) const {
2160 DCHECK(type == Experiment::MULTI_VALUE ||
2161 type == Experiment::ENABLE_DISABLE_VALUE);
2162 DCHECK_LT(index, num_choices);
2163 return std::string(internal_name) + testing::kMultiSeparator +
2164 base::IntToString(index);
2167 base::string16 Experiment::DescriptionForChoice(int index) const {
2168 DCHECK(type == Experiment::MULTI_VALUE ||
2169 type == Experiment::ENABLE_DISABLE_VALUE);
2170 DCHECK_LT(index, num_choices);
2171 int description_id;
2172 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2173 const int kEnableDisableDescriptionIds[] = {
2174 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2175 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2176 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2178 description_id = kEnableDisableDescriptionIds[index];
2179 } else {
2180 description_id = choices[index].description_id;
2182 return l10n_util::GetStringUTF16(description_id);
2185 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2186 CommandLine* command_line,
2187 SentinelsMode sentinels) {
2188 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
2189 command_line,
2190 sentinels);
2193 bool AreSwitchesIdenticalToCurrentCommandLine(
2194 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
2195 std::set<CommandLine::StringType> new_flags =
2196 ExtractFlagsFromCommandLine(new_cmdline);
2197 std::set<CommandLine::StringType> active_flags =
2198 ExtractFlagsFromCommandLine(active_cmdline);
2200 // Needed because std::equal doesn't check if the 2nd set is empty.
2201 if (new_flags.size() != active_flags.size())
2202 return false;
2204 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2207 void GetFlagsExperimentsData(FlagsStorage* flags_storage,
2208 FlagAccess access,
2209 base::ListValue* supported_experiments,
2210 base::ListValue* unsupported_experiments) {
2211 std::set<std::string> enabled_experiments;
2212 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2214 int current_platform = GetCurrentPlatform();
2216 for (size_t i = 0; i < num_experiments; ++i) {
2217 const Experiment& experiment = experiments[i];
2218 if (SkipConditionalExperiment(experiment))
2219 continue;
2221 base::DictionaryValue* data = new base::DictionaryValue();
2222 data->SetString("internal_name", experiment.internal_name);
2223 data->SetString("name",
2224 l10n_util::GetStringUTF16(experiment.visible_name_id));
2225 data->SetString("description",
2226 l10n_util::GetStringUTF16(
2227 experiment.visible_description_id));
2229 base::ListValue* supported_platforms = new base::ListValue();
2230 AddOsStrings(experiment.supported_platforms, supported_platforms);
2231 data->Set("supported_platforms", supported_platforms);
2233 switch (experiment.type) {
2234 case Experiment::SINGLE_VALUE:
2235 data->SetBoolean(
2236 "enabled",
2237 enabled_experiments.count(experiment.internal_name) > 0);
2238 break;
2239 case Experiment::MULTI_VALUE:
2240 case Experiment::ENABLE_DISABLE_VALUE:
2241 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2242 break;
2243 default:
2244 NOTREACHED();
2247 bool supported = (experiment.supported_platforms & current_platform) != 0;
2248 #if defined(OS_CHROMEOS)
2249 if (access == kOwnerAccessToFlags &&
2250 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2251 supported = true;
2253 #endif
2254 if (supported)
2255 supported_experiments->Append(data);
2256 else
2257 unsupported_experiments->Append(data);
2261 bool IsRestartNeededToCommitChanges() {
2262 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2265 void SetExperimentEnabled(FlagsStorage* flags_storage,
2266 const std::string& internal_name,
2267 bool enable) {
2268 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2269 internal_name, enable);
2272 void RemoveFlagsSwitches(
2273 std::map<std::string, CommandLine::StringType>* switch_list) {
2274 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
2277 void ResetAllFlags(FlagsStorage* flags_storage) {
2278 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
2281 int GetCurrentPlatform() {
2282 #if defined(OS_MACOSX)
2283 return kOsMac;
2284 #elif defined(OS_WIN)
2285 return kOsWin;
2286 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2287 return kOsCrOS;
2288 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2289 return kOsLinux;
2290 #elif defined(OS_ANDROID)
2291 return kOsAndroid;
2292 #else
2293 #error Unknown platform
2294 #endif
2297 void RecordUMAStatistics(FlagsStorage* flags_storage) {
2298 std::set<std::string> flags = flags_storage->GetFlags();
2299 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2300 ++it) {
2301 std::string action("AboutFlags_");
2302 action += *it;
2303 content::RecordComputedAction(action);
2305 // Since flag metrics are recorded every startup, add a tick so that the
2306 // stats can be made meaningful.
2307 if (flags.size())
2308 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2309 content::RecordAction(UserMetricsAction("StartupTick"));
2312 //////////////////////////////////////////////////////////////////////////////
2313 // FlagsState implementation.
2315 namespace {
2317 typedef std::map<std::string, std::pair<std::string, std::string> >
2318 NameToSwitchAndValueMap;
2320 void SetFlagToSwitchMapping(const std::string& key,
2321 const std::string& switch_name,
2322 const std::string& switch_value,
2323 NameToSwitchAndValueMap* name_to_switch_map) {
2324 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2325 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2328 void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2329 CommandLine* command_line,
2330 SentinelsMode sentinels) {
2331 if (command_line->HasSwitch(switches::kNoExperiments))
2332 return;
2334 std::set<std::string> enabled_experiments;
2336 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2337 &enabled_experiments);
2339 NameToSwitchAndValueMap name_to_switch_map;
2340 for (size_t i = 0; i < num_experiments; ++i) {
2341 const Experiment& e = experiments[i];
2342 if (e.type == Experiment::SINGLE_VALUE) {
2343 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2344 e.command_line_value, &name_to_switch_map);
2345 } else if (e.type == Experiment::MULTI_VALUE) {
2346 for (int j = 0; j < e.num_choices; ++j) {
2347 SetFlagToSwitchMapping(e.NameForChoice(j),
2348 e.choices[j].command_line_switch,
2349 e.choices[j].command_line_value,
2350 &name_to_switch_map);
2352 } else {
2353 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2354 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2355 &name_to_switch_map);
2356 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2357 e.command_line_value, &name_to_switch_map);
2358 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2359 e.disable_command_line_value, &name_to_switch_map);
2363 if (sentinels == kAddSentinels) {
2364 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2365 flags_switches_.insert(
2366 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2367 std::string()));
2369 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2370 it != enabled_experiments.end();
2371 ++it) {
2372 const std::string& experiment_name = *it;
2373 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
2374 name_to_switch_map.find(experiment_name);
2375 if (name_to_switch_it == name_to_switch_map.end()) {
2376 NOTREACHED();
2377 continue;
2380 const std::pair<std::string, std::string>&
2381 switch_and_value_pair = name_to_switch_it->second;
2383 CHECK(!switch_and_value_pair.first.empty());
2384 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2385 switch_and_value_pair.second);
2386 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
2388 if (sentinels == kAddSentinels) {
2389 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2390 flags_switches_.insert(
2391 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2392 std::string()));
2396 bool FlagsState::IsRestartNeededToCommitChanges() {
2397 return needs_restart_;
2400 void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2401 const std::string& internal_name,
2402 bool enable) {
2403 size_t at_index = internal_name.find(testing::kMultiSeparator);
2404 if (at_index != std::string::npos) {
2405 DCHECK(enable);
2406 // We're being asked to enable a multi-choice experiment. Disable the
2407 // currently selected choice.
2408 DCHECK_NE(at_index, 0u);
2409 const std::string experiment_name = internal_name.substr(0, at_index);
2410 SetExperimentEnabled(flags_storage, experiment_name, false);
2412 // And enable the new choice, if it is not the default first choice.
2413 if (internal_name != experiment_name + "@0") {
2414 std::set<std::string> enabled_experiments;
2415 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2416 needs_restart_ |= enabled_experiments.insert(internal_name).second;
2417 flags_storage->SetFlags(enabled_experiments);
2419 return;
2422 std::set<std::string> enabled_experiments;
2423 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
2425 const Experiment* e = NULL;
2426 for (size_t i = 0; i < num_experiments; ++i) {
2427 if (experiments[i].internal_name == internal_name) {
2428 e = experiments + i;
2429 break;
2432 DCHECK(e);
2434 if (e->type == Experiment::SINGLE_VALUE) {
2435 if (enable)
2436 needs_restart_ |= enabled_experiments.insert(internal_name).second;
2437 else
2438 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
2439 } else {
2440 if (enable) {
2441 // Enable the first choice.
2442 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
2443 } else {
2444 // Find the currently enabled choice and disable it.
2445 for (int i = 0; i < e->num_choices; ++i) {
2446 std::string choice_name = e->NameForChoice(i);
2447 if (enabled_experiments.find(choice_name) !=
2448 enabled_experiments.end()) {
2449 needs_restart_ = true;
2450 enabled_experiments.erase(choice_name);
2451 // Continue on just in case there's a bug and more than one
2452 // experiment for this choice was enabled.
2458 flags_storage->SetFlags(enabled_experiments);
2461 void FlagsState::RemoveFlagsSwitches(
2462 std::map<std::string, CommandLine::StringType>* switch_list) {
2463 for (std::map<std::string, std::string>::const_iterator
2464 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2465 switch_list->erase(it->first);
2469 void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
2470 needs_restart_ = true;
2472 std::set<std::string> no_experiments;
2473 flags_storage->SetFlags(no_experiments);
2476 void FlagsState::reset() {
2477 needs_restart_ = false;
2478 flags_switches_.clear();
2481 } // namespace
2483 namespace testing {
2485 // WARNING: '@' is also used in the html file. If you update this constant you
2486 // also need to update the html file.
2487 const char kMultiSeparator[] = "@";
2489 void ClearState() {
2490 FlagsState::GetInstance()->reset();
2493 void SetExperiments(const Experiment* e, size_t count) {
2494 if (!e) {
2495 experiments = kExperiments;
2496 num_experiments = arraysize(kExperiments);
2497 } else {
2498 experiments = e;
2499 num_experiments = count;
2503 const Experiment* GetExperiments(size_t* count) {
2504 *count = num_experiments;
2505 return experiments;
2508 } // namespace testing
2510 } // namespace about_flags