1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/about_flags.h"
12 #include "base/command_line.h"
13 #include "base/memory/singleton.h"
14 #include "base/metrics/sparse_histogram.h"
15 #include "base/stl_util.h"
16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h"
20 #include "cc/base/switches.h"
21 #include "chrome/browser/flags_storage.h"
22 #include "chrome/common/channel_info.h"
23 #include "chrome/common/chrome_content_client.h"
24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/grit/chromium_strings.h"
26 #include "chrome/grit/generated_resources.h"
27 #include "chrome/grit/google_chrome_strings.h"
28 #include "components/autofill/core/common/autofill_switches.h"
29 #include "components/cloud_devices/common/cloud_devices_switches.h"
30 #include "components/dom_distiller/core/dom_distiller_switches.h"
31 #include "components/enhanced_bookmarks/enhanced_bookmark_switches.h"
32 #include "components/metrics/metrics_hashes.h"
33 #include "components/nacl/common/nacl_switches.h"
34 #include "components/offline_pages/offline_page_switches.h"
35 #include "components/omnibox/browser/omnibox_switches.h"
36 #include "components/plugins/common/plugins_switches.h"
37 #include "components/proximity_auth/switches.h"
38 #include "components/search/search_switches.h"
39 #include "components/sync_driver/sync_driver_switches.h"
40 #include "components/version_info/version_info.h"
41 #include "content/public/browser/user_metrics.h"
42 #include "media/base/media_switches.h"
43 #include "media/midi/midi_switches.h"
44 #include "ui/base/l10n/l10n_util.h"
45 #include "ui/base/ui_base_switches.h"
46 #include "ui/display/display_switches.h"
47 #include "ui/events/event_switches.h"
48 #include "ui/gfx/switches.h"
49 #include "ui/gl/gl_switches.h"
50 #include "ui/keyboard/keyboard_switches.h"
51 #include "ui/native_theme/native_theme_switches.h"
52 #include "ui/views/views_switches.h"
54 #if defined(OS_ANDROID)
55 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
57 #include "ui/message_center/message_center_switches.h"
61 #include "ash/ash_switches.h"
64 #if defined(OS_CHROMEOS)
65 #include "chromeos/chromeos_switches.h"
66 #include "third_party/cros_system_api/switches/chrome_switches.h"
69 #if defined(ENABLE_APP_LIST)
70 #include "ui/app_list/app_list_switches.h"
73 #if defined(ENABLE_EXTENSIONS)
74 #include "extensions/common/switches.h"
77 #if defined(USE_OZONE)
78 #include "ui/ozone/public/ozone_switches.h"
81 namespace about_flags
{
83 // Macros to simplify specifying the type.
84 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
85 Experiment::SINGLE_VALUE, \
86 command_line_switch, switch_value, NULL, NULL, NULL, 0
87 #define SINGLE_VALUE_TYPE(command_line_switch) \
88 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
89 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
90 Experiment::SINGLE_DISABLE_VALUE, \
91 command_line_switch, switch_value, NULL, NULL, NULL, 0
92 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \
93 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
94 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
95 disable_switch, disable_value) \
96 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
97 disable_switch, disable_value, NULL, 3
98 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
99 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
100 #define MULTI_VALUE_TYPE(choices) \
101 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
105 // Enumeration of OSs.
112 kOsCrOSOwnerOnly
= 1 << 5
115 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
116 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
118 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
119 // whether the experiment is available on that platform.
120 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
123 const char* const name
;
128 {kOsCrOS
, "Chrome OS"},
129 {kOsAndroid
, "Android"},
130 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
132 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
133 if (bitmask
& kBitsToOs
[i
].bit
)
134 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
138 // Convert switch constants to proper CommandLine::StringType strings.
139 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
140 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
141 cmd_line
.AppendSwitch(flag
);
142 DCHECK_EQ(2U, cmd_line
.argv().size());
143 return cmd_line
.argv()[1];
146 // Scoops flags from a command line.
147 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
148 const base::CommandLine
& cmdline
) {
149 std::set
<base::CommandLine::StringType
> flags
;
150 // First do the ones between --flag-switches-begin and --flag-switches-end.
151 base::CommandLine::StringVector::const_iterator first
=
152 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
153 GetSwitchString(switches::kFlagSwitchesBegin
));
154 base::CommandLine::StringVector::const_iterator last
=
155 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
156 GetSwitchString(switches::kFlagSwitchesEnd
));
157 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
158 flags
.insert(first
+ 1, last
);
159 #if defined(OS_CHROMEOS)
160 // Then add those between --policy-switches-begin and --policy-switches-end.
161 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
162 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
163 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
164 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
165 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
166 flags
.insert(first
+ 1, last
);
171 const Experiment::Choice kTouchEventsChoices
[] = {
172 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
173 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
174 switches::kTouchEvents
,
175 switches::kTouchEventsEnabled
},
176 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
177 switches::kTouchEvents
,
178 switches::kTouchEventsDisabled
}
181 #if defined(USE_AURA)
182 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
183 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
184 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
185 switches::kOverscrollHistoryNavigation
,
187 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
188 switches::kOverscrollHistoryNavigation
,
193 const Experiment::Choice kTouchTextSelectionStrategyChoices
[] = {
194 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
195 { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER
,
196 switches::kTouchTextSelectionStrategy
,
198 { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION
,
199 switches::kTouchTextSelectionStrategy
,
203 #if !defined(DISABLE_NACL)
204 const Experiment::Choice kNaClDebugMaskChoices
[] = {
205 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
206 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
207 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
208 // so by default we want to avoid debugging that.
209 // NOTE: As the default value must be the empty string, the mask excluding
210 // the PNaCl translator and secure shell is substituted elsewhere.
211 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
212 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
213 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
214 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
218 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
220 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
221 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
222 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
223 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
}
226 const Experiment::Choice kDataReductionProxyLoFiChoices
[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
228 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON
,
229 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
230 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn
},
231 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY
,
232 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
233 data_reduction_proxy::switches::
234 kDataReductionProxyLoFiValueCellularOnly
},
235 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DISABLED
,
236 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
237 data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled
},
238 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_SLOW_CONNECTIONS_ONLY
,
239 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
240 data_reduction_proxy::switches::
241 kDataReductionProxyLoFiValueSlowConnectionsOnly
}
244 const Experiment::Choice kShowSavedCopyChoices
[] = {
245 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
246 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY
,
247 switches::kShowSavedCopy
, switches::kEnableShowSavedCopyPrimary
},
248 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY
,
249 switches::kShowSavedCopy
, switches::kEnableShowSavedCopySecondary
},
250 { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY
,
251 switches::kShowSavedCopy
, switches::kDisableShowSavedCopy
}
254 const Experiment::Choice kDefaultTileWidthChoices
[] = {
255 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
256 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
257 switches::kDefaultTileWidth
, "128"},
258 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
259 switches::kDefaultTileWidth
, "256"},
260 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
261 switches::kDefaultTileWidth
, "512"},
262 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
263 switches::kDefaultTileWidth
, "1024"}
266 const Experiment::Choice kDefaultTileHeightChoices
[] = {
267 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
268 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT
,
269 switches::kDefaultTileHeight
, "128"},
270 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL
,
271 switches::kDefaultTileHeight
, "256"},
272 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE
,
273 switches::kDefaultTileHeight
, "512"},
274 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI
,
275 switches::kDefaultTileHeight
, "1024"}
278 const Experiment::Choice kSimpleCacheBackendChoices
[] = {
279 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
280 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
281 switches::kUseSimpleCacheBackend
, "off" },
282 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
283 switches::kUseSimpleCacheBackend
, "on"}
286 #if defined(USE_AURA)
287 const Experiment::Choice kTabCaptureUpscaleQualityChoices
[] = {
288 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
289 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
290 switches::kTabCaptureUpscaleQuality
, "fast" },
291 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
292 switches::kTabCaptureUpscaleQuality
, "good" },
293 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
294 switches::kTabCaptureUpscaleQuality
, "best" },
297 const Experiment::Choice kTabCaptureDownscaleQualityChoices
[] = {
298 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
300 switches::kTabCaptureDownscaleQuality
, "fast" },
301 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
302 switches::kTabCaptureDownscaleQuality
, "good" },
303 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
304 switches::kTabCaptureDownscaleQuality
, "best" },
308 #if defined(OS_ANDROID)
309 const Experiment::Choice kReaderModeHeuristicsChoices
[] = {
310 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
311 { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP
,
312 switches::kReaderModeHeuristics
,
313 switches::reader_mode_heuristics::kOGArticle
},
314 { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST
,
315 switches::kReaderModeHeuristics
,
316 switches::reader_mode_heuristics::kAdaBoost
},
317 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON
,
318 switches::kReaderModeHeuristics
,
319 switches::reader_mode_heuristics::kAlwaysTrue
},
320 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF
,
321 switches::kReaderModeHeuristics
,
322 switches::reader_mode_heuristics::kNone
},
326 const Experiment::Choice kNumRasterThreadsChoices
[] = {
327 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
328 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
329 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
330 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
331 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
334 const Experiment::Choice kGpuRasterizationMSAASampleCountChoices
[] = {
335 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
338 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO
,
339 switches::kGpuRasterizationMSAASampleCount
, "0" },
340 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO
,
341 switches::kGpuRasterizationMSAASampleCount
, "2" },
342 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR
,
343 switches::kGpuRasterizationMSAASampleCount
, "4" },
344 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT
,
345 switches::kGpuRasterizationMSAASampleCount
, "8" },
346 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN
,
347 switches::kGpuRasterizationMSAASampleCount
, "16" },
350 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
351 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
352 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
353 switches::kEnableGpuRasterization
, "" },
354 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
355 switches::kDisableGpuRasterization
, "" },
356 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
357 switches::kForceGpuRasterization
, "" },
360 #if defined(OS_CHROMEOS)
361 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
362 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
363 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
364 chromeos::switches::kMemoryPressureThresholds
,
365 chromeos::switches::kConservativeThreshold
},
366 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
367 chromeos::switches::kMemoryPressureThresholds
,
368 chromeos::switches::kAggressiveCacheDiscardThreshold
},
369 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
370 chromeos::switches::kMemoryPressureThresholds
,
371 chromeos::switches::kAggressiveTabDiscardThreshold
},
372 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
373 chromeos::switches::kMemoryPressureThresholds
,
374 chromeos::switches::kAggressiveThreshold
},
378 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
379 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
380 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
381 switches::kExtensionContentVerification
,
382 switches::kExtensionContentVerificationBootstrap
},
383 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
384 switches::kExtensionContentVerification
,
385 switches::kExtensionContentVerificationEnforce
},
386 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
387 switches::kExtensionContentVerification
,
388 switches::kExtensionContentVerificationEnforceStrict
},
391 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
392 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
393 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
394 password_manager::switches::kAllowAutofillSyncCredential
, ""},
395 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
396 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
397 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
398 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
401 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
402 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
403 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
404 autofill::switches::kDisableFillOnAccountSelect
, "" },
405 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
406 autofill::switches::kEnableFillOnAccountSelect
, "" },
407 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
408 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
411 #if defined(ENABLE_TOPCHROME_MD)
412 const Experiment::Choice kTopChromeMaterialDesignChoices
[] = {
413 {IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL
, "", ""},
414 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL
,
415 switches::kTopChromeMD
,
416 switches::kTopChromeMDMaterial
},
417 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID
,
418 switches::kTopChromeMD
,
419 switches::kTopChromeMDMaterialHybrid
}};
422 #if defined(OS_CHROMEOS)
424 const Experiment::Choice kAshMaterialDesignInkDropAnimationSpeed
[] = {
425 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
426 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_FAST
,
427 switches::kMaterialDesignInkDropAnimationSpeed
,
428 switches::kMaterialDesignInkDropAnimationSpeedFast
},
429 {IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SLOW
,
430 switches::kMaterialDesignInkDropAnimationSpeed
,
431 switches::kMaterialDesignInkDropAnimationSpeedSlow
}};
433 const Experiment::Choice kDataSaverPromptChoices
[] = {
434 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
435 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
436 chromeos::switches::kEnableDataSaverPrompt
, "" },
437 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
438 chromeos::switches::kDisableDataSaverPrompt
, "" },
439 { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE
,
440 chromeos::switches::kEnableDataSaverPrompt
,
441 chromeos::switches::kDataSaverPromptDemoMode
},
444 const Experiment::Choice kFloatingVirtualKeyboardChoices
[] = {
445 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
446 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
447 keyboard::switches::kFloatingVirtualKeyboard
,
448 keyboard::switches::kFloatingVirtualKeyboardDisabled
},
449 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
450 keyboard::switches::kFloatingVirtualKeyboard
,
451 keyboard::switches::kFloatingVirtualKeyboardEnabled
},
454 const Experiment::Choice kSmartVirtualKeyboardChoices
[] = {
455 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
456 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
457 keyboard::switches::kSmartVirtualKeyboard
,
458 keyboard::switches::kSmartVirtualKeyboardDisabled
},
459 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
460 keyboard::switches::kSmartVirtualKeyboard
,
461 keyboard::switches::kSmartVirtualKeyboardEnabled
},
464 const Experiment::Choice kGestureTypingChoices
[] = {
465 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
466 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
467 keyboard::switches::kGestureTyping
,
468 keyboard::switches::kGestureTypingDisabled
},
469 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
470 keyboard::switches::kGestureTyping
,
471 keyboard::switches::kGestureTypingEnabled
},
474 const Experiment::Choice kGestureEditingChoices
[] = {
475 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
476 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
477 keyboard::switches::kGestureEditing
,
478 keyboard::switches::kGestureEditingDisabled
},
479 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
480 keyboard::switches::kGestureEditing
,
481 keyboard::switches::kGestureEditingEnabled
},
485 const Experiment::Choice kDownloadNotificationChoices
[] = {
486 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
487 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
488 switches::kEnableDownloadNotification
,
490 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
491 switches::kEnableDownloadNotification
,
495 const Experiment::Choice kSupervisedUserSafeSitesChoices
[] = {
496 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
497 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
498 switches::kSupervisedUserSafeSites
,
500 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
501 switches::kSupervisedUserSafeSites
,
503 { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY
,
504 switches::kSupervisedUserSafeSites
,
506 { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY
,
507 switches::kSupervisedUserSafeSites
,
508 "online-check-only" }
511 const Experiment::Choice kV8CacheOptionsChoices
[] = {
512 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
513 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
, switches::kV8CacheOptions
, "none" },
514 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE
, switches::kV8CacheOptions
, "parse" },
515 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE
, switches::kV8CacheOptions
, "code" },
518 #if defined(OS_ANDROID)
519 const Experiment::Choice kProgressBarAnimationChoices
[] = {
520 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
521 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
522 switches::kProgressBarAnimation
, "disabled" },
523 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_LINEAR
,
524 switches::kProgressBarAnimation
, "linear" },
525 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_SMOOTH
,
526 switches::kProgressBarAnimation
, "smooth" },
527 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_FAST_START
,
528 switches::kProgressBarAnimation
, "fast-start" },
530 #endif // defined(OS_ANDROID)
532 #if defined(OS_CHROMEOS)
533 const Experiment::Choice kCrosRegionsModeChoices
[] = {
534 { IDS_FLAGS_CROS_REGIONS_MODE_DEFAULT
, "", "" },
535 { IDS_FLAGS_CROS_REGIONS_MODE_OVERRIDE
, chromeos::switches::kCrosRegionsMode
,
536 chromeos::switches::kCrosRegionsModeOverride
},
537 { IDS_FLAGS_CROS_REGIONS_MODE_HIDE
, chromeos::switches::kCrosRegionsMode
,
538 chromeos::switches::kCrosRegionsModeHide
},
540 #endif // defined(OS_CHROMEOS)
542 // RECORDING USER METRICS FOR FLAGS:
543 // -----------------------------------------------------------------------------
544 // The first line of the experiment is the internal name. If you'd like to
545 // gather statistics about the usage of your flag, you should append a marker
546 // comment to the end of the feature name, like so:
547 // "my-special-feature", // FLAGS:RECORD_UMA
549 // After doing that, run
550 // tools/metrics/actions/extract_actions.py
551 // to add the metric to actions.xml (which will enable UMA to record your
552 // feature flag), then update the <owner>s and <description> sections. Make sure
553 // to include the actions.xml file when you upload your code for review!
555 // After your feature has shipped under a flag, you can locate the metrics under
556 // the action name AboutFlags_internal-action-name. Actions are recorded once
557 // per startup, so you should divide this number by AboutFlags_StartupTick to
558 // get a sense of usage. Note that this will not be the same as number of users
559 // with a given feature enabled because users can quit and relaunch the
560 // application multiple times over a given time interval. The dashboard also
561 // shows you how many (metrics reporting) users have enabled the flag over the
562 // last seven days. However, note that this is not the same as the number of
563 // users who have the flag enabled, since enabling the flag happens once,
564 // whereas running with the flag enabled happens until the user flips the flag
567 // To add a new experiment add to the end of kExperiments. There are two
568 // distinct types of experiments:
569 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
570 // macro for this type supplying the command line to the macro.
571 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
572 // deactivated state for this lab (i.e. no command line option). To specify
573 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
575 // See the documentation of Experiment for details on the fields.
577 // Command-line switches must have entries in enum "LoginCustomFlags" in
578 // histograms.xml. See note in histograms.xml and don't forget to run
579 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
581 // When adding a new choice, add it to the end of the list.
582 const Experiment kExperiments
[] = {
583 {"ignore-gpu-blacklist",
584 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
585 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
587 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)},
589 {"disable-direct-write",
590 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
591 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
593 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)},
595 {"enable-experimental-canvas-features",
596 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
597 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
599 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)},
600 {"disable-accelerated-2d-canvas",
601 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
602 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
604 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)},
605 {"enable-display-list-2d-canvas",
606 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
607 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
609 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
610 switches::kDisableDisplayList2dCanvas
)},
611 {"composited-layer-borders",
612 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
613 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
615 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)},
617 IDS_FLAGS_SHOW_FPS_COUNTER
,
618 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
620 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)},
621 #if defined(ENABLE_WEBRTC)
622 {"disable-webrtc-hw-decoding",
623 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
624 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
625 kOsAndroid
| kOsCrOS
,
626 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)},
627 {"disable-webrtc-hw-encoding",
628 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
629 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
630 kOsAndroid
| kOsCrOS
,
631 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)},
632 {"enable-webrtc-stun-origin",
633 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
634 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
636 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)},
638 #if defined(OS_ANDROID)
640 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
641 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
643 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)},
645 // Native client is compiled out when DISABLE_NACL is defined.
646 #if !defined(DISABLE_NACL)
647 {"enable-nacl", // FLAGS:RECORD_UMA
648 IDS_FLAGS_ENABLE_NACL_NAME
,
649 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
651 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)},
652 {"enable-nacl-debug", // FLAGS:RECORD_UMA
653 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
654 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
656 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)},
657 {"nacl-debug-mask", // FLAGS:RECORD_UMA
658 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
659 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
661 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)},
663 #if defined(ENABLE_EXTENSIONS)
664 {"extension-apis", // FLAGS:RECORD_UMA
665 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
666 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
668 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)},
669 {"extensions-on-chrome-urls",
670 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
671 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
673 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)},
675 {"enable-fast-unload",
676 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
677 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
679 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)},
680 #if defined(ENABLE_EXTENSIONS)
681 {"enable-app-window-controls",
682 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
683 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
685 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)},
687 {"disable-hyperlink-auditing",
688 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
689 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
691 SINGLE_VALUE_TYPE(switches::kNoPings
)},
692 #if defined(OS_ANDROID)
693 {"contextual-search",
694 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
695 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
697 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
698 switches::kDisableContextualSearch
)},
700 {"show-autofill-type-predictions",
701 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
702 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
704 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)},
705 {"enable-smooth-scrolling", // FLAGS:RECORD_UMA
706 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
707 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
708 // Can't expose the switch unless the code is compiled in.
709 // On by default for the Mac (different implementation in WebKit).
711 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)},
712 #if defined(USE_AURA) || defined(OS_LINUX)
713 {"overlay-scrollbars",
714 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
715 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
716 // Uses the system preference on Mac (a different implementation).
717 // On Android, this is always enabled.
718 kOsLinux
| kOsCrOS
| kOsWin
,
719 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
720 switches::kDisableOverlayScrollbar
)},
723 IDS_FLAGS_ENABLE_PANELS_NAME
,
724 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
726 SINGLE_VALUE_TYPE(switches::kEnablePanels
)},
727 {// See http://crbug.com/120416 for how to remove this flag.
728 "save-page-as-mhtml", // FLAGS:RECORD_UMA
729 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
730 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
731 kOsMac
| kOsWin
| kOsLinux
,
732 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)},
734 IDS_FLAGS_ENABLE_QUIC_NAME
,
735 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
737 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
, switches::kDisableQuic
)},
738 {"enable-alternative-services",
739 IDS_FLAGS_ENABLE_ALTSVC_NAME
,
740 IDS_FLAGS_ENABLE_ALTSVC_DESCRIPTION
,
742 SINGLE_VALUE_TYPE(switches::kEnableAlternativeServices
)},
743 {"disable-media-source",
744 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
745 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
747 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)},
748 {"disable-encrypted-media",
749 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
750 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
752 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)},
753 {"enable-prefixed-encrypted-media",
754 IDS_FLAGS_ENABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
755 IDS_FLAGS_ENABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
757 SINGLE_VALUE_TYPE(switches::kEnablePrefixedEncryptedMedia
)},
758 {"disable-javascript-harmony-shipping",
759 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
760 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
762 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)},
763 {"enable-javascript-harmony",
764 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
765 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
767 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)},
768 {"disable-software-rasterizer",
769 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
770 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
771 #if defined(ENABLE_SWIFTSHADER)
776 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)},
777 {"enable-gpu-rasterization",
778 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
779 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
781 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)},
782 {"gpu-rasterization-msaa-sample-count",
783 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME
,
784 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION
,
786 MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices
)},
787 {"enable-slimming-paint-v2",
788 IDS_FLAGS_ENABLE_SLIMMING_PAINT_V2_NAME
,
789 IDS_FLAGS_ENABLE_SLIMMING_PAINT_V2_DESCRIPTION
,
791 SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaintV2
)},
792 {"enable-experimental-web-platform-features",
793 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
794 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
796 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)},
797 {"enable-web-bluetooth",
798 IDS_FLAGS_WEB_BLUETOOTH_NAME
,
799 IDS_FLAGS_WEB_BLUETOOTH_DESCRIPTION
,
801 SINGLE_VALUE_TYPE(switches::kEnableWebBluetooth
)},
802 #if defined(ENABLE_EXTENSIONS)
803 {"enable-ble-advertising-in-apps",
804 IDS_FLAGS_BLE_ADVERTISING_IN_EXTENSIONS_NAME
,
805 IDS_FLAGS_BLE_ADVERTISING_IN_EXTENSIONS_DESCRIPTION
,
807 SINGLE_VALUE_TYPE(extensions::switches::kEnableBLEAdvertising
)},
809 {"enable-devtools-experiments",
810 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
811 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
813 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)},
814 {"silent-debugger-extension-api",
815 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
816 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
818 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)},
819 #if defined(ENABLE_SPELLCHECK)
820 #if defined(OS_ANDROID)
821 {"enable-android-spellchecker",
822 IDS_OPTIONS_ENABLE_SPELLCHECK
,
823 IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION
,
825 SINGLE_VALUE_TYPE(switches::kEnableAndroidSpellChecker
)},
827 {"spellcheck-autocorrect",
828 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
829 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
830 kOsWin
| kOsLinux
| kOsCrOS
,
831 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)},
833 #if defined(ENABLE_SPELLCHECK) && \
834 (defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS))
835 {"enable-multilingual-spellchecker",
836 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_NAME
,
837 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_DESCRIPTION
,
838 kOsWin
| kOsLinux
| kOsCrOS
,
839 SINGLE_VALUE_TYPE(switches::kEnableMultilingualSpellChecker
)},
841 {"enable-scroll-prediction",
842 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
843 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
845 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)},
846 #if defined(ENABLE_TOPCHROME_MD)
848 IDS_FLAGS_TOP_CHROME_MD
,
849 IDS_FLAGS_TOP_CHROME_MD_DESCRIPTION
,
850 kOsWin
| kOsLinux
| kOsCrOS
,
851 MULTI_VALUE_TYPE(kTopChromeMaterialDesignChoices
)},
854 IDS_TOUCH_EVENTS_NAME
,
855 IDS_TOUCH_EVENTS_DESCRIPTION
,
857 MULTI_VALUE_TYPE(kTouchEventsChoices
)},
858 {"disable-touch-adjustment",
859 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
860 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
861 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
862 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)},
863 #if defined(OS_CHROMEOS)
864 {"network-portal-notification",
865 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
866 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
868 ENABLE_DISABLE_VALUE_TYPE(
869 chromeos::switches::kEnableNetworkPortalNotification
,
870 chromeos::switches::kDisableNetworkPortalNotification
)},
872 {"enable-download-resumption",
873 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
874 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
876 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)},
877 {"enable-download-notification",
878 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
879 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
881 MULTI_VALUE_TYPE(kDownloadNotificationChoices
)},
882 #if defined(ENABLE_PLUGINS)
883 {"allow-nacl-socket-api",
884 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
885 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
887 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")},
889 #if defined(OS_CHROMEOS)
890 {"allow-touchpad-three-finger-click",
891 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
892 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
894 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)},
895 {"ash-enable-unified-desktop",
896 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME
,
897 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION
,
899 SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop
)},
900 {"enable-easy-unlock-proximity-detection",
901 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
902 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
904 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)},
905 {"enable-easy-unlock-bluetooth-low-energy-detection",
906 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME
,
907 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION
,
910 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery
)},
913 {"disable-minimize-on-second-launcher-item-click",
914 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
915 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
917 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)},
919 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
920 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
922 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)},
925 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
926 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
927 kOsLinux
| kOsWin
| kOsCrOS
,
928 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
930 #endif // defined(USE_ASH)
931 #if defined(OS_CHROMEOS)
933 "disable-boot-animation",
934 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
935 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
937 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
939 {"enable-video-player-chromecast-support",
940 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
941 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
944 chromeos::switches::kEnableVideoPlayerChromecastSupport
)},
946 "disable-office-editing-component-app",
947 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
948 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
950 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
953 "disable-display-color-calibration",
954 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
955 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
957 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
960 "ash-disable-screen-orientation-lock",
961 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
962 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
964 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
966 #endif // defined(OS_CHROMEOS)
968 "disable-accelerated-video-decode",
969 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
970 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
971 kOsMac
| kOsWin
| kOsCrOS
,
972 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
976 "ash-debug-shortcuts",
977 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
978 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
980 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
983 "ash-disable-maximize-mode-window-backdrop",
984 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME
,
985 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION
,
987 SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop
),
990 "ash-enable-touch-view-testing",
991 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
992 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
994 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
997 "disable-touch-feedback",
998 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
999 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
1001 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
1004 "ash-enable-mirrored-screen",
1005 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1006 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1008 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1011 "ash-stable-overview-order",
1012 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_NAME
,
1013 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_DESCRIPTION
,
1015 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableStableOverviewOrder
,
1016 ash::switches::kAshDisableStableOverviewOrder
),
1018 #endif // defined(USE_ASH)
1019 #if defined(OS_CHROMEOS)
1020 {"material-design-ink-drop-animation-speed",
1021 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_NAME
,
1022 IDS_FLAGS_MATERIAL_DESIGN_INK_DROP_ANIMATION_SPEED_DESCRIPTION
,
1024 MULTI_VALUE_TYPE(kAshMaterialDesignInkDropAnimationSpeed
)},
1025 {"disable-cloud-import",
1026 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1027 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1029 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)},
1030 {"enable-request-tablet-site",
1031 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1032 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1034 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)},
1036 {"debug-packed-apps",
1037 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1038 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1040 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)},
1041 {"enable-password-generation",
1042 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1043 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1044 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1045 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1046 autofill::switches::kDisablePasswordGeneration
)},
1047 {"enable-automatic-password-saving",
1048 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1049 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1052 password_manager::switches::kEnableAutomaticPasswordSaving
)},
1053 {"password-manager-reauthentication",
1054 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1055 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1057 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)},
1058 {"enable-password-change-support",
1059 IDS_FLAGS_ENABLE_PASSWORD_CHANGE_SUPPORT_NAME
,
1060 IDS_FLAGS_ENABLE_PASSWORD_CHANGE_SUPPORT_DESCRIPTION
,
1063 password_manager::switches::kEnablePasswordChangeSupport
)},
1064 {"enable-password-force-saving",
1065 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME
,
1066 IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION
,
1068 SINGLE_VALUE_TYPE(password_manager::switches::kEnablePasswordForceSaving
)},
1069 {"enable-password-link",
1070 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1071 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1072 kOsAndroid
| kOsDesktop
,
1073 ENABLE_DISABLE_VALUE_TYPE(
1074 password_manager::switches::kEnablePasswordLink
,
1075 password_manager::switches::kDisablePasswordLink
)},
1076 {"enable-affiliation-based-matching",
1077 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1078 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1079 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1080 ENABLE_DISABLE_VALUE_TYPE(
1081 password_manager::switches::kEnableAffiliationBasedMatching
,
1082 password_manager::switches::kDisableAffiliationBasedMatching
)},
1083 {"wallet-service-use-sandbox",
1084 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1085 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1086 kOsAndroid
| kOsDesktop
,
1087 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1088 autofill::switches::kWalletServiceUseSandbox
,
1090 autofill::switches::kWalletServiceUseSandbox
,
1092 #if defined(USE_AURA)
1093 {"overscroll-history-navigation",
1094 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1095 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1097 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)},
1099 {"scroll-end-effect",
1100 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1101 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1103 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScrollEndEffect
,
1105 switches::kScrollEndEffect
,
1108 IDS_FLAGS_ENABLE_ICON_NTP_NAME
,
1109 IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION
,
1110 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1111 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp
,
1112 switches::kDisableIconNtp
)},
1113 {"enable-touch-drag-drop",
1114 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1115 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1117 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1118 switches::kDisableTouchDragDrop
)},
1119 {"enable-touch-editing",
1120 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1121 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1122 kOsCrOS
| kOsWin
| kOsLinux
,
1123 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1124 switches::kDisableTouchEditing
)},
1125 {"touch-selection-strategy",
1126 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_NAME
,
1127 IDS_FLAGS_TOUCH_SELECTION_STRATEGY_DESCRIPTION
,
1128 kOsAndroid
, // TODO(mfomitchev): Add CrOS/Win/Linux support soon.
1129 MULTI_VALUE_TYPE(kTouchTextSelectionStrategyChoices
)},
1130 {"enable-suggestions-service",
1131 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1132 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1133 kOsAndroid
| kOsCrOS
,
1134 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1135 switches::kDisableSuggestionsService
)},
1136 {"enable-suggestions-with-substring-match",
1137 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_NAME
,
1138 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_DESCRIPTION
,
1141 autofill::switches::kEnableSuggestionsWithSubstringMatch
)},
1142 {"enable-supervised-user-managed-bookmarks-folder",
1143 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1144 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1145 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1146 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)},
1147 #if defined(ENABLE_APP_LIST)
1148 {"enable-sync-app-list",
1149 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1150 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1152 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1153 app_list::switches::kDisableSyncAppList
)},
1155 #if defined(OS_MACOSX)
1156 {"enable-avfoundation",
1157 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1158 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1160 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1161 switches::kForceQTKit
)},
1164 IDS_FLAGS_LCD_TEXT_NAME
,
1165 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1167 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1168 switches::kDisableLCDText
)},
1169 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1170 {"delegated-renderer",
1171 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1172 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1173 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1174 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1175 switches::kDisableDelegatedRenderer
)},
1177 {"enable-offer-store-unmasked-wallet-cards",
1178 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS
,
1179 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION
,
1181 ENABLE_DISABLE_VALUE_TYPE(
1182 autofill::switches::kEnableOfferStoreUnmaskedWalletCards
,
1183 autofill::switches::kDisableOfferStoreUnmaskedWalletCards
)},
1184 {"enable-offline-auto-reload",
1185 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1186 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1188 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1189 switches::kDisableOfflineAutoReload
)},
1190 {"enable-offline-auto-reload-visible-only",
1191 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1192 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1194 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1195 switches::kDisableOfflineAutoReloadVisibleOnly
)},
1197 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1198 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1200 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)},
1201 {"default-tile-width",
1202 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1203 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1205 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)},
1206 {"default-tile-height",
1207 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1208 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1210 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)},
1211 #if defined(OS_ANDROID)
1212 {"disable-gesture-requirement-for-media-playback",
1213 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1214 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1216 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)},
1218 #if defined(OS_CHROMEOS)
1219 {"enable-virtual-keyboard",
1220 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1221 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1223 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)},
1224 {"enable-virtual-keyboard-overscroll",
1225 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1226 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1228 ENABLE_DISABLE_VALUE_TYPE(
1229 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1230 keyboard::switches::kDisableVirtualKeyboardOverscroll
)},
1231 {"enable-input-view",
1232 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1233 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1235 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1236 keyboard::switches::kDisableInputView
)},
1237 {"disable-new-korean-ime",
1238 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_NAME
,
1239 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_DESCRIPTION
,
1241 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewKoreanIme
)},
1242 {"enable-physical-keyboard-autocorrect",
1243 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1244 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1246 ENABLE_DISABLE_VALUE_TYPE(
1247 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1248 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)},
1249 {"disable-voice-input",
1250 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1251 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1253 SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput
)},
1254 {"enable-experimental-input-view-features",
1255 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1256 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1259 keyboard::switches::kEnableExperimentalInputViewFeatures
)},
1260 {"floating-virtual-keyboard",
1261 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME
,
1262 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION
,
1264 MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices
)},
1265 {"smart-virtual-keyboard",
1266 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_NAME
,
1267 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1269 MULTI_VALUE_TYPE(kSmartVirtualKeyboardChoices
)},
1271 IDS_FLAGS_GESTURE_TYPING_NAME
,
1272 IDS_FLAGS_GESTURE_TYPING_DESCRIPTION
,
1274 MULTI_VALUE_TYPE(kGestureTypingChoices
)},
1276 IDS_FLAGS_GESTURE_EDITING_NAME
,
1277 IDS_FLAGS_GESTURE_EDITING_DESCRIPTION
,
1279 MULTI_VALUE_TYPE(kGestureEditingChoices
)},
1280 {"enable-fullscreen-app-list",
1281 IDS_FLAGS_FULLSCREEN_APP_LIST_NAME
,
1282 IDS_FLAGS_FULLSCREEN_APP_LIST_DESCRIPTION
,
1284 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullscreenAppList
)},
1286 {"enable-simple-cache-backend",
1287 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1288 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1289 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1290 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)},
1291 {"enable-tcp-fast-open",
1292 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1293 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1294 kOsLinux
| kOsCrOS
| kOsAndroid
,
1295 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)},
1296 #if defined(ENABLE_SERVICE_DISCOVERY)
1297 {"device-discovery-notifications",
1298 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1299 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1301 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1302 switches::kDisableDeviceDiscoveryNotifications
)},
1303 {"enable-print-preview-register-promos",
1304 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1305 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1307 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)},
1308 #endif // ENABLE_SERVICE_DISCOVERY
1310 {"enable-cloud-print-xps",
1311 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1312 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1314 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)},
1316 #if defined(USE_AURA)
1317 {"tab-capture-upscale-quality",
1318 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1319 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1321 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)},
1322 {"tab-capture-downscale-quality",
1323 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1324 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1326 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)},
1328 #if defined(TOOLKIT_VIEWS)
1329 {"disable-hide-inactive-stacked-tab-close-buttons",
1330 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1331 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1332 kOsCrOS
| kOsWin
| kOsLinux
,
1333 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)},
1335 #if defined(ENABLE_SPELLCHECK)
1336 {"enable-spelling-feedback-field-trial",
1337 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1338 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1340 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)},
1342 {"enable-webgl-draft-extensions",
1343 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1344 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1346 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)},
1347 {"enable-new-profile-management",
1348 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1349 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1350 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1351 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1352 switches::kDisableNewProfileManagement
)},
1353 {"enable-account-consistency",
1354 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1355 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1356 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1357 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1358 switches::kDisableAccountConsistency
)},
1359 {"enable-iframe-based-signin",
1360 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1361 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1362 kOsMac
| kOsWin
| kOsLinux
,
1363 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)},
1364 {"enable-google-profile-info",
1365 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1366 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1367 kOsMac
| kOsWin
| kOsLinux
,
1368 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)},
1369 #if defined(ENABLE_APP_LIST)
1370 {"reset-app-list-install-state",
1371 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1372 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1373 kOsMac
| kOsWin
| kOsLinux
,
1374 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState
)},
1376 #if defined(OS_ANDROID)
1377 {"enable-accessibility-tab-switcher",
1378 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1379 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1381 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)},
1383 {"enable-zero-copy",
1384 IDS_FLAGS_ENABLE_ZERO_COPY_NAME
,
1385 IDS_FLAGS_ENABLE_ZERO_COPY_DESCRIPTION
,
1387 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)},
1388 #if defined(OS_CHROMEOS)
1389 {"enable-first-run-ui-transitions",
1390 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1391 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1393 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)},
1395 {"disable-new-bookmark-apps",
1396 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1397 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1398 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1399 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1400 switches::kDisableNewBookmarkApps
)},
1401 #if defined(OS_MACOSX)
1402 {"disable-hosted-apps-in-windows",
1403 IDS_FLAGS_HOSTED_APPS_IN_WINDOWS_NAME
,
1404 IDS_FLAGS_HOSTED_APPS_IN_WINDOWS_DESCRIPTION
,
1406 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHostedAppsInWindows
,
1407 switches::kDisableHostedAppsInWindows
)},
1408 {"disable-hosted-app-shim-creation",
1409 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1410 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1412 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)},
1413 {"enable-hosted-app-quit-notification",
1414 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1415 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1417 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)},
1419 {"enable-ephemeral-apps-in-webstore",
1420 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1421 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1423 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)},
1424 #if defined(OS_ANDROID)
1425 {"disable-pull-to-refresh-effect",
1426 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1427 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1429 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)},
1431 #if defined(OS_MACOSX)
1432 {"enable-translate-new-ux",
1433 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1434 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1436 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTranslateNewUX
,
1437 switches::kDisableTranslateNewUX
)},
1439 #if defined(TOOLKIT_VIEWS)
1440 {"disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1441 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1442 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1443 kOsCrOS
| kOsWin
| kOsLinux
,
1444 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)},
1445 {"enable-link-disambiguation-popup",
1446 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1447 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1449 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)},
1451 #if defined(ENABLE_EXTENSIONS)
1452 {"enable-apps-show-on-first-paint",
1453 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1454 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1456 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)},
1458 {"enhanced-bookmarks-experiment",
1459 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1460 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1461 kOsDesktop
| kOsAndroid
,
1462 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnhancedBookmarksExperiment
,
1464 switches::kEnhancedBookmarksExperiment
,
1466 #if defined(OS_ANDROID)
1467 {"reader-mode-heuristics",
1468 IDS_FLAGS_READER_MODE_HEURISTICS_NAME
,
1469 IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION
,
1471 MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices
)},
1472 {"enable-dom-distiller-button-animation",
1473 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION
,
1474 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION
,
1476 SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation
)},
1478 {"num-raster-threads",
1479 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1480 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1482 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)},
1483 {"enable-single-click-autofill",
1484 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1485 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1486 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1487 ENABLE_DISABLE_VALUE_TYPE(
1488 autofill::switches::kEnableSingleClickAutofill
,
1489 autofill::switches::kDisableSingleClickAutofill
)},
1490 {"enable-site-engagement-service",
1491 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME
,
1492 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION
,
1494 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService
,
1495 switches::kDisableSiteEngagementService
)},
1496 {"enable-session-crashed-bubble",
1497 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1498 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1500 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1501 switches::kDisableSessionCrashedBubble
)},
1502 {"enable-pdf-material-ui",
1503 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1504 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1506 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1507 switches::kDisablePdfMaterialUI
)},
1508 {"disable-cast-streaming-hw-encoding",
1509 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1510 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1512 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)},
1513 #if defined(OS_ANDROID)
1514 {"prefetch-search-results",
1515 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1516 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1518 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)},
1520 #if defined(ENABLE_APP_LIST)
1521 {"enable-experimental-app-list",
1522 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1523 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1524 kOsWin
| kOsLinux
| kOsCrOS
,
1525 ENABLE_DISABLE_VALUE_TYPE(
1526 app_list::switches::kEnableExperimentalAppList
,
1527 app_list::switches::kDisableExperimentalAppList
)},
1528 {"enable-centered-app-list",
1529 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1530 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1531 kOsWin
| kOsLinux
| kOsCrOS
,
1532 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)},
1533 {"enable-new-app-list-mixer",
1534 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_NAME
,
1535 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_DESCRIPTION
,
1536 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1537 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableNewAppListMixer
,
1538 app_list::switches::kDisableNewAppListMixer
)},
1540 {"disable-threaded-scrolling",
1541 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1542 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1543 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
| kOsMac
,
1544 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)},
1545 {"bleeding-edge-renderer-mode",
1546 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1547 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1549 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)},
1550 {"enable-settings-window",
1551 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1552 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1554 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1555 switches::kDisableSettingsWindow
)},
1556 #if defined(OS_MACOSX)
1557 {"enable-save-password-bubble",
1558 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1559 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1561 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1562 switches::kDisableSavePasswordBubble
)},
1564 {"enable-apps-file-associations",
1565 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1566 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1568 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)},
1569 #if defined(OS_ANDROID)
1570 {"enable-embeddedsearch-api",
1571 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1572 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1574 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)},
1576 {"distance-field-text",
1577 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1578 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1580 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1581 switches::kDisableDistanceFieldText
)},
1582 {"extension-content-verification",
1583 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1584 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1586 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)},
1587 #if defined(ENABLE_EXTENSIONS)
1588 {"extension-active-script-permission",
1589 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1590 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1592 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)},
1594 #if defined(OS_ANDROID)
1595 {"enable-data-reduction-proxy-dev",
1596 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1597 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1599 ENABLE_DISABLE_VALUE_TYPE(
1600 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1601 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)},
1602 {"enable-data-reduction-proxy-carrier-test",
1603 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_NAME
,
1604 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_DESCRIPTION
,
1607 data_reduction_proxy::switches::kEnableDataReductionProxyCarrierTest
)},
1609 {"enable-hotword-hardware",
1610 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1611 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1613 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)},
1614 #if defined(ENABLE_EXTENSIONS)
1615 {"enable-embedded-extension-options",
1616 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1617 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1619 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)},
1621 #if defined(USE_ASH)
1622 {"enable-web-app-frame",
1623 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1624 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1626 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)},
1628 {"enable-drop-sync-credential",
1629 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1630 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1632 ENABLE_DISABLE_VALUE_TYPE(
1633 password_manager::switches::kEnableDropSyncCredential
,
1634 password_manager::switches::kDisableDropSyncCredential
)},
1635 #if defined(ENABLE_EXTENSIONS)
1636 {"enable-extension-action-redesign",
1637 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1638 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1640 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)},
1642 {"autofill-sync-credential",
1643 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1644 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1646 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)},
1647 #if !defined(OS_ANDROID)
1648 {"enable-message-center-always-scroll-up-upon-notification-removal",
1649 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1650 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1653 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)},
1655 #if defined(OS_CHROMEOS)
1656 {"memory-pressure-thresholds",
1657 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
1658 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
1660 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)},
1662 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
1663 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
1665 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)},
1666 #endif // OS_CHROMEOS
1667 {"enable-tab-audio-muting",
1668 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
1669 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
1671 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)},
1672 {"enable-credential-manager-api",
1673 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
1674 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
1676 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)},
1677 {"reduced-referrer-granularity",
1678 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
1679 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
1681 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)},
1682 #if defined(ENABLE_PLUGINS)
1683 {"enable-plugin-power-saver",
1684 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
1685 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
1687 ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver
,
1688 plugins::switches::kDisablePluginPowerSaver
)},
1690 #if defined(OS_CHROMEOS)
1691 {"disable-new-zip-unpacker",
1692 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
1693 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
1695 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)},
1696 #endif // defined(OS_CHROMEOS)
1697 {"enable-credit-card-scan",
1698 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
1699 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
1701 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
1702 autofill::switches::kDisableCreditCardScan
)},
1703 #if defined(OS_CHROMEOS)
1704 {"disable-captive-portal-bypass-proxy",
1705 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
1706 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
1708 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy
)},
1709 #endif // defined(OS_CHROMEOS)
1710 #if defined(OS_ANDROID)
1711 {"enable-seccomp-filter-sandbox",
1712 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
1713 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
1715 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)},
1717 {"enable-touch-hover",
1718 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
1719 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
1721 SINGLE_VALUE_TYPE("enable-touch-hover")},
1722 {"enable-fill-on-account-select",
1723 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
1724 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
1726 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)},
1727 #if defined(OS_CHROMEOS)
1728 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA
1729 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
1730 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
1732 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)},
1733 {"enable-potentially-annoying-security-features",
1734 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
1735 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
1737 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)},
1739 {"disable-delay-agnostic-aec",
1740 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_NAME
,
1741 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1742 kOsWin
| kOsLinux
| kOsCrOS
,
1743 SINGLE_VALUE_TYPE(switches::kDisableDelayAgnosticAec
)},
1744 {"enable-delay-agnostic-aec",
1745 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
1746 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1748 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)},
1749 {"mark-non-secure-as", // FLAGS:RECORD_UMA
1750 IDS_MARK_NON_SECURE_AS_NAME
,
1751 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
1753 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)},
1754 {"enable-site-per-process",
1755 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
1756 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
1758 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)},
1759 #if defined(OS_MACOSX)
1760 {"enable-harfbuzz-rendertext",
1761 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
1762 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
1764 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)},
1765 #endif // defined(OS_MACOSX)
1766 #if defined(OS_CHROMEOS)
1767 {"disable-timezone-tracking",
1768 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
1769 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
1771 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)},
1772 #endif // defined(OS_CHROMEOS)
1773 {"data-reduction-proxy-lo-fi",
1774 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME
,
1775 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
1777 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices
)},
1778 {"clear-data-reduction-proxy-data-savings",
1779 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
1780 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
1783 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings
)},
1784 {"enable-data-reduction-proxy-config-client",
1785 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_NAME
,
1786 IDS_FLAGS_DATA_REDUCTION_PROXY_CONFIG_CLIENT_DESCRIPTION
,
1788 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1789 kEnableDataReductionProxyConfigClient
)},
1790 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
1791 {"enable-data-reduction-proxy-bypass-warnings",
1792 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
1793 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
1795 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1796 kEnableDataReductionProxyBypassWarning
)},
1798 {"allow-insecure-localhost",
1799 IDS_ALLOW_INSECURE_LOCALHOST
,
1800 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
1802 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)},
1803 {"enable-add-to-shelf",
1804 IDS_FLAGS_ENABLE_ADD_TO_SHELF_NAME
,
1805 IDS_FLAGS_ENABLE_ADD_TO_SHELF_DESCRIPTION
,
1807 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToShelf
,
1808 switches::kDisableAddToShelf
)},
1809 {"bypass-app-banner-engagement-checks",
1810 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
1811 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
1813 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)},
1814 {"use-sync-sandbox",
1815 IDS_FLAGS_SYNC_SANDBOX_NAME
,
1816 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
1818 SINGLE_VALUE_TYPE_AND_VALUE(
1819 switches::kSyncServiceURL
,
1820 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
1821 {"enable-child-account-detection",
1822 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
1823 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
1824 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1825 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
1826 switches::kDisableChildAccountDetection
)},
1827 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
1828 {"ozone-test-single-overlay-support",
1829 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
1830 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
1832 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)},
1833 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
1834 {"v8-pac-mojo-out-of-process",
1835 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
1836 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
1838 ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
,
1839 switches::kDisableOutOfProcessPac
)},
1840 #if defined(ENABLE_MEDIA_ROUTER)
1841 {"enable-media-router",
1842 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
1843 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
1845 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)},
1846 #endif // defined(ENABLE_MEDIA_ROUTER)
1847 // Since Drive Search is not available when app list is disabled, flag guard
1848 // enable-drive-search-in-chrome-launcher flag.
1849 #if defined(ENABLE_APP_LIST)
1850 {"enable-drive-search-in-app-launcher",
1851 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER
,
1852 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER_DESCRIPTION
,
1854 ENABLE_DISABLE_VALUE_TYPE(
1855 app_list::switches::kEnableDriveSearchInChromeLauncher
,
1856 app_list::switches::kDisableDriveSearchInChromeLauncher
)},
1857 #endif // defined(ENABLE_APP_LIST)
1858 #if defined(OS_CHROMEOS)
1859 {"disable-mtp-write-support",
1860 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_NAME
,
1861 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_DESCRIPTION
,
1863 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport
)},
1864 #endif // defined(OS_CHROMEOS)
1865 #if defined(OS_CHROMEOS)
1866 {"enable-datasaver-prompt",
1867 IDS_FLAGS_DATASAVER_PROMPT_NAME
,
1868 IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION
,
1870 MULTI_VALUE_TYPE(kDataSaverPromptChoices
)},
1871 #endif // defined(OS_CHROMEOS)
1872 {"supervised-user-safesites",
1873 IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME
,
1874 IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1875 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1876 MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices
)},
1877 #if defined(OS_ANDROID)
1878 {"enable-autofill-keyboard-accessory-view",
1879 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME
,
1880 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION
,
1882 ENABLE_DISABLE_VALUE_TYPE(
1883 autofill::switches::kEnableAccessorySuggestionView
,
1884 autofill::switches::kDisableAccessorySuggestionView
)},
1885 #endif // defined(OS_ANDROID)
1886 // Temporary flag to ease the transition to standard-compliant scrollTop
1887 // behavior. Will be removed shortly after http://crbug.com/157855 ships.
1888 {"scroll-top-left-interop",
1889 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_NAME
,
1890 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_DESCRIPTION
,
1892 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableBlinkFeatures
,
1893 "ScrollTopLeftInterop",
1894 switches::kDisableBlinkFeatures
,
1895 "ScrollTopLeftInterop")},
1897 {"try-supported-channel-layouts",
1898 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_NAME
,
1899 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_DESCRIPTION
,
1901 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts
)},
1903 {"emphasize-titles-in-omnibox-dropdown",
1904 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_NAME
,
1905 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_DESCRIPTION
,
1907 SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown
)},
1908 #if defined(ENABLE_WEBRTC)
1909 {"enable-webrtc-dtls12",
1910 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME
,
1911 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION
,
1913 SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12
)},
1915 #if defined(OS_MACOSX)
1917 IDS_FLAGS_APP_INFO_DIALOG_NAME
,
1918 IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION
,
1920 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppInfoDialogMac
,
1921 switches::kDisableAppInfoDialogMac
)},
1922 {"mac-views-native-app-windows",
1923 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_NAME
,
1924 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_DESCRIPTION
,
1926 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMacViewsNativeAppWindows
,
1927 switches::kDisableMacViewsNativeAppWindows
)},
1928 {"app-window-cycling",
1929 IDS_FLAGS_APP_WINDOW_CYCLING_NAME
,
1930 IDS_FLAGS_APP_WINDOW_CYCLING_DESCRIPTION
,
1932 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppWindowCycling
,
1933 switches::kDisableAppWindowCycling
)},
1934 {"mac-views-dialogs",
1935 IDS_FLAGS_MAC_VIEWS_DIALOGS_NAME
,
1936 IDS_FLAGS_MAC_VIEWS_DIALOGS_DESCRIPTION
,
1938 SINGLE_VALUE_TYPE(switches::kEnableMacViewsDialogs
)},
1940 #if defined(ENABLE_WEBVR)
1942 IDS_FLAGS_ENABLE_WEBVR_NAME
,
1943 IDS_FLAGS_ENABLE_WEBVR_DESCRIPTION
,
1945 SINGLE_VALUE_TYPE(switches::kEnableWebVR
)},
1947 #if defined(OS_CHROMEOS)
1948 {"disable-accelerated-mjpeg-decode",
1949 IDS_FLAGS_DISABLE_ACCELERATED_MJPEG_DECODE_NAME
,
1950 IDS_FLAGS_DISABLE_ACCELERATED_MJPEG_DECODE_DESCRIPTION
,
1952 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode
)},
1953 #endif // OS_CHROMEOS
1954 {"v8-cache-options",
1955 IDS_FLAGS_V8_CACHE_OPTIONS_NAME
,
1956 IDS_FLAGS_V8_CACHE_OPTIONS_DESCRIPTION
,
1958 MULTI_VALUE_TYPE(kV8CacheOptionsChoices
)},
1959 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1960 {"enable-md-downloads",
1961 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_NAME
,
1962 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_DESCRIPTION
,
1964 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignDownloads
,
1965 switches::kDisableMaterialDesignDownloads
)},
1967 #if defined(OS_WIN) || defined(OS_MACOSX)
1968 {"enable-tab-discarding",
1969 IDS_FLAGS_ENABLE_TAB_DISCARDING_NAME
,
1970 IDS_FLAGS_ENABLE_TAB_DISCARDING_DESCRIPTION
,
1972 SINGLE_VALUE_TYPE(switches::kEnableTabDiscarding
)},
1974 {"enable-clear-browsing-data-counters",
1975 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_NAME
,
1976 IDS_FLAGS_ENABLE_CLEAR_BROWSING_DATA_COUNTERS_DESCRIPTION
,
1978 SINGLE_VALUE_TYPE(switches::kEnableClearBrowsingDataCounters
)
1980 #if defined(ENABLE_TASK_MANAGER)
1981 {"disable-new-task-manager",
1982 IDS_FLAGS_DISABLE_NEW_TASK_MANAGER_NAME
,
1983 IDS_FLAGS_DISABLE_NEW_TASK_MANAGER_DESCRIPTION
,
1985 SINGLE_VALUE_TYPE(switches::kDisableNewTaskManager
)
1987 #endif // defined(ENABLE_TASK_MANAGER)
1988 {"simplified-fullscreen-ui",
1989 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME
,
1990 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION
,
1992 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI
,
1993 switches::kDisableSimplifiedFullscreenUI
)
1995 #if defined(OS_ANDROID)
1996 {"progress-bar-animation",
1997 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME
,
1998 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION
,
2000 MULTI_VALUE_TYPE(kProgressBarAnimationChoices
)},
2001 #endif // defined(OS_ANDROID)
2002 #if defined(OS_ANDROID)
2003 {"enable-theme-color-in-tabbed-mode",
2004 IDS_FLAGS_THEME_COLOR_IN_TABBED_MODE_NAME
,
2005 IDS_FLAGS_THEME_COLOR_IN_TABBED_MODE_DESCRIPTION
,
2007 SINGLE_VALUE_TYPE(switches::kEnableThemeColorInTabbedMode
)
2009 #endif // defined(OS_ANDROID)
2010 #if defined(OS_ANDROID)
2012 IDS_FLAGS_OFFLINE_PAGES_NAME
,
2013 IDS_FLAGS_OFFLINE_PAGES_DESCRIPTION
,
2015 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflinePages
,
2016 switches::kDisableOfflinePages
)},
2017 #endif // defined(OS_ANDROID)
2018 {"low-priority-iframes",
2019 IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_NAME
,
2020 IDS_FLAGS_LOW_PRIORITY_IFRAMES_UI_DESCRIPTION
,
2022 // NOTE: if we want to add additional experiment entries for other
2023 // features controlled by kBlinkSettings, we'll need to add logic to
2024 // merge the flag values.
2025 SINGLE_VALUE_TYPE_AND_VALUE(
2026 switches::kBlinkSettings
, "lowPriorityIframes=true")},
2027 #if defined(OS_ANDROID)
2028 {"enable-ntp-popular-sites",
2029 IDS_FLAGS_NTP_POPULAR_SITES_NAME
,
2030 IDS_FLAGS_NTP_POPULAR_SITES_DESCRIPTION
,
2032 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNTPPopularSites
,
2033 switches::kDisableNTPPopularSites
)},
2034 {"use-android-midi-api",
2035 IDS_FLAGS_USE_ANDROID_MIDI_API_NAME
,
2036 IDS_FLAGS_USE_ANDROID_MIDI_API_DESCRIPTION
,
2038 SINGLE_VALUE_TYPE(switches::kUseAndroidMidiApi
)},
2039 #endif // defined(OS_ANDROID)
2041 {"trace-export-events-to-etw",
2042 IDS_FLAGS_TRACE_EXPORT_EVENTS_TO_ETW_NAME
,
2043 IDS_FLAGS_TRACE_EXPORT_EVENTS_TO_ETW_DESRIPTION
,
2045 SINGLE_VALUE_TYPE(switches::kTraceExportEventsToETW
)},
2046 #endif // defined(OS_WIN)
2047 #if defined(ENABLE_BACKGROUND)
2048 {"enable-push-api-background-mode",
2049 IDS_FLAGS_ENABLE_PUSH_API_BACKGROUND_MODE_NAME
,
2050 IDS_FLAGS_ENABLE_PUSH_API_BACKGROUND_MODE_DESCRIPTION
,
2051 kOsMac
| kOsWin
| kOsLinux
,
2052 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePushApiBackgroundMode
,
2053 switches::kDisablePushApiBackgroundMode
)},
2054 #endif // defined(ENABLE_BACKGROUND)
2055 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2056 {"enable-webusb-notifications",
2057 IDS_FLAGS_ENABLE_WEBUSB_NOTIFICATIONS_NAME
,
2058 IDS_FLAGS_ENABLE_WEBUSB_NOTIFICATIONS_DESCRIPTION
,
2060 SINGLE_VALUE_TYPE(switches::kEnableWebUsbNotifications
)},
2061 // TODO(reillyg): Remove this flag when the permission granting UI is
2062 // available. crbug.com/529950
2063 {"enable-webusb-on-any-origin",
2064 IDS_FLAGS_ENABLE_WEBUSB_ON_ANY_ORIGIN_NAME
,
2065 IDS_FLAGS_ENABLE_WEBUSB_ON_ANY_ORIGIN_DESCRIPTION
,
2067 SINGLE_VALUE_TYPE(switches::kEnableWebUsbOnAnyOrigin
)},
2069 #if defined(OS_CHROMEOS)
2070 {"cros-regions-mode",
2071 IDS_FLAGS_CROS_REGIONS_MODE_NAME
,
2072 IDS_FLAGS_CROS_REGIONS_MODE_DESCRIPTION
,
2074 MULTI_VALUE_TYPE(kCrosRegionsModeChoices
)},
2075 #endif // OS_CHROMEOS
2076 // NOTE: Adding new command-line switches requires adding corresponding
2077 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2078 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2081 const Experiment
* experiments
= kExperiments
;
2082 size_t num_experiments
= arraysize(kExperiments
);
2084 // Stores and encapsulates the little state that about:flags has.
2087 FlagsState() : needs_restart_(false) {}
2088 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2089 base::CommandLine
* command_line
,
2090 SentinelsMode sentinels
);
2091 bool IsRestartNeededToCommitChanges();
2092 void SetExperimentEnabled(
2093 FlagsStorage
* flags_storage
,
2094 const std::string
& internal_name
,
2096 void RemoveFlagsSwitches(
2097 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2098 void ResetAllFlags(FlagsStorage
* flags_storage
);
2101 // Returns the singleton instance of this class
2102 static FlagsState
* GetInstance() {
2103 return base::Singleton
<FlagsState
>::get();
2107 bool needs_restart_
;
2108 std::map
<std::string
, std::string
> flags_switches_
;
2110 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2113 // Adds the internal names for the specified experiment to |names|.
2114 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2115 if (e
.type
== Experiment::SINGLE_VALUE
||
2116 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2117 names
->insert(e
.internal_name
);
2119 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2120 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2121 for (int i
= 0; i
< e
.num_choices
; ++i
)
2122 names
->insert(e
.NameForChoice(i
));
2126 // Confirms that an experiment is valid, used in a DCHECK in
2127 // SanitizeList below.
2128 bool ValidateExperiment(const Experiment
& e
) {
2130 case Experiment::SINGLE_VALUE
:
2131 case Experiment::SINGLE_DISABLE_VALUE
:
2132 DCHECK_EQ(0, e
.num_choices
);
2135 case Experiment::MULTI_VALUE
:
2136 DCHECK_GT(e
.num_choices
, 0);
2138 DCHECK(e
.choices
[0].command_line_switch
);
2139 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2141 case Experiment::ENABLE_DISABLE_VALUE
:
2142 DCHECK_EQ(3, e
.num_choices
);
2144 DCHECK(e
.command_line_switch
);
2145 DCHECK(e
.command_line_value
);
2146 DCHECK(e
.disable_command_line_switch
);
2147 DCHECK(e
.disable_command_line_value
);
2155 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2156 // unknown, to prevent this list to become very long as experiments are added
2158 void SanitizeList(FlagsStorage
* flags_storage
) {
2159 std::set
<std::string
> known_experiments
;
2160 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2161 DCHECK(ValidateExperiment(experiments
[i
]));
2162 AddInternalName(experiments
[i
], &known_experiments
);
2165 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2167 std::set
<std::string
> new_enabled_experiments
=
2168 base::STLSetIntersection
<std::set
<std::string
> >(
2169 known_experiments
, enabled_experiments
);
2171 if (new_enabled_experiments
!= enabled_experiments
)
2172 flags_storage
->SetFlags(new_enabled_experiments
);
2175 void GetSanitizedEnabledFlags(
2176 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2177 SanitizeList(flags_storage
);
2178 *result
= flags_storage
->GetFlags();
2181 bool SkipConditionalExperiment(const Experiment
& experiment
) {
2182 version_info::Channel channel
= chrome::GetChannel();
2184 #if defined(OS_ANDROID)
2185 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2186 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2187 channel
!= version_info::Channel::BETA
&&
2188 channel
!= version_info::Channel::DEV
) {
2191 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2192 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2193 channel
!= version_info::Channel::DEV
) {
2196 // enable-data-reduction-proxy-carrier-test is only available for Chromium
2197 // builds and the Canary/Dev channel.
2198 if (!strcmp("enable-data-reduction-proxy-carrier-test",
2199 experiment
.internal_name
) &&
2200 channel
!= version_info::Channel::DEV
&&
2201 channel
!= version_info::Channel::CANARY
&&
2202 channel
!= version_info::Channel::UNKNOWN
) {
2207 // data-reduction-proxy-lo-fi is only available for Chromium builds and
2208 // the Canary/Dev/Beta channels.
2209 if (!strcmp("data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2210 channel
!= version_info::Channel::BETA
&&
2211 channel
!= version_info::Channel::DEV
&&
2212 channel
!= version_info::Channel::CANARY
&&
2213 channel
!= version_info::Channel::UNKNOWN
) {
2217 // enable-data-reduction-proxy-config-client is only available for Chromium
2218 // builds and the Canary/Dev channels.
2219 if (!strcmp("enable-data-reduction-proxy-config-client",
2220 experiment
.internal_name
) &&
2221 channel
!= version_info::Channel::DEV
&&
2222 channel
!= version_info::Channel::CANARY
&&
2223 channel
!= version_info::Channel::UNKNOWN
) {
2227 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2228 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2229 // builds and Canary/Dev channel.
2230 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2231 experiment
.internal_name
) &&
2232 channel
!= version_info::Channel::UNKNOWN
&&
2233 channel
!= version_info::Channel::CANARY
&&
2234 channel
!= version_info::Channel::DEV
) {
2243 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2244 // enabled on the current platform.
2245 void GetSanitizedEnabledFlagsForCurrentPlatform(
2246 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2247 GetSanitizedEnabledFlags(flags_storage
, result
);
2249 // Filter out any experiments that aren't enabled on the current platform. We
2250 // don't remove these from prefs else syncing to a platform with a different
2251 // set of experiments would be lossy.
2252 std::set
<std::string
> platform_experiments
;
2253 int current_platform
= GetCurrentPlatform();
2254 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2255 if (experiments
[i
].supported_platforms
& current_platform
)
2256 AddInternalName(experiments
[i
], &platform_experiments
);
2257 #if defined(OS_CHROMEOS)
2258 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2259 AddInternalName(experiments
[i
], &platform_experiments
);
2263 std::set
<std::string
> new_enabled_experiments
=
2264 base::STLSetIntersection
<std::set
<std::string
> >(
2265 platform_experiments
, *result
);
2267 result
->swap(new_enabled_experiments
);
2270 // Returns true if none of this experiment's options have been enabled.
2271 bool IsDefaultValue(
2272 const Experiment
& experiment
,
2273 const std::set
<std::string
>& enabled_experiments
) {
2274 switch (experiment
.type
) {
2275 case Experiment::SINGLE_VALUE
:
2276 case Experiment::SINGLE_DISABLE_VALUE
:
2277 return enabled_experiments
.count(experiment
.internal_name
) == 0;
2278 case Experiment::MULTI_VALUE
:
2279 case Experiment::ENABLE_DISABLE_VALUE
:
2280 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2281 if (enabled_experiments
.count(experiment
.NameForChoice(i
)) > 0)
2291 // Returns the Value representing the choice data in the specified experiment.
2292 base::Value
* CreateChoiceData(
2293 const Experiment
& experiment
,
2294 const std::set
<std::string
>& enabled_experiments
) {
2295 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2296 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2297 base::ListValue
* result
= new base::ListValue
;
2298 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2299 base::DictionaryValue
* value
= new base::DictionaryValue
;
2300 const std::string name
= experiment
.NameForChoice(i
);
2301 value
->SetString("internal_name", name
);
2302 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2303 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2304 result
->Append(value
);
2311 std::string
Experiment::NameForChoice(int index
) const {
2312 DCHECK(type
== Experiment::MULTI_VALUE
||
2313 type
== Experiment::ENABLE_DISABLE_VALUE
);
2314 DCHECK_LT(index
, num_choices
);
2315 return std::string(internal_name
) + testing::kMultiSeparator
+
2316 base::IntToString(index
);
2319 base::string16
Experiment::DescriptionForChoice(int index
) const {
2320 DCHECK(type
== Experiment::MULTI_VALUE
||
2321 type
== Experiment::ENABLE_DISABLE_VALUE
);
2322 DCHECK_LT(index
, num_choices
);
2324 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2325 const int kEnableDisableDescriptionIds
[] = {
2326 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2327 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2328 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2330 description_id
= kEnableDisableDescriptionIds
[index
];
2332 description_id
= choices
[index
].description_id
;
2334 return l10n_util::GetStringUTF16(description_id
);
2337 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2338 base::CommandLine
* command_line
,
2339 SentinelsMode sentinels
) {
2340 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2345 bool AreSwitchesIdenticalToCurrentCommandLine(
2346 const base::CommandLine
& new_cmdline
,
2347 const base::CommandLine
& active_cmdline
,
2348 std::set
<base::CommandLine::StringType
>* out_difference
) {
2349 std::set
<base::CommandLine::StringType
> new_flags
=
2350 ExtractFlagsFromCommandLine(new_cmdline
);
2351 std::set
<base::CommandLine::StringType
> active_flags
=
2352 ExtractFlagsFromCommandLine(active_cmdline
);
2354 bool result
= false;
2355 // Needed because std::equal doesn't check if the 2nd set is empty.
2356 if (new_flags
.size() == active_flags
.size()) {
2358 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2361 if (out_difference
&& !result
) {
2362 std::set_symmetric_difference(
2365 active_flags
.begin(),
2367 std::inserter(*out_difference
, out_difference
->begin()));
2373 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2375 base::ListValue
* supported_experiments
,
2376 base::ListValue
* unsupported_experiments
) {
2377 std::set
<std::string
> enabled_experiments
;
2378 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2380 int current_platform
= GetCurrentPlatform();
2382 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2383 const Experiment
& experiment
= experiments
[i
];
2384 if (SkipConditionalExperiment(experiment
))
2387 base::DictionaryValue
* data
= new base::DictionaryValue();
2388 data
->SetString("internal_name", experiment
.internal_name
);
2389 data
->SetString("name",
2390 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2391 data
->SetString("description",
2392 l10n_util::GetStringUTF16(
2393 experiment
.visible_description_id
));
2395 base::ListValue
* supported_platforms
= new base::ListValue();
2396 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2397 data
->Set("supported_platforms", supported_platforms
);
2398 // True if the switch is not currently passed.
2399 bool is_default_value
= IsDefaultValue(experiment
, enabled_experiments
);
2400 data
->SetBoolean("is_default", is_default_value
);
2402 switch (experiment
.type
) {
2403 case Experiment::SINGLE_VALUE
:
2404 case Experiment::SINGLE_DISABLE_VALUE
:
2407 (!is_default_value
&&
2408 experiment
.type
== Experiment::SINGLE_VALUE
) ||
2409 (is_default_value
&&
2410 experiment
.type
== Experiment::SINGLE_DISABLE_VALUE
));
2412 case Experiment::MULTI_VALUE
:
2413 case Experiment::ENABLE_DISABLE_VALUE
:
2414 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2420 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2421 #if defined(OS_CHROMEOS)
2422 if (access
== kOwnerAccessToFlags
&&
2423 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2428 supported_experiments
->Append(data
);
2430 unsupported_experiments
->Append(data
);
2434 bool IsRestartNeededToCommitChanges() {
2435 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2438 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2439 const std::string
& internal_name
,
2441 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2442 internal_name
, enable
);
2445 void RemoveFlagsSwitches(
2446 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2447 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2450 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2451 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2454 int GetCurrentPlatform() {
2455 #if defined(OS_MACOSX)
2457 #elif defined(OS_WIN)
2459 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2461 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2463 #elif defined(OS_ANDROID)
2466 #error Unknown platform
2470 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2471 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2472 for (const std::string
& flag
: flags
) {
2473 std::string
action("AboutFlags_");
2475 content::RecordComputedAction(action
);
2477 // Since flag metrics are recorded every startup, add a tick so that the
2478 // stats can be made meaningful.
2480 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2481 content::RecordAction(base::UserMetricsAction("StartupTick"));
2484 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2485 return static_cast<base::HistogramBase::Sample
>(
2486 metrics::HashMetricName(switch_name
));
2489 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2490 const std::set
<std::string
>& command_line_difference
) {
2491 for (const std::string
& flag
: command_line_difference
) {
2492 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2493 if (base::StartsWith(flag
, "--", base::CompareCase::SENSITIVE
)) {
2494 // Skip '--' before switch name.
2495 std::string
switch_name(flag
.substr(2));
2497 // Kill value, if any.
2498 const size_t value_pos
= switch_name
.find('=');
2499 if (value_pos
!= std::string::npos
)
2500 switch_name
.resize(value_pos
);
2502 uma_id
= GetSwitchUMAId(switch_name
);
2504 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2505 << "' has incorrect format.";
2507 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2508 << "' '" << flag
<< "', uma_id=" << uma_id
;
2510 // Sparse histogram macro does not cache the histogram, so it's safe
2511 // to use macro with non-static histogram name here.
2512 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2516 //////////////////////////////////////////////////////////////////////////////
2517 // FlagsState implementation.
2521 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2522 NameToSwitchAndValueMap
;
2524 void SetFlagToSwitchMapping(const std::string
& key
,
2525 const std::string
& switch_name
,
2526 const std::string
& switch_value
,
2527 NameToSwitchAndValueMap
* name_to_switch_map
) {
2528 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2529 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2532 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2533 base::CommandLine
* command_line
,
2534 SentinelsMode sentinels
) {
2535 if (command_line
->HasSwitch(switches::kNoExperiments
))
2538 std::set
<std::string
> enabled_experiments
;
2540 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2541 &enabled_experiments
);
2543 NameToSwitchAndValueMap name_to_switch_map
;
2544 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2545 const Experiment
& e
= experiments
[i
];
2546 if (e
.type
== Experiment::SINGLE_VALUE
||
2547 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2548 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2549 e
.command_line_value
, &name_to_switch_map
);
2550 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2551 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2552 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2553 e
.choices
[j
].command_line_switch
,
2554 e
.choices
[j
].command_line_value
,
2555 &name_to_switch_map
);
2558 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2559 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2560 &name_to_switch_map
);
2561 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2562 e
.command_line_value
, &name_to_switch_map
);
2563 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2564 e
.disable_command_line_value
, &name_to_switch_map
);
2568 if (sentinels
== kAddSentinels
) {
2569 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2570 flags_switches_
.insert(
2571 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2574 for (const std::string
& experiment_name
: enabled_experiments
) {
2575 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2576 name_to_switch_map
.find(experiment_name
);
2577 if (name_to_switch_it
== name_to_switch_map
.end()) {
2582 const std::pair
<std::string
, std::string
>&
2583 switch_and_value_pair
= name_to_switch_it
->second
;
2585 CHECK(!switch_and_value_pair
.first
.empty());
2586 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2587 switch_and_value_pair
.second
);
2588 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2590 if (sentinels
== kAddSentinels
) {
2591 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2592 flags_switches_
.insert(
2593 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2598 bool FlagsState::IsRestartNeededToCommitChanges() {
2599 return needs_restart_
;
2602 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2603 const std::string
& internal_name
,
2605 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2606 if (at_index
!= std::string::npos
) {
2608 // We're being asked to enable a multi-choice experiment. Disable the
2609 // currently selected choice.
2610 DCHECK_NE(at_index
, 0u);
2611 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2612 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2614 // And enable the new choice, if it is not the default first choice.
2615 if (internal_name
!= experiment_name
+ "@0") {
2616 std::set
<std::string
> enabled_experiments
;
2617 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2618 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2619 flags_storage
->SetFlags(enabled_experiments
);
2624 std::set
<std::string
> enabled_experiments
;
2625 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2627 const Experiment
* e
= NULL
;
2628 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2629 if (experiments
[i
].internal_name
== internal_name
) {
2630 e
= experiments
+ i
;
2636 if (e
->type
== Experiment::SINGLE_VALUE
) {
2638 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2640 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2641 } else if (e
->type
== Experiment::SINGLE_DISABLE_VALUE
) {
2643 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2645 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2648 // Enable the first choice.
2649 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2651 // Find the currently enabled choice and disable it.
2652 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2653 std::string choice_name
= e
->NameForChoice(i
);
2654 if (enabled_experiments
.find(choice_name
) !=
2655 enabled_experiments
.end()) {
2656 needs_restart_
= true;
2657 enabled_experiments
.erase(choice_name
);
2658 // Continue on just in case there's a bug and more than one
2659 // experiment for this choice was enabled.
2665 flags_storage
->SetFlags(enabled_experiments
);
2668 void FlagsState::RemoveFlagsSwitches(
2669 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2670 for (const auto& entry
: flags_switches_
)
2671 switch_list
->erase(entry
.first
);
2674 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2675 needs_restart_
= true;
2677 std::set
<std::string
> no_experiments
;
2678 flags_storage
->SetFlags(no_experiments
);
2681 void FlagsState::reset() {
2682 needs_restart_
= false;
2683 flags_switches_
.clear();
2690 // WARNING: '@' is also used in the html file. If you update this constant you
2691 // also need to update the html file.
2692 const char kMultiSeparator
[] = "@";
2694 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2697 FlagsState::GetInstance()->reset();
2700 void SetExperiments(const Experiment
* e
, size_t count
) {
2702 experiments
= kExperiments
;
2703 num_experiments
= arraysize(kExperiments
);
2706 num_experiments
= count
;
2710 const Experiment
* GetExperiments(size_t* count
) {
2711 *count
= num_experiments
;
2715 } // namespace testing
2717 } // namespace about_flags