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"
12 #include "base/command_line.h"
13 #include "base/memory/singleton.h"
14 #include "base/metrics/sparse_histogram.h"
15 #include "base/stl_util.h"
16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h"
20 #include "cc/base/switches.h"
21 #include "chrome/browser/flags_storage.h"
22 #include "chrome/common/channel_info.h"
23 #include "chrome/common/chrome_content_client.h"
24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/grit/chromium_strings.h"
26 #include "chrome/grit/generated_resources.h"
27 #include "chrome/grit/google_chrome_strings.h"
28 #include "components/autofill/core/common/autofill_switches.h"
29 #include "components/cloud_devices/common/cloud_devices_switches.h"
30 #include "components/dom_distiller/core/dom_distiller_switches.h"
31 #include "components/enhanced_bookmarks/enhanced_bookmark_switches.h"
32 #include "components/metrics/metrics_hashes.h"
33 #include "components/nacl/common/nacl_switches.h"
34 #include "components/omnibox/browser/omnibox_switches.h"
35 #include "components/plugins/common/plugins_switches.h"
36 #include "components/proximity_auth/switches.h"
37 #include "components/search/search_switches.h"
38 #include "components/version_info/version_info.h"
39 #include "content/public/browser/user_metrics.h"
40 #include "media/base/media_switches.h"
41 #include "ui/base/l10n/l10n_util.h"
42 #include "ui/base/ui_base_switches.h"
43 #include "ui/display/display_switches.h"
44 #include "ui/events/event_switches.h"
45 #include "ui/gfx/switches.h"
46 #include "ui/gl/gl_switches.h"
47 #include "ui/keyboard/keyboard_switches.h"
48 #include "ui/native_theme/native_theme_switches.h"
49 #include "ui/views/views_switches.h"
51 #if defined(OS_ANDROID)
52 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
54 #include "ui/message_center/message_center_switches.h"
58 #include "ash/ash_switches.h"
61 #if defined(OS_CHROMEOS)
62 #include "chromeos/chromeos_switches.h"
63 #include "third_party/cros_system_api/switches/chrome_switches.h"
66 #if defined(ENABLE_APP_LIST)
67 #include "ui/app_list/app_list_switches.h"
70 #if defined(ENABLE_EXTENSIONS)
71 #include "extensions/common/switches.h"
74 #if defined(USE_OZONE)
75 #include "ui/ozone/public/ozone_switches.h"
78 namespace about_flags
{
80 // Macros to simplify specifying the type.
81 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
82 Experiment::SINGLE_VALUE, \
83 command_line_switch, switch_value, NULL, NULL, NULL, 0
84 #define SINGLE_VALUE_TYPE(command_line_switch) \
85 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
86 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
87 Experiment::SINGLE_DISABLE_VALUE, \
88 command_line_switch, switch_value, NULL, NULL, NULL, 0
89 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \
90 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
91 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
92 disable_switch, disable_value) \
93 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
94 disable_switch, disable_value, NULL, 3
95 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
96 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
97 #define MULTI_VALUE_TYPE(choices) \
98 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
102 // Enumeration of OSs.
109 kOsCrOSOwnerOnly
= 1 << 5
112 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
113 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
115 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
116 // whether the experiment is available on that platform.
117 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
120 const char* const name
;
125 {kOsCrOS
, "Chrome OS"},
126 {kOsAndroid
, "Android"},
127 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
129 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
130 if (bitmask
& kBitsToOs
[i
].bit
)
131 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
135 // Convert switch constants to proper CommandLine::StringType strings.
136 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
137 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
138 cmd_line
.AppendSwitch(flag
);
139 DCHECK_EQ(2U, cmd_line
.argv().size());
140 return cmd_line
.argv()[1];
143 // Scoops flags from a command line.
144 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
145 const base::CommandLine
& cmdline
) {
146 std::set
<base::CommandLine::StringType
> flags
;
147 // First do the ones between --flag-switches-begin and --flag-switches-end.
148 base::CommandLine::StringVector::const_iterator first
=
149 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
150 GetSwitchString(switches::kFlagSwitchesBegin
));
151 base::CommandLine::StringVector::const_iterator last
=
152 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
153 GetSwitchString(switches::kFlagSwitchesEnd
));
154 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
155 flags
.insert(first
+ 1, last
);
156 #if defined(OS_CHROMEOS)
157 // Then add those between --policy-switches-begin and --policy-switches-end.
158 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
159 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
160 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
161 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
162 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
163 flags
.insert(first
+ 1, last
);
168 const Experiment::Choice kTouchEventsChoices
[] = {
169 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
170 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
171 switches::kTouchEvents
,
172 switches::kTouchEventsEnabled
},
173 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
174 switches::kTouchEvents
,
175 switches::kTouchEventsDisabled
}
178 #if defined(USE_AURA)
179 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
180 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
181 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
182 switches::kOverscrollHistoryNavigation
,
184 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
185 switches::kOverscrollHistoryNavigation
,
190 const Experiment::Choice kTouchTextSelectionStrategyChoices
[] = {
191 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
192 { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER
,
193 switches::kTouchTextSelectionStrategy
,
195 { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION
,
196 switches::kTouchTextSelectionStrategy
,
200 #if !defined(DISABLE_NACL)
201 const Experiment::Choice kNaClDebugMaskChoices
[] = {
202 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
203 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
204 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
205 // so by default we want to avoid debugging that.
206 // NOTE: As the default value must be the empty string, the mask excluding
207 // the PNaCl translator and secure shell is substituted elsewhere.
208 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
209 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
210 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
211 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
215 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
217 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
218 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
219 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
220 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
},
221 { IDS_MARK_NON_SECURE_AS_DUBIOUS
,
222 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsDubious
}
225 const Experiment::Choice kDataReductionProxyLoFiChoices
[] = {
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
227 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON
,
228 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
229 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn
},
230 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY
,
231 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
232 data_reduction_proxy::switches::
233 kDataReductionProxyLoFiValueCellularOnly
},
234 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DISABLED
,
235 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
236 data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled
},
237 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_SLOW_CONNECTIONS_ONLY
,
238 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
239 data_reduction_proxy::switches::
240 kDataReductionProxyLoFiValueSlowConnectionsOnly
}
243 const Experiment::Choice kShowSavedCopyChoices
[] = {
244 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
245 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY
,
246 switches::kShowSavedCopy
, switches::kEnableShowSavedCopyPrimary
},
247 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY
,
248 switches::kShowSavedCopy
, switches::kEnableShowSavedCopySecondary
},
249 { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY
,
250 switches::kShowSavedCopy
, switches::kDisableShowSavedCopy
}
253 const Experiment::Choice kDefaultTileWidthChoices
[] = {
254 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
255 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
256 switches::kDefaultTileWidth
, "128"},
257 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
258 switches::kDefaultTileWidth
, "256"},
259 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
260 switches::kDefaultTileWidth
, "512"},
261 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
262 switches::kDefaultTileWidth
, "1024"}
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" },
307 #if defined(OS_ANDROID)
308 const Experiment::Choice kZeroSuggestExperimentsChoices
[] = {
309 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
310 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED
,
311 switches::kEnableZeroSuggestMostVisited
, ""},
312 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP
,
313 switches::kEnableZeroSuggestMostVisitedWithoutSerp
, ""},
314 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
315 switches::kDisableZeroSuggest
, ""}
318 const Experiment::Choice kReaderModeHeuristicsChoices
[] = {
319 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
320 { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP
,
321 switches::kReaderModeHeuristics
,
322 switches::reader_mode_heuristics::kOGArticle
},
323 { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST
,
324 switches::kReaderModeHeuristics
,
325 switches::reader_mode_heuristics::kAdaBoost
},
326 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON
,
327 switches::kReaderModeHeuristics
,
328 switches::reader_mode_heuristics::kAlwaysTrue
},
329 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF
,
330 switches::kReaderModeHeuristics
,
331 switches::reader_mode_heuristics::kNone
},
335 const Experiment::Choice kNumRasterThreadsChoices
[] = {
336 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
337 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
338 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
339 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
340 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
343 const Experiment::Choice kGpuRasterizationMSAASampleCountChoices
[] = {
344 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
347 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO
,
348 switches::kGpuRasterizationMSAASampleCount
, "0" },
349 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO
,
350 switches::kGpuRasterizationMSAASampleCount
, "2" },
351 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR
,
352 switches::kGpuRasterizationMSAASampleCount
, "4" },
353 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT
,
354 switches::kGpuRasterizationMSAASampleCount
, "8" },
355 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN
,
356 switches::kGpuRasterizationMSAASampleCount
, "16" },
359 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
360 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
361 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
362 switches::kEnableGpuRasterization
, "" },
363 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
364 switches::kDisableGpuRasterization
, "" },
365 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
366 switches::kForceGpuRasterization
, "" },
369 #if defined(OS_CHROMEOS)
370 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
371 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
372 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
373 chromeos::switches::kMemoryPressureThresholds
,
374 chromeos::switches::kConservativeThreshold
},
375 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
376 chromeos::switches::kMemoryPressureThresholds
,
377 chromeos::switches::kAggressiveCacheDiscardThreshold
},
378 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
379 chromeos::switches::kMemoryPressureThresholds
,
380 chromeos::switches::kAggressiveTabDiscardThreshold
},
381 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
382 chromeos::switches::kMemoryPressureThresholds
,
383 chromeos::switches::kAggressiveThreshold
},
387 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
388 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
389 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
390 switches::kExtensionContentVerification
,
391 switches::kExtensionContentVerificationBootstrap
},
392 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
393 switches::kExtensionContentVerification
,
394 switches::kExtensionContentVerificationEnforce
},
395 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
396 switches::kExtensionContentVerification
,
397 switches::kExtensionContentVerificationEnforceStrict
},
400 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
401 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
402 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
403 password_manager::switches::kAllowAutofillSyncCredential
, ""},
404 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
405 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
406 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
407 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
410 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
411 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
412 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
413 autofill::switches::kDisableFillOnAccountSelect
, "" },
414 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
415 autofill::switches::kEnableFillOnAccountSelect
, "" },
416 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
417 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
421 const Experiment::Choice kAshScreenRotationAnimationChoices
[] = {
422 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
423 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
424 ash::switches::kAshEnableScreenRotationAnimation
,
426 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION
,
427 ash::switches::kAshEnableScreenRotationAnimation
,
428 "partial-rotation" },
429 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION
,
430 ash::switches::kAshEnableScreenRotationAnimation
,
435 #if defined(ENABLE_TOPCHROME_MD)
436 const Experiment::Choice kTopChromeMaterialDesignChoices
[] = {
437 {IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL
, "", ""},
438 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL
,
439 switches::kTopChromeMD
,
440 switches::kTopChromeMDMaterial
},
441 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID
,
442 switches::kTopChromeMD
,
443 switches::kTopChromeMDMaterialHybrid
}};
446 #if defined(OS_CHROMEOS)
447 const Experiment::Choice kAshMaterialDesignInkDrop
[] = {
448 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
449 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_CIRCLE
,
450 switches::kMaterialDesignInkDrop
,
451 switches::kMaterialDesignInkDropCircle
},
452 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_SQUARE
,
453 switches::kMaterialDesignInkDrop
,
454 switches::kMaterialDesignInkDropSquare
}};
456 const Experiment::Choice kAshMaterialDesignInkDropAnimationSpeed
[] = {
457 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
458 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_FAST
,
459 switches::kMaterialDesignInkDropAnimationSpeed
,
460 switches::kMaterialDesignInkDropAnimationSpeedFast
},
461 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SLOW
,
462 switches::kMaterialDesignInkDropAnimationSpeed
,
463 switches::kMaterialDesignInkDropAnimationSpeedSlow
}};
465 const Experiment::Choice kDataSaverPromptChoices
[] = {
466 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
467 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
468 chromeos::switches::kDisableDataSaverPrompt
, "" },
469 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
470 chromeos::switches::kEnableDataSaverPrompt
, "" },
471 { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE
,
472 chromeos::switches::kEnableDataSaverPrompt
,
473 chromeos::switches::kDataSaverPromptDemoMode
},
476 const Experiment::Choice kFloatingVirtualKeyboardChoices
[] = {
477 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
478 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
479 keyboard::switches::kFloatingVirtualKeyboard
,
480 keyboard::switches::kFloatingVirtualKeyboardDisabled
},
481 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
482 keyboard::switches::kFloatingVirtualKeyboard
,
483 keyboard::switches::kFloatingVirtualKeyboardEnabled
},
486 const Experiment::Choice kSmartVirtualKeyboardChoices
[] = {
487 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
488 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
489 keyboard::switches::kSmartVirtualKeyboard
,
490 keyboard::switches::kSmartVirtualKeyboardDisabled
},
491 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
492 keyboard::switches::kSmartVirtualKeyboard
,
493 keyboard::switches::kSmartVirtualKeyboardEnabled
},
496 const Experiment::Choice kGestureTypingChoices
[] = {
497 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
498 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
499 keyboard::switches::kGestureTyping
,
500 keyboard::switches::kGestureTypingDisabled
},
501 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
502 keyboard::switches::kGestureTyping
,
503 keyboard::switches::kGestureTypingEnabled
},
506 const Experiment::Choice kGestureEditingChoices
[] = {
507 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
508 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
509 keyboard::switches::kGestureEditing
,
510 keyboard::switches::kGestureEditingDisabled
},
511 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
512 keyboard::switches::kGestureEditing
,
513 keyboard::switches::kGestureEditingEnabled
},
517 const Experiment::Choice kDownloadNotificationChoices
[] = {
518 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
519 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
520 switches::kEnableDownloadNotification
,
522 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
523 switches::kEnableDownloadNotification
,
527 const Experiment::Choice kSupervisedUserSafeSitesChoices
[] = {
528 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
529 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
530 switches::kSupervisedUserSafeSites
,
532 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
533 switches::kSupervisedUserSafeSites
,
535 { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY
,
536 switches::kSupervisedUserSafeSites
,
538 { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY
,
539 switches::kSupervisedUserSafeSites
,
540 "online-check-only" }
543 const Experiment::Choice kV8CacheOptionsChoices
[] = {
544 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
545 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
, switches::kV8CacheOptions
, "none" },
546 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE
, switches::kV8CacheOptions
, "parse" },
547 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE
, switches::kV8CacheOptions
, "code" },
550 #if defined(OS_ANDROID)
551 const Experiment::Choice kProgressBarAnimationChoices
[] = {
552 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
553 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
554 switches::kProgressBarAnimation
, "disabled" },
555 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_SMOOTH
,
556 switches::kProgressBarAnimation
, "smooth" },
557 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_FAST_START
,
558 switches::kProgressBarAnimation
, "fast-start" },
560 #endif // defined(OS_ANDROID)
562 // RECORDING USER METRICS FOR FLAGS:
563 // -----------------------------------------------------------------------------
564 // The first line of the experiment is the internal name. If you'd like to
565 // gather statistics about the usage of your flag, you should append a marker
566 // comment to the end of the feature name, like so:
567 // "my-special-feature", // FLAGS:RECORD_UMA
569 // After doing that, run
570 // tools/metrics/actions/extract_actions.py
571 // to add the metric to actions.xml (which will enable UMA to record your
572 // feature flag), then update the <owner>s and <description> sections. Make sure
573 // to include the actions.xml file when you upload your code for review!
575 // After your feature has shipped under a flag, you can locate the metrics under
576 // the action name AboutFlags_internal-action-name. Actions are recorded once
577 // per startup, so you should divide this number by AboutFlags_StartupTick to
578 // get a sense of usage. Note that this will not be the same as number of users
579 // with a given feature enabled because users can quit and relaunch the
580 // application multiple times over a given time interval. The dashboard also
581 // shows you how many (metrics reporting) users have enabled the flag over the
582 // last seven days. However, note that this is not the same as the number of
583 // users who have the flag enabled, since enabling the flag happens once,
584 // whereas running with the flag enabled happens until the user flips the flag
587 // To add a new experiment add to the end of kExperiments. There are two
588 // distinct types of experiments:
589 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
590 // macro for this type supplying the command line to the macro.
591 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
592 // deactivated state for this lab (i.e. no command line option). To specify
593 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
595 // See the documentation of Experiment for details on the fields.
597 // Command-line switches must have entries in enum "LoginCustomFlags" in
598 // histograms.xml. See note in histograms.xml and don't forget to run
599 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
601 // When adding a new choice, add it to the end of the list.
602 const Experiment kExperiments
[] = {
603 {"ignore-gpu-blacklist",
604 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
605 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
607 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)},
609 {"disable-direct-write",
610 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
611 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
613 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)},
615 {"enable-experimental-canvas-features",
616 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
617 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
619 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)},
620 {"disable-accelerated-2d-canvas",
621 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
622 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
624 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)},
625 {"enable-display-list-2d-canvas",
626 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
627 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
629 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
630 switches::kDisableDisplayList2dCanvas
)},
631 {"composited-layer-borders",
632 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
633 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
635 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)},
637 IDS_FLAGS_SHOW_FPS_COUNTER
,
638 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
640 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)},
642 IDS_FLAGS_DISABLE_WEBGL_NAME
,
643 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
645 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)},
647 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
648 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
650 #if defined(OS_ANDROID)
651 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
653 SINGLE_VALUE_TYPE("")
656 #if defined(ENABLE_WEBRTC)
657 {"disable-webrtc-hw-decoding",
658 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
659 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
660 kOsAndroid
| kOsCrOS
,
661 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)},
662 {"disable-webrtc-hw-encoding",
663 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
664 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
665 kOsAndroid
| kOsCrOS
,
666 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)},
667 {"enable-webrtc-stun-origin",
668 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
669 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
671 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)},
673 #if defined(OS_ANDROID)
675 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
676 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
678 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)},
680 // Native client is compiled out when DISABLE_NACL is defined.
681 #if !defined(DISABLE_NACL)
682 {"enable-nacl", // FLAGS:RECORD_UMA
683 IDS_FLAGS_ENABLE_NACL_NAME
,
684 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
686 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)},
687 {"enable-nacl-debug", // FLAGS:RECORD_UMA
688 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
689 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
691 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)},
692 {"nacl-debug-mask", // FLAGS:RECORD_UMA
693 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
694 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
696 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)},
698 #if defined(ENABLE_EXTENSIONS)
699 {"extension-apis", // FLAGS:RECORD_UMA
700 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
701 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
703 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)},
704 {"extensions-on-chrome-urls",
705 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
706 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
708 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)},
710 {"enable-fast-unload",
711 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
712 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
714 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)},
715 #if defined(ENABLE_EXTENSIONS)
716 {"enable-app-window-controls",
717 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
718 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
720 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)},
722 {"disable-hyperlink-auditing",
723 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
724 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
726 SINGLE_VALUE_TYPE(switches::kNoPings
)},
727 #if defined(OS_ANDROID)
728 {"contextual-search",
729 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
730 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
732 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
733 switches::kDisableContextualSearch
)},
735 {"show-autofill-type-predictions",
736 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
737 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
739 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)},
740 {"enable-smooth-scrolling", // FLAGS:RECORD_UMA
741 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
742 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
743 // Can't expose the switch unless the code is compiled in.
744 // On by default for the Mac (different implementation in WebKit).
746 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)},
747 #if defined(USE_AURA) || defined(OS_LINUX)
748 {"overlay-scrollbars",
749 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
750 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
751 // Uses the system preference on Mac (a different implementation).
752 // On Android, this is always enabled.
753 kOsLinux
| kOsCrOS
| kOsWin
,
754 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
755 switches::kDisableOverlayScrollbar
)},
758 IDS_FLAGS_ENABLE_PANELS_NAME
,
759 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
761 SINGLE_VALUE_TYPE(switches::kEnablePanels
)},
762 {// See http://crbug.com/120416 for how to remove this flag.
763 "save-page-as-mhtml", // FLAGS:RECORD_UMA
764 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
765 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
766 kOsMac
| kOsWin
| kOsLinux
,
767 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)},
769 IDS_FLAGS_ENABLE_QUIC_NAME
,
770 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
772 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
, switches::kDisableQuic
)},
773 {"disable-media-source",
774 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
775 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
777 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)},
778 {"disable-encrypted-media",
779 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
780 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
782 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)},
783 {"disable-prefixed-encrypted-media",
784 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
785 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
787 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)},
788 {"disable-javascript-harmony-shipping",
789 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
790 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
792 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)},
793 {"enable-javascript-harmony",
794 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
795 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
797 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)},
798 {"disable-software-rasterizer",
799 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
800 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
801 #if defined(ENABLE_SWIFTSHADER)
806 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)},
807 {"enable-gpu-rasterization",
808 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
809 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
811 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)},
812 {"gpu-rasterization-msaa-sample-count",
813 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME
,
814 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION
,
816 MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices
)},
817 {"disable-slimming-paint",
818 IDS_FLAGS_DISABLE_SLIMMING_PAINT_NAME
,
819 IDS_FLAGS_DISABLE_SLIMMING_PAINT_DESCRIPTION
,
821 SINGLE_VALUE_TYPE(switches::kDisableSlimmingPaint
)},
822 {"enable-slimming-paint",
823 IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME
,
824 IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION
,
826 SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint
)},
827 {"enable-experimental-web-platform-features",
828 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
829 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
831 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)},
832 {"enable-web-bluetooth",
833 IDS_FLAGS_WEB_BLUETOOTH_NAME
,
834 IDS_FLAGS_WEB_BLUETOOTH_DESCRIPTION
,
836 SINGLE_VALUE_TYPE(switches::kEnableWebBluetooth
)},
837 {"enable-devtools-experiments",
838 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
839 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
841 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)},
842 {"silent-debugger-extension-api",
843 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
844 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
846 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)},
847 #if defined(ENABLE_SPELLCHECK)
848 #if defined(OS_ANDROID)
849 {"enable-android-spellchecker",
850 IDS_OPTIONS_ENABLE_SPELLCHECK
,
851 IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION
,
853 SINGLE_VALUE_TYPE(switches::kEnableAndroidSpellChecker
)},
855 {"spellcheck-autocorrect",
856 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
857 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
858 kOsWin
| kOsLinux
| kOsCrOS
,
859 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)},
861 #if defined(ENABLE_SPELLCHECK) && \
862 (defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS))
863 {"enable-multilingual-spellchecker",
864 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_NAME
,
865 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_DESCRIPTION
,
866 kOsWin
| kOsLinux
| kOsCrOS
,
867 SINGLE_VALUE_TYPE(switches::kEnableMultilingualSpellChecker
)},
869 {"enable-scroll-prediction",
870 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
871 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
873 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)},
874 #if defined(ENABLE_TOPCHROME_MD)
876 IDS_FLAGS_TOP_CHROME_MD
,
877 IDS_FLAGS_TOP_CHROME_MD_DESCRIPTION
,
878 kOsWin
| kOsLinux
| kOsCrOS
,
879 MULTI_VALUE_TYPE(kTopChromeMaterialDesignChoices
)},
882 IDS_TOUCH_EVENTS_NAME
,
883 IDS_TOUCH_EVENTS_DESCRIPTION
,
885 MULTI_VALUE_TYPE(kTouchEventsChoices
)},
886 {"disable-touch-adjustment",
887 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
888 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
889 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
890 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)},
891 #if defined(OS_CHROMEOS)
892 {"network-portal-notification",
893 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
894 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
896 ENABLE_DISABLE_VALUE_TYPE(
897 chromeos::switches::kEnableNetworkPortalNotification
,
898 chromeos::switches::kDisableNetworkPortalNotification
)},
900 {"enable-download-resumption",
901 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
902 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
904 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)},
905 {"enable-download-notification",
906 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
907 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
909 MULTI_VALUE_TYPE(kDownloadNotificationChoices
)},
910 #if defined(ENABLE_PLUGINS)
911 {"allow-nacl-socket-api",
912 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
913 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
915 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")},
917 #if defined(OS_CHROMEOS)
918 {"allow-touchpad-three-finger-click",
919 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
920 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
922 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)},
923 {"ash-enable-unified-desktop",
924 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME
,
925 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION
,
927 SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop
)},
928 {"disable-easy-unlock",
929 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
930 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
932 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)},
933 {"enable-easy-unlock-proximity-detection",
934 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
935 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
937 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)},
938 {"enable-easy-unlock-bluetooth-low-energy-detection",
939 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME
,
940 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION
,
943 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery
)},
946 {"disable-minimize-on-second-launcher-item-click",
947 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
948 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
950 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)},
952 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
953 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
955 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)},
958 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
959 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
960 kOsLinux
| kOsWin
| kOsCrOS
,
961 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
963 #endif // defined(USE_ASH)
965 "enable-viewport-meta",
966 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
967 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
968 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
969 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
971 #if defined(OS_CHROMEOS)
973 "disable-boot-animation",
974 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
975 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
977 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
979 {"enable-video-player-chromecast-support",
980 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
981 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
984 chromeos::switches::kEnableVideoPlayerChromecastSupport
)},
986 "disable-office-editing-component-app",
987 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
988 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
990 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
993 "disable-display-color-calibration",
994 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
995 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
997 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
1000 "ash-disable-screen-orientation-lock",
1001 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
1002 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
1004 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
1006 #endif // defined(OS_CHROMEOS)
1008 "disable-accelerated-video-decode",
1009 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
1010 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
1011 kOsMac
| kOsWin
| kOsCrOS
,
1012 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
1014 #if defined(USE_ASH)
1016 "ash-debug-shortcuts",
1017 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
1018 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
1020 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
1023 "ash-disable-maximize-mode-window-backdrop",
1024 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME
,
1025 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION
,
1027 SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop
),
1030 "ash-enable-touch-view-testing",
1031 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
1032 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
1034 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
1037 "disable-touch-feedback",
1038 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
1039 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
1041 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
1044 "ash-enable-mirrored-screen",
1045 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1046 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1048 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1050 {"ash-enable-screen-rotation-animations",
1051 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME
,
1052 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION
,
1054 MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices
)},
1056 "ash-stable-overview-order",
1057 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_NAME
,
1058 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_DESCRIPTION
,
1060 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableStableOverviewOrder
,
1061 ash::switches::kAshDisableStableOverviewOrder
),
1063 #endif // defined(USE_ASH)
1064 #if defined(OS_CHROMEOS)
1065 {"material-design-ink-drop",
1066 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_NAME
,
1067 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_DESCRIPTION
,
1069 MULTI_VALUE_TYPE(kAshMaterialDesignInkDrop
)},
1070 {"material-design-ink-drop-animation-speed",
1071 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_NAME
,
1072 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_DESCRIPTION
,
1074 MULTI_VALUE_TYPE(kAshMaterialDesignInkDropAnimationSpeed
)},
1075 {"disable-cloud-import",
1076 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1077 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1079 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)},
1080 {"enable-request-tablet-site",
1081 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1082 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1084 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)},
1086 {"debug-packed-apps",
1087 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1088 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1090 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)},
1091 {"enable-password-generation",
1092 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1093 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1094 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1095 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1096 autofill::switches::kDisablePasswordGeneration
)},
1097 {"enable-automatic-password-saving",
1098 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1099 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1102 password_manager::switches::kEnableAutomaticPasswordSaving
)},
1103 {"password-manager-reauthentication",
1104 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1105 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1107 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)},
1108 {"enable-password-force-saving",
1109 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME
,
1110 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION
,
1112 SINGLE_VALUE_TYPE(password_manager::switches::kEnablePasswordForceSaving
)},
1113 {"enable-password-link",
1114 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1115 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1116 kOsAndroid
| kOsDesktop
,
1117 ENABLE_DISABLE_VALUE_TYPE(
1118 password_manager::switches::kEnablePasswordLink
,
1119 password_manager::switches::kDisablePasswordLink
)},
1120 {"enable-affiliation-based-matching",
1121 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1122 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1123 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1124 ENABLE_DISABLE_VALUE_TYPE(
1125 password_manager::switches::kEnableAffiliationBasedMatching
,
1126 password_manager::switches::kDisableAffiliationBasedMatching
)},
1127 {"wallet-service-use-sandbox",
1128 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1129 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1130 kOsAndroid
| kOsDesktop
,
1131 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1132 autofill::switches::kWalletServiceUseSandbox
,
1134 autofill::switches::kWalletServiceUseSandbox
,
1136 #if defined(USE_AURA)
1137 {"overscroll-history-navigation",
1138 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1139 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1141 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)},
1143 {"scroll-end-effect",
1144 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1145 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1147 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScrollEndEffect
,
1149 switches::kScrollEndEffect
,
1152 IDS_FLAGS_ENABLE_ICON_NTP_NAME
,
1153 IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION
,
1154 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1155 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp
,
1156 switches::kDisableIconNtp
)},
1157 {"enable-touch-drag-drop",
1158 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1159 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1161 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1162 switches::kDisableTouchDragDrop
)},
1163 {"enable-touch-editing",
1164 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1165 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1166 kOsCrOS
| kOsWin
| kOsLinux
,
1167 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1168 switches::kDisableTouchEditing
)},
1169 {"touch-selection-strategy",
1170 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_NAME
,
1171 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_DESCRIPTION
,
1172 kOsAndroid
, // TODO(mfomitchev): Add CrOS/Win/Linux support soon.
1173 MULTI_VALUE_TYPE(kTouchTextSelectionStrategyChoices
)},
1174 {"enable-stale-while-revalidate",
1175 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1176 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1178 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)},
1179 {"enable-suggestions-service",
1180 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1181 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1182 kOsAndroid
| kOsCrOS
,
1183 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1184 switches::kDisableSuggestionsService
)},
1185 {"enable-suggestions-with-substring-match",
1186 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_NAME
,
1187 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_DESCRIPTION
,
1190 autofill::switches::kEnableSuggestionsWithSubstringMatch
)},
1191 {"enable-supervised-user-managed-bookmarks-folder",
1192 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1193 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1194 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1195 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)},
1196 #if defined(ENABLE_APP_LIST)
1197 {"enable-sync-app-list",
1198 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1199 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1201 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1202 app_list::switches::kDisableSyncAppList
)},
1204 #if defined(OS_MACOSX)
1205 {"enable-avfoundation",
1206 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1207 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1209 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1210 switches::kForceQTKit
)},
1213 IDS_FLAGS_LCD_TEXT_NAME
,
1214 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1216 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1217 switches::kDisableLCDText
)},
1218 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1219 {"delegated-renderer",
1220 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1221 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1222 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1223 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1224 switches::kDisableDelegatedRenderer
)},
1226 {"enable-offer-store-unmasked-wallet-cards",
1227 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS
,
1228 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION
,
1230 ENABLE_DISABLE_VALUE_TYPE(
1231 autofill::switches::kEnableOfferStoreUnmaskedWalletCards
,
1232 autofill::switches::kDisableOfferStoreUnmaskedWalletCards
)},
1233 {"enable-offline-auto-reload",
1234 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1235 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1237 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1238 switches::kDisableOfflineAutoReload
)},
1239 {"enable-offline-auto-reload-visible-only",
1240 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1241 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1243 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1244 switches::kDisableOfflineAutoReloadVisibleOnly
)},
1246 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1247 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1249 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)},
1250 {"default-tile-width",
1251 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1252 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1254 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)},
1255 {"default-tile-height",
1256 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1257 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1259 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)},
1260 #if defined(OS_ANDROID)
1261 {"disable-gesture-requirement-for-media-playback",
1262 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1263 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1265 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)},
1267 #if defined(OS_CHROMEOS)
1268 {"enable-virtual-keyboard",
1269 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1270 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1272 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)},
1273 {"enable-virtual-keyboard-overscroll",
1274 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1275 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1277 ENABLE_DISABLE_VALUE_TYPE(
1278 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1279 keyboard::switches::kDisableVirtualKeyboardOverscroll
)},
1280 {"enable-input-view",
1281 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1282 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1284 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1285 keyboard::switches::kDisableInputView
)},
1286 {"disable-new-korean-ime",
1287 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_NAME
,
1288 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_DESCRIPTION
,
1290 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewKoreanIme
)},
1291 {"enable-physical-keyboard-autocorrect",
1292 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1293 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1295 ENABLE_DISABLE_VALUE_TYPE(
1296 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1297 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)},
1298 {"disable-voice-input",
1299 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1300 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1302 SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput
)},
1303 {"enable-experimental-input-view-features",
1304 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1305 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1308 keyboard::switches::kEnableExperimentalInputViewFeatures
)},
1309 {"floating-virtual-keyboard",
1310 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME
,
1311 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION
,
1313 MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices
)},
1314 {"smart-virtual-keyboard",
1315 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_NAME
,
1316 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1318 MULTI_VALUE_TYPE(kSmartVirtualKeyboardChoices
)},
1320 IDS_FLAGS_GESTURE_TYPING_NAME
,
1321 IDS_FLAGS_GESTURE_TYPING_DESCRIPTION
,
1323 MULTI_VALUE_TYPE(kGestureTypingChoices
)},
1325 IDS_FLAGS_GESTURE_EDITING_NAME
,
1326 IDS_FLAGS_GESTURE_EDITING_DESCRIPTION
,
1328 MULTI_VALUE_TYPE(kGestureEditingChoices
)},
1329 {"enable-fullscreen-app-list",
1330 IDS_FLAGS_FULLSCREEN_APP_LIST_NAME
,
1331 IDS_FLAGS_FULLSCREEN_APP_LIST_DESCRIPTION
,
1333 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullscreenAppList
)},
1335 {"enable-simple-cache-backend",
1336 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1337 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1338 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1339 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)},
1340 {"enable-tcp-fast-open",
1341 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1342 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1343 kOsLinux
| kOsCrOS
| kOsAndroid
,
1344 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)},
1345 #if defined(ENABLE_SERVICE_DISCOVERY)
1346 {"device-discovery-notifications",
1347 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1348 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1350 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1351 switches::kDisableDeviceDiscoveryNotifications
)},
1352 {"enable-print-preview-register-promos",
1353 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1354 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1356 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)},
1357 #endif // ENABLE_SERVICE_DISCOVERY
1359 {"enable-cloud-print-xps",
1360 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1361 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1363 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)},
1365 #if defined(USE_AURA)
1366 {"tab-capture-upscale-quality",
1367 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1368 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1370 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)},
1371 {"tab-capture-downscale-quality",
1372 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1373 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1375 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)},
1377 #if defined(TOOLKIT_VIEWS)
1378 {"disable-hide-inactive-stacked-tab-close-buttons",
1379 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1380 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1381 kOsCrOS
| kOsWin
| kOsLinux
,
1382 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)},
1384 #if defined(ENABLE_SPELLCHECK)
1385 {"enable-spelling-feedback-field-trial",
1386 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1387 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1389 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)},
1391 {"enable-webgl-draft-extensions",
1392 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1393 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1395 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)},
1396 {"enable-new-profile-management",
1397 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1398 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1399 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1400 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1401 switches::kDisableNewProfileManagement
)},
1402 {"enable-account-consistency",
1403 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1404 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1405 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1406 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1407 switches::kDisableAccountConsistency
)},
1408 {"enable-iframe-based-signin",
1409 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1410 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1411 kOsMac
| kOsWin
| kOsLinux
,
1412 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)},
1413 {"enable-google-profile-info",
1414 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1415 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1416 kOsMac
| kOsWin
| kOsLinux
,
1417 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)},
1418 #if defined(ENABLE_EXTENSIONS)
1419 {"enable-surface-worker",
1420 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1421 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1423 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)},
1425 #if defined(ENABLE_APP_LIST)
1426 {"reset-app-list-install-state",
1427 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1428 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1429 kOsMac
| kOsWin
| kOsLinux
,
1430 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState
)},
1431 {"disable-drive-apps-in-app-list",
1432 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1433 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1435 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)},
1437 #if defined(OS_ANDROID)
1438 {"enable-accessibility-tab-switcher",
1439 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1440 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1442 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)},
1443 {// TODO(dmazzoni): remove this flag when native android accessibility
1444 // ships in the stable channel. http://crbug.com/356775
1445 "enable-accessibility-script-injection",
1446 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1447 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1449 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1450 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")},
1453 IDS_FLAGS_ONE_COPY_NAME
,
1454 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1456 SINGLE_VALUE_TYPE(switches::kEnableOneCopy
)},
1457 {"enable-zero-copy",
1458 IDS_FLAGS_ZERO_COPY_NAME
,
1459 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1461 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)},
1462 #if defined(OS_CHROMEOS)
1463 {"enable-first-run-ui-transitions",
1464 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1465 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1467 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)},
1469 {"disable-new-bookmark-apps",
1470 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1471 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1472 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1473 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1474 switches::kDisableNewBookmarkApps
)},
1475 #if defined(OS_MACOSX)
1476 {"disable-hosted-app-shim-creation",
1477 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1478 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1480 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)},
1481 {"enable-hosted-app-quit-notification",
1482 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1483 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1485 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)},
1487 {"enable-ephemeral-apps-in-webstore",
1488 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1489 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1491 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)},
1492 {"enable-linkable-ephemeral-apps",
1493 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1494 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1496 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)},
1497 #if defined(OS_ANDROID)
1498 {"disable-click-delay",
1499 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1500 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1502 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1503 SINGLE_VALUE_TYPE("disable-click-delay")},
1504 {"disable-pull-to-refresh-effect",
1505 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1506 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1508 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)},
1510 #if defined(OS_MACOSX)
1511 {"enable-translate-new-ux",
1512 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1513 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1515 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)},
1517 #if defined(TOOLKIT_VIEWS)
1518 {"disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1519 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1520 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1521 kOsCrOS
| kOsWin
| kOsLinux
,
1522 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)},
1523 {"enable-link-disambiguation-popup",
1524 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1525 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1527 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)},
1529 #if defined(ENABLE_EXTENSIONS)
1530 {"enable-apps-show-on-first-paint",
1531 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1532 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1534 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)},
1536 {"enhanced-bookmarks-experiment",
1537 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1538 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1539 kOsDesktop
| kOsAndroid
,
1540 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnhancedBookmarksExperiment
,
1542 switches::kEnhancedBookmarksExperiment
,
1544 #if defined(OS_ANDROID)
1545 {"enable-zero-suggest-experiment",
1546 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1547 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1549 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)},
1550 {"reader-mode-heuristics",
1551 IDS_FLAGS_READER_MODE_HEURISTICS_NAME
,
1552 IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION
,
1554 MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices
)},
1555 {"enable-reader-mode-toolbar-icon",
1556 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1557 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1559 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)},
1560 {"enable-dom-distiller-button-animation",
1561 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION
,
1562 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION
,
1564 SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation
)},
1566 {"num-raster-threads",
1567 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1568 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1570 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)},
1571 {"enable-single-click-autofill",
1572 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1573 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1574 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1575 ENABLE_DISABLE_VALUE_TYPE(
1576 autofill::switches::kEnableSingleClickAutofill
,
1577 autofill::switches::kDisableSingleClickAutofill
)},
1578 {"enable-site-engagement-service",
1579 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME
,
1580 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION
,
1582 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService
,
1583 switches::kDisableSiteEngagementService
)},
1584 {"enable-session-crashed-bubble",
1585 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1586 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1588 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1589 switches::kDisableSessionCrashedBubble
)},
1590 {"enable-pdf-material-ui",
1591 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1592 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1594 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1595 switches::kDisablePdfMaterialUI
)},
1596 {"disable-cast-streaming-hw-encoding",
1597 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1598 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1600 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)},
1601 #if defined(OS_ANDROID)
1603 IDS_FLAGS_DISABLE_CAST_NAME
,
1604 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1606 SINGLE_VALUE_TYPE(switches::kDisableCast
)},
1607 {"prefetch-search-results",
1608 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1609 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1611 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)},
1613 #if defined(ENABLE_APP_LIST)
1614 {"enable-experimental-app-list",
1615 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1616 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1617 kOsWin
| kOsLinux
| kOsCrOS
,
1618 ENABLE_DISABLE_VALUE_TYPE(
1619 app_list::switches::kEnableExperimentalAppList
,
1620 app_list::switches::kDisableExperimentalAppList
)},
1621 {"enable-centered-app-list",
1622 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1623 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1624 kOsWin
| kOsLinux
| kOsCrOS
,
1625 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)},
1626 {"enable-new-app-list-mixer",
1627 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_NAME
,
1628 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_DESCRIPTION
,
1629 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1630 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableNewAppListMixer
,
1631 app_list::switches::kDisableNewAppListMixer
)},
1633 {"disable-threaded-scrolling",
1634 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1635 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1636 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
| kOsMac
,
1637 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)},
1638 {"invert-viewport-scroll-order",
1639 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_NAME
,
1640 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_DESCRIPTION
,
1642 SINGLE_VALUE_TYPE(switches::kInvertViewportScrollOrder
)},
1643 {"bleeding-edge-renderer-mode",
1644 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1645 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1647 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)},
1648 {"enable-settings-window",
1649 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1650 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1652 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1653 switches::kDisableSettingsWindow
)},
1654 {"enable-save-password-bubble",
1655 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1656 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1657 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1658 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1659 switches::kDisableSavePasswordBubble
)},
1660 {"enable-apps-file-associations",
1661 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1662 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1664 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)},
1665 #if defined(OS_ANDROID)
1666 {"enable-embeddedsearch-api",
1667 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1668 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1670 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)},
1672 {"distance-field-text",
1673 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1674 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1676 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1677 switches::kDisableDistanceFieldText
)},
1678 {"extension-content-verification",
1679 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1680 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1682 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)},
1683 #if defined(ENABLE_EXTENSIONS)
1684 {"extension-active-script-permission",
1685 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1686 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1688 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)},
1690 #if defined(OS_ANDROID)
1691 {"enable-data-reduction-proxy-dev",
1692 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1693 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1695 ENABLE_DISABLE_VALUE_TYPE(
1696 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1697 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)},
1698 {"enable-data-reduction-proxy-carrier-test",
1699 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_NAME
,
1700 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_DESCRIPTION
,
1703 data_reduction_proxy::switches::kEnableDataReductionProxyCarrierTest
)},
1705 {"enable-hotword-hardware",
1706 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1707 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1709 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)},
1710 #if defined(ENABLE_EXTENSIONS)
1711 {"enable-embedded-extension-options",
1712 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1713 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1715 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)},
1717 #if defined(USE_ASH)
1718 {"enable-web-app-frame",
1719 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1720 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1722 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)},
1724 {"enable-drop-sync-credential",
1725 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1726 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1728 ENABLE_DISABLE_VALUE_TYPE(
1729 password_manager::switches::kEnableDropSyncCredential
,
1730 password_manager::switches::kDisableDropSyncCredential
)},
1731 #if defined(ENABLE_EXTENSIONS)
1732 {"enable-extension-action-redesign",
1733 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1734 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1736 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)},
1738 {"autofill-sync-credential",
1739 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1740 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1742 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)},
1743 #if !defined(OS_ANDROID)
1744 {"enable-message-center-always-scroll-up-upon-notification-removal",
1745 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1746 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1749 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)},
1751 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1752 {"enable-md-settings",
1753 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
1754 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
1756 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignSettings
)},
1758 #if defined(OS_CHROMEOS)
1759 {"memory-pressure-thresholds",
1760 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
1761 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
1763 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)},
1765 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
1766 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
1768 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)},
1769 #endif // OS_CHROMEOS
1770 {"enable-tab-audio-muting",
1771 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
1772 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
1774 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)},
1775 {"enable-credential-manager-api",
1776 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
1777 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
1779 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)},
1780 {"reduced-referrer-granularity",
1781 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
1782 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
1784 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)},
1785 #if defined(ENABLE_PLUGINS)
1786 {"enable-plugin-power-saver",
1787 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
1788 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
1790 ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver
,
1791 plugins::switches::kDisablePluginPowerSaver
)},
1793 #if defined(OS_CHROMEOS)
1794 {"disable-new-zip-unpacker",
1795 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
1796 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
1798 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)},
1799 #endif // defined(OS_CHROMEOS)
1800 {"enable-credit-card-scan",
1801 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
1802 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
1804 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
1805 autofill::switches::kDisableCreditCardScan
)},
1806 #if defined(OS_CHROMEOS)
1807 {"disable-captive-portal-bypass-proxy",
1808 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
1809 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
1811 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy
)},
1812 #endif // defined(OS_CHROMEOS)
1813 #if defined(OS_ANDROID)
1814 {"enable-seccomp-filter-sandbox",
1815 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
1816 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
1818 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)},
1820 {"enable-touch-hover",
1821 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
1822 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
1824 SINGLE_VALUE_TYPE("enable-touch-hover")},
1825 {"enable-fill-on-account-select",
1826 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
1827 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
1829 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)},
1830 #if defined(OS_CHROMEOS)
1831 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA
1832 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
1833 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
1835 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)},
1836 {"enable-potentially-annoying-security-features",
1837 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
1838 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
1840 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)},
1842 {"disable-delay-agnostic-aec",
1843 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_NAME
,
1844 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1845 kOsWin
| kOsLinux
| kOsCrOS
,
1846 SINGLE_VALUE_TYPE(switches::kDisableDelayAgnosticAec
)},
1847 {"enable-delay-agnostic-aec",
1848 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
1849 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1851 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)},
1852 {"mark-non-secure-as", // FLAGS:RECORD_UMA
1853 IDS_MARK_NON_SECURE_AS_NAME
,
1854 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
1856 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)},
1857 {"enable-site-per-process",
1858 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
1859 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
1861 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)},
1862 #if defined(OS_MACOSX)
1863 {"enable-harfbuzz-rendertext",
1864 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
1865 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
1867 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)},
1868 #endif // defined(OS_MACOSX)
1869 #if defined(OS_CHROMEOS)
1870 {"disable-timezone-tracking",
1871 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
1872 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
1874 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)},
1875 #endif // defined(OS_CHROMEOS)
1876 {"data-reduction-proxy-lo-fi",
1877 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME
,
1878 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
1880 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices
)},
1881 {"clear-data-reduction-proxy-data-savings",
1882 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
1883 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
1886 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings
)},
1887 {"enable-data-reduction-proxy-config-client",
1888 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_NAME
,
1889 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_DESCRIPTION
,
1891 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1892 kEnableDataReductionProxyConfigClient
)},
1893 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
1894 {"enable-data-reduction-proxy-bypass-warnings",
1895 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
1896 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
1898 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1899 kEnableDataReductionProxyBypassWarning
)},
1901 {"allow-insecure-localhost",
1902 IDS_ALLOW_INSECURE_LOCALHOST
,
1903 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
1905 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)},
1906 {"enable-add-to-shelf",
1907 IDS_FLAGS_ENABLE_ADD_TO_SHELF_NAME
,
1908 IDS_FLAGS_ENABLE_ADD_TO_SHELF_DESCRIPTION
,
1910 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToShelf
,
1911 switches::kDisableAddToShelf
)},
1912 {"bypass-app-banner-engagement-checks",
1913 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
1914 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
1916 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)},
1917 {"use-sync-sandbox",
1918 IDS_FLAGS_SYNC_SANDBOX_NAME
,
1919 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
1921 SINGLE_VALUE_TYPE_AND_VALUE(
1922 switches::kSyncServiceURL
,
1923 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
1924 {"enable-child-account-detection",
1925 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
1926 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
1927 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1928 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
1929 switches::kDisableChildAccountDetection
)},
1930 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
1931 {"ozone-test-single-overlay-support",
1932 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
1933 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
1935 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)},
1936 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
1937 {"v8-pac-mojo-out-of-process",
1938 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
1939 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
1941 ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
,
1942 switches::kDisableOutOfProcessPac
)},
1943 #if defined(ENABLE_MEDIA_ROUTER)
1944 {"enable-media-router",
1945 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
1946 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
1948 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)},
1949 #endif // defined(ENABLE_MEDIA_ROUTER)
1950 // Since Drive Search is not available when app list is disabled, flag guard
1951 // enable-drive-search-in-chrome-launcher flag.
1952 #if defined(ENABLE_APP_LIST)
1953 {"enable-drive-search-in-app-launcher",
1954 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER
,
1955 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER_DESCRIPTION
,
1957 ENABLE_DISABLE_VALUE_TYPE(
1958 app_list::switches::kEnableDriveSearchInChromeLauncher
,
1959 app_list::switches::kDisableDriveSearchInChromeLauncher
)},
1960 #endif // defined(ENABLE_APP_LIST)
1961 #if defined(OS_CHROMEOS)
1962 {"disable-mtp-write-support",
1963 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_NAME
,
1964 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_DESCRIPTION
,
1966 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport
)},
1967 #endif // defined(OS_CHROMEOS)
1968 #if defined(OS_CHROMEOS)
1969 {"enable-datasaver-prompt",
1970 IDS_FLAGS_DATASAVER_PROMPT_NAME
,
1971 IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION
,
1973 MULTI_VALUE_TYPE(kDataSaverPromptChoices
)},
1974 #endif // defined(OS_CHROMEOS)
1975 {"supervised-user-safesites",
1976 IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME
,
1977 IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1978 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1979 MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices
)},
1980 #if defined(OS_ANDROID)
1981 {"enable-autofill-keyboard-accessory-view",
1982 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME
,
1983 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION
,
1985 SINGLE_VALUE_TYPE(autofill::switches::kEnableAccessorySuggestionView
)},
1986 #endif // defined(OS_ANDROID)
1987 {"disable-new-video-renderer",
1988 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_NAME
,
1989 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_DESCRIPTION
,
1991 SINGLE_VALUE_TYPE(switches::kDisableNewVideoRenderer
)},
1992 // Temporary flag to ease the transition to standard-compliant scrollTop
1993 // behavior. Will be removed shortly after http://crbug.com/157855 ships.
1994 {"scroll-top-left-interop",
1995 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_NAME
,
1996 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_DESCRIPTION
,
1998 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableBlinkFeatures
,
1999 "ScrollTopLeftInterop",
2000 switches::kDisableBlinkFeatures
,
2001 "ScrollTopLeftInterop")},
2003 {"try-supported-channel-layouts",
2004 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_NAME
,
2005 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_DESCRIPTION
,
2007 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts
)},
2009 {"emphasize-titles-in-omnibox-dropdown",
2010 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_NAME
,
2011 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_DESCRIPTION
,
2013 SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown
)},
2014 #if defined(ENABLE_WEBRTC)
2015 {"enable-webrtc-dtls12",
2016 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME
,
2017 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION
,
2019 SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12
)},
2021 #if defined(OS_MACOSX)
2023 IDS_FLAGS_APP_INFO_DIALOG_NAME
,
2024 IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION
,
2026 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppInfoDialogMac
,
2027 switches::kDisableAppInfoDialogMac
)},
2028 {"mac-views-native-app-windows",
2029 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_NAME
,
2030 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_DESCRIPTION
,
2032 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMacViewsNativeAppWindows
,
2033 switches::kDisableMacViewsNativeAppWindows
)},
2034 {"app-window-cycling",
2035 IDS_FLAGS_APP_WINDOW_CYCLING_NAME
,
2036 IDS_FLAGS_APP_WINDOW_CYCLING_DESCRIPTION
,
2038 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppWindowCycling
,
2039 switches::kDisableAppWindowCycling
)},
2041 #if defined(ENABLE_WEBVR)
2043 IDS_FLAGS_ENABLE_WEBVR_NAME
,
2044 IDS_FLAGS_ENABLE_WEBVR_DESCRIPTION
,
2046 SINGLE_VALUE_TYPE(switches::kEnableWebVR
)},
2048 #if defined(OS_CHROMEOS)
2049 {"disable-accelerated-mjpeg-decode",
2050 IDS_FLAGS_DISABLE_ACCELERATED_MJPEG_DECODE_NAME
,
2051 IDS_FLAGS_DISABLE_ACCELERATED_MJPEG_DECODE_DESCRIPTION
,
2053 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode
)},
2054 #endif // OS_CHROMEOS
2055 {"v8-cache-options",
2056 IDS_FLAGS_V8_CACHE_OPTIONS_NAME
,
2057 IDS_FLAGS_V8_CACHE_OPTIONS_DESCRIPTION
,
2059 MULTI_VALUE_TYPE(kV8CacheOptionsChoices
)},
2060 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2061 {"enable-md-downloads",
2062 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_NAME
,
2063 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_DESCRIPTION
,
2065 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignDownloads
)},
2067 #if defined(OS_WIN) || defined(OS_MACOSX)
2068 {"enable-tab-discarding",
2069 IDS_FLAGS_ENABLE_TAB_DISCARDING_NAME
,
2070 IDS_FLAGS_ENABLE_TAB_DISCARDING_DESCRIPTION
,
2072 SINGLE_VALUE_TYPE(switches::kEnableTabDiscarding
)},
2074 {"enable-clear-browsing-data-counters",
2075 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_NAME
,
2076 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_DESCRIPTION
,
2078 SINGLE_VALUE_TYPE(switches::kEnableClearBrowsingDataCounters
)
2080 #if defined(ENABLE_TASK_MANAGER)
2081 {"enable-new-task-manager",
2082 IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_NAME
,
2083 IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_DESCRIPTION
,
2085 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager
)
2087 #endif // defined(ENABLE_TASK_MANAGER)
2088 {"simplified-fullscreen-ui",
2089 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME
,
2090 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION
,
2092 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI
,
2093 switches::kDisableSimplifiedFullscreenUI
)
2095 #if defined(OS_ANDROID)
2096 {"progress-bar-animation",
2097 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME
,
2098 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION
,
2100 MULTI_VALUE_TYPE(kProgressBarAnimationChoices
)},
2101 #endif // defined(OS_ANDROID)
2103 // NOTE: Adding new command-line switches requires adding corresponding
2104 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2105 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2108 const Experiment
* experiments
= kExperiments
;
2109 size_t num_experiments
= arraysize(kExperiments
);
2111 // Stores and encapsulates the little state that about:flags has.
2114 FlagsState() : needs_restart_(false) {}
2115 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2116 base::CommandLine
* command_line
,
2117 SentinelsMode sentinels
);
2118 bool IsRestartNeededToCommitChanges();
2119 void SetExperimentEnabled(
2120 FlagsStorage
* flags_storage
,
2121 const std::string
& internal_name
,
2123 void RemoveFlagsSwitches(
2124 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2125 void ResetAllFlags(FlagsStorage
* flags_storage
);
2128 // Returns the singleton instance of this class
2129 static FlagsState
* GetInstance() {
2130 return Singleton
<FlagsState
>::get();
2134 bool needs_restart_
;
2135 std::map
<std::string
, std::string
> flags_switches_
;
2137 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2140 // Adds the internal names for the specified experiment to |names|.
2141 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2142 if (e
.type
== Experiment::SINGLE_VALUE
||
2143 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2144 names
->insert(e
.internal_name
);
2146 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2147 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2148 for (int i
= 0; i
< e
.num_choices
; ++i
)
2149 names
->insert(e
.NameForChoice(i
));
2153 // Confirms that an experiment is valid, used in a DCHECK in
2154 // SanitizeList below.
2155 bool ValidateExperiment(const Experiment
& e
) {
2157 case Experiment::SINGLE_VALUE
:
2158 case Experiment::SINGLE_DISABLE_VALUE
:
2159 DCHECK_EQ(0, e
.num_choices
);
2162 case Experiment::MULTI_VALUE
:
2163 DCHECK_GT(e
.num_choices
, 0);
2165 DCHECK(e
.choices
[0].command_line_switch
);
2166 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2168 case Experiment::ENABLE_DISABLE_VALUE
:
2169 DCHECK_EQ(3, e
.num_choices
);
2171 DCHECK(e
.command_line_switch
);
2172 DCHECK(e
.command_line_value
);
2173 DCHECK(e
.disable_command_line_switch
);
2174 DCHECK(e
.disable_command_line_value
);
2182 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2183 // unknown, to prevent this list to become very long as experiments are added
2185 void SanitizeList(FlagsStorage
* flags_storage
) {
2186 std::set
<std::string
> known_experiments
;
2187 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2188 DCHECK(ValidateExperiment(experiments
[i
]));
2189 AddInternalName(experiments
[i
], &known_experiments
);
2192 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2194 std::set
<std::string
> new_enabled_experiments
=
2195 base::STLSetIntersection
<std::set
<std::string
> >(
2196 known_experiments
, enabled_experiments
);
2198 if (new_enabled_experiments
!= enabled_experiments
)
2199 flags_storage
->SetFlags(new_enabled_experiments
);
2202 void GetSanitizedEnabledFlags(
2203 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2204 SanitizeList(flags_storage
);
2205 *result
= flags_storage
->GetFlags();
2208 bool SkipConditionalExperiment(const Experiment
& experiment
) {
2209 version_info::Channel channel
= chrome::GetChannel();
2211 #if defined(OS_ANDROID)
2212 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2213 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2214 channel
!= version_info::Channel::BETA
&&
2215 channel
!= version_info::Channel::DEV
) {
2218 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2219 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2220 channel
!= version_info::Channel::DEV
) {
2223 // enable-data-reduction-proxy-carrier-test is only available for Chromium
2224 // builds and the Canary/Dev channel.
2225 if (!strcmp("enable-data-reduction-proxy-carrier-test",
2226 experiment
.internal_name
) &&
2227 channel
!= version_info::Channel::DEV
&&
2228 channel
!= version_info::Channel::CANARY
&&
2229 channel
!= version_info::Channel::UNKNOWN
) {
2234 // data-reduction-proxy-lo-fi is only available for Chromium builds and
2235 // the Canary/Dev/Beta channels.
2236 if (!strcmp("data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2237 channel
!= version_info::Channel::BETA
&&
2238 channel
!= version_info::Channel::DEV
&&
2239 channel
!= version_info::Channel::CANARY
&&
2240 channel
!= version_info::Channel::UNKNOWN
) {
2244 // enable-data-reduction-proxy-config-client is only available for Chromium
2245 // builds and the Canary/Dev channels.
2246 if (!strcmp("enable-data-reduction-proxy-config-client",
2247 experiment
.internal_name
) &&
2248 channel
!= version_info::Channel::DEV
&&
2249 channel
!= version_info::Channel::CANARY
&&
2250 channel
!= version_info::Channel::UNKNOWN
) {
2254 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2255 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2256 // builds and Canary/Dev channel.
2257 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2258 experiment
.internal_name
) &&
2259 channel
!= version_info::Channel::UNKNOWN
&&
2260 channel
!= version_info::Channel::CANARY
&&
2261 channel
!= version_info::Channel::DEV
) {
2270 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2271 // enabled on the current platform.
2272 void GetSanitizedEnabledFlagsForCurrentPlatform(
2273 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2274 GetSanitizedEnabledFlags(flags_storage
, result
);
2276 // Filter out any experiments that aren't enabled on the current platform. We
2277 // don't remove these from prefs else syncing to a platform with a different
2278 // set of experiments would be lossy.
2279 std::set
<std::string
> platform_experiments
;
2280 int current_platform
= GetCurrentPlatform();
2281 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2282 if (experiments
[i
].supported_platforms
& current_platform
)
2283 AddInternalName(experiments
[i
], &platform_experiments
);
2284 #if defined(OS_CHROMEOS)
2285 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2286 AddInternalName(experiments
[i
], &platform_experiments
);
2290 std::set
<std::string
> new_enabled_experiments
=
2291 base::STLSetIntersection
<std::set
<std::string
> >(
2292 platform_experiments
, *result
);
2294 result
->swap(new_enabled_experiments
);
2297 // Returns true if none of this experiment's options have been enabled.
2298 bool IsDefaultValue(
2299 const Experiment
& experiment
,
2300 const std::set
<std::string
>& enabled_experiments
) {
2301 switch (experiment
.type
) {
2302 case Experiment::SINGLE_VALUE
:
2303 case Experiment::SINGLE_DISABLE_VALUE
:
2304 return enabled_experiments
.count(experiment
.internal_name
) == 0;
2305 case Experiment::MULTI_VALUE
:
2306 case Experiment::ENABLE_DISABLE_VALUE
:
2307 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2308 if (enabled_experiments
.count(experiment
.NameForChoice(i
)) > 0)
2318 // Returns the Value representing the choice data in the specified experiment.
2319 base::Value
* CreateChoiceData(
2320 const Experiment
& experiment
,
2321 const std::set
<std::string
>& enabled_experiments
) {
2322 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2323 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2324 base::ListValue
* result
= new base::ListValue
;
2325 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2326 base::DictionaryValue
* value
= new base::DictionaryValue
;
2327 const std::string name
= experiment
.NameForChoice(i
);
2328 value
->SetString("internal_name", name
);
2329 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2330 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2331 result
->Append(value
);
2338 std::string
Experiment::NameForChoice(int index
) const {
2339 DCHECK(type
== Experiment::MULTI_VALUE
||
2340 type
== Experiment::ENABLE_DISABLE_VALUE
);
2341 DCHECK_LT(index
, num_choices
);
2342 return std::string(internal_name
) + testing::kMultiSeparator
+
2343 base::IntToString(index
);
2346 base::string16
Experiment::DescriptionForChoice(int index
) const {
2347 DCHECK(type
== Experiment::MULTI_VALUE
||
2348 type
== Experiment::ENABLE_DISABLE_VALUE
);
2349 DCHECK_LT(index
, num_choices
);
2351 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2352 const int kEnableDisableDescriptionIds
[] = {
2353 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2354 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2355 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2357 description_id
= kEnableDisableDescriptionIds
[index
];
2359 description_id
= choices
[index
].description_id
;
2361 return l10n_util::GetStringUTF16(description_id
);
2364 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2365 base::CommandLine
* command_line
,
2366 SentinelsMode sentinels
) {
2367 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2372 bool AreSwitchesIdenticalToCurrentCommandLine(
2373 const base::CommandLine
& new_cmdline
,
2374 const base::CommandLine
& active_cmdline
,
2375 std::set
<base::CommandLine::StringType
>* out_difference
) {
2376 std::set
<base::CommandLine::StringType
> new_flags
=
2377 ExtractFlagsFromCommandLine(new_cmdline
);
2378 std::set
<base::CommandLine::StringType
> active_flags
=
2379 ExtractFlagsFromCommandLine(active_cmdline
);
2381 bool result
= false;
2382 // Needed because std::equal doesn't check if the 2nd set is empty.
2383 if (new_flags
.size() == active_flags
.size()) {
2385 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2388 if (out_difference
&& !result
) {
2389 std::set_symmetric_difference(
2392 active_flags
.begin(),
2394 std::inserter(*out_difference
, out_difference
->begin()));
2400 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2402 base::ListValue
* supported_experiments
,
2403 base::ListValue
* unsupported_experiments
) {
2404 std::set
<std::string
> enabled_experiments
;
2405 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2407 int current_platform
= GetCurrentPlatform();
2409 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2410 const Experiment
& experiment
= experiments
[i
];
2411 if (SkipConditionalExperiment(experiment
))
2414 base::DictionaryValue
* data
= new base::DictionaryValue();
2415 data
->SetString("internal_name", experiment
.internal_name
);
2416 data
->SetString("name",
2417 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2418 data
->SetString("description",
2419 l10n_util::GetStringUTF16(
2420 experiment
.visible_description_id
));
2422 base::ListValue
* supported_platforms
= new base::ListValue();
2423 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2424 data
->Set("supported_platforms", supported_platforms
);
2425 // True if the switch is not currently passed.
2426 bool is_default_value
= IsDefaultValue(experiment
, enabled_experiments
);
2427 data
->SetBoolean("is_default", is_default_value
);
2429 switch (experiment
.type
) {
2430 case Experiment::SINGLE_VALUE
:
2431 case Experiment::SINGLE_DISABLE_VALUE
:
2434 (!is_default_value
&&
2435 experiment
.type
== Experiment::SINGLE_VALUE
) ||
2436 (is_default_value
&&
2437 experiment
.type
== Experiment::SINGLE_DISABLE_VALUE
));
2439 case Experiment::MULTI_VALUE
:
2440 case Experiment::ENABLE_DISABLE_VALUE
:
2441 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2447 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2448 #if defined(OS_CHROMEOS)
2449 if (access
== kOwnerAccessToFlags
&&
2450 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2455 supported_experiments
->Append(data
);
2457 unsupported_experiments
->Append(data
);
2461 bool IsRestartNeededToCommitChanges() {
2462 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2465 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2466 const std::string
& internal_name
,
2468 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2469 internal_name
, enable
);
2472 void RemoveFlagsSwitches(
2473 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2474 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2477 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2478 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2481 int GetCurrentPlatform() {
2482 #if defined(OS_MACOSX)
2484 #elif defined(OS_WIN)
2486 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2488 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2490 #elif defined(OS_ANDROID)
2493 #error Unknown platform
2497 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2498 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2499 for (const std::string
& flag
: flags
) {
2500 std::string
action("AboutFlags_");
2502 content::RecordComputedAction(action
);
2504 // Since flag metrics are recorded every startup, add a tick so that the
2505 // stats can be made meaningful.
2507 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2508 content::RecordAction(base::UserMetricsAction("StartupTick"));
2511 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2512 return static_cast<base::HistogramBase::Sample
>(
2513 metrics::HashMetricName(switch_name
));
2516 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2517 const std::set
<std::string
>& command_line_difference
) {
2518 for (const std::string
& flag
: command_line_difference
) {
2519 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2520 if (base::StartsWith(flag
, "--", base::CompareCase::SENSITIVE
)) {
2521 // Skip '--' before switch name.
2522 std::string
switch_name(flag
.substr(2));
2524 // Kill value, if any.
2525 const size_t value_pos
= switch_name
.find('=');
2526 if (value_pos
!= std::string::npos
)
2527 switch_name
.resize(value_pos
);
2529 uma_id
= GetSwitchUMAId(switch_name
);
2531 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2532 << "' has incorrect format.";
2534 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2535 << "' '" << flag
<< "', uma_id=" << uma_id
;
2537 // Sparse histogram macro does not cache the histogram, so it's safe
2538 // to use macro with non-static histogram name here.
2539 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2543 //////////////////////////////////////////////////////////////////////////////
2544 // FlagsState implementation.
2548 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2549 NameToSwitchAndValueMap
;
2551 void SetFlagToSwitchMapping(const std::string
& key
,
2552 const std::string
& switch_name
,
2553 const std::string
& switch_value
,
2554 NameToSwitchAndValueMap
* name_to_switch_map
) {
2555 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2556 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2559 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2560 base::CommandLine
* command_line
,
2561 SentinelsMode sentinels
) {
2562 if (command_line
->HasSwitch(switches::kNoExperiments
))
2565 std::set
<std::string
> enabled_experiments
;
2567 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2568 &enabled_experiments
);
2570 NameToSwitchAndValueMap name_to_switch_map
;
2571 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2572 const Experiment
& e
= experiments
[i
];
2573 if (e
.type
== Experiment::SINGLE_VALUE
||
2574 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2575 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2576 e
.command_line_value
, &name_to_switch_map
);
2577 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2578 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2579 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2580 e
.choices
[j
].command_line_switch
,
2581 e
.choices
[j
].command_line_value
,
2582 &name_to_switch_map
);
2585 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2586 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2587 &name_to_switch_map
);
2588 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2589 e
.command_line_value
, &name_to_switch_map
);
2590 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2591 e
.disable_command_line_value
, &name_to_switch_map
);
2595 if (sentinels
== kAddSentinels
) {
2596 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2597 flags_switches_
.insert(
2598 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2601 for (const std::string
& experiment_name
: enabled_experiments
) {
2602 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2603 name_to_switch_map
.find(experiment_name
);
2604 if (name_to_switch_it
== name_to_switch_map
.end()) {
2609 const std::pair
<std::string
, std::string
>&
2610 switch_and_value_pair
= name_to_switch_it
->second
;
2612 CHECK(!switch_and_value_pair
.first
.empty());
2613 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2614 switch_and_value_pair
.second
);
2615 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2617 if (sentinels
== kAddSentinels
) {
2618 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2619 flags_switches_
.insert(
2620 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2625 bool FlagsState::IsRestartNeededToCommitChanges() {
2626 return needs_restart_
;
2629 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2630 const std::string
& internal_name
,
2632 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2633 if (at_index
!= std::string::npos
) {
2635 // We're being asked to enable a multi-choice experiment. Disable the
2636 // currently selected choice.
2637 DCHECK_NE(at_index
, 0u);
2638 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2639 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2641 // And enable the new choice, if it is not the default first choice.
2642 if (internal_name
!= experiment_name
+ "@0") {
2643 std::set
<std::string
> enabled_experiments
;
2644 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2645 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2646 flags_storage
->SetFlags(enabled_experiments
);
2651 std::set
<std::string
> enabled_experiments
;
2652 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2654 const Experiment
* e
= NULL
;
2655 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2656 if (experiments
[i
].internal_name
== internal_name
) {
2657 e
= experiments
+ i
;
2663 if (e
->type
== Experiment::SINGLE_VALUE
) {
2665 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2667 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2668 } else if (e
->type
== Experiment::SINGLE_DISABLE_VALUE
) {
2670 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2672 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2675 // Enable the first choice.
2676 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2678 // Find the currently enabled choice and disable it.
2679 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2680 std::string choice_name
= e
->NameForChoice(i
);
2681 if (enabled_experiments
.find(choice_name
) !=
2682 enabled_experiments
.end()) {
2683 needs_restart_
= true;
2684 enabled_experiments
.erase(choice_name
);
2685 // Continue on just in case there's a bug and more than one
2686 // experiment for this choice was enabled.
2692 flags_storage
->SetFlags(enabled_experiments
);
2695 void FlagsState::RemoveFlagsSwitches(
2696 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2697 for (const auto& entry
: flags_switches_
)
2698 switch_list
->erase(entry
.first
);
2701 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2702 needs_restart_
= true;
2704 std::set
<std::string
> no_experiments
;
2705 flags_storage
->SetFlags(no_experiments
);
2708 void FlagsState::reset() {
2709 needs_restart_
= false;
2710 flags_switches_
.clear();
2717 // WARNING: '@' is also used in the html file. If you update this constant you
2718 // also need to update the html file.
2719 const char kMultiSeparator
[] = "@";
2721 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2724 FlagsState::GetInstance()->reset();
2727 void SetExperiments(const Experiment
* e
, size_t count
) {
2729 experiments
= kExperiments
;
2730 num_experiments
= arraysize(kExperiments
);
2733 num_experiments
= count
;
2737 const Experiment
* GetExperiments(size_t* count
) {
2738 *count
= num_experiments
;
2742 } // namespace testing
2744 } // namespace about_flags