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/offline_pages/offline_page_switches.h"
35 #include "components/omnibox/browser/omnibox_switches.h"
36 #include "components/plugins/common/plugins_switches.h"
37 #include "components/proximity_auth/switches.h"
38 #include "components/search/search_switches.h"
39 #include "components/version_info/version_info.h"
40 #include "content/public/browser/user_metrics.h"
41 #include "media/base/media_switches.h"
42 #include "ui/base/l10n/l10n_util.h"
43 #include "ui/base/ui_base_switches.h"
44 #include "ui/display/display_switches.h"
45 #include "ui/events/event_switches.h"
46 #include "ui/gfx/switches.h"
47 #include "ui/gl/gl_switches.h"
48 #include "ui/keyboard/keyboard_switches.h"
49 #include "ui/native_theme/native_theme_switches.h"
50 #include "ui/views/views_switches.h"
52 #if defined(OS_ANDROID)
53 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
55 #include "ui/message_center/message_center_switches.h"
59 #include "ash/ash_switches.h"
62 #if defined(OS_CHROMEOS)
63 #include "chromeos/chromeos_switches.h"
64 #include "third_party/cros_system_api/switches/chrome_switches.h"
67 #if defined(ENABLE_APP_LIST)
68 #include "ui/app_list/app_list_switches.h"
71 #if defined(ENABLE_EXTENSIONS)
72 #include "extensions/common/switches.h"
75 #if defined(USE_OZONE)
76 #include "ui/ozone/public/ozone_switches.h"
79 namespace about_flags
{
81 // Macros to simplify specifying the type.
82 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
83 Experiment::SINGLE_VALUE, \
84 command_line_switch, switch_value, NULL, NULL, NULL, 0
85 #define SINGLE_VALUE_TYPE(command_line_switch) \
86 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
87 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
88 Experiment::SINGLE_DISABLE_VALUE, \
89 command_line_switch, switch_value, NULL, NULL, NULL, 0
90 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \
91 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
92 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
93 disable_switch, disable_value) \
94 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
95 disable_switch, disable_value, NULL, 3
96 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
97 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
98 #define MULTI_VALUE_TYPE(choices) \
99 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
103 // Enumeration of OSs.
110 kOsCrOSOwnerOnly
= 1 << 5
113 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
114 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
116 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
117 // whether the experiment is available on that platform.
118 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
121 const char* const name
;
126 {kOsCrOS
, "Chrome OS"},
127 {kOsAndroid
, "Android"},
128 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
130 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
131 if (bitmask
& kBitsToOs
[i
].bit
)
132 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
136 // Convert switch constants to proper CommandLine::StringType strings.
137 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
138 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
139 cmd_line
.AppendSwitch(flag
);
140 DCHECK_EQ(2U, cmd_line
.argv().size());
141 return cmd_line
.argv()[1];
144 // Scoops flags from a command line.
145 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
146 const base::CommandLine
& cmdline
) {
147 std::set
<base::CommandLine::StringType
> flags
;
148 // First do the ones between --flag-switches-begin and --flag-switches-end.
149 base::CommandLine::StringVector::const_iterator first
=
150 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
151 GetSwitchString(switches::kFlagSwitchesBegin
));
152 base::CommandLine::StringVector::const_iterator last
=
153 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
154 GetSwitchString(switches::kFlagSwitchesEnd
));
155 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
156 flags
.insert(first
+ 1, last
);
157 #if defined(OS_CHROMEOS)
158 // Then add those between --policy-switches-begin and --policy-switches-end.
159 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
160 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
161 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
162 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
163 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
164 flags
.insert(first
+ 1, last
);
169 const Experiment::Choice kTouchEventsChoices
[] = {
170 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
171 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
172 switches::kTouchEvents
,
173 switches::kTouchEventsEnabled
},
174 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
175 switches::kTouchEvents
,
176 switches::kTouchEventsDisabled
}
179 #if defined(USE_AURA)
180 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
181 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
182 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
183 switches::kOverscrollHistoryNavigation
,
185 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
186 switches::kOverscrollHistoryNavigation
,
191 const Experiment::Choice kTouchTextSelectionStrategyChoices
[] = {
192 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
193 { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER
,
194 switches::kTouchTextSelectionStrategy
,
196 { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION
,
197 switches::kTouchTextSelectionStrategy
,
201 #if !defined(DISABLE_NACL)
202 const Experiment::Choice kNaClDebugMaskChoices
[] = {
203 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
204 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
205 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
206 // so by default we want to avoid debugging that.
207 // NOTE: As the default value must be the empty string, the mask excluding
208 // the PNaCl translator and secure shell is substituted elsewhere.
209 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
210 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
211 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
212 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
216 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
218 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
219 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
220 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
221 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
},
222 { IDS_MARK_NON_SECURE_AS_DUBIOUS
,
223 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsDubious
}
226 const Experiment::Choice kDataReductionProxyLoFiChoices
[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
228 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON
,
229 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
230 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn
},
231 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY
,
232 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
233 data_reduction_proxy::switches::
234 kDataReductionProxyLoFiValueCellularOnly
},
235 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DISABLED
,
236 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
237 data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled
},
238 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_SLOW_CONNECTIONS_ONLY
,
239 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
240 data_reduction_proxy::switches::
241 kDataReductionProxyLoFiValueSlowConnectionsOnly
}
244 const Experiment::Choice kShowSavedCopyChoices
[] = {
245 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
246 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY
,
247 switches::kShowSavedCopy
, switches::kEnableShowSavedCopyPrimary
},
248 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY
,
249 switches::kShowSavedCopy
, switches::kEnableShowSavedCopySecondary
},
250 { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY
,
251 switches::kShowSavedCopy
, switches::kDisableShowSavedCopy
}
254 const Experiment::Choice kDefaultTileWidthChoices
[] = {
255 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
256 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
257 switches::kDefaultTileWidth
, "128"},
258 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
259 switches::kDefaultTileWidth
, "256"},
260 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
261 switches::kDefaultTileWidth
, "512"},
262 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
263 switches::kDefaultTileWidth
, "1024"}
266 const Experiment::Choice kDefaultTileHeightChoices
[] = {
267 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
268 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT
,
269 switches::kDefaultTileHeight
, "128"},
270 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL
,
271 switches::kDefaultTileHeight
, "256"},
272 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE
,
273 switches::kDefaultTileHeight
, "512"},
274 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI
,
275 switches::kDefaultTileHeight
, "1024"}
278 const Experiment::Choice kSimpleCacheBackendChoices
[] = {
279 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
280 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
281 switches::kUseSimpleCacheBackend
, "off" },
282 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
283 switches::kUseSimpleCacheBackend
, "on"}
286 #if defined(USE_AURA)
287 const Experiment::Choice kTabCaptureUpscaleQualityChoices
[] = {
288 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
289 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
290 switches::kTabCaptureUpscaleQuality
, "fast" },
291 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
292 switches::kTabCaptureUpscaleQuality
, "good" },
293 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
294 switches::kTabCaptureUpscaleQuality
, "best" },
297 const Experiment::Choice kTabCaptureDownscaleQualityChoices
[] = {
298 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
300 switches::kTabCaptureDownscaleQuality
, "fast" },
301 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
302 switches::kTabCaptureDownscaleQuality
, "good" },
303 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
304 switches::kTabCaptureDownscaleQuality
, "best" },
308 #if defined(OS_ANDROID)
309 const Experiment::Choice kZeroSuggestExperimentsChoices
[] = {
310 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
311 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED
,
312 switches::kEnableZeroSuggestMostVisited
, ""},
313 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP
,
314 switches::kEnableZeroSuggestMostVisitedWithoutSerp
, ""},
315 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
316 switches::kDisableZeroSuggest
, ""}
319 const Experiment::Choice kReaderModeHeuristicsChoices
[] = {
320 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
321 { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP
,
322 switches::kReaderModeHeuristics
,
323 switches::reader_mode_heuristics::kOGArticle
},
324 { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST
,
325 switches::kReaderModeHeuristics
,
326 switches::reader_mode_heuristics::kAdaBoost
},
327 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON
,
328 switches::kReaderModeHeuristics
,
329 switches::reader_mode_heuristics::kAlwaysTrue
},
330 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF
,
331 switches::kReaderModeHeuristics
,
332 switches::reader_mode_heuristics::kNone
},
336 const Experiment::Choice kNumRasterThreadsChoices
[] = {
337 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
338 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
339 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
340 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
341 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
344 const Experiment::Choice kGpuRasterizationMSAASampleCountChoices
[] = {
345 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
348 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO
,
349 switches::kGpuRasterizationMSAASampleCount
, "0" },
350 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO
,
351 switches::kGpuRasterizationMSAASampleCount
, "2" },
352 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR
,
353 switches::kGpuRasterizationMSAASampleCount
, "4" },
354 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT
,
355 switches::kGpuRasterizationMSAASampleCount
, "8" },
356 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN
,
357 switches::kGpuRasterizationMSAASampleCount
, "16" },
360 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
361 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
362 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
363 switches::kEnableGpuRasterization
, "" },
364 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
365 switches::kDisableGpuRasterization
, "" },
366 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
367 switches::kForceGpuRasterization
, "" },
370 #if defined(OS_CHROMEOS)
371 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
372 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
373 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
374 chromeos::switches::kMemoryPressureThresholds
,
375 chromeos::switches::kConservativeThreshold
},
376 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
377 chromeos::switches::kMemoryPressureThresholds
,
378 chromeos::switches::kAggressiveCacheDiscardThreshold
},
379 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
380 chromeos::switches::kMemoryPressureThresholds
,
381 chromeos::switches::kAggressiveTabDiscardThreshold
},
382 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
383 chromeos::switches::kMemoryPressureThresholds
,
384 chromeos::switches::kAggressiveThreshold
},
388 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
389 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
390 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
391 switches::kExtensionContentVerification
,
392 switches::kExtensionContentVerificationBootstrap
},
393 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
394 switches::kExtensionContentVerification
,
395 switches::kExtensionContentVerificationEnforce
},
396 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
397 switches::kExtensionContentVerification
,
398 switches::kExtensionContentVerificationEnforceStrict
},
401 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
402 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
403 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
404 password_manager::switches::kAllowAutofillSyncCredential
, ""},
405 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
406 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
407 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
408 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
411 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
412 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
413 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
414 autofill::switches::kDisableFillOnAccountSelect
, "" },
415 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
416 autofill::switches::kEnableFillOnAccountSelect
, "" },
417 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
418 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
422 const Experiment::Choice kAshScreenRotationAnimationChoices
[] = {
423 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
424 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
425 ash::switches::kAshEnableScreenRotationAnimation
,
427 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION
,
428 ash::switches::kAshEnableScreenRotationAnimation
,
429 "partial-rotation" },
430 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION
,
431 ash::switches::kAshEnableScreenRotationAnimation
,
436 #if defined(ENABLE_TOPCHROME_MD)
437 const Experiment::Choice kTopChromeMaterialDesignChoices
[] = {
438 {IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL
, "", ""},
439 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL
,
440 switches::kTopChromeMD
,
441 switches::kTopChromeMDMaterial
},
442 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID
,
443 switches::kTopChromeMD
,
444 switches::kTopChromeMDMaterialHybrid
}};
447 #if defined(OS_CHROMEOS)
448 const Experiment::Choice kAshMaterialDesignInkDrop
[] = {
449 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
450 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_CIRCLE
,
451 switches::kMaterialDesignInkDrop
,
452 switches::kMaterialDesignInkDropCircle
},
453 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_SQUARE
,
454 switches::kMaterialDesignInkDrop
,
455 switches::kMaterialDesignInkDropSquare
}};
457 const Experiment::Choice kAshMaterialDesignInkDropAnimationSpeed
[] = {
458 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
459 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_FAST
,
460 switches::kMaterialDesignInkDropAnimationSpeed
,
461 switches::kMaterialDesignInkDropAnimationSpeedFast
},
462 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SLOW
,
463 switches::kMaterialDesignInkDropAnimationSpeed
,
464 switches::kMaterialDesignInkDropAnimationSpeedSlow
}};
466 const Experiment::Choice kDataSaverPromptChoices
[] = {
467 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
468 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
469 chromeos::switches::kDisableDataSaverPrompt
, "" },
470 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
471 chromeos::switches::kEnableDataSaverPrompt
, "" },
472 { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE
,
473 chromeos::switches::kEnableDataSaverPrompt
,
474 chromeos::switches::kDataSaverPromptDemoMode
},
477 const Experiment::Choice kFloatingVirtualKeyboardChoices
[] = {
478 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
479 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
480 keyboard::switches::kFloatingVirtualKeyboard
,
481 keyboard::switches::kFloatingVirtualKeyboardDisabled
},
482 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
483 keyboard::switches::kFloatingVirtualKeyboard
,
484 keyboard::switches::kFloatingVirtualKeyboardEnabled
},
487 const Experiment::Choice kSmartVirtualKeyboardChoices
[] = {
488 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
489 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
490 keyboard::switches::kSmartVirtualKeyboard
,
491 keyboard::switches::kSmartVirtualKeyboardDisabled
},
492 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
493 keyboard::switches::kSmartVirtualKeyboard
,
494 keyboard::switches::kSmartVirtualKeyboardEnabled
},
497 const Experiment::Choice kGestureTypingChoices
[] = {
498 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
499 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
500 keyboard::switches::kGestureTyping
,
501 keyboard::switches::kGestureTypingDisabled
},
502 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
503 keyboard::switches::kGestureTyping
,
504 keyboard::switches::kGestureTypingEnabled
},
507 const Experiment::Choice kGestureEditingChoices
[] = {
508 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
509 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
510 keyboard::switches::kGestureEditing
,
511 keyboard::switches::kGestureEditingDisabled
},
512 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
513 keyboard::switches::kGestureEditing
,
514 keyboard::switches::kGestureEditingEnabled
},
518 const Experiment::Choice kDownloadNotificationChoices
[] = {
519 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
520 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
521 switches::kEnableDownloadNotification
,
523 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
524 switches::kEnableDownloadNotification
,
528 const Experiment::Choice kSupervisedUserSafeSitesChoices
[] = {
529 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
530 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
531 switches::kSupervisedUserSafeSites
,
533 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
534 switches::kSupervisedUserSafeSites
,
536 { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY
,
537 switches::kSupervisedUserSafeSites
,
539 { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY
,
540 switches::kSupervisedUserSafeSites
,
541 "online-check-only" }
544 const Experiment::Choice kV8CacheOptionsChoices
[] = {
545 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
546 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
, switches::kV8CacheOptions
, "none" },
547 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE
, switches::kV8CacheOptions
, "parse" },
548 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE
, switches::kV8CacheOptions
, "code" },
551 #if defined(OS_ANDROID)
552 const Experiment::Choice kProgressBarAnimationChoices
[] = {
553 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
554 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
555 switches::kProgressBarAnimation
, "disabled" },
556 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_SMOOTH
,
557 switches::kProgressBarAnimation
, "smooth" },
558 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_FAST_START
,
559 switches::kProgressBarAnimation
, "fast-start" },
561 #endif // defined(OS_ANDROID)
563 // RECORDING USER METRICS FOR FLAGS:
564 // -----------------------------------------------------------------------------
565 // The first line of the experiment is the internal name. If you'd like to
566 // gather statistics about the usage of your flag, you should append a marker
567 // comment to the end of the feature name, like so:
568 // "my-special-feature", // FLAGS:RECORD_UMA
570 // After doing that, run
571 // tools/metrics/actions/extract_actions.py
572 // to add the metric to actions.xml (which will enable UMA to record your
573 // feature flag), then update the <owner>s and <description> sections. Make sure
574 // to include the actions.xml file when you upload your code for review!
576 // After your feature has shipped under a flag, you can locate the metrics under
577 // the action name AboutFlags_internal-action-name. Actions are recorded once
578 // per startup, so you should divide this number by AboutFlags_StartupTick to
579 // get a sense of usage. Note that this will not be the same as number of users
580 // with a given feature enabled because users can quit and relaunch the
581 // application multiple times over a given time interval. The dashboard also
582 // shows you how many (metrics reporting) users have enabled the flag over the
583 // last seven days. However, note that this is not the same as the number of
584 // users who have the flag enabled, since enabling the flag happens once,
585 // whereas running with the flag enabled happens until the user flips the flag
588 // To add a new experiment add to the end of kExperiments. There are two
589 // distinct types of experiments:
590 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
591 // macro for this type supplying the command line to the macro.
592 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
593 // deactivated state for this lab (i.e. no command line option). To specify
594 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
596 // See the documentation of Experiment for details on the fields.
598 // Command-line switches must have entries in enum "LoginCustomFlags" in
599 // histograms.xml. See note in histograms.xml and don't forget to run
600 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
602 // When adding a new choice, add it to the end of the list.
603 const Experiment kExperiments
[] = {
604 {"ignore-gpu-blacklist",
605 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
606 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
608 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)},
610 {"disable-direct-write",
611 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
612 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
614 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)},
616 {"enable-experimental-canvas-features",
617 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
618 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
620 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)},
621 {"disable-accelerated-2d-canvas",
622 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
623 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
625 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)},
626 {"enable-display-list-2d-canvas",
627 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
628 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
630 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
631 switches::kDisableDisplayList2dCanvas
)},
632 {"composited-layer-borders",
633 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
634 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
636 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)},
638 IDS_FLAGS_SHOW_FPS_COUNTER
,
639 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
641 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)},
643 IDS_FLAGS_DISABLE_WEBGL_NAME
,
644 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
646 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)},
648 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
649 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
651 #if defined(OS_ANDROID)
652 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
654 SINGLE_VALUE_TYPE("")
657 #if defined(ENABLE_WEBRTC)
658 {"disable-webrtc-hw-decoding",
659 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
660 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
661 kOsAndroid
| kOsCrOS
,
662 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)},
663 {"disable-webrtc-hw-encoding",
664 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
665 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
666 kOsAndroid
| kOsCrOS
,
667 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)},
668 {"enable-webrtc-stun-origin",
669 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
670 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
672 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)},
674 #if defined(OS_ANDROID)
676 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
677 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
679 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)},
681 // Native client is compiled out when DISABLE_NACL is defined.
682 #if !defined(DISABLE_NACL)
683 {"enable-nacl", // FLAGS:RECORD_UMA
684 IDS_FLAGS_ENABLE_NACL_NAME
,
685 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
687 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)},
688 {"enable-nacl-debug", // FLAGS:RECORD_UMA
689 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
690 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
692 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)},
693 {"nacl-debug-mask", // FLAGS:RECORD_UMA
694 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
695 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
697 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)},
699 #if defined(ENABLE_EXTENSIONS)
700 {"extension-apis", // FLAGS:RECORD_UMA
701 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
702 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
704 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)},
705 {"extensions-on-chrome-urls",
706 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
707 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
709 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)},
711 {"enable-fast-unload",
712 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
713 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
715 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)},
716 #if defined(ENABLE_EXTENSIONS)
717 {"enable-app-window-controls",
718 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
719 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
721 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)},
723 {"disable-hyperlink-auditing",
724 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
725 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
727 SINGLE_VALUE_TYPE(switches::kNoPings
)},
728 #if defined(OS_ANDROID)
729 {"contextual-search",
730 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
731 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
733 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
734 switches::kDisableContextualSearch
)},
736 {"show-autofill-type-predictions",
737 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
738 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
740 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)},
741 {"enable-smooth-scrolling", // FLAGS:RECORD_UMA
742 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
743 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
744 // Can't expose the switch unless the code is compiled in.
745 // On by default for the Mac (different implementation in WebKit).
747 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)},
748 #if defined(USE_AURA) || defined(OS_LINUX)
749 {"overlay-scrollbars",
750 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
751 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
752 // Uses the system preference on Mac (a different implementation).
753 // On Android, this is always enabled.
754 kOsLinux
| kOsCrOS
| kOsWin
,
755 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
756 switches::kDisableOverlayScrollbar
)},
759 IDS_FLAGS_ENABLE_PANELS_NAME
,
760 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
762 SINGLE_VALUE_TYPE(switches::kEnablePanels
)},
763 {// See http://crbug.com/120416 for how to remove this flag.
764 "save-page-as-mhtml", // FLAGS:RECORD_UMA
765 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
766 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
767 kOsMac
| kOsWin
| kOsLinux
,
768 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)},
770 IDS_FLAGS_ENABLE_QUIC_NAME
,
771 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
773 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
, switches::kDisableQuic
)},
774 {"disable-media-source",
775 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
776 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
778 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)},
779 {"disable-encrypted-media",
780 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
781 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
783 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)},
784 {"disable-prefixed-encrypted-media",
785 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
786 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
788 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)},
789 {"disable-javascript-harmony-shipping",
790 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
791 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
793 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)},
794 {"enable-javascript-harmony",
795 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
796 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
798 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)},
799 {"disable-software-rasterizer",
800 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
801 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
802 #if defined(ENABLE_SWIFTSHADER)
807 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)},
808 {"enable-gpu-rasterization",
809 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
810 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
812 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)},
813 {"gpu-rasterization-msaa-sample-count",
814 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME
,
815 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION
,
817 MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices
)},
818 {"disable-slimming-paint",
819 IDS_FLAGS_DISABLE_SLIMMING_PAINT_NAME
,
820 IDS_FLAGS_DISABLE_SLIMMING_PAINT_DESCRIPTION
,
822 SINGLE_VALUE_TYPE(switches::kDisableSlimmingPaint
)},
823 {"enable-slimming-paint",
824 IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME
,
825 IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION
,
827 SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint
)},
828 {"enable-experimental-web-platform-features",
829 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
830 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
832 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)},
833 {"enable-web-bluetooth",
834 IDS_FLAGS_WEB_BLUETOOTH_NAME
,
835 IDS_FLAGS_WEB_BLUETOOTH_DESCRIPTION
,
837 SINGLE_VALUE_TYPE(switches::kEnableWebBluetooth
)},
838 {"enable-devtools-experiments",
839 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
840 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
842 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)},
843 {"silent-debugger-extension-api",
844 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
845 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
847 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)},
848 #if defined(ENABLE_SPELLCHECK)
849 #if defined(OS_ANDROID)
850 {"enable-android-spellchecker",
851 IDS_OPTIONS_ENABLE_SPELLCHECK
,
852 IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION
,
854 SINGLE_VALUE_TYPE(switches::kEnableAndroidSpellChecker
)},
856 {"spellcheck-autocorrect",
857 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
858 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
859 kOsWin
| kOsLinux
| kOsCrOS
,
860 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)},
862 #if defined(ENABLE_SPELLCHECK) && \
863 (defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS))
864 {"enable-multilingual-spellchecker",
865 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_NAME
,
866 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_DESCRIPTION
,
867 kOsWin
| kOsLinux
| kOsCrOS
,
868 SINGLE_VALUE_TYPE(switches::kEnableMultilingualSpellChecker
)},
870 {"enable-scroll-prediction",
871 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
872 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
874 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)},
875 #if defined(ENABLE_TOPCHROME_MD)
877 IDS_FLAGS_TOP_CHROME_MD
,
878 IDS_FLAGS_TOP_CHROME_MD_DESCRIPTION
,
879 kOsWin
| kOsLinux
| kOsCrOS
,
880 MULTI_VALUE_TYPE(kTopChromeMaterialDesignChoices
)},
883 IDS_TOUCH_EVENTS_NAME
,
884 IDS_TOUCH_EVENTS_DESCRIPTION
,
886 MULTI_VALUE_TYPE(kTouchEventsChoices
)},
887 {"disable-touch-adjustment",
888 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
889 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
890 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
891 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)},
892 #if defined(OS_CHROMEOS)
893 {"network-portal-notification",
894 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
895 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
897 ENABLE_DISABLE_VALUE_TYPE(
898 chromeos::switches::kEnableNetworkPortalNotification
,
899 chromeos::switches::kDisableNetworkPortalNotification
)},
901 {"enable-download-resumption",
902 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
903 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
905 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)},
906 {"enable-download-notification",
907 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
908 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
910 MULTI_VALUE_TYPE(kDownloadNotificationChoices
)},
911 #if defined(ENABLE_PLUGINS)
912 {"allow-nacl-socket-api",
913 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
914 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
916 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")},
918 #if defined(OS_CHROMEOS)
919 {"allow-touchpad-three-finger-click",
920 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
921 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
923 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)},
924 {"ash-enable-unified-desktop",
925 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME
,
926 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION
,
928 SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop
)},
929 {"disable-easy-unlock",
930 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
931 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
933 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)},
934 {"enable-easy-unlock-proximity-detection",
935 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
936 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
938 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)},
939 {"enable-easy-unlock-bluetooth-low-energy-detection",
940 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME
,
941 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION
,
944 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery
)},
947 {"disable-minimize-on-second-launcher-item-click",
948 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
949 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
951 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)},
953 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
954 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
956 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)},
959 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
960 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
961 kOsLinux
| kOsWin
| kOsCrOS
,
962 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
964 #endif // defined(USE_ASH)
966 "enable-viewport-meta",
967 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
968 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
969 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
970 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
972 #if defined(OS_CHROMEOS)
974 "disable-boot-animation",
975 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
976 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
978 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
980 {"enable-video-player-chromecast-support",
981 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
982 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
985 chromeos::switches::kEnableVideoPlayerChromecastSupport
)},
987 "disable-office-editing-component-app",
988 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
989 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
991 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
994 "disable-display-color-calibration",
995 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
996 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
998 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
1001 "ash-disable-screen-orientation-lock",
1002 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
1003 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
1005 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
1007 #endif // defined(OS_CHROMEOS)
1009 "disable-accelerated-video-decode",
1010 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
1011 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
1012 kOsMac
| kOsWin
| kOsCrOS
,
1013 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
1015 #if defined(USE_ASH)
1017 "ash-debug-shortcuts",
1018 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
1019 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
1021 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
1024 "ash-disable-maximize-mode-window-backdrop",
1025 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME
,
1026 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION
,
1028 SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop
),
1031 "ash-enable-touch-view-testing",
1032 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
1033 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
1035 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
1038 "disable-touch-feedback",
1039 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
1040 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
1042 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
1045 "ash-enable-mirrored-screen",
1046 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1047 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1049 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1051 {"ash-enable-screen-rotation-animations",
1052 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME
,
1053 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION
,
1055 MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices
)},
1057 "ash-stable-overview-order",
1058 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_NAME
,
1059 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_DESCRIPTION
,
1061 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableStableOverviewOrder
,
1062 ash::switches::kAshDisableStableOverviewOrder
),
1064 #endif // defined(USE_ASH)
1065 #if defined(OS_CHROMEOS)
1066 {"material-design-ink-drop",
1067 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_NAME
,
1068 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_DESCRIPTION
,
1070 MULTI_VALUE_TYPE(kAshMaterialDesignInkDrop
)},
1071 {"material-design-ink-drop-animation-speed",
1072 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_NAME
,
1073 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_DESCRIPTION
,
1075 MULTI_VALUE_TYPE(kAshMaterialDesignInkDropAnimationSpeed
)},
1076 {"disable-cloud-import",
1077 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1078 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1080 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)},
1081 {"enable-request-tablet-site",
1082 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1083 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1085 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)},
1087 {"debug-packed-apps",
1088 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1089 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1091 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)},
1092 {"enable-password-generation",
1093 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1094 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1095 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1096 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1097 autofill::switches::kDisablePasswordGeneration
)},
1098 {"enable-automatic-password-saving",
1099 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1100 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1103 password_manager::switches::kEnableAutomaticPasswordSaving
)},
1104 {"password-manager-reauthentication",
1105 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1106 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1108 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)},
1109 {"enable-password-change-support",
1110 IDS_FLAGS_ENABLE_PASSWORD_CHANGE_SUPPORT_NAME
,
1111 IDS_FLAGS_ENABLE_PASSWORD_CHANGE_SUPPORT_DESCRIPTION
,
1112 kOsWin
| kOsLinux
| kOsCrOS
,
1114 password_manager::switches::kEnablePasswordChangeSupport
)},
1115 {"enable-password-force-saving",
1116 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME
,
1117 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION
,
1119 SINGLE_VALUE_TYPE(password_manager::switches::kEnablePasswordForceSaving
)},
1120 {"enable-password-link",
1121 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1122 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1123 kOsAndroid
| kOsDesktop
,
1124 ENABLE_DISABLE_VALUE_TYPE(
1125 password_manager::switches::kEnablePasswordLink
,
1126 password_manager::switches::kDisablePasswordLink
)},
1127 {"enable-affiliation-based-matching",
1128 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1129 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1130 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1131 ENABLE_DISABLE_VALUE_TYPE(
1132 password_manager::switches::kEnableAffiliationBasedMatching
,
1133 password_manager::switches::kDisableAffiliationBasedMatching
)},
1134 {"wallet-service-use-sandbox",
1135 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1136 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1137 kOsAndroid
| kOsDesktop
,
1138 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1139 autofill::switches::kWalletServiceUseSandbox
,
1141 autofill::switches::kWalletServiceUseSandbox
,
1143 #if defined(USE_AURA)
1144 {"overscroll-history-navigation",
1145 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1146 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1148 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)},
1150 {"scroll-end-effect",
1151 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1152 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1154 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScrollEndEffect
,
1156 switches::kScrollEndEffect
,
1159 IDS_FLAGS_ENABLE_ICON_NTP_NAME
,
1160 IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION
,
1161 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1162 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp
,
1163 switches::kDisableIconNtp
)},
1164 {"enable-touch-drag-drop",
1165 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1166 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1168 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1169 switches::kDisableTouchDragDrop
)},
1170 {"enable-touch-editing",
1171 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1172 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1173 kOsCrOS
| kOsWin
| kOsLinux
,
1174 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1175 switches::kDisableTouchEditing
)},
1176 {"touch-selection-strategy",
1177 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_NAME
,
1178 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_DESCRIPTION
,
1179 kOsAndroid
, // TODO(mfomitchev): Add CrOS/Win/Linux support soon.
1180 MULTI_VALUE_TYPE(kTouchTextSelectionStrategyChoices
)},
1181 {"enable-stale-while-revalidate",
1182 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1183 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1185 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)},
1186 {"enable-suggestions-service",
1187 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1188 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1189 kOsAndroid
| kOsCrOS
,
1190 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1191 switches::kDisableSuggestionsService
)},
1192 {"enable-suggestions-with-substring-match",
1193 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_NAME
,
1194 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_DESCRIPTION
,
1197 autofill::switches::kEnableSuggestionsWithSubstringMatch
)},
1198 {"enable-supervised-user-managed-bookmarks-folder",
1199 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1200 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1201 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1202 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)},
1203 #if defined(ENABLE_APP_LIST)
1204 {"enable-sync-app-list",
1205 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1206 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1208 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1209 app_list::switches::kDisableSyncAppList
)},
1211 #if defined(OS_MACOSX)
1212 {"enable-avfoundation",
1213 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1214 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1216 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1217 switches::kForceQTKit
)},
1220 IDS_FLAGS_LCD_TEXT_NAME
,
1221 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1223 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1224 switches::kDisableLCDText
)},
1225 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1226 {"delegated-renderer",
1227 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1228 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1229 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1230 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1231 switches::kDisableDelegatedRenderer
)},
1233 {"enable-offer-store-unmasked-wallet-cards",
1234 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS
,
1235 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION
,
1237 ENABLE_DISABLE_VALUE_TYPE(
1238 autofill::switches::kEnableOfferStoreUnmaskedWalletCards
,
1239 autofill::switches::kDisableOfferStoreUnmaskedWalletCards
)},
1240 {"enable-offline-auto-reload",
1241 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1242 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1244 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1245 switches::kDisableOfflineAutoReload
)},
1246 {"enable-offline-auto-reload-visible-only",
1247 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1248 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1250 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1251 switches::kDisableOfflineAutoReloadVisibleOnly
)},
1253 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1254 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1256 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)},
1257 {"default-tile-width",
1258 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1259 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1261 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)},
1262 {"default-tile-height",
1263 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1264 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1266 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)},
1267 #if defined(OS_ANDROID)
1268 {"disable-gesture-requirement-for-media-playback",
1269 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1270 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1272 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)},
1274 #if defined(OS_CHROMEOS)
1275 {"enable-virtual-keyboard",
1276 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1277 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1279 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)},
1280 {"enable-virtual-keyboard-overscroll",
1281 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1282 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1284 ENABLE_DISABLE_VALUE_TYPE(
1285 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1286 keyboard::switches::kDisableVirtualKeyboardOverscroll
)},
1287 {"enable-input-view",
1288 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1289 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1291 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1292 keyboard::switches::kDisableInputView
)},
1293 {"disable-new-korean-ime",
1294 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_NAME
,
1295 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_DESCRIPTION
,
1297 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewKoreanIme
)},
1298 {"enable-physical-keyboard-autocorrect",
1299 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1300 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1302 ENABLE_DISABLE_VALUE_TYPE(
1303 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1304 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)},
1305 {"disable-voice-input",
1306 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1307 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1309 SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput
)},
1310 {"enable-experimental-input-view-features",
1311 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1312 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1315 keyboard::switches::kEnableExperimentalInputViewFeatures
)},
1316 {"floating-virtual-keyboard",
1317 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME
,
1318 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION
,
1320 MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices
)},
1321 {"smart-virtual-keyboard",
1322 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_NAME
,
1323 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1325 MULTI_VALUE_TYPE(kSmartVirtualKeyboardChoices
)},
1327 IDS_FLAGS_GESTURE_TYPING_NAME
,
1328 IDS_FLAGS_GESTURE_TYPING_DESCRIPTION
,
1330 MULTI_VALUE_TYPE(kGestureTypingChoices
)},
1332 IDS_FLAGS_GESTURE_EDITING_NAME
,
1333 IDS_FLAGS_GESTURE_EDITING_DESCRIPTION
,
1335 MULTI_VALUE_TYPE(kGestureEditingChoices
)},
1336 {"enable-fullscreen-app-list",
1337 IDS_FLAGS_FULLSCREEN_APP_LIST_NAME
,
1338 IDS_FLAGS_FULLSCREEN_APP_LIST_DESCRIPTION
,
1340 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullscreenAppList
)},
1342 {"enable-simple-cache-backend",
1343 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1344 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1345 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1346 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)},
1347 {"enable-tcp-fast-open",
1348 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1349 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1350 kOsLinux
| kOsCrOS
| kOsAndroid
,
1351 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)},
1352 #if defined(ENABLE_SERVICE_DISCOVERY)
1353 {"device-discovery-notifications",
1354 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1355 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1357 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1358 switches::kDisableDeviceDiscoveryNotifications
)},
1359 {"enable-print-preview-register-promos",
1360 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1361 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1363 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)},
1364 #endif // ENABLE_SERVICE_DISCOVERY
1366 {"enable-cloud-print-xps",
1367 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1368 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1370 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)},
1372 #if defined(USE_AURA)
1373 {"tab-capture-upscale-quality",
1374 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1375 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1377 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)},
1378 {"tab-capture-downscale-quality",
1379 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1380 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1382 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)},
1384 #if defined(TOOLKIT_VIEWS)
1385 {"disable-hide-inactive-stacked-tab-close-buttons",
1386 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1387 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1388 kOsCrOS
| kOsWin
| kOsLinux
,
1389 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)},
1391 #if defined(ENABLE_SPELLCHECK)
1392 {"enable-spelling-feedback-field-trial",
1393 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1394 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1396 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)},
1398 {"enable-webgl-draft-extensions",
1399 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1400 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1402 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)},
1403 {"enable-new-profile-management",
1404 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1405 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1406 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1407 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1408 switches::kDisableNewProfileManagement
)},
1409 {"enable-account-consistency",
1410 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1411 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1412 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1413 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1414 switches::kDisableAccountConsistency
)},
1415 {"enable-iframe-based-signin",
1416 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1417 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1418 kOsMac
| kOsWin
| kOsLinux
,
1419 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)},
1420 {"enable-google-profile-info",
1421 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1422 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1423 kOsMac
| kOsWin
| kOsLinux
,
1424 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)},
1425 #if defined(ENABLE_EXTENSIONS)
1426 {"enable-surface-worker",
1427 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1428 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1430 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)},
1432 #if defined(ENABLE_APP_LIST)
1433 {"reset-app-list-install-state",
1434 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1435 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1436 kOsMac
| kOsWin
| kOsLinux
,
1437 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState
)},
1438 {"disable-drive-apps-in-app-list",
1439 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1440 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1442 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)},
1444 #if defined(OS_ANDROID)
1445 {"enable-accessibility-tab-switcher",
1446 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1447 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1449 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)},
1450 {// TODO(dmazzoni): remove this flag when native android accessibility
1451 // ships in the stable channel. http://crbug.com/356775
1452 "enable-accessibility-script-injection",
1453 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1454 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1456 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1457 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")},
1460 IDS_FLAGS_ONE_COPY_NAME
,
1461 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1463 SINGLE_VALUE_TYPE(switches::kEnableOneCopy
)},
1464 {"enable-zero-copy",
1465 IDS_FLAGS_ZERO_COPY_NAME
,
1466 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1468 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)},
1469 #if defined(OS_CHROMEOS)
1470 {"enable-first-run-ui-transitions",
1471 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1472 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1474 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)},
1476 {"disable-new-bookmark-apps",
1477 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1478 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1479 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1480 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1481 switches::kDisableNewBookmarkApps
)},
1482 #if defined(OS_MACOSX)
1483 {"disable-hosted-app-shim-creation",
1484 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1485 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1487 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)},
1488 {"enable-hosted-app-quit-notification",
1489 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1490 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1492 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)},
1494 {"enable-ephemeral-apps-in-webstore",
1495 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1496 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1498 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)},
1499 {"enable-linkable-ephemeral-apps",
1500 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1501 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1503 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)},
1504 #if defined(OS_ANDROID)
1505 {"disable-click-delay",
1506 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1507 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1509 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1510 SINGLE_VALUE_TYPE("disable-click-delay")},
1511 {"disable-pull-to-refresh-effect",
1512 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1513 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1515 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)},
1517 #if defined(OS_MACOSX)
1518 {"enable-translate-new-ux",
1519 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1520 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1522 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)},
1524 #if defined(TOOLKIT_VIEWS)
1525 {"disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1526 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1527 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1528 kOsCrOS
| kOsWin
| kOsLinux
,
1529 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)},
1530 {"enable-link-disambiguation-popup",
1531 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1532 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1534 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)},
1536 #if defined(ENABLE_EXTENSIONS)
1537 {"enable-apps-show-on-first-paint",
1538 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1539 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1541 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)},
1543 {"enhanced-bookmarks-experiment",
1544 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1545 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1546 kOsDesktop
| kOsAndroid
,
1547 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnhancedBookmarksExperiment
,
1549 switches::kEnhancedBookmarksExperiment
,
1551 #if defined(OS_ANDROID)
1552 {"enable-zero-suggest-experiment",
1553 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1554 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1556 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)},
1557 {"reader-mode-heuristics",
1558 IDS_FLAGS_READER_MODE_HEURISTICS_NAME
,
1559 IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION
,
1561 MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices
)},
1562 {"enable-reader-mode-toolbar-icon",
1563 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1564 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1566 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)},
1567 {"enable-dom-distiller-button-animation",
1568 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION
,
1569 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION
,
1571 SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation
)},
1573 {"num-raster-threads",
1574 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1575 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1577 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)},
1578 {"enable-single-click-autofill",
1579 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1580 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1581 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1582 ENABLE_DISABLE_VALUE_TYPE(
1583 autofill::switches::kEnableSingleClickAutofill
,
1584 autofill::switches::kDisableSingleClickAutofill
)},
1585 {"enable-site-engagement-service",
1586 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME
,
1587 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION
,
1589 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService
,
1590 switches::kDisableSiteEngagementService
)},
1591 {"enable-session-crashed-bubble",
1592 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1593 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1595 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1596 switches::kDisableSessionCrashedBubble
)},
1597 {"enable-pdf-material-ui",
1598 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1599 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1601 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1602 switches::kDisablePdfMaterialUI
)},
1603 {"disable-cast-streaming-hw-encoding",
1604 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1605 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1607 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)},
1608 #if defined(OS_ANDROID)
1610 IDS_FLAGS_DISABLE_CAST_NAME
,
1611 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1613 SINGLE_VALUE_TYPE(switches::kDisableCast
)},
1614 {"prefetch-search-results",
1615 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1616 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1618 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)},
1620 #if defined(ENABLE_APP_LIST)
1621 {"enable-experimental-app-list",
1622 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1623 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1624 kOsWin
| kOsLinux
| kOsCrOS
,
1625 ENABLE_DISABLE_VALUE_TYPE(
1626 app_list::switches::kEnableExperimentalAppList
,
1627 app_list::switches::kDisableExperimentalAppList
)},
1628 {"enable-centered-app-list",
1629 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1630 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1631 kOsWin
| kOsLinux
| kOsCrOS
,
1632 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)},
1633 {"enable-new-app-list-mixer",
1634 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_NAME
,
1635 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_DESCRIPTION
,
1636 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1637 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableNewAppListMixer
,
1638 app_list::switches::kDisableNewAppListMixer
)},
1640 {"disable-threaded-scrolling",
1641 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1642 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1643 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
| kOsMac
,
1644 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)},
1645 {"invert-viewport-scroll-order",
1646 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_NAME
,
1647 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_DESCRIPTION
,
1649 SINGLE_VALUE_TYPE(switches::kInvertViewportScrollOrder
)},
1650 {"bleeding-edge-renderer-mode",
1651 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1652 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1654 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)},
1655 {"enable-settings-window",
1656 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1657 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1659 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1660 switches::kDisableSettingsWindow
)},
1661 {"enable-save-password-bubble",
1662 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1663 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1664 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1665 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1666 switches::kDisableSavePasswordBubble
)},
1667 {"enable-apps-file-associations",
1668 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1669 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1671 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)},
1672 #if defined(OS_ANDROID)
1673 {"enable-embeddedsearch-api",
1674 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1675 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1677 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)},
1679 {"distance-field-text",
1680 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1681 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1683 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1684 switches::kDisableDistanceFieldText
)},
1685 {"extension-content-verification",
1686 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1687 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1689 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)},
1690 #if defined(ENABLE_EXTENSIONS)
1691 {"extension-active-script-permission",
1692 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1693 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1695 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)},
1697 #if defined(OS_ANDROID)
1698 {"enable-data-reduction-proxy-dev",
1699 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1700 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1702 ENABLE_DISABLE_VALUE_TYPE(
1703 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1704 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)},
1705 {"enable-data-reduction-proxy-carrier-test",
1706 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_NAME
,
1707 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_DESCRIPTION
,
1710 data_reduction_proxy::switches::kEnableDataReductionProxyCarrierTest
)},
1712 {"enable-hotword-hardware",
1713 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1714 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1716 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)},
1717 #if defined(ENABLE_EXTENSIONS)
1718 {"enable-embedded-extension-options",
1719 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1720 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1722 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)},
1724 #if defined(USE_ASH)
1725 {"enable-web-app-frame",
1726 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1727 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1729 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)},
1731 {"enable-drop-sync-credential",
1732 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1733 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1735 ENABLE_DISABLE_VALUE_TYPE(
1736 password_manager::switches::kEnableDropSyncCredential
,
1737 password_manager::switches::kDisableDropSyncCredential
)},
1738 #if defined(ENABLE_EXTENSIONS)
1739 {"enable-extension-action-redesign",
1740 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1741 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1743 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)},
1745 {"autofill-sync-credential",
1746 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1747 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1749 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)},
1750 #if !defined(OS_ANDROID)
1751 {"enable-message-center-always-scroll-up-upon-notification-removal",
1752 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1753 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1756 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)},
1758 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1759 {"enable-md-settings",
1760 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
1761 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
1763 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignSettings
)},
1765 #if defined(OS_CHROMEOS)
1766 {"memory-pressure-thresholds",
1767 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
1768 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
1770 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)},
1772 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
1773 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
1775 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)},
1776 #endif // OS_CHROMEOS
1777 {"enable-tab-audio-muting",
1778 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
1779 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
1781 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)},
1782 {"enable-credential-manager-api",
1783 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
1784 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
1786 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)},
1787 {"reduced-referrer-granularity",
1788 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
1789 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
1791 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)},
1792 #if defined(ENABLE_PLUGINS)
1793 {"enable-plugin-power-saver",
1794 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
1795 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
1797 ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver
,
1798 plugins::switches::kDisablePluginPowerSaver
)},
1800 #if defined(OS_CHROMEOS)
1801 {"disable-new-zip-unpacker",
1802 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
1803 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
1805 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)},
1806 #endif // defined(OS_CHROMEOS)
1807 {"enable-credit-card-scan",
1808 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
1809 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
1811 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
1812 autofill::switches::kDisableCreditCardScan
)},
1813 #if defined(OS_CHROMEOS)
1814 {"disable-captive-portal-bypass-proxy",
1815 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
1816 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
1818 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy
)},
1819 #endif // defined(OS_CHROMEOS)
1820 #if defined(OS_ANDROID)
1821 {"enable-seccomp-filter-sandbox",
1822 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
1823 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
1825 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)},
1827 {"enable-touch-hover",
1828 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
1829 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
1831 SINGLE_VALUE_TYPE("enable-touch-hover")},
1832 {"enable-fill-on-account-select",
1833 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
1834 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
1836 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)},
1837 #if defined(OS_CHROMEOS)
1838 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA
1839 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
1840 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
1842 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)},
1843 {"enable-potentially-annoying-security-features",
1844 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
1845 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
1847 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)},
1849 {"disable-delay-agnostic-aec",
1850 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_NAME
,
1851 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1852 kOsWin
| kOsLinux
| kOsCrOS
,
1853 SINGLE_VALUE_TYPE(switches::kDisableDelayAgnosticAec
)},
1854 {"enable-delay-agnostic-aec",
1855 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
1856 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1858 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)},
1859 {"mark-non-secure-as", // FLAGS:RECORD_UMA
1860 IDS_MARK_NON_SECURE_AS_NAME
,
1861 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
1863 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)},
1864 {"enable-site-per-process",
1865 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
1866 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
1868 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)},
1869 #if defined(OS_MACOSX)
1870 {"enable-harfbuzz-rendertext",
1871 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
1872 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
1874 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)},
1875 #endif // defined(OS_MACOSX)
1876 #if defined(OS_CHROMEOS)
1877 {"disable-timezone-tracking",
1878 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
1879 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
1881 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)},
1882 #endif // defined(OS_CHROMEOS)
1883 {"data-reduction-proxy-lo-fi",
1884 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME
,
1885 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
1887 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices
)},
1888 {"clear-data-reduction-proxy-data-savings",
1889 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
1890 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
1893 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings
)},
1894 {"enable-data-reduction-proxy-config-client",
1895 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_NAME
,
1896 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_DESCRIPTION
,
1898 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1899 kEnableDataReductionProxyConfigClient
)},
1900 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
1901 {"enable-data-reduction-proxy-bypass-warnings",
1902 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
1903 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
1905 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1906 kEnableDataReductionProxyBypassWarning
)},
1908 {"allow-insecure-localhost",
1909 IDS_ALLOW_INSECURE_LOCALHOST
,
1910 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
1912 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)},
1913 {"enable-add-to-shelf",
1914 IDS_FLAGS_ENABLE_ADD_TO_SHELF_NAME
,
1915 IDS_FLAGS_ENABLE_ADD_TO_SHELF_DESCRIPTION
,
1917 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToShelf
,
1918 switches::kDisableAddToShelf
)},
1919 {"bypass-app-banner-engagement-checks",
1920 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
1921 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
1923 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)},
1924 {"use-sync-sandbox",
1925 IDS_FLAGS_SYNC_SANDBOX_NAME
,
1926 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
1928 SINGLE_VALUE_TYPE_AND_VALUE(
1929 switches::kSyncServiceURL
,
1930 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
1931 {"enable-child-account-detection",
1932 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
1933 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
1934 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1935 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
1936 switches::kDisableChildAccountDetection
)},
1937 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
1938 {"ozone-test-single-overlay-support",
1939 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
1940 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
1942 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)},
1943 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
1944 {"v8-pac-mojo-out-of-process",
1945 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
1946 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
1948 ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
,
1949 switches::kDisableOutOfProcessPac
)},
1950 #if defined(ENABLE_MEDIA_ROUTER)
1951 {"enable-media-router",
1952 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
1953 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
1955 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)},
1956 #endif // defined(ENABLE_MEDIA_ROUTER)
1957 // Since Drive Search is not available when app list is disabled, flag guard
1958 // enable-drive-search-in-chrome-launcher flag.
1959 #if defined(ENABLE_APP_LIST)
1960 {"enable-drive-search-in-app-launcher",
1961 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER
,
1962 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER_DESCRIPTION
,
1964 ENABLE_DISABLE_VALUE_TYPE(
1965 app_list::switches::kEnableDriveSearchInChromeLauncher
,
1966 app_list::switches::kDisableDriveSearchInChromeLauncher
)},
1967 #endif // defined(ENABLE_APP_LIST)
1968 #if defined(OS_CHROMEOS)
1969 {"disable-mtp-write-support",
1970 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_NAME
,
1971 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_DESCRIPTION
,
1973 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport
)},
1974 #endif // defined(OS_CHROMEOS)
1975 #if defined(OS_CHROMEOS)
1976 {"enable-datasaver-prompt",
1977 IDS_FLAGS_DATASAVER_PROMPT_NAME
,
1978 IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION
,
1980 MULTI_VALUE_TYPE(kDataSaverPromptChoices
)},
1981 #endif // defined(OS_CHROMEOS)
1982 {"supervised-user-safesites",
1983 IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME
,
1984 IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1985 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1986 MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices
)},
1987 #if defined(OS_ANDROID)
1988 {"enable-autofill-keyboard-accessory-view",
1989 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME
,
1990 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION
,
1992 SINGLE_VALUE_TYPE(autofill::switches::kEnableAccessorySuggestionView
)},
1993 #endif // defined(OS_ANDROID)
1994 {"disable-new-video-renderer",
1995 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_NAME
,
1996 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_DESCRIPTION
,
1998 SINGLE_VALUE_TYPE(switches::kDisableNewVideoRenderer
)},
1999 // Temporary flag to ease the transition to standard-compliant scrollTop
2000 // behavior. Will be removed shortly after http://crbug.com/157855 ships.
2001 {"scroll-top-left-interop",
2002 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_NAME
,
2003 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_DESCRIPTION
,
2005 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableBlinkFeatures
,
2006 "ScrollTopLeftInterop",
2007 switches::kDisableBlinkFeatures
,
2008 "ScrollTopLeftInterop")},
2010 {"try-supported-channel-layouts",
2011 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_NAME
,
2012 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_DESCRIPTION
,
2014 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts
)},
2016 {"emphasize-titles-in-omnibox-dropdown",
2017 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_NAME
,
2018 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_DESCRIPTION
,
2020 SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown
)},
2021 #if defined(ENABLE_WEBRTC)
2022 {"enable-webrtc-dtls12",
2023 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME
,
2024 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION
,
2026 SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12
)},
2028 #if defined(OS_MACOSX)
2030 IDS_FLAGS_APP_INFO_DIALOG_NAME
,
2031 IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION
,
2033 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppInfoDialogMac
,
2034 switches::kDisableAppInfoDialogMac
)},
2035 {"mac-views-native-app-windows",
2036 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_NAME
,
2037 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_DESCRIPTION
,
2039 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMacViewsNativeAppWindows
,
2040 switches::kDisableMacViewsNativeAppWindows
)},
2041 {"app-window-cycling",
2042 IDS_FLAGS_APP_WINDOW_CYCLING_NAME
,
2043 IDS_FLAGS_APP_WINDOW_CYCLING_DESCRIPTION
,
2045 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppWindowCycling
,
2046 switches::kDisableAppWindowCycling
)},
2048 #if defined(ENABLE_WEBVR)
2050 IDS_FLAGS_ENABLE_WEBVR_NAME
,
2051 IDS_FLAGS_ENABLE_WEBVR_DESCRIPTION
,
2053 SINGLE_VALUE_TYPE(switches::kEnableWebVR
)},
2055 #if defined(OS_CHROMEOS)
2056 {"disable-accelerated-mjpeg-decode",
2057 IDS_FLAGS_DISABLE_ACCELERATED_MJPEG_DECODE_NAME
,
2058 IDS_FLAGS_DISABLE_ACCELERATED_MJPEG_DECODE_DESCRIPTION
,
2060 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode
)},
2061 #endif // OS_CHROMEOS
2062 {"v8-cache-options",
2063 IDS_FLAGS_V8_CACHE_OPTIONS_NAME
,
2064 IDS_FLAGS_V8_CACHE_OPTIONS_DESCRIPTION
,
2066 MULTI_VALUE_TYPE(kV8CacheOptionsChoices
)},
2067 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2068 {"enable-md-downloads",
2069 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_NAME
,
2070 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_DESCRIPTION
,
2072 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignDownloads
)},
2074 #if defined(OS_WIN) || defined(OS_MACOSX)
2075 {"enable-tab-discarding",
2076 IDS_FLAGS_ENABLE_TAB_DISCARDING_NAME
,
2077 IDS_FLAGS_ENABLE_TAB_DISCARDING_DESCRIPTION
,
2079 SINGLE_VALUE_TYPE(switches::kEnableTabDiscarding
)},
2081 {"enable-clear-browsing-data-counters",
2082 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_NAME
,
2083 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_DESCRIPTION
,
2085 SINGLE_VALUE_TYPE(switches::kEnableClearBrowsingDataCounters
)
2087 #if defined(ENABLE_TASK_MANAGER)
2088 {"enable-new-task-manager",
2089 IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_NAME
,
2090 IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_DESCRIPTION
,
2092 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager
)
2094 #endif // defined(ENABLE_TASK_MANAGER)
2095 {"simplified-fullscreen-ui",
2096 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME
,
2097 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION
,
2099 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI
,
2100 switches::kDisableSimplifiedFullscreenUI
)
2102 #if defined(OS_ANDROID)
2103 {"progress-bar-animation",
2104 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME
,
2105 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION
,
2107 MULTI_VALUE_TYPE(kProgressBarAnimationChoices
)},
2108 #endif // defined(OS_ANDROID)
2109 #if defined(OS_ANDROID)
2111 IDS_FLAGS_OFFLINE_PAGES_NAME
,
2112 IDS_FLAGS_OFFLINE_PAGES_DESCRIPTION
,
2114 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflinePages
,
2115 switches::kDisableOfflinePages
)},
2116 #endif // defined(OS_ANDROID)
2117 {"low-priority-iframes",
2118 IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_NAME
,
2119 IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_DESCRIPTION
,
2121 // NOTE: if we want to add additional experiment entries for other
2122 // features controlled by kBlinkSettings, we'll need to add logic to
2123 // merge the flag values.
2124 SINGLE_VALUE_TYPE_AND_VALUE(
2125 switches::kBlinkSettings
, "lowPriorityIframes=true")},
2126 #if defined(OS_ANDROID)
2127 {"enable-ntp-popular-sites",
2128 IDS_FLAGS_NTP_POPULAR_SITES_NAME
,
2129 IDS_FLAGS_NTP_POPULAR_SITES_DESCRIPTION
,
2131 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNTPPopularSites
,
2132 switches::kDisableNTPPopularSites
)},
2133 #endif // defined(OS_ANDROID)
2134 // NOTE: Adding new command-line switches requires adding corresponding
2135 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2136 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2139 const Experiment
* experiments
= kExperiments
;
2140 size_t num_experiments
= arraysize(kExperiments
);
2142 // Stores and encapsulates the little state that about:flags has.
2145 FlagsState() : needs_restart_(false) {}
2146 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2147 base::CommandLine
* command_line
,
2148 SentinelsMode sentinels
);
2149 bool IsRestartNeededToCommitChanges();
2150 void SetExperimentEnabled(
2151 FlagsStorage
* flags_storage
,
2152 const std::string
& internal_name
,
2154 void RemoveFlagsSwitches(
2155 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2156 void ResetAllFlags(FlagsStorage
* flags_storage
);
2159 // Returns the singleton instance of this class
2160 static FlagsState
* GetInstance() {
2161 return Singleton
<FlagsState
>::get();
2165 bool needs_restart_
;
2166 std::map
<std::string
, std::string
> flags_switches_
;
2168 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2171 // Adds the internal names for the specified experiment to |names|.
2172 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2173 if (e
.type
== Experiment::SINGLE_VALUE
||
2174 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2175 names
->insert(e
.internal_name
);
2177 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2178 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2179 for (int i
= 0; i
< e
.num_choices
; ++i
)
2180 names
->insert(e
.NameForChoice(i
));
2184 // Confirms that an experiment is valid, used in a DCHECK in
2185 // SanitizeList below.
2186 bool ValidateExperiment(const Experiment
& e
) {
2188 case Experiment::SINGLE_VALUE
:
2189 case Experiment::SINGLE_DISABLE_VALUE
:
2190 DCHECK_EQ(0, e
.num_choices
);
2193 case Experiment::MULTI_VALUE
:
2194 DCHECK_GT(e
.num_choices
, 0);
2196 DCHECK(e
.choices
[0].command_line_switch
);
2197 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2199 case Experiment::ENABLE_DISABLE_VALUE
:
2200 DCHECK_EQ(3, e
.num_choices
);
2202 DCHECK(e
.command_line_switch
);
2203 DCHECK(e
.command_line_value
);
2204 DCHECK(e
.disable_command_line_switch
);
2205 DCHECK(e
.disable_command_line_value
);
2213 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2214 // unknown, to prevent this list to become very long as experiments are added
2216 void SanitizeList(FlagsStorage
* flags_storage
) {
2217 std::set
<std::string
> known_experiments
;
2218 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2219 DCHECK(ValidateExperiment(experiments
[i
]));
2220 AddInternalName(experiments
[i
], &known_experiments
);
2223 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2225 std::set
<std::string
> new_enabled_experiments
=
2226 base::STLSetIntersection
<std::set
<std::string
> >(
2227 known_experiments
, enabled_experiments
);
2229 if (new_enabled_experiments
!= enabled_experiments
)
2230 flags_storage
->SetFlags(new_enabled_experiments
);
2233 void GetSanitizedEnabledFlags(
2234 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2235 SanitizeList(flags_storage
);
2236 *result
= flags_storage
->GetFlags();
2239 bool SkipConditionalExperiment(const Experiment
& experiment
) {
2240 version_info::Channel channel
= chrome::GetChannel();
2242 #if defined(OS_ANDROID)
2243 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2244 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2245 channel
!= version_info::Channel::BETA
&&
2246 channel
!= version_info::Channel::DEV
) {
2249 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2250 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2251 channel
!= version_info::Channel::DEV
) {
2254 // enable-data-reduction-proxy-carrier-test is only available for Chromium
2255 // builds and the Canary/Dev channel.
2256 if (!strcmp("enable-data-reduction-proxy-carrier-test",
2257 experiment
.internal_name
) &&
2258 channel
!= version_info::Channel::DEV
&&
2259 channel
!= version_info::Channel::CANARY
&&
2260 channel
!= version_info::Channel::UNKNOWN
) {
2265 // data-reduction-proxy-lo-fi is only available for Chromium builds and
2266 // the Canary/Dev/Beta channels.
2267 if (!strcmp("data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2268 channel
!= version_info::Channel::BETA
&&
2269 channel
!= version_info::Channel::DEV
&&
2270 channel
!= version_info::Channel::CANARY
&&
2271 channel
!= version_info::Channel::UNKNOWN
) {
2275 // enable-data-reduction-proxy-config-client is only available for Chromium
2276 // builds and the Canary/Dev channels.
2277 if (!strcmp("enable-data-reduction-proxy-config-client",
2278 experiment
.internal_name
) &&
2279 channel
!= version_info::Channel::DEV
&&
2280 channel
!= version_info::Channel::CANARY
&&
2281 channel
!= version_info::Channel::UNKNOWN
) {
2285 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2286 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2287 // builds and Canary/Dev channel.
2288 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2289 experiment
.internal_name
) &&
2290 channel
!= version_info::Channel::UNKNOWN
&&
2291 channel
!= version_info::Channel::CANARY
&&
2292 channel
!= version_info::Channel::DEV
) {
2301 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2302 // enabled on the current platform.
2303 void GetSanitizedEnabledFlagsForCurrentPlatform(
2304 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2305 GetSanitizedEnabledFlags(flags_storage
, result
);
2307 // Filter out any experiments that aren't enabled on the current platform. We
2308 // don't remove these from prefs else syncing to a platform with a different
2309 // set of experiments would be lossy.
2310 std::set
<std::string
> platform_experiments
;
2311 int current_platform
= GetCurrentPlatform();
2312 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2313 if (experiments
[i
].supported_platforms
& current_platform
)
2314 AddInternalName(experiments
[i
], &platform_experiments
);
2315 #if defined(OS_CHROMEOS)
2316 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2317 AddInternalName(experiments
[i
], &platform_experiments
);
2321 std::set
<std::string
> new_enabled_experiments
=
2322 base::STLSetIntersection
<std::set
<std::string
> >(
2323 platform_experiments
, *result
);
2325 result
->swap(new_enabled_experiments
);
2328 // Returns true if none of this experiment's options have been enabled.
2329 bool IsDefaultValue(
2330 const Experiment
& experiment
,
2331 const std::set
<std::string
>& enabled_experiments
) {
2332 switch (experiment
.type
) {
2333 case Experiment::SINGLE_VALUE
:
2334 case Experiment::SINGLE_DISABLE_VALUE
:
2335 return enabled_experiments
.count(experiment
.internal_name
) == 0;
2336 case Experiment::MULTI_VALUE
:
2337 case Experiment::ENABLE_DISABLE_VALUE
:
2338 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2339 if (enabled_experiments
.count(experiment
.NameForChoice(i
)) > 0)
2349 // Returns the Value representing the choice data in the specified experiment.
2350 base::Value
* CreateChoiceData(
2351 const Experiment
& experiment
,
2352 const std::set
<std::string
>& enabled_experiments
) {
2353 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2354 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2355 base::ListValue
* result
= new base::ListValue
;
2356 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2357 base::DictionaryValue
* value
= new base::DictionaryValue
;
2358 const std::string name
= experiment
.NameForChoice(i
);
2359 value
->SetString("internal_name", name
);
2360 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2361 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2362 result
->Append(value
);
2369 std::string
Experiment::NameForChoice(int index
) const {
2370 DCHECK(type
== Experiment::MULTI_VALUE
||
2371 type
== Experiment::ENABLE_DISABLE_VALUE
);
2372 DCHECK_LT(index
, num_choices
);
2373 return std::string(internal_name
) + testing::kMultiSeparator
+
2374 base::IntToString(index
);
2377 base::string16
Experiment::DescriptionForChoice(int index
) const {
2378 DCHECK(type
== Experiment::MULTI_VALUE
||
2379 type
== Experiment::ENABLE_DISABLE_VALUE
);
2380 DCHECK_LT(index
, num_choices
);
2382 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2383 const int kEnableDisableDescriptionIds
[] = {
2384 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2385 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2386 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2388 description_id
= kEnableDisableDescriptionIds
[index
];
2390 description_id
= choices
[index
].description_id
;
2392 return l10n_util::GetStringUTF16(description_id
);
2395 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2396 base::CommandLine
* command_line
,
2397 SentinelsMode sentinels
) {
2398 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2403 bool AreSwitchesIdenticalToCurrentCommandLine(
2404 const base::CommandLine
& new_cmdline
,
2405 const base::CommandLine
& active_cmdline
,
2406 std::set
<base::CommandLine::StringType
>* out_difference
) {
2407 std::set
<base::CommandLine::StringType
> new_flags
=
2408 ExtractFlagsFromCommandLine(new_cmdline
);
2409 std::set
<base::CommandLine::StringType
> active_flags
=
2410 ExtractFlagsFromCommandLine(active_cmdline
);
2412 bool result
= false;
2413 // Needed because std::equal doesn't check if the 2nd set is empty.
2414 if (new_flags
.size() == active_flags
.size()) {
2416 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2419 if (out_difference
&& !result
) {
2420 std::set_symmetric_difference(
2423 active_flags
.begin(),
2425 std::inserter(*out_difference
, out_difference
->begin()));
2431 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2433 base::ListValue
* supported_experiments
,
2434 base::ListValue
* unsupported_experiments
) {
2435 std::set
<std::string
> enabled_experiments
;
2436 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2438 int current_platform
= GetCurrentPlatform();
2440 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2441 const Experiment
& experiment
= experiments
[i
];
2442 if (SkipConditionalExperiment(experiment
))
2445 base::DictionaryValue
* data
= new base::DictionaryValue();
2446 data
->SetString("internal_name", experiment
.internal_name
);
2447 data
->SetString("name",
2448 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2449 data
->SetString("description",
2450 l10n_util::GetStringUTF16(
2451 experiment
.visible_description_id
));
2453 base::ListValue
* supported_platforms
= new base::ListValue();
2454 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2455 data
->Set("supported_platforms", supported_platforms
);
2456 // True if the switch is not currently passed.
2457 bool is_default_value
= IsDefaultValue(experiment
, enabled_experiments
);
2458 data
->SetBoolean("is_default", is_default_value
);
2460 switch (experiment
.type
) {
2461 case Experiment::SINGLE_VALUE
:
2462 case Experiment::SINGLE_DISABLE_VALUE
:
2465 (!is_default_value
&&
2466 experiment
.type
== Experiment::SINGLE_VALUE
) ||
2467 (is_default_value
&&
2468 experiment
.type
== Experiment::SINGLE_DISABLE_VALUE
));
2470 case Experiment::MULTI_VALUE
:
2471 case Experiment::ENABLE_DISABLE_VALUE
:
2472 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2478 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2479 #if defined(OS_CHROMEOS)
2480 if (access
== kOwnerAccessToFlags
&&
2481 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2486 supported_experiments
->Append(data
);
2488 unsupported_experiments
->Append(data
);
2492 bool IsRestartNeededToCommitChanges() {
2493 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2496 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2497 const std::string
& internal_name
,
2499 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2500 internal_name
, enable
);
2503 void RemoveFlagsSwitches(
2504 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2505 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2508 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2509 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2512 int GetCurrentPlatform() {
2513 #if defined(OS_MACOSX)
2515 #elif defined(OS_WIN)
2517 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2519 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2521 #elif defined(OS_ANDROID)
2524 #error Unknown platform
2528 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2529 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2530 for (const std::string
& flag
: flags
) {
2531 std::string
action("AboutFlags_");
2533 content::RecordComputedAction(action
);
2535 // Since flag metrics are recorded every startup, add a tick so that the
2536 // stats can be made meaningful.
2538 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2539 content::RecordAction(base::UserMetricsAction("StartupTick"));
2542 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2543 return static_cast<base::HistogramBase::Sample
>(
2544 metrics::HashMetricName(switch_name
));
2547 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2548 const std::set
<std::string
>& command_line_difference
) {
2549 for (const std::string
& flag
: command_line_difference
) {
2550 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2551 if (base::StartsWith(flag
, "--", base::CompareCase::SENSITIVE
)) {
2552 // Skip '--' before switch name.
2553 std::string
switch_name(flag
.substr(2));
2555 // Kill value, if any.
2556 const size_t value_pos
= switch_name
.find('=');
2557 if (value_pos
!= std::string::npos
)
2558 switch_name
.resize(value_pos
);
2560 uma_id
= GetSwitchUMAId(switch_name
);
2562 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2563 << "' has incorrect format.";
2565 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2566 << "' '" << flag
<< "', uma_id=" << uma_id
;
2568 // Sparse histogram macro does not cache the histogram, so it's safe
2569 // to use macro with non-static histogram name here.
2570 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2574 //////////////////////////////////////////////////////////////////////////////
2575 // FlagsState implementation.
2579 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2580 NameToSwitchAndValueMap
;
2582 void SetFlagToSwitchMapping(const std::string
& key
,
2583 const std::string
& switch_name
,
2584 const std::string
& switch_value
,
2585 NameToSwitchAndValueMap
* name_to_switch_map
) {
2586 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2587 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2590 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2591 base::CommandLine
* command_line
,
2592 SentinelsMode sentinels
) {
2593 if (command_line
->HasSwitch(switches::kNoExperiments
))
2596 std::set
<std::string
> enabled_experiments
;
2598 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2599 &enabled_experiments
);
2601 NameToSwitchAndValueMap name_to_switch_map
;
2602 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2603 const Experiment
& e
= experiments
[i
];
2604 if (e
.type
== Experiment::SINGLE_VALUE
||
2605 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2606 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2607 e
.command_line_value
, &name_to_switch_map
);
2608 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2609 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2610 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2611 e
.choices
[j
].command_line_switch
,
2612 e
.choices
[j
].command_line_value
,
2613 &name_to_switch_map
);
2616 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2617 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2618 &name_to_switch_map
);
2619 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2620 e
.command_line_value
, &name_to_switch_map
);
2621 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2622 e
.disable_command_line_value
, &name_to_switch_map
);
2626 if (sentinels
== kAddSentinels
) {
2627 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2628 flags_switches_
.insert(
2629 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2632 for (const std::string
& experiment_name
: enabled_experiments
) {
2633 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2634 name_to_switch_map
.find(experiment_name
);
2635 if (name_to_switch_it
== name_to_switch_map
.end()) {
2640 const std::pair
<std::string
, std::string
>&
2641 switch_and_value_pair
= name_to_switch_it
->second
;
2643 CHECK(!switch_and_value_pair
.first
.empty());
2644 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2645 switch_and_value_pair
.second
);
2646 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2648 if (sentinels
== kAddSentinels
) {
2649 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2650 flags_switches_
.insert(
2651 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2656 bool FlagsState::IsRestartNeededToCommitChanges() {
2657 return needs_restart_
;
2660 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2661 const std::string
& internal_name
,
2663 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2664 if (at_index
!= std::string::npos
) {
2666 // We're being asked to enable a multi-choice experiment. Disable the
2667 // currently selected choice.
2668 DCHECK_NE(at_index
, 0u);
2669 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2670 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2672 // And enable the new choice, if it is not the default first choice.
2673 if (internal_name
!= experiment_name
+ "@0") {
2674 std::set
<std::string
> enabled_experiments
;
2675 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2676 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2677 flags_storage
->SetFlags(enabled_experiments
);
2682 std::set
<std::string
> enabled_experiments
;
2683 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2685 const Experiment
* e
= NULL
;
2686 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2687 if (experiments
[i
].internal_name
== internal_name
) {
2688 e
= experiments
+ i
;
2694 if (e
->type
== Experiment::SINGLE_VALUE
) {
2696 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2698 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2699 } else if (e
->type
== Experiment::SINGLE_DISABLE_VALUE
) {
2701 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2703 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2706 // Enable the first choice.
2707 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2709 // Find the currently enabled choice and disable it.
2710 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2711 std::string choice_name
= e
->NameForChoice(i
);
2712 if (enabled_experiments
.find(choice_name
) !=
2713 enabled_experiments
.end()) {
2714 needs_restart_
= true;
2715 enabled_experiments
.erase(choice_name
);
2716 // Continue on just in case there's a bug and more than one
2717 // experiment for this choice was enabled.
2723 flags_storage
->SetFlags(enabled_experiments
);
2726 void FlagsState::RemoveFlagsSwitches(
2727 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2728 for (const auto& entry
: flags_switches_
)
2729 switch_list
->erase(entry
.first
);
2732 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2733 needs_restart_
= true;
2735 std::set
<std::string
> no_experiments
;
2736 flags_storage
->SetFlags(no_experiments
);
2739 void FlagsState::reset() {
2740 needs_restart_
= false;
2741 flags_switches_
.clear();
2748 // WARNING: '@' is also used in the html file. If you update this constant you
2749 // also need to update the html file.
2750 const char kMultiSeparator
[] = "@";
2752 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2755 FlagsState::GetInstance()->reset();
2758 void SetExperiments(const Experiment
* e
, size_t count
) {
2760 experiments
= kExperiments
;
2761 num_experiments
= arraysize(kExperiments
);
2764 num_experiments
= count
;
2768 const Experiment
* GetExperiments(size_t* count
) {
2769 *count
= num_experiments
;
2773 } // namespace testing
2775 } // namespace about_flags