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/chrome_content_client.h"
23 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/chrome_version_info.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/metrics/metrics_hashes.h"
32 #include "components/nacl/common/nacl_switches.h"
33 #include "components/omnibox/browser/omnibox_switches.h"
34 #include "components/plugins/common/plugins_switches.h"
35 #include "components/proximity_auth/switches.h"
36 #include "components/search/search_switches.h"
37 #include "content/public/browser/user_metrics.h"
38 #include "media/base/media_switches.h"
39 #include "ui/base/l10n/l10n_util.h"
40 #include "ui/base/ui_base_switches.h"
41 #include "ui/display/display_switches.h"
42 #include "ui/events/event_switches.h"
43 #include "ui/gfx/switches.h"
44 #include "ui/gl/gl_switches.h"
45 #include "ui/keyboard/keyboard_switches.h"
46 #include "ui/native_theme/native_theme_switches.h"
47 #include "ui/views/views_switches.h"
49 #if defined(OS_ANDROID)
50 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
52 #include "ui/message_center/message_center_switches.h"
56 #include "ash/ash_switches.h"
59 #if defined(OS_CHROMEOS)
60 #include "chromeos/chromeos_switches.h"
61 #include "third_party/cros_system_api/switches/chrome_switches.h"
64 #if defined(ENABLE_APP_LIST)
65 #include "ui/app_list/app_list_switches.h"
68 #if defined(ENABLE_EXTENSIONS)
69 #include "extensions/common/switches.h"
72 #if defined(USE_OZONE)
73 #include "ui/ozone/public/ozone_switches.h"
76 namespace about_flags
{
78 // Macros to simplify specifying the type.
79 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
80 Experiment::SINGLE_VALUE, \
81 command_line_switch, switch_value, NULL, NULL, NULL, 0
82 #define SINGLE_VALUE_TYPE(command_line_switch) \
83 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
84 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
85 Experiment::SINGLE_DISABLE_VALUE, \
86 command_line_switch, switch_value, NULL, NULL, NULL, 0
87 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \
88 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
89 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
90 disable_switch, disable_value) \
91 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
92 disable_switch, disable_value, NULL, 3
93 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
94 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
95 #define MULTI_VALUE_TYPE(choices) \
96 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
100 // Enumeration of OSs.
107 kOsCrOSOwnerOnly
= 1 << 5
110 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
111 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
113 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
114 // whether the experiment is available on that platform.
115 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
118 const char* const name
;
123 {kOsCrOS
, "Chrome OS"},
124 {kOsAndroid
, "Android"},
125 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
127 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
128 if (bitmask
& kBitsToOs
[i
].bit
)
129 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
133 // Convert switch constants to proper CommandLine::StringType strings.
134 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
135 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
136 cmd_line
.AppendSwitch(flag
);
137 DCHECK_EQ(2U, cmd_line
.argv().size());
138 return cmd_line
.argv()[1];
141 // Scoops flags from a command line.
142 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
143 const base::CommandLine
& cmdline
) {
144 std::set
<base::CommandLine::StringType
> flags
;
145 // First do the ones between --flag-switches-begin and --flag-switches-end.
146 base::CommandLine::StringVector::const_iterator first
=
147 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
148 GetSwitchString(switches::kFlagSwitchesBegin
));
149 base::CommandLine::StringVector::const_iterator last
=
150 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
151 GetSwitchString(switches::kFlagSwitchesEnd
));
152 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
153 flags
.insert(first
+ 1, last
);
154 #if defined(OS_CHROMEOS)
155 // Then add those between --policy-switches-begin and --policy-switches-end.
156 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
157 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
158 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
159 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
160 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
161 flags
.insert(first
+ 1, last
);
166 const Experiment::Choice kTouchEventsChoices
[] = {
167 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
168 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
169 switches::kTouchEvents
,
170 switches::kTouchEventsEnabled
},
171 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
172 switches::kTouchEvents
,
173 switches::kTouchEventsDisabled
}
176 #if defined(USE_AURA)
177 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
178 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
180 switches::kOverscrollHistoryNavigation
,
182 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
183 switches::kOverscrollHistoryNavigation
,
188 const Experiment::Choice kTouchTextSelectionStrategyChoices
[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
190 { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER
,
191 switches::kTouchTextSelectionStrategy
,
193 { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION
,
194 switches::kTouchTextSelectionStrategy
,
198 #if !defined(DISABLE_NACL)
199 const Experiment::Choice kNaClDebugMaskChoices
[] = {
200 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
201 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
202 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
203 // so by default we want to avoid debugging that.
204 // NOTE: As the default value must be the empty string, the mask excluding
205 // the PNaCl translator and secure shell is substituted elsewhere.
206 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
207 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
208 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
209 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
213 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
215 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
216 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
217 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
218 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
},
219 { IDS_MARK_NON_SECURE_AS_DUBIOUS
,
220 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsDubious
}
223 const Experiment::Choice kDataReductionProxyLoFiChoices
[] = {
224 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
225 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON
,
226 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
227 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn
},
228 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY
,
229 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
230 data_reduction_proxy::switches::
231 kDataReductionProxyLoFiValueCellularOnly
},
232 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DISABLED
,
233 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
234 data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled
}
237 const Experiment::Choice kShowSavedCopyChoices
[] = {
238 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
239 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY
,
240 switches::kShowSavedCopy
, switches::kEnableShowSavedCopyPrimary
},
241 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY
,
242 switches::kShowSavedCopy
, switches::kEnableShowSavedCopySecondary
},
243 { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY
,
244 switches::kShowSavedCopy
, switches::kDisableShowSavedCopy
}
247 const Experiment::Choice kDefaultTileWidthChoices
[] = {
248 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
249 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
250 switches::kDefaultTileWidth
, "128"},
251 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
252 switches::kDefaultTileWidth
, "256"},
253 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
254 switches::kDefaultTileWidth
, "512"},
255 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
256 switches::kDefaultTileWidth
, "1024"}
259 const Experiment::Choice kDefaultTileHeightChoices
[] = {
260 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
261 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT
,
262 switches::kDefaultTileHeight
, "128"},
263 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL
,
264 switches::kDefaultTileHeight
, "256"},
265 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE
,
266 switches::kDefaultTileHeight
, "512"},
267 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI
,
268 switches::kDefaultTileHeight
, "1024"}
271 const Experiment::Choice kSimpleCacheBackendChoices
[] = {
272 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
273 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
274 switches::kUseSimpleCacheBackend
, "off" },
275 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
276 switches::kUseSimpleCacheBackend
, "on"}
279 #if defined(USE_AURA)
280 const Experiment::Choice kTabCaptureUpscaleQualityChoices
[] = {
281 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
282 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
283 switches::kTabCaptureUpscaleQuality
, "fast" },
284 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
285 switches::kTabCaptureUpscaleQuality
, "good" },
286 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
287 switches::kTabCaptureUpscaleQuality
, "best" },
290 const Experiment::Choice kTabCaptureDownscaleQualityChoices
[] = {
291 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
292 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
293 switches::kTabCaptureDownscaleQuality
, "fast" },
294 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
295 switches::kTabCaptureDownscaleQuality
, "good" },
296 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
297 switches::kTabCaptureDownscaleQuality
, "best" },
301 #if defined(OS_ANDROID)
302 const Experiment::Choice kZeroSuggestExperimentsChoices
[] = {
303 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
304 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED
,
305 switches::kEnableZeroSuggestMostVisited
, ""},
306 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP
,
307 switches::kEnableZeroSuggestMostVisitedWithoutSerp
, ""},
308 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
309 switches::kDisableZeroSuggest
, ""}
312 const Experiment::Choice kReaderModeHeuristicsChoices
[] = {
313 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
314 { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP
,
315 switches::kReaderModeHeuristics
,
316 switches::reader_mode_heuristics::kOGArticle
},
317 { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST
,
318 switches::kReaderModeHeuristics
,
319 switches::reader_mode_heuristics::kAdaBoost
},
320 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON
,
321 switches::kReaderModeHeuristics
,
322 switches::reader_mode_heuristics::kAlwaysTrue
},
323 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF
,
324 switches::kReaderModeHeuristics
,
325 switches::reader_mode_heuristics::kNone
},
329 const Experiment::Choice kNumRasterThreadsChoices
[] = {
330 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
331 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
332 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
333 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
334 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
337 const Experiment::Choice kGpuRasterizationMSAASampleCountChoices
[] = {
338 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
341 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO
,
342 switches::kGpuRasterizationMSAASampleCount
, "0" },
343 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO
,
344 switches::kGpuRasterizationMSAASampleCount
, "2" },
345 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR
,
346 switches::kGpuRasterizationMSAASampleCount
, "4" },
347 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT
,
348 switches::kGpuRasterizationMSAASampleCount
, "8" },
349 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN
,
350 switches::kGpuRasterizationMSAASampleCount
, "16" },
353 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
354 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
355 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
356 switches::kEnableGpuRasterization
, "" },
357 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
358 switches::kDisableGpuRasterization
, "" },
359 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
360 switches::kForceGpuRasterization
, "" },
363 #if defined(OS_CHROMEOS)
364 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
365 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
366 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
367 chromeos::switches::kMemoryPressureThresholds
,
368 chromeos::switches::kConservativeThreshold
},
369 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
370 chromeos::switches::kMemoryPressureThresholds
,
371 chromeos::switches::kAggressiveCacheDiscardThreshold
},
372 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
373 chromeos::switches::kMemoryPressureThresholds
,
374 chromeos::switches::kAggressiveTabDiscardThreshold
},
375 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
376 chromeos::switches::kMemoryPressureThresholds
,
377 chromeos::switches::kAggressiveThreshold
},
381 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
382 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
383 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
384 switches::kExtensionContentVerification
,
385 switches::kExtensionContentVerificationBootstrap
},
386 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
387 switches::kExtensionContentVerification
,
388 switches::kExtensionContentVerificationEnforce
},
389 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
390 switches::kExtensionContentVerification
,
391 switches::kExtensionContentVerificationEnforceStrict
},
394 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
395 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
396 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
397 password_manager::switches::kAllowAutofillSyncCredential
, ""},
398 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
399 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
400 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
401 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
404 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
405 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
406 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
407 autofill::switches::kDisableFillOnAccountSelect
, "" },
408 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
409 autofill::switches::kEnableFillOnAccountSelect
, "" },
410 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
411 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
415 const Experiment::Choice kAshScreenRotationAnimationChoices
[] = {
416 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
417 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
418 ash::switches::kAshEnableScreenRotationAnimation
,
420 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION
,
421 ash::switches::kAshEnableScreenRotationAnimation
,
422 "partial-rotation" },
423 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION
,
424 ash::switches::kAshEnableScreenRotationAnimation
,
429 #if defined(ENABLE_TOPCHROME_MD)
430 const Experiment::Choice kTopChromeMaterialDesignChoices
[] = {
431 {IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL
, "", ""},
432 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL
,
433 switches::kTopChromeMD
,
434 switches::kTopChromeMDMaterial
},
435 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID
,
436 switches::kTopChromeMD
,
437 switches::kTopChromeMDMaterialHybrid
}};
440 #if defined(OS_CHROMEOS)
441 const Experiment::Choice kAshMaterialDesignInkDrop
[] = {
442 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
443 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_CIRCLE
,
444 switches::kMaterialDesignInkDrop
,
445 switches::kMaterialDesignInkDropCircle
},
446 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_SQUARE
,
447 switches::kMaterialDesignInkDrop
,
448 switches::kMaterialDesignInkDropSquare
}};
450 const Experiment::Choice kAshMaterialDesignInkDropAnimationSpeed
[] = {
451 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
452 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_FAST
,
453 switches::kMaterialDesignInkDropAnimationSpeed
,
454 switches::kMaterialDesignInkDropAnimationSpeedFast
},
455 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SLOW
,
456 switches::kMaterialDesignInkDropAnimationSpeed
,
457 switches::kMaterialDesignInkDropAnimationSpeedSlow
}};
459 const Experiment::Choice kDataSaverPromptChoices
[] = {
460 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
461 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
462 chromeos::switches::kDisableDataSaverPrompt
, "" },
463 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
464 chromeos::switches::kEnableDataSaverPrompt
, "" },
465 { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE
,
466 chromeos::switches::kEnableDataSaverPrompt
,
467 chromeos::switches::kDataSaverPromptDemoMode
},
470 const Experiment::Choice kFloatingVirtualKeyboardChoices
[] = {
471 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
472 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
473 keyboard::switches::kFloatingVirtualKeyboard
,
474 keyboard::switches::kFloatingVirtualKeyboardDisabled
},
475 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
476 keyboard::switches::kFloatingVirtualKeyboard
,
477 keyboard::switches::kFloatingVirtualKeyboardEnabled
},
480 const Experiment::Choice kSmartVirtualKeyboardChoices
[] = {
481 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
482 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
483 keyboard::switches::kSmartVirtualKeyboard
,
484 keyboard::switches::kSmartVirtualKeyboardDisabled
},
485 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
486 keyboard::switches::kSmartVirtualKeyboard
,
487 keyboard::switches::kSmartVirtualKeyboardEnabled
},
490 const Experiment::Choice kGestureTypingChoices
[] = {
491 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
492 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
493 keyboard::switches::kGestureTyping
,
494 keyboard::switches::kGestureTypingDisabled
},
495 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
496 keyboard::switches::kGestureTyping
,
497 keyboard::switches::kGestureTypingEnabled
},
500 const Experiment::Choice kGestureEditingChoices
[] = {
501 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
502 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
503 keyboard::switches::kGestureEditing
,
504 keyboard::switches::kGestureEditingDisabled
},
505 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
506 keyboard::switches::kGestureEditing
,
507 keyboard::switches::kGestureEditingEnabled
},
511 const Experiment::Choice kDownloadNotificationChoices
[] = {
512 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
513 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
514 switches::kEnableDownloadNotification
,
516 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
517 switches::kEnableDownloadNotification
,
521 const Experiment::Choice kSupervisedUserSafeSitesChoices
[] = {
522 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
523 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
524 switches::kSupervisedUserSafeSites
,
526 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
527 switches::kSupervisedUserSafeSites
,
529 { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY
,
530 switches::kSupervisedUserSafeSites
,
532 { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY
,
533 switches::kSupervisedUserSafeSites
,
534 "online-check-only" }
537 const Experiment::Choice kV8CacheOptionsChoices
[] = {
538 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
539 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
, switches::kV8CacheOptions
, "none" },
540 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE
, switches::kV8CacheOptions
, "parse" },
541 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE
, switches::kV8CacheOptions
, "code" },
544 // RECORDING USER METRICS FOR FLAGS:
545 // -----------------------------------------------------------------------------
546 // The first line of the experiment is the internal name. If you'd like to
547 // gather statistics about the usage of your flag, you should append a marker
548 // comment to the end of the feature name, like so:
549 // "my-special-feature", // FLAGS:RECORD_UMA
551 // After doing that, run
552 // tools/metrics/actions/extract_actions.py
553 // to add the metric to actions.xml (which will enable UMA to record your
554 // feature flag), then update the <owner>s and <description> sections. Make sure
555 // to include the actions.xml file when you upload your code for review!
557 // After your feature has shipped under a flag, you can locate the metrics under
558 // the action name AboutFlags_internal-action-name. Actions are recorded once
559 // per startup, so you should divide this number by AboutFlags_StartupTick to
560 // get a sense of usage. Note that this will not be the same as number of users
561 // with a given feature enabled because users can quit and relaunch the
562 // application multiple times over a given time interval. The dashboard also
563 // shows you how many (metrics reporting) users have enabled the flag over the
564 // last seven days. However, note that this is not the same as the number of
565 // users who have the flag enabled, since enabling the flag happens once,
566 // whereas running with the flag enabled happens until the user flips the flag
569 // To add a new experiment add to the end of kExperiments. There are two
570 // distinct types of experiments:
571 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
572 // macro for this type supplying the command line to the macro.
573 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
574 // deactivated state for this lab (i.e. no command line option). To specify
575 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
577 // See the documentation of Experiment for details on the fields.
579 // Command-line switches must have entries in enum "LoginCustomFlags" in
580 // histograms.xml. See note in histograms.xml and don't forget to run
581 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
583 // When adding a new choice, add it to the end of the list.
584 const Experiment kExperiments
[] = {
585 {"ignore-gpu-blacklist",
586 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
587 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
589 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)},
591 {"disable-direct-write",
592 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
593 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
595 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)},
597 {"enable-experimental-canvas-features",
598 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
599 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
601 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)},
602 {"disable-accelerated-2d-canvas",
603 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
604 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
606 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)},
607 {"enable-display-list-2d-canvas",
608 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
609 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
611 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
612 switches::kDisableDisplayList2dCanvas
)},
613 {"composited-layer-borders",
614 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
615 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
617 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)},
619 IDS_FLAGS_SHOW_FPS_COUNTER
,
620 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
622 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)},
624 IDS_FLAGS_DISABLE_WEBGL_NAME
,
625 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
627 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)},
629 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
630 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
632 #if defined(OS_ANDROID)
633 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
635 SINGLE_VALUE_TYPE("")
638 #if defined(ENABLE_WEBRTC)
639 {"disable-webrtc-hw-decoding",
640 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
641 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
642 kOsAndroid
| kOsCrOS
,
643 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)},
644 {"disable-webrtc-hw-encoding",
645 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
646 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
647 kOsAndroid
| kOsCrOS
,
648 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)},
649 {"enable-webrtc-stun-origin",
650 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
651 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
653 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)},
655 #if defined(OS_ANDROID)
657 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
658 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
660 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)},
662 // Native client is compiled out when DISABLE_NACL is defined.
663 #if !defined(DISABLE_NACL)
664 {"enable-nacl", // FLAGS:RECORD_UMA
665 IDS_FLAGS_ENABLE_NACL_NAME
,
666 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
668 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)},
669 {"enable-nacl-debug", // FLAGS:RECORD_UMA
670 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
671 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
673 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)},
674 {"nacl-debug-mask", // FLAGS:RECORD_UMA
675 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
676 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
678 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)},
680 #if defined(ENABLE_EXTENSIONS)
681 {"extension-apis", // FLAGS:RECORD_UMA
682 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
683 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
685 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)},
686 {"extensions-on-chrome-urls",
687 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
688 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
690 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)},
692 {"enable-fast-unload",
693 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
694 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
696 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)},
697 #if defined(ENABLE_EXTENSIONS)
698 {"enable-app-window-controls",
699 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
700 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
702 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)},
704 {"disable-hyperlink-auditing",
705 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
706 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
708 SINGLE_VALUE_TYPE(switches::kNoPings
)},
709 #if defined(OS_ANDROID)
710 {"contextual-search",
711 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
712 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
714 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
715 switches::kDisableContextualSearch
)},
717 {"show-autofill-type-predictions",
718 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
719 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
721 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)},
722 {"enable-smooth-scrolling", // FLAGS:RECORD_UMA
723 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
724 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
725 // Can't expose the switch unless the code is compiled in.
726 // On by default for the Mac (different implementation in WebKit).
728 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)},
729 #if defined(USE_AURA) || defined(OS_LINUX)
730 {"overlay-scrollbars",
731 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
732 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
733 // Uses the system preference on Mac (a different implementation).
734 // On Android, this is always enabled.
735 kOsLinux
| kOsCrOS
| kOsWin
,
736 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
737 switches::kDisableOverlayScrollbar
)},
740 IDS_FLAGS_ENABLE_PANELS_NAME
,
741 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
743 SINGLE_VALUE_TYPE(switches::kEnablePanels
)},
744 {// See http://crbug.com/120416 for how to remove this flag.
745 "save-page-as-mhtml", // FLAGS:RECORD_UMA
746 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
747 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
748 kOsMac
| kOsWin
| kOsLinux
,
749 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)},
751 IDS_FLAGS_ENABLE_QUIC_NAME
,
752 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
754 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
, switches::kDisableQuic
)},
755 {"disable-media-source",
756 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
757 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
759 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)},
760 {"disable-encrypted-media",
761 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
762 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
764 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)},
765 {"disable-prefixed-encrypted-media",
766 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
767 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
769 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)},
770 {"disable-javascript-harmony-shipping",
771 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
772 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
774 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)},
775 {"enable-javascript-harmony",
776 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
777 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
779 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)},
780 {"disable-software-rasterizer",
781 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
782 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
783 #if defined(ENABLE_SWIFTSHADER)
788 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)},
789 {"enable-gpu-rasterization",
790 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
791 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
793 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)},
794 {"gpu-rasterization-msaa-sample-count",
795 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME
,
796 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION
,
798 MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices
)},
799 {"disable-slimming-paint",
800 IDS_FLAGS_DISABLE_SLIMMING_PAINT_NAME
,
801 IDS_FLAGS_DISABLE_SLIMMING_PAINT_DESCRIPTION
,
803 SINGLE_VALUE_TYPE(switches::kDisableSlimmingPaint
)},
804 {"enable-slimming-paint",
805 IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME
,
806 IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION
,
808 SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint
)},
809 {"enable-experimental-web-platform-features",
810 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
811 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
813 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)},
814 {"enable-web-bluetooth",
815 IDS_FLAGS_WEB_BLUETOOTH_NAME
,
816 IDS_FLAGS_WEB_BLUETOOTH_DESCRIPTION
,
818 SINGLE_VALUE_TYPE(switches::kEnableWebBluetooth
)},
819 {"enable-devtools-experiments",
820 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
821 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
823 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)},
824 {"silent-debugger-extension-api",
825 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
826 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
828 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)},
829 #if defined(ENABLE_SPELLCHECK)
830 #if defined(OS_ANDROID)
831 {"enable-android-spellchecker",
832 IDS_OPTIONS_ENABLE_SPELLCHECK
,
833 IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION
,
835 SINGLE_VALUE_TYPE(switches::kEnableAndroidSpellChecker
)},
837 {"spellcheck-autocorrect",
838 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
839 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
840 kOsWin
| kOsLinux
| kOsCrOS
,
841 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)},
843 #if defined(ENABLE_SPELLCHECK) && \
844 (defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS))
845 {"enable-multilingual-spellchecker",
846 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_NAME
,
847 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_DESCRIPTION
,
848 kOsWin
| kOsLinux
| kOsCrOS
,
849 SINGLE_VALUE_TYPE(switches::kEnableMultilingualSpellChecker
)},
851 {"enable-scroll-prediction",
852 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
853 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
855 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)},
856 #if defined(ENABLE_TOPCHROME_MD)
858 IDS_FLAGS_TOP_CHROME_MD
,
859 IDS_FLAGS_TOP_CHROME_MD_DESCRIPTION
,
860 kOsWin
| kOsLinux
| kOsCrOS
,
861 MULTI_VALUE_TYPE(kTopChromeMaterialDesignChoices
)},
864 IDS_TOUCH_EVENTS_NAME
,
865 IDS_TOUCH_EVENTS_DESCRIPTION
,
867 MULTI_VALUE_TYPE(kTouchEventsChoices
)},
868 {"disable-touch-adjustment",
869 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
870 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
871 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
872 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)},
873 #if defined(OS_CHROMEOS)
874 {"network-portal-notification",
875 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
876 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
878 ENABLE_DISABLE_VALUE_TYPE(
879 chromeos::switches::kEnableNetworkPortalNotification
,
880 chromeos::switches::kDisableNetworkPortalNotification
)},
882 {"enable-download-resumption",
883 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
884 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
886 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)},
887 {"enable-download-notification",
888 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
889 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
891 MULTI_VALUE_TYPE(kDownloadNotificationChoices
)},
892 #if defined(ENABLE_PLUGINS)
893 {"allow-nacl-socket-api",
894 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
895 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
897 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")},
899 #if defined(OS_CHROMEOS)
900 {"allow-touchpad-three-finger-click",
901 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
902 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
904 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)},
905 {"ash-enable-unified-desktop",
906 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME
,
907 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION
,
909 SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop
)},
910 {"disable-easy-unlock",
911 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
912 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
914 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)},
915 {"enable-easy-unlock-proximity-detection",
916 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
917 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
919 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)},
920 {"enable-easy-unlock-bluetooth-low-energy-detection",
921 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME
,
922 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION
,
925 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery
)},
928 {"disable-minimize-on-second-launcher-item-click",
929 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
930 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
932 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)},
934 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
935 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
937 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)},
940 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
941 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
942 kOsLinux
| kOsWin
| kOsCrOS
,
943 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
945 #endif // defined(USE_ASH)
947 "enable-viewport-meta",
948 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
949 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
950 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
951 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
953 #if defined(OS_CHROMEOS)
955 "disable-boot-animation",
956 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
957 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
959 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
961 {"enable-video-player-chromecast-support",
962 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
963 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
966 chromeos::switches::kEnableVideoPlayerChromecastSupport
)},
968 "disable-office-editing-component-app",
969 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
970 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
972 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
975 "disable-display-color-calibration",
976 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
977 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
979 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
982 "ash-disable-screen-orientation-lock",
983 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
984 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
986 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
988 #endif // defined(OS_CHROMEOS)
990 "disable-accelerated-video-decode",
991 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
992 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
993 kOsMac
| kOsWin
| kOsCrOS
,
994 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
998 "ash-debug-shortcuts",
999 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
1000 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
1002 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
1005 "ash-disable-maximize-mode-window-backdrop",
1006 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME
,
1007 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION
,
1009 SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop
),
1012 "ash-enable-touch-view-testing",
1013 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
1014 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
1016 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
1019 "disable-touch-feedback",
1020 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
1021 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
1023 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
1026 "ash-enable-mirrored-screen",
1027 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1028 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1030 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1032 {"ash-enable-screen-rotation-animations",
1033 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME
,
1034 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION
,
1036 MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices
)},
1038 "ash-stable-overview-order",
1039 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_NAME
,
1040 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_DESCRIPTION
,
1042 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableStableOverviewOrder
,
1043 ash::switches::kAshDisableStableOverviewOrder
),
1045 #endif // defined(USE_ASH)
1046 #if defined(OS_CHROMEOS)
1047 {"material-design-ink-drop",
1048 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_NAME
,
1049 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_DESCRIPTION
,
1051 MULTI_VALUE_TYPE(kAshMaterialDesignInkDrop
)},
1052 {"material-design-ink-drop-animation-speed",
1053 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_NAME
,
1054 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_DESCRIPTION
,
1056 MULTI_VALUE_TYPE(kAshMaterialDesignInkDropAnimationSpeed
)},
1057 {"disable-cloud-import",
1058 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1059 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1061 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)},
1062 {"enable-request-tablet-site",
1063 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1064 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1066 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)},
1068 {"debug-packed-apps",
1069 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1070 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1072 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)},
1073 {"enable-password-generation",
1074 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1075 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1076 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1077 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1078 autofill::switches::kDisablePasswordGeneration
)},
1079 {"enable-automatic-password-saving",
1080 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1081 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1084 password_manager::switches::kEnableAutomaticPasswordSaving
)},
1085 {"password-manager-reauthentication",
1086 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1087 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1089 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)},
1090 {"enable-password-force-saving",
1091 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME
,
1092 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION
,
1094 SINGLE_VALUE_TYPE(password_manager::switches::kEnablePasswordForceSaving
)},
1095 {"enable-password-link",
1096 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1097 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1098 kOsAndroid
| kOsDesktop
,
1099 ENABLE_DISABLE_VALUE_TYPE(
1100 password_manager::switches::kEnablePasswordLink
,
1101 password_manager::switches::kDisablePasswordLink
)},
1102 {"enable-affiliation-based-matching",
1103 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1104 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1105 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1106 ENABLE_DISABLE_VALUE_TYPE(
1107 password_manager::switches::kEnableAffiliationBasedMatching
,
1108 password_manager::switches::kDisableAffiliationBasedMatching
)},
1109 {"wallet-service-use-sandbox",
1110 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1111 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1112 kOsAndroid
| kOsDesktop
,
1113 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1114 autofill::switches::kWalletServiceUseSandbox
,
1116 autofill::switches::kWalletServiceUseSandbox
,
1118 #if defined(USE_AURA)
1119 {"overscroll-history-navigation",
1120 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1121 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1123 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)},
1125 {"scroll-end-effect",
1126 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1127 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1129 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScrollEndEffect
,
1131 switches::kScrollEndEffect
,
1134 IDS_FLAGS_ENABLE_ICON_NTP_NAME
,
1135 IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION
,
1136 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1137 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp
,
1138 switches::kDisableIconNtp
)},
1139 {"enable-touch-drag-drop",
1140 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1141 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1143 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1144 switches::kDisableTouchDragDrop
)},
1145 {"enable-touch-editing",
1146 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1147 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1148 kOsCrOS
| kOsWin
| kOsLinux
,
1149 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1150 switches::kDisableTouchEditing
)},
1151 {"touch-selection-strategy",
1152 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_NAME
,
1153 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_DESCRIPTION
,
1154 kOsAndroid
, // TODO(mfomitchev): Add CrOS/Win/Linux support soon.
1155 MULTI_VALUE_TYPE(kTouchTextSelectionStrategyChoices
)},
1156 {"enable-stale-while-revalidate",
1157 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1158 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1160 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)},
1161 {"enable-suggestions-service",
1162 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1163 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1164 kOsAndroid
| kOsCrOS
,
1165 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1166 switches::kDisableSuggestionsService
)},
1167 {"enable-suggestions-with-substring-match",
1168 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_NAME
,
1169 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_DESCRIPTION
,
1172 autofill::switches::kEnableSuggestionsWithSubstringMatch
)},
1173 {"enable-supervised-user-managed-bookmarks-folder",
1174 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1175 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1176 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1177 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)},
1178 #if defined(ENABLE_APP_LIST)
1179 {"enable-sync-app-list",
1180 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1181 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1183 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1184 app_list::switches::kDisableSyncAppList
)},
1186 #if defined(OS_MACOSX)
1187 {"enable-avfoundation",
1188 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1189 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1191 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1192 switches::kForceQTKit
)},
1195 IDS_FLAGS_LCD_TEXT_NAME
,
1196 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1198 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1199 switches::kDisableLCDText
)},
1200 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1201 {"delegated-renderer",
1202 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1203 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1204 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1205 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1206 switches::kDisableDelegatedRenderer
)},
1208 {"enable-offer-store-unmasked-wallet-cards",
1209 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS
,
1210 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION
,
1212 ENABLE_DISABLE_VALUE_TYPE(
1213 autofill::switches::kEnableOfferStoreUnmaskedWalletCards
,
1214 autofill::switches::kDisableOfferStoreUnmaskedWalletCards
)},
1215 {"enable-offline-auto-reload",
1216 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1217 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1219 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1220 switches::kDisableOfflineAutoReload
)},
1221 {"enable-offline-auto-reload-visible-only",
1222 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1223 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1225 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1226 switches::kDisableOfflineAutoReloadVisibleOnly
)},
1228 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1229 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1231 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)},
1232 {"default-tile-width",
1233 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1234 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1236 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)},
1237 {"default-tile-height",
1238 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1239 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1241 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)},
1242 #if defined(OS_ANDROID)
1243 {"disable-gesture-requirement-for-media-playback",
1244 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1245 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1247 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)},
1249 #if defined(OS_CHROMEOS)
1250 {"enable-virtual-keyboard",
1251 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1252 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1254 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)},
1255 {"enable-virtual-keyboard-overscroll",
1256 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1257 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1259 ENABLE_DISABLE_VALUE_TYPE(
1260 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1261 keyboard::switches::kDisableVirtualKeyboardOverscroll
)},
1262 {"enable-input-view",
1263 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1264 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1266 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1267 keyboard::switches::kDisableInputView
)},
1268 {"disable-new-korean-ime",
1269 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_NAME
,
1270 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_DESCRIPTION
,
1272 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewKoreanIme
)},
1273 {"disable-new-md-input-view",
1274 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_NAME
,
1275 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_DESCRIPTION
,
1277 SINGLE_VALUE_TYPE(keyboard::switches::kDisableNewMDInputView
)},
1278 {"enable-physical-keyboard-autocorrect",
1279 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1280 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1282 ENABLE_DISABLE_VALUE_TYPE(
1283 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1284 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)},
1285 {"disable-voice-input",
1286 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1287 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1289 SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput
)},
1290 {"enable-experimental-input-view-features",
1291 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1292 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1295 keyboard::switches::kEnableExperimentalInputViewFeatures
)},
1296 {"floating-virtual-keyboard",
1297 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME
,
1298 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION
,
1300 MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices
)},
1301 {"smart-virtual-keyboard",
1302 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_NAME
,
1303 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1305 MULTI_VALUE_TYPE(kSmartVirtualKeyboardChoices
)},
1307 IDS_FLAGS_GESTURE_TYPING_NAME
,
1308 IDS_FLAGS_GESTURE_TYPING_DESCRIPTION
,
1310 MULTI_VALUE_TYPE(kGestureTypingChoices
)},
1312 IDS_FLAGS_GESTURE_EDITING_NAME
,
1313 IDS_FLAGS_GESTURE_EDITING_DESCRIPTION
,
1315 MULTI_VALUE_TYPE(kGestureEditingChoices
)},
1316 {"enable-fullscreen-app-list",
1317 IDS_FLAGS_FULLSCREEN_APP_LIST_NAME
,
1318 IDS_FLAGS_FULLSCREEN_APP_LIST_DESCRIPTION
,
1320 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullscreenAppList
)},
1322 {"enable-simple-cache-backend",
1323 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1324 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1325 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1326 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)},
1327 {"enable-tcp-fast-open",
1328 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1329 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1330 kOsLinux
| kOsCrOS
| kOsAndroid
,
1331 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)},
1332 #if defined(ENABLE_SERVICE_DISCOVERY)
1333 {"device-discovery-notifications",
1334 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1335 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1337 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1338 switches::kDisableDeviceDiscoveryNotifications
)},
1339 {"enable-print-preview-register-promos",
1340 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1341 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1343 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)},
1344 #endif // ENABLE_SERVICE_DISCOVERY
1346 {"enable-cloud-print-xps",
1347 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1348 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1350 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)},
1352 #if defined(USE_AURA)
1353 {"tab-capture-upscale-quality",
1354 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1355 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1357 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)},
1358 {"tab-capture-downscale-quality",
1359 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1360 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1362 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)},
1364 #if defined(TOOLKIT_VIEWS)
1365 {"disable-hide-inactive-stacked-tab-close-buttons",
1366 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1367 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1368 kOsCrOS
| kOsWin
| kOsLinux
,
1369 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)},
1371 #if defined(ENABLE_SPELLCHECK)
1372 {"enable-spelling-feedback-field-trial",
1373 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1374 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1376 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)},
1378 {"enable-webgl-draft-extensions",
1379 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1380 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1382 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)},
1383 {"enable-new-profile-management",
1384 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1385 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1386 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1387 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1388 switches::kDisableNewProfileManagement
)},
1389 {"enable-account-consistency",
1390 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1391 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1392 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1393 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1394 switches::kDisableAccountConsistency
)},
1395 {"enable-iframe-based-signin",
1396 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1397 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1398 kOsMac
| kOsWin
| kOsLinux
,
1399 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)},
1400 {"enable-google-profile-info",
1401 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1402 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1403 kOsMac
| kOsWin
| kOsLinux
,
1404 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)},
1405 #if defined(ENABLE_EXTENSIONS)
1406 {"enable-surface-worker",
1407 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1408 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1410 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)},
1412 #if defined(ENABLE_APP_LIST)
1413 {"reset-app-list-install-state",
1414 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1415 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1416 kOsMac
| kOsWin
| kOsLinux
,
1417 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState
)},
1418 {"disable-drive-apps-in-app-list",
1419 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1420 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1422 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)},
1424 #if defined(OS_ANDROID)
1425 {"enable-accessibility-tab-switcher",
1426 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1427 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1429 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)},
1430 {// TODO(dmazzoni): remove this flag when native android accessibility
1431 // ships in the stable channel. http://crbug.com/356775
1432 "enable-accessibility-script-injection",
1433 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1434 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1436 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1437 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")},
1440 IDS_FLAGS_ONE_COPY_NAME
,
1441 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1443 SINGLE_VALUE_TYPE(switches::kEnableOneCopy
)},
1444 {"enable-zero-copy",
1445 IDS_FLAGS_ZERO_COPY_NAME
,
1446 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1448 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)},
1449 #if defined(OS_CHROMEOS)
1450 {"enable-first-run-ui-transitions",
1451 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1452 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1454 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)},
1456 {"disable-new-bookmark-apps",
1457 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1458 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1459 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1460 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1461 switches::kDisableNewBookmarkApps
)},
1462 #if defined(OS_MACOSX)
1463 {"disable-hosted-app-shim-creation",
1464 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1465 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1467 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)},
1468 {"enable-hosted-app-quit-notification",
1469 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1470 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1472 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)},
1474 {"enable-ephemeral-apps-in-webstore",
1475 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1476 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1478 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)},
1479 {"enable-linkable-ephemeral-apps",
1480 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1481 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1483 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)},
1484 #if defined(OS_ANDROID)
1485 {"disable-click-delay",
1486 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1487 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1489 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1490 SINGLE_VALUE_TYPE("disable-click-delay")},
1491 {"disable-pull-to-refresh-effect",
1492 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1493 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1495 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)},
1497 #if defined(OS_MACOSX)
1498 {"enable-translate-new-ux",
1499 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1500 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1502 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)},
1504 #if defined(TOOLKIT_VIEWS)
1505 {"disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1506 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1507 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1508 kOsCrOS
| kOsWin
| kOsLinux
,
1509 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)},
1510 {"enable-link-disambiguation-popup",
1511 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1512 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1514 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)},
1516 #if defined(ENABLE_EXTENSIONS)
1517 {"enable-apps-show-on-first-paint",
1518 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1519 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1521 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)},
1523 {"enhanced-bookmarks-experiment",
1524 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1525 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1526 kOsDesktop
| kOsAndroid
,
1527 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnhancedBookmarksExperiment
,
1529 switches::kEnhancedBookmarksExperiment
,
1531 #if defined(OS_ANDROID)
1532 {"enable-zero-suggest-experiment",
1533 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1534 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1536 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)},
1537 {"reader-mode-heuristics",
1538 IDS_FLAGS_READER_MODE_HEURISTICS_NAME
,
1539 IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION
,
1541 MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices
)},
1542 {"enable-reader-mode-toolbar-icon",
1543 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1544 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1546 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)},
1547 {"enable-dom-distiller-button-animation",
1548 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION
,
1549 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION
,
1551 SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation
)},
1553 {"num-raster-threads",
1554 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1555 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1557 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)},
1558 {"enable-single-click-autofill",
1559 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1560 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1561 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1562 ENABLE_DISABLE_VALUE_TYPE(
1563 autofill::switches::kEnableSingleClickAutofill
,
1564 autofill::switches::kDisableSingleClickAutofill
)},
1565 {"enable-site-engagement-service",
1566 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME
,
1567 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION
,
1569 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService
,
1570 switches::kDisableSiteEngagementService
)},
1571 {"enable-session-crashed-bubble",
1572 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1573 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1575 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1576 switches::kDisableSessionCrashedBubble
)},
1577 {"enable-pdf-material-ui",
1578 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1579 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1581 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1582 switches::kDisablePdfMaterialUI
)},
1583 {"disable-cast-streaming-hw-encoding",
1584 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1585 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1587 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)},
1588 #if defined(OS_ANDROID)
1590 IDS_FLAGS_DISABLE_CAST_NAME
,
1591 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1593 SINGLE_VALUE_TYPE(switches::kDisableCast
)},
1594 {"prefetch-search-results",
1595 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1596 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1598 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)},
1600 #if defined(ENABLE_APP_LIST)
1601 {"enable-experimental-app-list",
1602 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1603 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1604 kOsWin
| kOsLinux
| kOsCrOS
,
1605 ENABLE_DISABLE_VALUE_TYPE(
1606 app_list::switches::kEnableExperimentalAppList
,
1607 app_list::switches::kDisableExperimentalAppList
)},
1608 {"enable-centered-app-list",
1609 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1610 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1611 kOsWin
| kOsLinux
| kOsCrOS
,
1612 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)},
1613 {"enable-new-app-list-mixer",
1614 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_NAME
,
1615 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_DESCRIPTION
,
1616 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1617 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableNewAppListMixer
,
1618 app_list::switches::kDisableNewAppListMixer
)},
1620 {"disable-threaded-scrolling",
1621 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1622 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1623 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
| kOsMac
,
1624 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)},
1625 {"invert-viewport-scroll-order",
1626 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_NAME
,
1627 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_DESCRIPTION
,
1629 SINGLE_VALUE_TYPE(switches::kInvertViewportScrollOrder
)},
1630 {"bleeding-edge-renderer-mode",
1631 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1632 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1634 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)},
1635 {"enable-settings-window",
1636 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1637 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1639 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1640 switches::kDisableSettingsWindow
)},
1641 {"enable-save-password-bubble",
1642 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1643 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1644 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1645 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1646 switches::kDisableSavePasswordBubble
)},
1647 {"enable-apps-file-associations",
1648 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1649 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1651 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)},
1652 #if defined(OS_ANDROID)
1653 {"enable-embeddedsearch-api",
1654 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1655 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1657 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)},
1659 {"distance-field-text",
1660 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1661 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1663 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1664 switches::kDisableDistanceFieldText
)},
1665 {"extension-content-verification",
1666 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1667 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1669 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)},
1670 #if defined(ENABLE_EXTENSIONS)
1671 {"extension-active-script-permission",
1672 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1673 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1675 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)},
1677 #if defined(OS_ANDROID)
1678 {"enable-data-reduction-proxy-dev",
1679 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1680 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1682 ENABLE_DISABLE_VALUE_TYPE(
1683 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1684 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)},
1685 {"enable-data-reduction-proxy-carrier-test",
1686 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_NAME
,
1687 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_DESCRIPTION
,
1690 data_reduction_proxy::switches::kEnableDataReductionProxyCarrierTest
)},
1692 {"enable-hotword-hardware",
1693 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1694 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1696 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)},
1697 #if defined(ENABLE_EXTENSIONS)
1698 {"enable-embedded-extension-options",
1699 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1700 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1702 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)},
1704 #if defined(USE_ASH)
1705 {"enable-web-app-frame",
1706 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1707 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1709 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)},
1711 {"enable-drop-sync-credential",
1712 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1713 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1715 ENABLE_DISABLE_VALUE_TYPE(
1716 password_manager::switches::kEnableDropSyncCredential
,
1717 password_manager::switches::kDisableDropSyncCredential
)},
1718 #if defined(ENABLE_EXTENSIONS)
1719 {"enable-extension-action-redesign",
1720 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1721 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1723 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)},
1725 {"autofill-sync-credential",
1726 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1727 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1729 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)},
1730 #if !defined(OS_ANDROID)
1731 {"enable-message-center-always-scroll-up-upon-notification-removal",
1732 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1733 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1736 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)},
1738 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1739 {"enable-md-settings",
1740 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
1741 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
1743 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignSettings
)},
1745 #if defined(OS_CHROMEOS)
1746 {"memory-pressure-thresholds",
1747 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
1748 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
1750 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)},
1752 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
1753 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
1755 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)},
1756 #endif // OS_CHROMEOS
1757 {"enable-tab-audio-muting",
1758 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
1759 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
1761 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)},
1762 {"enable-credential-manager-api",
1763 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
1764 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
1766 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)},
1767 {"reduced-referrer-granularity",
1768 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
1769 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
1771 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)},
1772 #if defined(ENABLE_PLUGINS)
1773 {"enable-plugin-power-saver",
1774 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
1775 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
1777 ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver
,
1778 plugins::switches::kDisablePluginPowerSaver
)},
1780 #if defined(OS_CHROMEOS)
1781 {"disable-new-zip-unpacker",
1782 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
1783 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
1785 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)},
1786 #endif // defined(OS_CHROMEOS)
1787 {"enable-credit-card-scan",
1788 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
1789 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
1791 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
1792 autofill::switches::kDisableCreditCardScan
)},
1793 #if defined(OS_CHROMEOS)
1794 {"disable-captive-portal-bypass-proxy",
1795 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
1796 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
1798 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy
)},
1799 #endif // defined(OS_CHROMEOS)
1800 #if defined(OS_ANDROID)
1801 {"enable-seccomp-filter-sandbox",
1802 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
1803 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
1805 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)},
1807 {"enable-touch-hover",
1808 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
1809 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
1811 SINGLE_VALUE_TYPE("enable-touch-hover")},
1812 {"enable-fill-on-account-select",
1813 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
1814 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
1816 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)},
1817 #if defined(OS_CHROMEOS)
1818 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA
1819 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
1820 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
1822 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)},
1823 {"enable-potentially-annoying-security-features",
1824 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
1825 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
1827 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)},
1829 {"disable-delay-agnostic-aec",
1830 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_NAME
,
1831 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1832 kOsWin
| kOsLinux
| kOsCrOS
,
1833 SINGLE_VALUE_TYPE(switches::kDisableDelayAgnosticAec
)},
1834 {"enable-delay-agnostic-aec",
1835 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
1836 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1838 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)},
1839 {"mark-non-secure-as", // FLAGS:RECORD_UMA
1840 IDS_MARK_NON_SECURE_AS_NAME
,
1841 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
1843 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)},
1844 {"enable-site-per-process",
1845 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
1846 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
1848 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)},
1849 #if defined(OS_MACOSX)
1850 {"enable-harfbuzz-rendertext",
1851 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
1852 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
1854 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)},
1855 #endif // defined(OS_MACOSX)
1856 #if defined(OS_CHROMEOS)
1857 {"disable-timezone-tracking",
1858 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
1859 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
1861 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)},
1862 {"disable-webview-signin-flow",
1863 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME
,
1864 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION
,
1866 SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow
)},
1867 #endif // defined(OS_CHROMEOS)
1868 {"data-reduction-proxy-lo-fi",
1869 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME
,
1870 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
1872 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices
)},
1873 {"clear-data-reduction-proxy-data-savings",
1874 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
1875 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
1878 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings
)},
1879 {"enable-data-reduction-proxy-config-client",
1880 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_NAME
,
1881 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_DESCRIPTION
,
1883 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1884 kEnableDataReductionProxyConfigClient
)},
1885 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
1886 {"enable-data-reduction-proxy-bypass-warnings",
1887 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
1888 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
1890 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1891 kEnableDataReductionProxyBypassWarning
)},
1893 {"allow-insecure-localhost",
1894 IDS_ALLOW_INSECURE_LOCALHOST
,
1895 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
1897 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)},
1898 {"enable-add-to-shelf",
1899 IDS_FLAGS_ENABLE_ADD_TO_SHELF_NAME
,
1900 IDS_FLAGS_ENABLE_ADD_TO_SHELF_DESCRIPTION
,
1902 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToShelf
,
1903 switches::kDisableAddToShelf
)},
1904 {"bypass-app-banner-engagement-checks",
1905 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
1906 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
1908 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)},
1909 {"use-sync-sandbox",
1910 IDS_FLAGS_SYNC_SANDBOX_NAME
,
1911 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
1913 SINGLE_VALUE_TYPE_AND_VALUE(
1914 switches::kSyncServiceURL
,
1915 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
1916 {"enable-child-account-detection",
1917 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
1918 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
1919 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1920 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
1921 switches::kDisableChildAccountDetection
)},
1922 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
1923 {"ozone-test-single-overlay-support",
1924 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
1925 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
1927 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)},
1928 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
1929 {"v8-pac-mojo-out-of-process",
1930 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
1931 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
1933 ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
,
1934 switches::kDisableOutOfProcessPac
)},
1935 #if defined(ENABLE_MEDIA_ROUTER)
1936 {"enable-media-router",
1937 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
1938 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
1940 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)},
1941 #endif // defined(ENABLE_MEDIA_ROUTER)
1942 // Since Drive Search is not available when app list is disabled, flag guard
1943 // enable-drive-search-in-chrome-launcher flag.
1944 #if defined(ENABLE_APP_LIST)
1945 {"enable-drive-search-in-app-launcher",
1946 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER
,
1947 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER_DESCRIPTION
,
1949 ENABLE_DISABLE_VALUE_TYPE(
1950 app_list::switches::kEnableDriveSearchInChromeLauncher
,
1951 app_list::switches::kDisableDriveSearchInChromeLauncher
)},
1952 #endif // defined(ENABLE_APP_LIST)
1953 #if defined(OS_CHROMEOS)
1954 {"disable-mtp-write-support",
1955 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_NAME
,
1956 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_DESCRIPTION
,
1958 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport
)},
1959 #endif // defined(OS_CHROMEOS)
1960 #if defined(OS_CHROMEOS)
1961 {"enable-datasaver-prompt",
1962 IDS_FLAGS_DATASAVER_PROMPT_NAME
,
1963 IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION
,
1965 MULTI_VALUE_TYPE(kDataSaverPromptChoices
)},
1966 #endif // defined(OS_CHROMEOS)
1967 {"supervised-user-safesites",
1968 IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME
,
1969 IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1970 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1971 MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices
)},
1972 #if defined(OS_ANDROID)
1973 {"enable-autofill-keyboard-accessory-view",
1974 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME
,
1975 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION
,
1977 SINGLE_VALUE_TYPE(autofill::switches::kEnableAccessorySuggestionView
)},
1978 #endif // defined(OS_ANDROID)
1979 {"disable-new-video-renderer",
1980 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_NAME
,
1981 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_DESCRIPTION
,
1983 SINGLE_VALUE_TYPE(switches::kDisableNewVideoRenderer
)},
1984 // Temporary flag to ease the transition to standard-compliant scrollTop
1985 // behavior. Will be removed shortly after http://crbug.com/157855 ships.
1986 {"scroll-top-left-interop",
1987 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_NAME
,
1988 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_DESCRIPTION
,
1990 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableBlinkFeatures
,
1991 "ScrollTopLeftInterop",
1992 switches::kDisableBlinkFeatures
,
1993 "ScrollTopLeftInterop")},
1995 {"try-supported-channel-layouts",
1996 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_NAME
,
1997 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_DESCRIPTION
,
1999 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts
)},
2001 {"emphasize-titles-in-omnibox-dropdown",
2002 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_NAME
,
2003 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_DESCRIPTION
,
2005 SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown
)},
2006 #if defined(ENABLE_WEBRTC)
2007 {"enable-webrtc-dtls12",
2008 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME
,
2009 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION
,
2011 SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12
)},
2013 #if defined(OS_MACOSX)
2015 IDS_FLAGS_APP_INFO_DIALOG_NAME
,
2016 IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION
,
2018 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppInfoDialogMac
,
2019 switches::kDisableAppInfoDialogMac
)},
2020 {"mac-views-native-app-windows",
2021 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_NAME
,
2022 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_DESCRIPTION
,
2024 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMacViewsNativeAppWindows
,
2025 switches::kDisableMacViewsNativeAppWindows
)},
2026 {"app-window-cycling",
2027 IDS_FLAGS_APP_WINDOW_CYCLING_NAME
,
2028 IDS_FLAGS_APP_WINDOW_CYCLING_DESCRIPTION
,
2030 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppWindowCycling
,
2031 switches::kDisableAppWindowCycling
)},
2033 #if defined(ENABLE_WEBVR)
2035 IDS_FLAGS_ENABLE_WEBVR_NAME
,
2036 IDS_FLAGS_ENABLE_WEBVR_DESCRIPTION
,
2038 SINGLE_VALUE_TYPE(switches::kEnableWebVR
)},
2040 #if defined(OS_CHROMEOS)
2041 {"enable-accelerated-mjpeg-decode",
2042 IDS_FLAGS_ENABLE_ACCELERATED_MJPEG_DECODE_NAME
,
2043 IDS_FLAGS_ENABLE_ACCELERATED_MJPEG_DECODE_DESCRIPTION
,
2045 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode
)},
2046 #endif // OS_CHROMEOS
2047 {"v8-cache-options",
2048 IDS_FLAGS_V8_CACHE_OPTIONS_NAME
,
2049 IDS_FLAGS_V8_CACHE_OPTIONS_DESCRIPTION
,
2051 MULTI_VALUE_TYPE(kV8CacheOptionsChoices
)},
2052 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2053 {"enable-md-downloads",
2054 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_NAME
,
2055 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_DESCRIPTION
,
2057 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignDownloads
)},
2059 #if defined(OS_WIN) || defined(OS_MACOSX)
2060 {"enable-tab-discarding",
2061 IDS_FLAGS_ENABLE_TAB_DISCARDING_NAME
,
2062 IDS_FLAGS_ENABLE_TAB_DISCARDING_DESCRIPTION
,
2064 SINGLE_VALUE_TYPE(switches::kEnableTabDiscarding
)},
2066 {"enable-clear-browsing-data-counters",
2067 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_NAME
,
2068 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_DESCRIPTION
,
2070 SINGLE_VALUE_TYPE(switches::kEnableClearBrowsingDataCounters
)
2072 #if defined(ENABLE_TASK_MANAGER)
2073 {"enable-new-task-manager",
2074 IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_NAME
,
2075 IDS_FLAGS_ENABLE_NEW_TASK_MANAGER_DESCRIPTION
,
2077 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager
)
2079 #endif // defined(ENABLE_TASK_MANAGER)
2080 // NOTE: Adding new command-line switches requires adding corresponding
2081 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2082 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2085 const Experiment
* experiments
= kExperiments
;
2086 size_t num_experiments
= arraysize(kExperiments
);
2088 // Stores and encapsulates the little state that about:flags has.
2091 FlagsState() : needs_restart_(false) {}
2092 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2093 base::CommandLine
* command_line
,
2094 SentinelsMode sentinels
);
2095 bool IsRestartNeededToCommitChanges();
2096 void SetExperimentEnabled(
2097 FlagsStorage
* flags_storage
,
2098 const std::string
& internal_name
,
2100 void RemoveFlagsSwitches(
2101 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2102 void ResetAllFlags(FlagsStorage
* flags_storage
);
2105 // Returns the singleton instance of this class
2106 static FlagsState
* GetInstance() {
2107 return Singleton
<FlagsState
>::get();
2111 bool needs_restart_
;
2112 std::map
<std::string
, std::string
> flags_switches_
;
2114 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2117 // Adds the internal names for the specified experiment to |names|.
2118 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2119 if (e
.type
== Experiment::SINGLE_VALUE
||
2120 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2121 names
->insert(e
.internal_name
);
2123 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2124 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2125 for (int i
= 0; i
< e
.num_choices
; ++i
)
2126 names
->insert(e
.NameForChoice(i
));
2130 // Confirms that an experiment is valid, used in a DCHECK in
2131 // SanitizeList below.
2132 bool ValidateExperiment(const Experiment
& e
) {
2134 case Experiment::SINGLE_VALUE
:
2135 case Experiment::SINGLE_DISABLE_VALUE
:
2136 DCHECK_EQ(0, e
.num_choices
);
2139 case Experiment::MULTI_VALUE
:
2140 DCHECK_GT(e
.num_choices
, 0);
2142 DCHECK(e
.choices
[0].command_line_switch
);
2143 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2145 case Experiment::ENABLE_DISABLE_VALUE
:
2146 DCHECK_EQ(3, e
.num_choices
);
2148 DCHECK(e
.command_line_switch
);
2149 DCHECK(e
.command_line_value
);
2150 DCHECK(e
.disable_command_line_switch
);
2151 DCHECK(e
.disable_command_line_value
);
2159 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2160 // unknown, to prevent this list to become very long as experiments are added
2162 void SanitizeList(FlagsStorage
* flags_storage
) {
2163 std::set
<std::string
> known_experiments
;
2164 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2165 DCHECK(ValidateExperiment(experiments
[i
]));
2166 AddInternalName(experiments
[i
], &known_experiments
);
2169 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2171 std::set
<std::string
> new_enabled_experiments
=
2172 base::STLSetIntersection
<std::set
<std::string
> >(
2173 known_experiments
, enabled_experiments
);
2175 if (new_enabled_experiments
!= enabled_experiments
)
2176 flags_storage
->SetFlags(new_enabled_experiments
);
2179 void GetSanitizedEnabledFlags(
2180 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2181 SanitizeList(flags_storage
);
2182 *result
= flags_storage
->GetFlags();
2185 bool SkipConditionalExperiment(const Experiment
& experiment
) {
2186 chrome::VersionInfo::Channel channel
= chrome::VersionInfo::GetChannel();
2188 #if defined(OS_ANDROID)
2189 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2190 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2191 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2192 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2195 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2196 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2197 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2200 // enable-data-reduction-proxy-carrier-test is only available for Chromium
2201 // builds and the Canary/Dev channel.
2202 if (!strcmp("enable-data-reduction-proxy-carrier-test",
2203 experiment
.internal_name
) &&
2204 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2205 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2206 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2211 // data-reduction-proxy-lo-fi is only available for Chromium builds and
2212 // the Canary/Dev/Beta channels.
2213 if (!strcmp("data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2214 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2215 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2216 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2217 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2221 // enable-data-reduction-proxy-config-client is only available for Chromium
2222 // builds and the Canary/Dev channels.
2223 if (!strcmp("enable-data-reduction-proxy-config-client",
2224 experiment
.internal_name
) &&
2225 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2226 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2227 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2231 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2232 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2233 // builds and Canary/Dev channel.
2234 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2235 experiment
.internal_name
) &&
2236 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
&&
2237 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2238 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2247 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2248 // enabled on the current platform.
2249 void GetSanitizedEnabledFlagsForCurrentPlatform(
2250 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2251 GetSanitizedEnabledFlags(flags_storage
, result
);
2253 // Filter out any experiments that aren't enabled on the current platform. We
2254 // don't remove these from prefs else syncing to a platform with a different
2255 // set of experiments would be lossy.
2256 std::set
<std::string
> platform_experiments
;
2257 int current_platform
= GetCurrentPlatform();
2258 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2259 if (experiments
[i
].supported_platforms
& current_platform
)
2260 AddInternalName(experiments
[i
], &platform_experiments
);
2261 #if defined(OS_CHROMEOS)
2262 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2263 AddInternalName(experiments
[i
], &platform_experiments
);
2267 std::set
<std::string
> new_enabled_experiments
=
2268 base::STLSetIntersection
<std::set
<std::string
> >(
2269 platform_experiments
, *result
);
2271 result
->swap(new_enabled_experiments
);
2274 // Returns true if none of this experiment's options have been enabled.
2275 bool IsDefaultValue(
2276 const Experiment
& experiment
,
2277 const std::set
<std::string
>& enabled_experiments
) {
2278 switch (experiment
.type
) {
2279 case Experiment::SINGLE_VALUE
:
2280 case Experiment::SINGLE_DISABLE_VALUE
:
2281 return enabled_experiments
.count(experiment
.internal_name
) == 0;
2282 case Experiment::MULTI_VALUE
:
2283 case Experiment::ENABLE_DISABLE_VALUE
:
2284 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2285 if (enabled_experiments
.count(experiment
.NameForChoice(i
)) > 0)
2295 // Returns the Value representing the choice data in the specified experiment.
2296 base::Value
* CreateChoiceData(
2297 const Experiment
& experiment
,
2298 const std::set
<std::string
>& enabled_experiments
) {
2299 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2300 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2301 base::ListValue
* result
= new base::ListValue
;
2302 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2303 base::DictionaryValue
* value
= new base::DictionaryValue
;
2304 const std::string name
= experiment
.NameForChoice(i
);
2305 value
->SetString("internal_name", name
);
2306 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2307 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2308 result
->Append(value
);
2315 std::string
Experiment::NameForChoice(int index
) const {
2316 DCHECK(type
== Experiment::MULTI_VALUE
||
2317 type
== Experiment::ENABLE_DISABLE_VALUE
);
2318 DCHECK_LT(index
, num_choices
);
2319 return std::string(internal_name
) + testing::kMultiSeparator
+
2320 base::IntToString(index
);
2323 base::string16
Experiment::DescriptionForChoice(int index
) const {
2324 DCHECK(type
== Experiment::MULTI_VALUE
||
2325 type
== Experiment::ENABLE_DISABLE_VALUE
);
2326 DCHECK_LT(index
, num_choices
);
2328 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2329 const int kEnableDisableDescriptionIds
[] = {
2330 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2331 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2332 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2334 description_id
= kEnableDisableDescriptionIds
[index
];
2336 description_id
= choices
[index
].description_id
;
2338 return l10n_util::GetStringUTF16(description_id
);
2341 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2342 base::CommandLine
* command_line
,
2343 SentinelsMode sentinels
) {
2344 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2349 bool AreSwitchesIdenticalToCurrentCommandLine(
2350 const base::CommandLine
& new_cmdline
,
2351 const base::CommandLine
& active_cmdline
,
2352 std::set
<base::CommandLine::StringType
>* out_difference
) {
2353 std::set
<base::CommandLine::StringType
> new_flags
=
2354 ExtractFlagsFromCommandLine(new_cmdline
);
2355 std::set
<base::CommandLine::StringType
> active_flags
=
2356 ExtractFlagsFromCommandLine(active_cmdline
);
2358 bool result
= false;
2359 // Needed because std::equal doesn't check if the 2nd set is empty.
2360 if (new_flags
.size() == active_flags
.size()) {
2362 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2365 if (out_difference
&& !result
) {
2366 std::set_symmetric_difference(
2369 active_flags
.begin(),
2371 std::inserter(*out_difference
, out_difference
->begin()));
2377 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2379 base::ListValue
* supported_experiments
,
2380 base::ListValue
* unsupported_experiments
) {
2381 std::set
<std::string
> enabled_experiments
;
2382 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2384 int current_platform
= GetCurrentPlatform();
2386 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2387 const Experiment
& experiment
= experiments
[i
];
2388 if (SkipConditionalExperiment(experiment
))
2391 base::DictionaryValue
* data
= new base::DictionaryValue();
2392 data
->SetString("internal_name", experiment
.internal_name
);
2393 data
->SetString("name",
2394 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2395 data
->SetString("description",
2396 l10n_util::GetStringUTF16(
2397 experiment
.visible_description_id
));
2399 base::ListValue
* supported_platforms
= new base::ListValue();
2400 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2401 data
->Set("supported_platforms", supported_platforms
);
2402 // True if the switch is not currently passed.
2403 bool is_default_value
= IsDefaultValue(experiment
, enabled_experiments
);
2404 data
->SetBoolean("is_default", is_default_value
);
2406 switch (experiment
.type
) {
2407 case Experiment::SINGLE_VALUE
:
2408 case Experiment::SINGLE_DISABLE_VALUE
:
2411 (!is_default_value
&&
2412 experiment
.type
== Experiment::SINGLE_VALUE
) ||
2413 (is_default_value
&&
2414 experiment
.type
== Experiment::SINGLE_DISABLE_VALUE
));
2416 case Experiment::MULTI_VALUE
:
2417 case Experiment::ENABLE_DISABLE_VALUE
:
2418 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2424 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2425 #if defined(OS_CHROMEOS)
2426 if (access
== kOwnerAccessToFlags
&&
2427 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2432 supported_experiments
->Append(data
);
2434 unsupported_experiments
->Append(data
);
2438 bool IsRestartNeededToCommitChanges() {
2439 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2442 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2443 const std::string
& internal_name
,
2445 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2446 internal_name
, enable
);
2449 void RemoveFlagsSwitches(
2450 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2451 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2454 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2455 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2458 int GetCurrentPlatform() {
2459 #if defined(OS_MACOSX)
2461 #elif defined(OS_WIN)
2463 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2465 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2467 #elif defined(OS_ANDROID)
2470 #error Unknown platform
2474 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2475 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2476 for (const std::string
& flag
: flags
) {
2477 std::string
action("AboutFlags_");
2479 content::RecordComputedAction(action
);
2481 // Since flag metrics are recorded every startup, add a tick so that the
2482 // stats can be made meaningful.
2484 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2485 content::RecordAction(base::UserMetricsAction("StartupTick"));
2488 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2489 return static_cast<base::HistogramBase::Sample
>(
2490 metrics::HashMetricName(switch_name
));
2493 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2494 const std::set
<std::string
>& command_line_difference
) {
2495 for (const std::string
& flag
: command_line_difference
) {
2496 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2497 if (base::StartsWith(flag
, "--", base::CompareCase::SENSITIVE
)) {
2498 // Skip '--' before switch name.
2499 std::string
switch_name(flag
.substr(2));
2501 // Kill value, if any.
2502 const size_t value_pos
= switch_name
.find('=');
2503 if (value_pos
!= std::string::npos
)
2504 switch_name
.resize(value_pos
);
2506 uma_id
= GetSwitchUMAId(switch_name
);
2508 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2509 << "' has incorrect format.";
2511 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2512 << "' '" << flag
<< "', uma_id=" << uma_id
;
2514 // Sparse histogram macro does not cache the histogram, so it's safe
2515 // to use macro with non-static histogram name here.
2516 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2520 //////////////////////////////////////////////////////////////////////////////
2521 // FlagsState implementation.
2525 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2526 NameToSwitchAndValueMap
;
2528 void SetFlagToSwitchMapping(const std::string
& key
,
2529 const std::string
& switch_name
,
2530 const std::string
& switch_value
,
2531 NameToSwitchAndValueMap
* name_to_switch_map
) {
2532 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2533 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2536 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2537 base::CommandLine
* command_line
,
2538 SentinelsMode sentinels
) {
2539 if (command_line
->HasSwitch(switches::kNoExperiments
))
2542 std::set
<std::string
> enabled_experiments
;
2544 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2545 &enabled_experiments
);
2547 NameToSwitchAndValueMap name_to_switch_map
;
2548 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2549 const Experiment
& e
= experiments
[i
];
2550 if (e
.type
== Experiment::SINGLE_VALUE
||
2551 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2552 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2553 e
.command_line_value
, &name_to_switch_map
);
2554 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2555 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2556 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2557 e
.choices
[j
].command_line_switch
,
2558 e
.choices
[j
].command_line_value
,
2559 &name_to_switch_map
);
2562 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2563 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2564 &name_to_switch_map
);
2565 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2566 e
.command_line_value
, &name_to_switch_map
);
2567 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2568 e
.disable_command_line_value
, &name_to_switch_map
);
2572 if (sentinels
== kAddSentinels
) {
2573 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2574 flags_switches_
.insert(
2575 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2578 for (const std::string
& experiment_name
: enabled_experiments
) {
2579 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2580 name_to_switch_map
.find(experiment_name
);
2581 if (name_to_switch_it
== name_to_switch_map
.end()) {
2586 const std::pair
<std::string
, std::string
>&
2587 switch_and_value_pair
= name_to_switch_it
->second
;
2589 CHECK(!switch_and_value_pair
.first
.empty());
2590 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2591 switch_and_value_pair
.second
);
2592 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2594 if (sentinels
== kAddSentinels
) {
2595 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2596 flags_switches_
.insert(
2597 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2602 bool FlagsState::IsRestartNeededToCommitChanges() {
2603 return needs_restart_
;
2606 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2607 const std::string
& internal_name
,
2609 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2610 if (at_index
!= std::string::npos
) {
2612 // We're being asked to enable a multi-choice experiment. Disable the
2613 // currently selected choice.
2614 DCHECK_NE(at_index
, 0u);
2615 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2616 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2618 // And enable the new choice, if it is not the default first choice.
2619 if (internal_name
!= experiment_name
+ "@0") {
2620 std::set
<std::string
> enabled_experiments
;
2621 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2622 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2623 flags_storage
->SetFlags(enabled_experiments
);
2628 std::set
<std::string
> enabled_experiments
;
2629 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2631 const Experiment
* e
= NULL
;
2632 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2633 if (experiments
[i
].internal_name
== internal_name
) {
2634 e
= experiments
+ i
;
2640 if (e
->type
== Experiment::SINGLE_VALUE
) {
2642 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2644 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2645 } else if (e
->type
== Experiment::SINGLE_DISABLE_VALUE
) {
2647 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2649 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2652 // Enable the first choice.
2653 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2655 // Find the currently enabled choice and disable it.
2656 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2657 std::string choice_name
= e
->NameForChoice(i
);
2658 if (enabled_experiments
.find(choice_name
) !=
2659 enabled_experiments
.end()) {
2660 needs_restart_
= true;
2661 enabled_experiments
.erase(choice_name
);
2662 // Continue on just in case there's a bug and more than one
2663 // experiment for this choice was enabled.
2669 flags_storage
->SetFlags(enabled_experiments
);
2672 void FlagsState::RemoveFlagsSwitches(
2673 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2674 for (const auto& entry
: flags_switches_
)
2675 switch_list
->erase(entry
.first
);
2678 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2679 needs_restart_
= true;
2681 std::set
<std::string
> no_experiments
;
2682 flags_storage
->SetFlags(no_experiments
);
2685 void FlagsState::reset() {
2686 needs_restart_
= false;
2687 flags_switches_
.clear();
2694 // WARNING: '@' is also used in the html file. If you update this constant you
2695 // also need to update the html file.
2696 const char kMultiSeparator
[] = "@";
2698 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2701 FlagsState::GetInstance()->reset();
2704 void SetExperiments(const Experiment
* e
, size_t count
) {
2706 experiments
= kExperiments
;
2707 num_experiments
= arraysize(kExperiments
);
2710 num_experiments
= count
;
2714 const Experiment
* GetExperiments(size_t* count
) {
2715 *count
= num_experiments
;
2719 } // namespace testing
2721 } // namespace about_flags