1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/about_flags.h"
12 #include "base/command_line.h"
13 #include "base/memory/singleton.h"
14 #include "base/metrics/sparse_histogram.h"
15 #include "base/stl_util.h"
16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h"
20 #include "cc/base/switches.h"
21 #include "chrome/browser/flags_storage.h"
22 #include "chrome/common/chrome_content_client.h"
23 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/chrome_version_info.h"
25 #include "chrome/grit/chromium_strings.h"
26 #include "chrome/grit/generated_resources.h"
27 #include "chrome/grit/google_chrome_strings.h"
28 #include "components/autofill/core/common/autofill_switches.h"
29 #include "components/cloud_devices/common/cloud_devices_switches.h"
30 #include "components/dom_distiller/core/dom_distiller_switches.h"
31 #include "components/metrics/metrics_hashes.h"
32 #include "components/nacl/common/nacl_switches.h"
33 #include "components/omnibox/browser/omnibox_switches.h"
34 #include "components/plugins/common/plugins_switches.h"
35 #include "components/proximity_auth/switches.h"
36 #include "components/search/search_switches.h"
37 #include "content/public/browser/user_metrics.h"
38 #include "media/base/media_switches.h"
39 #include "ui/base/l10n/l10n_util.h"
40 #include "ui/base/ui_base_switches.h"
41 #include "ui/display/display_switches.h"
42 #include "ui/events/event_switches.h"
43 #include "ui/gfx/switches.h"
44 #include "ui/gl/gl_switches.h"
45 #include "ui/keyboard/keyboard_switches.h"
46 #include "ui/native_theme/native_theme_switches.h"
47 #include "ui/views/views_switches.h"
49 #if defined(OS_ANDROID)
50 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
52 #include "ui/message_center/message_center_switches.h"
56 #include "ash/ash_switches.h"
59 #if defined(OS_CHROMEOS)
60 #include "chromeos/chromeos_switches.h"
61 #include "third_party/cros_system_api/switches/chrome_switches.h"
64 #if defined(ENABLE_APP_LIST)
65 #include "ui/app_list/app_list_switches.h"
68 #if defined(ENABLE_EXTENSIONS)
69 #include "extensions/common/switches.h"
72 #if defined(USE_OZONE)
73 #include "ui/ozone/public/ozone_switches.h"
76 namespace about_flags
{
78 // Macros to simplify specifying the type.
79 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
80 Experiment::SINGLE_VALUE, \
81 command_line_switch, switch_value, NULL, NULL, NULL, 0
82 #define SINGLE_VALUE_TYPE(command_line_switch) \
83 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
84 #define SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
85 Experiment::SINGLE_DISABLE_VALUE, \
86 command_line_switch, switch_value, NULL, NULL, NULL, 0
87 #define SINGLE_DISABLE_VALUE_TYPE(command_line_switch) \
88 SINGLE_DISABLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
89 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
90 disable_switch, disable_value) \
91 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
92 disable_switch, disable_value, NULL, 3
93 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
94 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
95 #define MULTI_VALUE_TYPE(choices) \
96 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
100 // Enumeration of OSs.
107 kOsCrOSOwnerOnly
= 1 << 5
110 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
111 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
113 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
114 // whether the experiment is available on that platform.
115 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
118 const char* const name
;
123 {kOsCrOS
, "Chrome OS"},
124 {kOsAndroid
, "Android"},
125 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
127 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
128 if (bitmask
& kBitsToOs
[i
].bit
)
129 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
133 // Convert switch constants to proper CommandLine::StringType strings.
134 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
135 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
136 cmd_line
.AppendSwitch(flag
);
137 DCHECK_EQ(2U, cmd_line
.argv().size());
138 return cmd_line
.argv()[1];
141 // Scoops flags from a command line.
142 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
143 const base::CommandLine
& cmdline
) {
144 std::set
<base::CommandLine::StringType
> flags
;
145 // First do the ones between --flag-switches-begin and --flag-switches-end.
146 base::CommandLine::StringVector::const_iterator first
=
147 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
148 GetSwitchString(switches::kFlagSwitchesBegin
));
149 base::CommandLine::StringVector::const_iterator last
=
150 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
151 GetSwitchString(switches::kFlagSwitchesEnd
));
152 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
153 flags
.insert(first
+ 1, last
);
154 #if defined(OS_CHROMEOS)
155 // Then add those between --policy-switches-begin and --policy-switches-end.
156 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
157 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
158 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
159 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
160 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
161 flags
.insert(first
+ 1, last
);
166 const Experiment::Choice kTouchEventsChoices
[] = {
167 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
168 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
169 switches::kTouchEvents
,
170 switches::kTouchEventsEnabled
},
171 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
172 switches::kTouchEvents
,
173 switches::kTouchEventsDisabled
}
176 #if defined(USE_AURA)
177 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
178 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
180 switches::kOverscrollHistoryNavigation
,
182 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
183 switches::kOverscrollHistoryNavigation
,
188 const Experiment::Choice kTouchTextSelectionStrategyChoices
[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
190 { IDS_TOUCH_SELECTION_STRATEGY_CHARACTER
,
191 switches::kTouchTextSelectionStrategy
,
193 { IDS_TOUCH_SELECTION_STRATEGY_DIRECTION
,
194 switches::kTouchTextSelectionStrategy
,
198 #if !defined(DISABLE_NACL)
199 const Experiment::Choice kNaClDebugMaskChoices
[] = {
200 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
201 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
202 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
203 // so by default we want to avoid debugging that.
204 // NOTE: As the default value must be the empty string, the mask excluding
205 // the PNaCl translator and secure shell is substituted elsewhere.
206 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
207 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
208 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
209 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
213 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
215 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
216 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
217 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
218 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
},
219 { IDS_MARK_NON_SECURE_AS_DUBIOUS
,
220 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsDubious
}
223 const Experiment::Choice kDataReductionProxyLoFiChoices
[] = {
224 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
225 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_ALWAYS_ON
,
226 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
227 data_reduction_proxy::switches::kDataReductionProxyLoFiValueAlwaysOn
},
228 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_CELLULAR_ONLY
,
229 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
230 data_reduction_proxy::switches::
231 kDataReductionProxyLoFiValueCellularOnly
},
232 { IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DISABLED
,
233 data_reduction_proxy::switches::kDataReductionProxyLoFi
,
234 data_reduction_proxy::switches::kDataReductionProxyLoFiValueDisabled
}
237 const Experiment::Choice kMaxTilesForInterestAreaChoices
[] = {
238 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
239 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT
,
240 cc::switches::kMaxTilesForInterestArea
, "64"},
241 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL
,
242 cc::switches::kMaxTilesForInterestArea
, "128"},
243 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE
,
244 cc::switches::kMaxTilesForInterestArea
, "256"},
245 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI
,
246 cc::switches::kMaxTilesForInterestArea
, "512"}
249 const Experiment::Choice kShowSavedCopyChoices
[] = {
250 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
251 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY
,
252 switches::kShowSavedCopy
, switches::kEnableShowSavedCopyPrimary
},
253 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY
,
254 switches::kShowSavedCopy
, switches::kEnableShowSavedCopySecondary
},
255 { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY
,
256 switches::kShowSavedCopy
, switches::kDisableShowSavedCopy
}
259 const Experiment::Choice kDefaultTileWidthChoices
[] = {
260 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
261 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
262 switches::kDefaultTileWidth
, "128"},
263 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
264 switches::kDefaultTileWidth
, "256"},
265 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
266 switches::kDefaultTileWidth
, "512"},
267 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
268 switches::kDefaultTileWidth
, "1024"}
271 const Experiment::Choice kDefaultTileHeightChoices
[] = {
272 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
273 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT
,
274 switches::kDefaultTileHeight
, "128"},
275 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL
,
276 switches::kDefaultTileHeight
, "256"},
277 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE
,
278 switches::kDefaultTileHeight
, "512"},
279 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI
,
280 switches::kDefaultTileHeight
, "1024"}
283 const Experiment::Choice kSimpleCacheBackendChoices
[] = {
284 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
285 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
286 switches::kUseSimpleCacheBackend
, "off" },
287 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
288 switches::kUseSimpleCacheBackend
, "on"}
291 #if defined(USE_AURA)
292 const Experiment::Choice kTabCaptureUpscaleQualityChoices
[] = {
293 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
294 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
295 switches::kTabCaptureUpscaleQuality
, "fast" },
296 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
297 switches::kTabCaptureUpscaleQuality
, "good" },
298 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
299 switches::kTabCaptureUpscaleQuality
, "best" },
302 const Experiment::Choice kTabCaptureDownscaleQualityChoices
[] = {
303 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
304 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
305 switches::kTabCaptureDownscaleQuality
, "fast" },
306 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
307 switches::kTabCaptureDownscaleQuality
, "good" },
308 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
309 switches::kTabCaptureDownscaleQuality
, "best" },
313 #if defined(OS_ANDROID)
314 const Experiment::Choice kZeroSuggestExperimentsChoices
[] = {
315 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
316 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED
,
317 switches::kEnableZeroSuggestMostVisited
, ""},
318 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP
,
319 switches::kEnableZeroSuggestMostVisitedWithoutSerp
, ""},
320 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
321 switches::kDisableZeroSuggest
, ""}
324 const Experiment::Choice kReaderModeHeuristicsChoices
[] = {
325 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
326 { IDS_FLAGS_READER_MODE_HEURISTICS_MARKUP
,
327 switches::kReaderModeHeuristics
,
328 switches::reader_mode_heuristics::kOGArticle
},
329 { IDS_FLAGS_READER_MODE_HEURISTICS_ADABOOST
,
330 switches::kReaderModeHeuristics
,
331 switches::reader_mode_heuristics::kAdaBoost
},
332 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_ON
,
333 switches::kReaderModeHeuristics
,
334 switches::reader_mode_heuristics::kAlwaysTrue
},
335 { IDS_FLAGS_READER_MODE_HEURISTICS_ALWAYS_OFF
,
336 switches::kReaderModeHeuristics
,
337 switches::reader_mode_heuristics::kNone
},
341 const Experiment::Choice kNumRasterThreadsChoices
[] = {
342 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
343 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
344 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
345 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
346 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
349 const Experiment::Choice kGpuRasterizationMSAASampleCountChoices
[] = {
350 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
353 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO
,
354 switches::kGpuRasterizationMSAASampleCount
, "0" },
355 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO
,
356 switches::kGpuRasterizationMSAASampleCount
, "2" },
357 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR
,
358 switches::kGpuRasterizationMSAASampleCount
, "4" },
359 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT
,
360 switches::kGpuRasterizationMSAASampleCount
, "8" },
361 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN
,
362 switches::kGpuRasterizationMSAASampleCount
, "16" },
365 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
366 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
367 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
368 switches::kEnableGpuRasterization
, "" },
369 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
370 switches::kDisableGpuRasterization
, "" },
371 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
372 switches::kForceGpuRasterization
, "" },
375 #if defined(OS_CHROMEOS)
376 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
377 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
378 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
379 chromeos::switches::kMemoryPressureThresholds
,
380 chromeos::switches::kConservativeThreshold
},
381 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
382 chromeos::switches::kMemoryPressureThresholds
,
383 chromeos::switches::kAggressiveCacheDiscardThreshold
},
384 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
385 chromeos::switches::kMemoryPressureThresholds
,
386 chromeos::switches::kAggressiveTabDiscardThreshold
},
387 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
388 chromeos::switches::kMemoryPressureThresholds
,
389 chromeos::switches::kAggressiveThreshold
},
393 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
394 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
395 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
396 switches::kExtensionContentVerification
,
397 switches::kExtensionContentVerificationBootstrap
},
398 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
399 switches::kExtensionContentVerification
,
400 switches::kExtensionContentVerificationEnforce
},
401 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
402 switches::kExtensionContentVerification
,
403 switches::kExtensionContentVerificationEnforceStrict
},
406 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
407 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
408 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
409 password_manager::switches::kAllowAutofillSyncCredential
, ""},
410 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
411 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
412 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
413 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
416 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
417 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
418 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
419 autofill::switches::kDisableFillOnAccountSelect
, "" },
420 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
421 autofill::switches::kEnableFillOnAccountSelect
, "" },
422 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
423 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
427 const Experiment::Choice kAshScreenRotationAnimationChoices
[] = {
428 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
429 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
430 ash::switches::kAshEnableScreenRotationAnimation
,
432 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION
,
433 ash::switches::kAshEnableScreenRotationAnimation
,
434 "partial-rotation" },
435 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION
,
436 ash::switches::kAshEnableScreenRotationAnimation
,
441 #if defined(ENABLE_TOPCHROME_MD)
442 const Experiment::Choice kTopChromeMaterialDesignChoices
[] = {
443 {IDS_FLAGS_TOP_CHROME_MD_NON_MATERIAL
, "", ""},
444 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL
,
445 switches::kTopChromeMD
,
446 switches::kTopChromeMDMaterial
},
447 {IDS_FLAGS_TOP_CHROME_MD_MATERIAL_HYBRID
,
448 switches::kTopChromeMD
,
449 switches::kTopChromeMDMaterialHybrid
}};
452 #if defined(OS_CHROMEOS)
453 const Experiment::Choice kDataSaverPromptChoices
[] = {
454 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
455 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
456 chromeos::switches::kDisableDataSaverPrompt
, "" },
457 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
458 chromeos::switches::kEnableDataSaverPrompt
, "" },
459 { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE
,
460 chromeos::switches::kEnableDataSaverPrompt
,
461 chromeos::switches::kDataSaverPromptDemoMode
},
464 const Experiment::Choice kFloatingVirtualKeyboardChoices
[] = {
465 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
466 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
467 keyboard::switches::kFloatingVirtualKeyboard
,
468 keyboard::switches::kFloatingVirtualKeyboardDisabled
},
469 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
470 keyboard::switches::kFloatingVirtualKeyboard
,
471 keyboard::switches::kFloatingVirtualKeyboardEnabled
},
474 const Experiment::Choice kSmartVirtualKeyboardChoices
[] = {
475 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
476 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
477 keyboard::switches::kSmartVirtualKeyboard
,
478 keyboard::switches::kSmartVirtualKeyboardDisabled
},
479 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
480 keyboard::switches::kSmartVirtualKeyboard
,
481 keyboard::switches::kSmartVirtualKeyboardEnabled
},
484 const Experiment::Choice kGestureTypingChoices
[] = {
485 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
486 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
487 keyboard::switches::kGestureTyping
,
488 keyboard::switches::kGestureTypingDisabled
},
489 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
490 keyboard::switches::kGestureTyping
,
491 keyboard::switches::kGestureTypingEnabled
},
494 const Experiment::Choice kGestureEditingChoices
[] = {
495 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
496 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
497 keyboard::switches::kGestureEditing
,
498 keyboard::switches::kGestureEditingDisabled
},
499 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
500 keyboard::switches::kGestureEditing
,
501 keyboard::switches::kGestureEditingEnabled
},
505 const Experiment::Choice kSupervisedUserSafeSitesChoices
[] = {
506 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
507 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
508 switches::kSupervisedUserSafeSites
,
510 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
511 switches::kSupervisedUserSafeSites
,
513 { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY
,
514 switches::kSupervisedUserSafeSites
,
516 { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY
,
517 switches::kSupervisedUserSafeSites
,
518 "online-check-only" }
521 const Experiment::Choice kV8CacheOptionsChoices
[] = {
522 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
523 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
, switches::kV8CacheOptions
, "none" },
524 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE
, switches::kV8CacheOptions
, "parse" },
525 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE
, switches::kV8CacheOptions
, "code" },
528 // RECORDING USER METRICS FOR FLAGS:
529 // -----------------------------------------------------------------------------
530 // The first line of the experiment is the internal name. If you'd like to
531 // gather statistics about the usage of your flag, you should append a marker
532 // comment to the end of the feature name, like so:
533 // "my-special-feature", // FLAGS:RECORD_UMA
535 // After doing that, run
536 // tools/metrics/actions/extract_actions.py
537 // to add the metric to actions.xml (which will enable UMA to record your
538 // feature flag), then update the <owner>s and <description> sections. Make sure
539 // to include the actions.xml file when you upload your code for review!
541 // After your feature has shipped under a flag, you can locate the metrics under
542 // the action name AboutFlags_internal-action-name. Actions are recorded once
543 // per startup, so you should divide this number by AboutFlags_StartupTick to
544 // get a sense of usage. Note that this will not be the same as number of users
545 // with a given feature enabled because users can quit and relaunch the
546 // application multiple times over a given time interval. The dashboard also
547 // shows you how many (metrics reporting) users have enabled the flag over the
548 // last seven days. However, note that this is not the same as the number of
549 // users who have the flag enabled, since enabling the flag happens once,
550 // whereas running with the flag enabled happens until the user flips the flag
553 // To add a new experiment add to the end of kExperiments. There are two
554 // distinct types of experiments:
555 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
556 // macro for this type supplying the command line to the macro.
557 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
558 // deactivated state for this lab (i.e. no command line option). To specify
559 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
561 // See the documentation of Experiment for details on the fields.
563 // Command-line switches must have entries in enum "LoginCustomFlags" in
564 // histograms.xml. See note in histograms.xml and don't forget to run
565 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
567 // When adding a new choice, add it to the end of the list.
568 const Experiment kExperiments
[] = {
569 {"ignore-gpu-blacklist",
570 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
571 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
573 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)},
575 {"disable-direct-write",
576 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
577 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
579 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)},
581 {"enable-experimental-canvas-features",
582 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
583 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
585 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)},
586 {"disable-accelerated-2d-canvas",
587 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
588 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
590 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)},
591 {"enable-display-list-2d-canvas",
592 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
593 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
595 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
596 switches::kDisableDisplayList2dCanvas
)},
597 {"composited-layer-borders",
598 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
599 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
601 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)},
603 IDS_FLAGS_SHOW_FPS_COUNTER
,
604 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
606 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)},
608 IDS_FLAGS_DISABLE_WEBGL_NAME
,
609 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
611 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)},
613 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
614 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
616 #if defined(OS_ANDROID)
617 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
619 SINGLE_VALUE_TYPE("")
622 #if defined(ENABLE_WEBRTC)
623 {"disable-webrtc-hw-decoding",
624 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
625 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
626 kOsAndroid
| kOsCrOS
,
627 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)},
628 {"disable-webrtc-hw-encoding",
629 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
630 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
631 kOsAndroid
| kOsCrOS
,
632 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)},
633 {"enable-webrtc-stun-origin",
634 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
635 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
637 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)},
639 #if defined(OS_ANDROID)
641 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
642 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
644 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)},
646 // Native client is compiled out when DISABLE_NACL is defined.
647 #if !defined(DISABLE_NACL)
648 {"enable-nacl", // FLAGS:RECORD_UMA
649 IDS_FLAGS_ENABLE_NACL_NAME
,
650 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
652 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)},
653 {"enable-nacl-debug", // FLAGS:RECORD_UMA
654 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
655 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
657 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)},
658 {"nacl-debug-mask", // FLAGS:RECORD_UMA
659 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
660 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
662 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)},
664 #if defined(ENABLE_EXTENSIONS)
665 {"extension-apis", // FLAGS:RECORD_UMA
666 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
667 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
669 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)},
670 {"extensions-on-chrome-urls",
671 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
672 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
674 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)},
676 {"enable-fast-unload",
677 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
678 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
680 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)},
681 #if defined(ENABLE_EXTENSIONS)
682 {"enable-app-window-controls",
683 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
684 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
686 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)},
688 {"disable-hyperlink-auditing",
689 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
690 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
692 SINGLE_VALUE_TYPE(switches::kNoPings
)},
693 #if defined(OS_ANDROID)
694 {"contextual-search",
695 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
696 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
698 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
699 switches::kDisableContextualSearch
)},
701 {"show-autofill-type-predictions",
702 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
703 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
705 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)},
706 {"enable-smooth-scrolling", // FLAGS:RECORD_UMA
707 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
708 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
709 // Can't expose the switch unless the code is compiled in.
710 // On by default for the Mac (different implementation in WebKit).
712 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)},
713 #if defined(USE_AURA) || defined(OS_LINUX)
714 {"overlay-scrollbars",
715 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
716 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
717 // Uses the system preference on Mac (a different implementation).
718 // On Android, this is always enabled.
719 kOsLinux
| kOsCrOS
| kOsWin
,
720 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
721 switches::kDisableOverlayScrollbar
)},
724 IDS_FLAGS_ENABLE_PANELS_NAME
,
725 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
727 SINGLE_VALUE_TYPE(switches::kEnablePanels
)},
728 {// See http://crbug.com/120416 for how to remove this flag.
729 "save-page-as-mhtml", // FLAGS:RECORD_UMA
730 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
731 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
732 kOsMac
| kOsWin
| kOsLinux
,
733 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)},
735 IDS_FLAGS_ENABLE_QUIC_NAME
,
736 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
738 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
, switches::kDisableQuic
)},
739 {"disable-media-source",
740 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
741 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
743 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)},
744 {"disable-encrypted-media",
745 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
746 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
748 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)},
749 {"disable-prefixed-encrypted-media",
750 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
751 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
753 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)},
754 {"disable-javascript-harmony-shipping",
755 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
756 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
758 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)},
759 {"enable-javascript-harmony",
760 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
761 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
763 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)},
764 {"disable-software-rasterizer",
765 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
766 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
767 #if defined(ENABLE_SWIFTSHADER)
772 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)},
773 {"enable-gpu-rasterization",
774 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
775 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
777 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)},
778 {"gpu-rasterization-msaa-sample-count",
779 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME
,
780 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION
,
782 MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices
)},
783 {"disable-slimming-paint",
784 IDS_FLAGS_DISABLE_SLIMMING_PAINT_NAME
,
785 IDS_FLAGS_DISABLE_SLIMMING_PAINT_DESCRIPTION
,
787 SINGLE_VALUE_TYPE(switches::kDisableSlimmingPaint
)},
788 {"enable-slimming-paint",
789 IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME
,
790 IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION
,
792 SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint
)},
793 {"enable-experimental-web-platform-features",
794 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
795 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
797 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)},
798 {"enable-web-bluetooth",
799 IDS_FLAGS_WEB_BLUETOOTH_NAME
,
800 IDS_FLAGS_WEB_BLUETOOTH_DESCRIPTION
,
802 SINGLE_VALUE_TYPE(switches::kEnableWebBluetooth
)},
803 {"enable-devtools-experiments",
804 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
805 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
807 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)},
808 {"silent-debugger-extension-api",
809 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
810 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
812 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)},
813 #if defined(ENABLE_SPELLCHECK)
814 #if defined(OS_ANDROID)
815 {"enable-android-spellchecker",
816 IDS_OPTIONS_ENABLE_SPELLCHECK
,
817 IDS_OPTIONS_ENABLE_ANDROID_SPELLCHECKER_DESCRIPTION
,
819 SINGLE_VALUE_TYPE(switches::kEnableAndroidSpellChecker
)},
821 {"spellcheck-autocorrect",
822 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
823 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
824 kOsWin
| kOsLinux
| kOsCrOS
,
825 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)},
827 #if defined(ENABLE_SPELLCHECK) && \
828 (defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS))
829 {"enable-multilingual-spellchecker",
830 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_NAME
,
831 IDS_FLAGS_ENABLE_MULTILINGUAL_SPELLCHECKER_DESCRIPTION
,
832 kOsWin
| kOsLinux
| kOsCrOS
,
833 SINGLE_VALUE_TYPE(switches::kEnableMultilingualSpellChecker
)},
835 {"enable-scroll-prediction",
836 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
837 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
839 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)},
840 #if defined(ENABLE_TOPCHROME_MD)
842 IDS_FLAGS_TOP_CHROME_MD
,
843 IDS_FLAGS_TOP_CHROME_MD_DESCRIPTION
,
844 kOsWin
| kOsLinux
| kOsCrOS
,
845 MULTI_VALUE_TYPE(kTopChromeMaterialDesignChoices
)},
848 IDS_TOUCH_EVENTS_NAME
,
849 IDS_TOUCH_EVENTS_DESCRIPTION
,
851 MULTI_VALUE_TYPE(kTouchEventsChoices
)},
852 {"disable-touch-adjustment",
853 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
854 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
855 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
856 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)},
857 #if defined(OS_CHROMEOS)
858 {"network-portal-notification",
859 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
860 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
862 ENABLE_DISABLE_VALUE_TYPE(
863 chromeos::switches::kEnableNetworkPortalNotification
,
864 chromeos::switches::kDisableNetworkPortalNotification
)},
866 {"enable-download-resumption",
867 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
868 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
870 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)},
871 {"enable-download-notification",
872 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
873 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
875 SINGLE_VALUE_TYPE(switches::kEnableDownloadNotification
)},
876 #if defined(ENABLE_PLUGINS)
877 {"allow-nacl-socket-api",
878 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
879 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
881 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")},
883 #if defined(OS_CHROMEOS)
884 {"allow-touchpad-three-finger-click",
885 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
886 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
888 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)},
889 {"ash-enable-unified-desktop",
890 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_NAME
,
891 IDS_FLAGS_ASH_ENABLE_UNIFIED_DESKTOP_DESCRIPTION
,
893 SINGLE_VALUE_TYPE(ash::switches::kAshEnableUnifiedDesktop
)},
894 {"disable-easy-unlock",
895 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
896 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
898 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)},
899 {"enable-easy-unlock-proximity-detection",
900 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
901 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
903 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)},
904 {"enable-easy-unlock-bluetooth-low-energy-detection",
905 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_NAME
,
906 IDS_FLAGS_ENABLE_EASY_UNLOCK_BLUETOOTH_LOW_ENERGY_DISCOVERY_DESCRIPTION
,
909 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery
)},
912 {"disable-minimize-on-second-launcher-item-click",
913 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
914 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
916 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)},
918 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
919 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
921 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)},
924 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
925 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
926 kOsLinux
| kOsWin
| kOsCrOS
,
927 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
929 #endif // defined(USE_ASH)
931 "enable-viewport-meta",
932 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
933 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
934 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
935 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
937 #if defined(OS_CHROMEOS)
939 "disable-boot-animation",
940 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
941 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
943 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
945 {"enable-video-player-chromecast-support",
946 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
947 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
950 chromeos::switches::kEnableVideoPlayerChromecastSupport
)},
952 "disable-office-editing-component-app",
953 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
954 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
956 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
959 "disable-display-color-calibration",
960 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
961 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
963 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
966 "ash-disable-screen-orientation-lock",
967 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
968 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
970 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
972 #endif // defined(OS_CHROMEOS)
974 "disable-accelerated-video-decode",
975 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
976 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
977 kOsMac
| kOsWin
| kOsCrOS
,
978 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
982 "ash-debug-shortcuts",
983 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
984 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
986 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
989 "ash-disable-maximize-mode-window-backdrop",
990 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME
,
991 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION
,
993 SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop
),
996 "ash-enable-touch-view-testing",
997 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
998 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
1000 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
1003 "disable-touch-feedback",
1004 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
1005 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
1007 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
1010 "ash-enable-mirrored-screen",
1011 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1012 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1014 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1016 {"ash-enable-screen-rotation-animations",
1017 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME
,
1018 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION
,
1020 MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices
)},
1022 "ash-stable-overview-order",
1023 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_NAME
,
1024 IDS_FLAGS_ASH_STABLE_OVERVIEW_ORDER_DESCRIPTION
,
1026 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableStableOverviewOrder
,
1027 ash::switches::kAshDisableStableOverviewOrder
),
1029 #endif // defined(USE_ASH)
1030 #if defined(OS_CHROMEOS)
1031 {"disable-cloud-import",
1032 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1033 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1035 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)},
1036 {"enable-request-tablet-site",
1037 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1038 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1040 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)},
1042 {"debug-packed-apps",
1043 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1044 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1046 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)},
1047 {"enable-password-generation",
1048 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1049 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1050 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1051 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1052 autofill::switches::kDisablePasswordGeneration
)},
1053 {"enable-automatic-password-saving",
1054 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1055 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1058 password_manager::switches::kEnableAutomaticPasswordSaving
)},
1059 {"password-manager-reauthentication",
1060 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1061 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1063 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)},
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-stale-while-revalidate",
1131 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1132 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1134 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)},
1135 {"enable-suggestions-service",
1136 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1137 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1138 kOsAndroid
| kOsCrOS
,
1139 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1140 switches::kDisableSuggestionsService
)},
1141 {"enable-suggestions-with-substring-match",
1142 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_NAME
,
1143 IDS_FLAGS_ENABLE_SUGGESTIONS_WITH_SUB_STRING_MATCH_DESCRIPTION
,
1146 autofill::switches::kEnableSuggestionsWithSubstringMatch
)},
1147 {"enable-supervised-user-managed-bookmarks-folder",
1148 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1149 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1150 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1151 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)},
1152 #if defined(ENABLE_APP_LIST)
1153 {"enable-sync-app-list",
1154 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1155 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1157 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1158 app_list::switches::kDisableSyncAppList
)},
1160 #if defined(OS_MACOSX)
1161 {"enable-avfoundation",
1162 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1163 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1165 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1166 switches::kForceQTKit
)},
1169 IDS_FLAGS_LCD_TEXT_NAME
,
1170 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1172 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1173 switches::kDisableLCDText
)},
1174 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1175 {"delegated-renderer",
1176 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1177 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1178 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1179 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1180 switches::kDisableDelegatedRenderer
)},
1182 {"max-tiles-for-interest-area",
1183 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME
,
1184 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION
,
1186 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices
)},
1187 {"enable-offer-store-unmasked-wallet-cards",
1188 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS
,
1189 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION
,
1191 ENABLE_DISABLE_VALUE_TYPE(
1192 autofill::switches::kEnableOfferStoreUnmaskedWalletCards
,
1193 autofill::switches::kDisableOfferStoreUnmaskedWalletCards
)},
1194 {"enable-offline-auto-reload",
1195 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1196 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1198 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1199 switches::kDisableOfflineAutoReload
)},
1200 {"enable-offline-auto-reload-visible-only",
1201 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1202 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1204 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1205 switches::kDisableOfflineAutoReloadVisibleOnly
)},
1207 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1208 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1210 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)},
1211 {"default-tile-width",
1212 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1213 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1215 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)},
1216 {"default-tile-height",
1217 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1218 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1220 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)},
1221 #if defined(OS_ANDROID)
1222 {"disable-gesture-requirement-for-media-playback",
1223 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1224 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1226 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)},
1228 #if defined(OS_CHROMEOS)
1229 {"enable-virtual-keyboard",
1230 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1231 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1233 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)},
1234 {"enable-virtual-keyboard-overscroll",
1235 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1236 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1238 ENABLE_DISABLE_VALUE_TYPE(
1239 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1240 keyboard::switches::kDisableVirtualKeyboardOverscroll
)},
1241 {"enable-input-view",
1242 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1243 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1245 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1246 keyboard::switches::kDisableInputView
)},
1247 {"disable-new-korean-ime",
1248 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_NAME
,
1249 IDS_FLAGS_DISABLE_NEW_KOREAN_IME_DESCRIPTION
,
1251 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewKoreanIme
)},
1252 {"disable-new-md-input-view",
1253 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_NAME
,
1254 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_DESCRIPTION
,
1256 SINGLE_VALUE_TYPE(keyboard::switches::kDisableNewMDInputView
)},
1257 {"enable-physical-keyboard-autocorrect",
1258 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1259 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1261 ENABLE_DISABLE_VALUE_TYPE(
1262 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1263 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)},
1264 {"disable-voice-input",
1265 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1266 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1268 SINGLE_VALUE_TYPE(keyboard::switches::kDisableVoiceInput
)},
1269 {"enable-experimental-input-view-features",
1270 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1271 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1274 keyboard::switches::kEnableExperimentalInputViewFeatures
)},
1275 {"floating-virtual-keyboard",
1276 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_NAME
,
1277 IDS_FLAGS_FLOATING_VIRTUAL_KEYBOARD_DESCRIPTION
,
1279 MULTI_VALUE_TYPE(kFloatingVirtualKeyboardChoices
)},
1280 {"smart-virtual-keyboard",
1281 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_NAME
,
1282 IDS_FLAGS_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1284 MULTI_VALUE_TYPE(kSmartVirtualKeyboardChoices
)},
1286 IDS_FLAGS_GESTURE_TYPING_NAME
,
1287 IDS_FLAGS_GESTURE_TYPING_DESCRIPTION
,
1289 MULTI_VALUE_TYPE(kGestureTypingChoices
)},
1291 IDS_FLAGS_GESTURE_EDITING_NAME
,
1292 IDS_FLAGS_GESTURE_EDITING_DESCRIPTION
,
1294 MULTI_VALUE_TYPE(kGestureEditingChoices
)},
1295 {"enable-fullscreen-app-list",
1296 IDS_FLAGS_FULLSCREEN_APP_LIST_NAME
,
1297 IDS_FLAGS_FULLSCREEN_APP_LIST_DESCRIPTION
,
1299 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullscreenAppList
)},
1301 {"enable-simple-cache-backend",
1302 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1303 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1304 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1305 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)},
1306 {"enable-tcp-fast-open",
1307 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1308 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1309 kOsLinux
| kOsCrOS
| kOsAndroid
,
1310 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)},
1311 #if defined(ENABLE_SERVICE_DISCOVERY)
1312 {"device-discovery-notifications",
1313 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1314 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1316 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1317 switches::kDisableDeviceDiscoveryNotifications
)},
1318 {"enable-print-preview-register-promos",
1319 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1320 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1322 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)},
1323 #endif // ENABLE_SERVICE_DISCOVERY
1325 {"enable-cloud-print-xps",
1326 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1327 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1329 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)},
1331 #if defined(USE_AURA)
1332 {"tab-capture-upscale-quality",
1333 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1334 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1336 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)},
1337 {"tab-capture-downscale-quality",
1338 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1339 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1341 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)},
1343 #if defined(TOOLKIT_VIEWS)
1344 {"disable-hide-inactive-stacked-tab-close-buttons",
1345 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1346 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1347 kOsCrOS
| kOsWin
| kOsLinux
,
1348 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)},
1350 #if defined(ENABLE_SPELLCHECK)
1351 {"enable-spelling-feedback-field-trial",
1352 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1353 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1355 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)},
1357 {"enable-webgl-draft-extensions",
1358 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1359 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1361 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)},
1362 {"enable-new-profile-management",
1363 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1364 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1365 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1366 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1367 switches::kDisableNewProfileManagement
)},
1368 {"enable-account-consistency",
1369 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1370 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1371 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1372 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1373 switches::kDisableAccountConsistency
)},
1374 {"enable-iframe-based-signin",
1375 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1376 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1377 kOsMac
| kOsWin
| kOsLinux
,
1378 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)},
1379 {"enable-google-profile-info",
1380 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1381 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1382 kOsMac
| kOsWin
| kOsLinux
,
1383 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)},
1384 #if defined(ENABLE_EXTENSIONS)
1385 {"enable-surface-worker",
1386 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1387 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1389 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)},
1391 #if defined(ENABLE_APP_LIST)
1392 {"reset-app-list-install-state",
1393 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1394 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1395 kOsMac
| kOsWin
| kOsLinux
,
1396 SINGLE_VALUE_TYPE(app_list::switches::kResetAppListInstallState
)},
1397 {"disable-drive-apps-in-app-list",
1398 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1399 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1401 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)},
1403 #if defined(OS_ANDROID)
1404 {"enable-accessibility-tab-switcher",
1405 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1406 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1408 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)},
1409 {// TODO(dmazzoni): remove this flag when native android accessibility
1410 // ships in the stable channel. http://crbug.com/356775
1411 "enable-accessibility-script-injection",
1412 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1413 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1415 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1416 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")},
1418 {"disable-one-copy",
1419 IDS_FLAGS_DISABLE_ONE_COPY_NAME
,
1420 IDS_FLAGS_DISABLE_ONE_COPY_DESCRIPTION
,
1422 SINGLE_VALUE_TYPE(switches::kDisableOneCopy
)},
1423 {"enable-zero-copy",
1424 IDS_FLAGS_ENABLE_ZERO_COPY_NAME
,
1425 IDS_FLAGS_ENABLE_ZERO_COPY_DESCRIPTION
,
1427 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)},
1428 #if defined(OS_CHROMEOS)
1429 {"enable-first-run-ui-transitions",
1430 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1431 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1433 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)},
1435 {"disable-new-bookmark-apps",
1436 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1437 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1438 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1439 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1440 switches::kDisableNewBookmarkApps
)},
1441 #if defined(OS_MACOSX)
1442 {"disable-hosted-app-shim-creation",
1443 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1444 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1446 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)},
1447 {"enable-hosted-app-quit-notification",
1448 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1449 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1451 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)},
1453 {"enable-ephemeral-apps-in-webstore",
1454 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1455 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1457 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)},
1458 {"enable-linkable-ephemeral-apps",
1459 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1460 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1462 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)},
1463 #if defined(OS_ANDROID)
1464 {"disable-click-delay",
1465 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1466 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1468 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1469 SINGLE_VALUE_TYPE("disable-click-delay")},
1470 {"disable-pull-to-refresh-effect",
1471 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1472 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1474 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)},
1476 #if defined(OS_MACOSX)
1477 {"enable-translate-new-ux",
1478 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1479 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1481 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)},
1483 #if defined(TOOLKIT_VIEWS)
1484 {"disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1485 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1486 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1487 kOsCrOS
| kOsWin
| kOsLinux
,
1488 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)},
1489 {"enable-link-disambiguation-popup",
1490 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1491 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1493 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)},
1495 #if defined(ENABLE_EXTENSIONS)
1496 {"enable-apps-show-on-first-paint",
1497 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1498 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1500 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)},
1502 {"enhanced-bookmarks-experiment",
1503 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1504 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1505 kOsDesktop
| kOsAndroid
,
1506 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnhancedBookmarksExperiment
,
1508 switches::kEnhancedBookmarksExperiment
,
1510 #if defined(OS_ANDROID)
1511 {"enable-zero-suggest-experiment",
1512 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1513 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1515 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)},
1516 {"reader-mode-heuristics",
1517 IDS_FLAGS_READER_MODE_HEURISTICS_NAME
,
1518 IDS_FLAGS_READER_MODE_HEURISTICS_DESCRIPTION
,
1520 MULTI_VALUE_TYPE(kReaderModeHeuristicsChoices
)},
1521 {"enable-reader-mode-toolbar-icon",
1522 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1523 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1525 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)},
1526 {"enable-dom-distiller-button-animation",
1527 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION
,
1528 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION
,
1530 SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation
)},
1532 {"num-raster-threads",
1533 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1534 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1536 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)},
1537 {"enable-single-click-autofill",
1538 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1539 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1540 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1541 ENABLE_DISABLE_VALUE_TYPE(
1542 autofill::switches::kEnableSingleClickAutofill
,
1543 autofill::switches::kDisableSingleClickAutofill
)},
1544 {"enable-site-engagement-service",
1545 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_NAME
,
1546 IDS_FLAGS_ENABLE_SITE_ENGAGEMENT_SERVICE_DESCRIPTION
,
1548 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSiteEngagementService
,
1549 switches::kDisableSiteEngagementService
)},
1550 {"enable-session-crashed-bubble",
1551 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1552 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1554 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1555 switches::kDisableSessionCrashedBubble
)},
1556 {"enable-pdf-material-ui",
1557 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1558 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1560 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1561 switches::kDisablePdfMaterialUI
)},
1562 {"disable-cast-streaming-hw-encoding",
1563 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1564 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1566 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)},
1567 #if defined(OS_ANDROID)
1569 IDS_FLAGS_DISABLE_CAST_NAME
,
1570 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1572 SINGLE_VALUE_TYPE(switches::kDisableCast
)},
1573 {"prefetch-search-results",
1574 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1575 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1577 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)},
1579 #if defined(ENABLE_APP_LIST)
1580 {"enable-experimental-app-list",
1581 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1582 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1583 kOsWin
| kOsLinux
| kOsCrOS
,
1584 ENABLE_DISABLE_VALUE_TYPE(
1585 app_list::switches::kEnableExperimentalAppList
,
1586 app_list::switches::kDisableExperimentalAppList
)},
1587 {"enable-centered-app-list",
1588 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1589 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1590 kOsWin
| kOsLinux
| kOsCrOS
,
1591 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)},
1592 {"enable-new-app-list-mixer",
1593 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_NAME
,
1594 IDS_FLAGS_ENABLE_NEW_APP_LIST_MIXER_DESCRIPTION
,
1595 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1596 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableNewAppListMixer
,
1597 app_list::switches::kDisableNewAppListMixer
)},
1599 {"disable-threaded-scrolling",
1600 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1601 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1602 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
| kOsMac
,
1603 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)},
1604 {"invert-viewport-scroll-order",
1605 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_NAME
,
1606 IDS_FLAGS_INVERT_VIEWPORT_SCROLL_ORDER_DESCRIPTION
,
1608 SINGLE_VALUE_TYPE(switches::kInvertViewportScrollOrder
)},
1609 {"bleeding-edge-renderer-mode",
1610 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1611 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1613 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)},
1614 {"enable-settings-window",
1615 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1616 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1618 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1619 switches::kDisableSettingsWindow
)},
1620 #if defined(OS_ANDROID)
1621 {"enable-instant-search-clicks",
1622 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME
,
1623 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION
,
1625 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks
)},
1627 {"enable-save-password-bubble",
1628 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1629 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1630 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1631 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1632 switches::kDisableSavePasswordBubble
)},
1633 {"enable-apps-file-associations",
1634 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1635 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1637 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)},
1638 #if defined(OS_ANDROID)
1639 {"enable-embeddedsearch-api",
1640 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1641 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1643 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)},
1645 {"distance-field-text",
1646 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1647 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1649 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1650 switches::kDisableDistanceFieldText
)},
1651 {"extension-content-verification",
1652 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1653 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1655 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)},
1656 #if defined(ENABLE_EXTENSIONS)
1657 {"extension-active-script-permission",
1658 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1659 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1661 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)},
1663 #if defined(OS_ANDROID)
1664 {"enable-data-reduction-proxy-dev",
1665 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1666 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1668 ENABLE_DISABLE_VALUE_TYPE(
1669 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1670 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)},
1671 {"enable-data-reduction-proxy-carrier-test",
1672 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_NAME
,
1673 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_CARRIER_TEST_DESCRIPTION
,
1676 data_reduction_proxy::switches::kEnableDataReductionProxyCarrierTest
)},
1678 {"enable-hotword-hardware",
1679 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1680 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1682 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)},
1683 #if defined(ENABLE_EXTENSIONS)
1684 {"enable-embedded-extension-options",
1685 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1686 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1688 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)},
1690 #if defined(USE_ASH)
1691 {"enable-web-app-frame",
1692 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1693 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1695 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)},
1697 {"enable-drop-sync-credential",
1698 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1699 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1701 ENABLE_DISABLE_VALUE_TYPE(
1702 password_manager::switches::kEnableDropSyncCredential
,
1703 password_manager::switches::kDisableDropSyncCredential
)},
1704 #if defined(ENABLE_EXTENSIONS)
1705 {"enable-extension-action-redesign",
1706 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1707 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1709 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)},
1711 {"autofill-sync-credential",
1712 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1713 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1715 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)},
1716 #if !defined(OS_ANDROID)
1717 {"enable-message-center-always-scroll-up-upon-notification-removal",
1718 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1719 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1722 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)},
1724 #if !defined(OS_ANDROID) && !defined(OS_IOS)
1725 {"enable-md-settings",
1726 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
1727 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
1729 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignSettings
)},
1731 #if defined(OS_CHROMEOS)
1732 {"memory-pressure-thresholds",
1733 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
1734 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
1736 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)},
1738 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
1739 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
1741 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)},
1742 #endif // OS_CHROMEOS
1743 {"enable-tab-audio-muting",
1744 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
1745 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
1747 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)},
1748 {"enable-credential-manager-api",
1749 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
1750 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
1752 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)},
1753 {"reduced-referrer-granularity",
1754 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
1755 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
1757 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)},
1758 #if defined(ENABLE_PLUGINS)
1759 {"enable-plugin-power-saver",
1760 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
1761 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
1763 ENABLE_DISABLE_VALUE_TYPE(plugins::switches::kEnablePluginPowerSaver
,
1764 plugins::switches::kDisablePluginPowerSaver
)},
1766 #if defined(OS_CHROMEOS)
1767 {"disable-new-zip-unpacker",
1768 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
1769 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
1771 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)},
1772 #endif // defined(OS_CHROMEOS)
1773 {"enable-credit-card-scan",
1774 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
1775 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
1777 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
1778 autofill::switches::kDisableCreditCardScan
)},
1779 #if defined(OS_CHROMEOS)
1780 {"disable-captive-portal-bypass-proxy",
1781 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
1782 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
1784 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy
)},
1785 #endif // defined(OS_CHROMEOS)
1786 #if defined(OS_ANDROID)
1787 {"enable-seccomp-filter-sandbox",
1788 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
1789 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
1791 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)},
1793 {"enable-touch-hover",
1794 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
1795 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
1797 SINGLE_VALUE_TYPE("enable-touch-hover")},
1798 {"enable-fill-on-account-select",
1799 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
1800 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
1802 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)},
1803 #if defined(OS_CHROMEOS)
1804 {"enable-wifi-credential-sync", // FLAGS:RECORD_UMA
1805 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
1806 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
1808 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)},
1809 {"enable-potentially-annoying-security-features",
1810 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
1811 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
1813 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)},
1815 {"disable-delay-agnostic-aec",
1816 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_NAME
,
1817 IDS_FLAGS_DISABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1818 kOsWin
| kOsLinux
| kOsCrOS
,
1819 SINGLE_VALUE_TYPE(switches::kDisableDelayAgnosticAec
)},
1820 {"enable-delay-agnostic-aec",
1821 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
1822 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
1824 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)},
1825 {"mark-non-secure-as", // FLAGS:RECORD_UMA
1826 IDS_MARK_NON_SECURE_AS_NAME
,
1827 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
1829 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)},
1830 {"enable-site-per-process",
1831 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
1832 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
1834 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)},
1835 #if defined(OS_MACOSX)
1836 {"enable-harfbuzz-rendertext",
1837 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
1838 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
1840 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)},
1841 #endif // defined(OS_MACOSX)
1842 #if defined(OS_CHROMEOS)
1843 {"disable-timezone-tracking",
1844 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
1845 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
1847 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)},
1848 {"disable-webview-signin-flow",
1849 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME
,
1850 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION
,
1852 SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow
)},
1853 #endif // defined(OS_CHROMEOS)
1854 {"data-reduction-proxy-lo-fi",
1855 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_NAME
,
1856 IDS_FLAGS_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
1858 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices
)},
1859 {"clear-data-reduction-proxy-data-savings",
1860 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
1861 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
1864 data_reduction_proxy::switches::kClearDataReductionProxyDataSavings
)},
1865 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
1866 {"enable-data-reduction-proxy-bypass-warnings",
1867 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
1868 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
1870 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
1871 kEnableDataReductionProxyBypassWarning
)},
1873 {"allow-insecure-localhost",
1874 IDS_ALLOW_INSECURE_LOCALHOST
,
1875 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
1877 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)},
1878 {"enable-add-to-shelf",
1879 IDS_FLAGS_ENABLE_ADD_TO_SHELF_NAME
,
1880 IDS_FLAGS_ENABLE_ADD_TO_SHELF_DESCRIPTION
,
1882 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToShelf
,
1883 switches::kDisableAddToShelf
)},
1884 {"bypass-app-banner-engagement-checks",
1885 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
1886 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
1888 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)},
1889 {"use-sync-sandbox",
1890 IDS_FLAGS_SYNC_SANDBOX_NAME
,
1891 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
1893 SINGLE_VALUE_TYPE_AND_VALUE(
1894 switches::kSyncServiceURL
,
1895 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")},
1896 {"enable-child-account-detection",
1897 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
1898 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
1899 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1900 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
1901 switches::kDisableChildAccountDetection
)},
1902 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
1903 {"ozone-test-single-overlay-support",
1904 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
1905 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
1907 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)},
1908 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
1909 {"v8-pac-mojo-out-of-process",
1910 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
1911 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
1913 ENABLE_DISABLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
,
1914 switches::kDisableOutOfProcessPac
)},
1915 #if defined(ENABLE_MEDIA_ROUTER)
1916 {"enable-media-router",
1917 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
1918 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
1920 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)},
1921 #endif // defined(ENABLE_MEDIA_ROUTER)
1922 // Since Drive Search is not available when app list is disabled, flag guard
1923 // enable-drive-search-in-chrome-launcher flag.
1924 #if defined(ENABLE_APP_LIST)
1925 {"enable-drive-search-in-app-launcher",
1926 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER
,
1927 IDS_FLAGS_ENABLE_DRIVE_SEARCH_IN_CHROME_LAUNCHER_DESCRIPTION
,
1929 ENABLE_DISABLE_VALUE_TYPE(
1930 app_list::switches::kEnableDriveSearchInChromeLauncher
,
1931 app_list::switches::kDisableDriveSearchInChromeLauncher
)},
1932 #endif // defined(ENABLE_APP_LIST)
1933 #if defined(OS_CHROMEOS)
1934 {"disable-mtp-write-support",
1935 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_NAME
,
1936 IDS_FLAG_DISABLE_MTP_WRITE_SUPPORT_DESCRIPTION
,
1938 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMtpWriteSupport
)},
1939 #endif // defined(OS_CHROMEOS)
1940 #if defined(OS_CHROMEOS)
1941 {"enable-datasaver-prompt",
1942 IDS_FLAGS_DATASAVER_PROMPT_NAME
,
1943 IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION
,
1945 MULTI_VALUE_TYPE(kDataSaverPromptChoices
)},
1946 #endif // defined(OS_CHROMEOS)
1947 {"supervised-user-safesites",
1948 IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME
,
1949 IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1950 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1951 MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices
)},
1952 #if defined(OS_ANDROID)
1953 {"enable-autofill-keyboard-accessory-view",
1954 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_NAME
,
1955 IDS_FLAGS_AUTOFILL_ACCESSORY_VIEW_DESCRIPTION
,
1957 SINGLE_VALUE_TYPE(autofill::switches::kEnableAccessorySuggestionView
)},
1958 #endif // defined(OS_ANDROID)
1959 {"disable-new-video-renderer",
1960 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_NAME
,
1961 IDS_FLAGS_DISABLE_NEW_VIDEO_RENDERER_DESCRIPTION
,
1963 SINGLE_VALUE_TYPE(switches::kDisableNewVideoRenderer
)},
1964 // Temporary flag to ease the transition to standard-compliant scrollTop
1965 // behavior. Will be removed shortly after http://crbug.com/157855 ships.
1966 {"scroll-top-left-interop",
1967 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_NAME
,
1968 IDS_FLAGS_SCROLL_TOP_LEFT_INTEROP_DESCRIPTION
,
1970 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableBlinkFeatures
,
1971 "ScrollTopLeftInterop",
1972 switches::kDisableBlinkFeatures
,
1973 "ScrollTopLeftInterop")},
1975 {"try-supported-channel-layouts",
1976 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_NAME
,
1977 IDS_FLAGS_TRY_SUPPORTED_CHANNEL_LAYOUTS_DESCRIPTION
,
1979 SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts
)},
1981 {"emphasize-titles-in-omnibox-dropdown",
1982 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_NAME
,
1983 IDS_FLAGS_EMPHASIZE_TITLES_IN_OMNIBOX_DROPDOWN_DESCRIPTION
,
1985 SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown
)},
1986 #if defined(ENABLE_WEBRTC)
1987 {"enable-webrtc-dtls12",
1988 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME
,
1989 IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION
,
1991 SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12
)},
1993 #if defined(OS_MACOSX)
1995 IDS_FLAGS_APP_INFO_DIALOG_NAME
,
1996 IDS_FLAGS_APP_INFO_DIALOG_DESCRIPTION
,
1998 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppInfoDialogMac
,
1999 switches::kDisableAppInfoDialogMac
)},
2000 {"mac-views-native-app-windows",
2001 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_NAME
,
2002 IDS_FLAGS_MAC_VIEWS_NATIVE_APP_WINDOWS_DESCRIPTION
,
2004 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMacViewsNativeAppWindows
,
2005 switches::kDisableMacViewsNativeAppWindows
)},
2006 {"app-window-cycling",
2007 IDS_FLAGS_APP_WINDOW_CYCLING_NAME
,
2008 IDS_FLAGS_APP_WINDOW_CYCLING_DESCRIPTION
,
2010 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAppWindowCycling
,
2011 switches::kDisableAppWindowCycling
)},
2013 #if defined(ENABLE_WEBVR)
2015 IDS_FLAGS_ENABLE_WEBVR_NAME
,
2016 IDS_FLAGS_ENABLE_WEBVR_DESCRIPTION
,
2018 SINGLE_VALUE_TYPE(switches::kEnableWebVR
)},
2020 #if defined(OS_CHROMEOS)
2021 {"enable-accelerated-mjpeg-decode",
2022 IDS_FLAGS_ENABLE_ACCELERATED_MJPEG_DECODE_NAME
,
2023 IDS_FLAGS_ENABLE_ACCELERATED_MJPEG_DECODE_DESCRIPTION
,
2025 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode
)},
2026 #endif // OS_CHROMEOS
2027 {"v8-cache-options",
2028 IDS_FLAGS_V8_CACHE_OPTIONS_NAME
,
2029 IDS_FLAGS_V8_CACHE_OPTIONS_DESCRIPTION
,
2031 MULTI_VALUE_TYPE(kV8CacheOptionsChoices
)},
2032 #if !defined(OS_ANDROID) && !defined(OS_IOS)
2033 {"enable-md-downloads",
2034 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_NAME
,
2035 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_DOWNLOADS_DESCRIPTION
,
2037 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignDownloads
)},
2039 // NOTE: Adding new command-line switches requires adding corresponding
2040 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2041 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2044 const Experiment
* experiments
= kExperiments
;
2045 size_t num_experiments
= arraysize(kExperiments
);
2047 // Stores and encapsulates the little state that about:flags has.
2050 FlagsState() : needs_restart_(false) {}
2051 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2052 base::CommandLine
* command_line
,
2053 SentinelsMode sentinels
);
2054 bool IsRestartNeededToCommitChanges();
2055 void SetExperimentEnabled(
2056 FlagsStorage
* flags_storage
,
2057 const std::string
& internal_name
,
2059 void RemoveFlagsSwitches(
2060 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2061 void ResetAllFlags(FlagsStorage
* flags_storage
);
2064 // Returns the singleton instance of this class
2065 static FlagsState
* GetInstance() {
2066 return Singleton
<FlagsState
>::get();
2070 bool needs_restart_
;
2071 std::map
<std::string
, std::string
> flags_switches_
;
2073 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2076 // Adds the internal names for the specified experiment to |names|.
2077 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2078 if (e
.type
== Experiment::SINGLE_VALUE
||
2079 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2080 names
->insert(e
.internal_name
);
2082 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2083 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2084 for (int i
= 0; i
< e
.num_choices
; ++i
)
2085 names
->insert(e
.NameForChoice(i
));
2089 // Confirms that an experiment is valid, used in a DCHECK in
2090 // SanitizeList below.
2091 bool ValidateExperiment(const Experiment
& e
) {
2093 case Experiment::SINGLE_VALUE
:
2094 case Experiment::SINGLE_DISABLE_VALUE
:
2095 DCHECK_EQ(0, e
.num_choices
);
2098 case Experiment::MULTI_VALUE
:
2099 DCHECK_GT(e
.num_choices
, 0);
2101 DCHECK(e
.choices
[0].command_line_switch
);
2102 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2104 case Experiment::ENABLE_DISABLE_VALUE
:
2105 DCHECK_EQ(3, e
.num_choices
);
2107 DCHECK(e
.command_line_switch
);
2108 DCHECK(e
.command_line_value
);
2109 DCHECK(e
.disable_command_line_switch
);
2110 DCHECK(e
.disable_command_line_value
);
2118 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2119 // unknown, to prevent this list to become very long as experiments are added
2121 void SanitizeList(FlagsStorage
* flags_storage
) {
2122 std::set
<std::string
> known_experiments
;
2123 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2124 DCHECK(ValidateExperiment(experiments
[i
]));
2125 AddInternalName(experiments
[i
], &known_experiments
);
2128 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2130 std::set
<std::string
> new_enabled_experiments
=
2131 base::STLSetIntersection
<std::set
<std::string
> >(
2132 known_experiments
, enabled_experiments
);
2134 if (new_enabled_experiments
!= enabled_experiments
)
2135 flags_storage
->SetFlags(new_enabled_experiments
);
2138 void GetSanitizedEnabledFlags(
2139 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2140 SanitizeList(flags_storage
);
2141 *result
= flags_storage
->GetFlags();
2144 bool SkipConditionalExperiment(const Experiment
& experiment
) {
2145 chrome::VersionInfo::Channel channel
= chrome::VersionInfo::GetChannel();
2147 #if defined(OS_ANDROID)
2148 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2149 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2150 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2151 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2154 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2155 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2156 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2159 // enable-data-reduction-proxy-carrier-test is only available for Chromium
2160 // builds and the Canary/Dev channel.
2161 if (!strcmp("enable-data-reduction-proxy-carrier-test",
2162 experiment
.internal_name
) &&
2163 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2164 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2165 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2170 // data-reduction-proxy-lo-fi is only available for Chromium builds and
2171 // the Canary/Dev/Beta channels.
2172 if (!strcmp("data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2173 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2174 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2175 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2176 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2180 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2181 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2182 // builds and Canary/Dev channel.
2183 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2184 experiment
.internal_name
) &&
2185 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
&&
2186 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2187 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2196 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2197 // enabled on the current platform.
2198 void GetSanitizedEnabledFlagsForCurrentPlatform(
2199 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2200 GetSanitizedEnabledFlags(flags_storage
, result
);
2202 // Filter out any experiments that aren't enabled on the current platform. We
2203 // don't remove these from prefs else syncing to a platform with a different
2204 // set of experiments would be lossy.
2205 std::set
<std::string
> platform_experiments
;
2206 int current_platform
= GetCurrentPlatform();
2207 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2208 if (experiments
[i
].supported_platforms
& current_platform
)
2209 AddInternalName(experiments
[i
], &platform_experiments
);
2210 #if defined(OS_CHROMEOS)
2211 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2212 AddInternalName(experiments
[i
], &platform_experiments
);
2216 std::set
<std::string
> new_enabled_experiments
=
2217 base::STLSetIntersection
<std::set
<std::string
> >(
2218 platform_experiments
, *result
);
2220 result
->swap(new_enabled_experiments
);
2223 // Returns true if none of this experiment's options have been enabled.
2224 bool IsDefaultValue(
2225 const Experiment
& experiment
,
2226 const std::set
<std::string
>& enabled_experiments
) {
2227 switch (experiment
.type
) {
2228 case Experiment::SINGLE_VALUE
:
2229 case Experiment::SINGLE_DISABLE_VALUE
:
2230 return enabled_experiments
.count(experiment
.internal_name
) == 0;
2231 case Experiment::MULTI_VALUE
:
2232 case Experiment::ENABLE_DISABLE_VALUE
:
2233 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2234 if (enabled_experiments
.count(experiment
.NameForChoice(i
)) > 0)
2244 // Returns the Value representing the choice data in the specified experiment.
2245 base::Value
* CreateChoiceData(
2246 const Experiment
& experiment
,
2247 const std::set
<std::string
>& enabled_experiments
) {
2248 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2249 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2250 base::ListValue
* result
= new base::ListValue
;
2251 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2252 base::DictionaryValue
* value
= new base::DictionaryValue
;
2253 const std::string name
= experiment
.NameForChoice(i
);
2254 value
->SetString("internal_name", name
);
2255 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2256 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2257 result
->Append(value
);
2264 std::string
Experiment::NameForChoice(int index
) const {
2265 DCHECK(type
== Experiment::MULTI_VALUE
||
2266 type
== Experiment::ENABLE_DISABLE_VALUE
);
2267 DCHECK_LT(index
, num_choices
);
2268 return std::string(internal_name
) + testing::kMultiSeparator
+
2269 base::IntToString(index
);
2272 base::string16
Experiment::DescriptionForChoice(int index
) const {
2273 DCHECK(type
== Experiment::MULTI_VALUE
||
2274 type
== Experiment::ENABLE_DISABLE_VALUE
);
2275 DCHECK_LT(index
, num_choices
);
2277 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2278 const int kEnableDisableDescriptionIds
[] = {
2279 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2280 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2281 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2283 description_id
= kEnableDisableDescriptionIds
[index
];
2285 description_id
= choices
[index
].description_id
;
2287 return l10n_util::GetStringUTF16(description_id
);
2290 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2291 base::CommandLine
* command_line
,
2292 SentinelsMode sentinels
) {
2293 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2298 bool AreSwitchesIdenticalToCurrentCommandLine(
2299 const base::CommandLine
& new_cmdline
,
2300 const base::CommandLine
& active_cmdline
,
2301 std::set
<base::CommandLine::StringType
>* out_difference
) {
2302 std::set
<base::CommandLine::StringType
> new_flags
=
2303 ExtractFlagsFromCommandLine(new_cmdline
);
2304 std::set
<base::CommandLine::StringType
> active_flags
=
2305 ExtractFlagsFromCommandLine(active_cmdline
);
2307 bool result
= false;
2308 // Needed because std::equal doesn't check if the 2nd set is empty.
2309 if (new_flags
.size() == active_flags
.size()) {
2311 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2314 if (out_difference
&& !result
) {
2315 std::set_symmetric_difference(
2318 active_flags
.begin(),
2320 std::inserter(*out_difference
, out_difference
->begin()));
2326 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2328 base::ListValue
* supported_experiments
,
2329 base::ListValue
* unsupported_experiments
) {
2330 std::set
<std::string
> enabled_experiments
;
2331 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2333 int current_platform
= GetCurrentPlatform();
2335 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2336 const Experiment
& experiment
= experiments
[i
];
2337 if (SkipConditionalExperiment(experiment
))
2340 base::DictionaryValue
* data
= new base::DictionaryValue();
2341 data
->SetString("internal_name", experiment
.internal_name
);
2342 data
->SetString("name",
2343 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2344 data
->SetString("description",
2345 l10n_util::GetStringUTF16(
2346 experiment
.visible_description_id
));
2348 base::ListValue
* supported_platforms
= new base::ListValue();
2349 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2350 data
->Set("supported_platforms", supported_platforms
);
2351 // True if the switch is not currently passed.
2352 bool is_default_value
= IsDefaultValue(experiment
, enabled_experiments
);
2353 data
->SetBoolean("is_default", is_default_value
);
2355 switch (experiment
.type
) {
2356 case Experiment::SINGLE_VALUE
:
2357 case Experiment::SINGLE_DISABLE_VALUE
:
2360 (!is_default_value
&&
2361 experiment
.type
== Experiment::SINGLE_VALUE
) ||
2362 (is_default_value
&&
2363 experiment
.type
== Experiment::SINGLE_DISABLE_VALUE
));
2365 case Experiment::MULTI_VALUE
:
2366 case Experiment::ENABLE_DISABLE_VALUE
:
2367 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2373 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2374 #if defined(OS_CHROMEOS)
2375 if (access
== kOwnerAccessToFlags
&&
2376 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2381 supported_experiments
->Append(data
);
2383 unsupported_experiments
->Append(data
);
2387 bool IsRestartNeededToCommitChanges() {
2388 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2391 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2392 const std::string
& internal_name
,
2394 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2395 internal_name
, enable
);
2398 void RemoveFlagsSwitches(
2399 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2400 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2403 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2404 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2407 int GetCurrentPlatform() {
2408 #if defined(OS_MACOSX)
2410 #elif defined(OS_WIN)
2412 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2414 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2416 #elif defined(OS_ANDROID)
2419 #error Unknown platform
2423 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2424 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2425 for (const std::string
& flag
: flags
) {
2426 std::string
action("AboutFlags_");
2428 content::RecordComputedAction(action
);
2430 // Since flag metrics are recorded every startup, add a tick so that the
2431 // stats can be made meaningful.
2433 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2434 content::RecordAction(base::UserMetricsAction("StartupTick"));
2437 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2438 return static_cast<base::HistogramBase::Sample
>(
2439 metrics::HashMetricName(switch_name
));
2442 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2443 const std::set
<std::string
>& command_line_difference
) {
2444 for (const std::string
& flag
: command_line_difference
) {
2445 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2446 if (base::StartsWith(flag
, "--", base::CompareCase::SENSITIVE
)) {
2447 // Skip '--' before switch name.
2448 std::string
switch_name(flag
.substr(2));
2450 // Kill value, if any.
2451 const size_t value_pos
= switch_name
.find('=');
2452 if (value_pos
!= std::string::npos
)
2453 switch_name
.resize(value_pos
);
2455 uma_id
= GetSwitchUMAId(switch_name
);
2457 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2458 << "' has incorrect format.";
2460 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2461 << "' '" << flag
<< "', uma_id=" << uma_id
;
2463 // Sparse histogram macro does not cache the histogram, so it's safe
2464 // to use macro with non-static histogram name here.
2465 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2469 //////////////////////////////////////////////////////////////////////////////
2470 // FlagsState implementation.
2474 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2475 NameToSwitchAndValueMap
;
2477 void SetFlagToSwitchMapping(const std::string
& key
,
2478 const std::string
& switch_name
,
2479 const std::string
& switch_value
,
2480 NameToSwitchAndValueMap
* name_to_switch_map
) {
2481 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2482 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2485 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2486 base::CommandLine
* command_line
,
2487 SentinelsMode sentinels
) {
2488 if (command_line
->HasSwitch(switches::kNoExperiments
))
2491 std::set
<std::string
> enabled_experiments
;
2493 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2494 &enabled_experiments
);
2496 NameToSwitchAndValueMap name_to_switch_map
;
2497 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2498 const Experiment
& e
= experiments
[i
];
2499 if (e
.type
== Experiment::SINGLE_VALUE
||
2500 e
.type
== Experiment::SINGLE_DISABLE_VALUE
) {
2501 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2502 e
.command_line_value
, &name_to_switch_map
);
2503 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2504 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2505 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2506 e
.choices
[j
].command_line_switch
,
2507 e
.choices
[j
].command_line_value
,
2508 &name_to_switch_map
);
2511 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2512 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2513 &name_to_switch_map
);
2514 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2515 e
.command_line_value
, &name_to_switch_map
);
2516 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2517 e
.disable_command_line_value
, &name_to_switch_map
);
2521 if (sentinels
== kAddSentinels
) {
2522 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2523 flags_switches_
.insert(
2524 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2527 for (const std::string
& experiment_name
: enabled_experiments
) {
2528 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2529 name_to_switch_map
.find(experiment_name
);
2530 if (name_to_switch_it
== name_to_switch_map
.end()) {
2535 const std::pair
<std::string
, std::string
>&
2536 switch_and_value_pair
= name_to_switch_it
->second
;
2538 CHECK(!switch_and_value_pair
.first
.empty());
2539 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2540 switch_and_value_pair
.second
);
2541 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2543 if (sentinels
== kAddSentinels
) {
2544 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2545 flags_switches_
.insert(
2546 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2551 bool FlagsState::IsRestartNeededToCommitChanges() {
2552 return needs_restart_
;
2555 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2556 const std::string
& internal_name
,
2558 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2559 if (at_index
!= std::string::npos
) {
2561 // We're being asked to enable a multi-choice experiment. Disable the
2562 // currently selected choice.
2563 DCHECK_NE(at_index
, 0u);
2564 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2565 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2567 // And enable the new choice, if it is not the default first choice.
2568 if (internal_name
!= experiment_name
+ "@0") {
2569 std::set
<std::string
> enabled_experiments
;
2570 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2571 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2572 flags_storage
->SetFlags(enabled_experiments
);
2577 std::set
<std::string
> enabled_experiments
;
2578 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2580 const Experiment
* e
= NULL
;
2581 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2582 if (experiments
[i
].internal_name
== internal_name
) {
2583 e
= experiments
+ i
;
2589 if (e
->type
== Experiment::SINGLE_VALUE
) {
2591 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2593 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2594 } else if (e
->type
== Experiment::SINGLE_DISABLE_VALUE
) {
2596 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2598 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2601 // Enable the first choice.
2602 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2604 // Find the currently enabled choice and disable it.
2605 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2606 std::string choice_name
= e
->NameForChoice(i
);
2607 if (enabled_experiments
.find(choice_name
) !=
2608 enabled_experiments
.end()) {
2609 needs_restart_
= true;
2610 enabled_experiments
.erase(choice_name
);
2611 // Continue on just in case there's a bug and more than one
2612 // experiment for this choice was enabled.
2618 flags_storage
->SetFlags(enabled_experiments
);
2621 void FlagsState::RemoveFlagsSwitches(
2622 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2623 for (const auto& entry
: flags_switches_
)
2624 switch_list
->erase(entry
.first
);
2627 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2628 needs_restart_
= true;
2630 std::set
<std::string
> no_experiments
;
2631 flags_storage
->SetFlags(no_experiments
);
2634 void FlagsState::reset() {
2635 needs_restart_
= false;
2636 flags_switches_
.clear();
2643 // WARNING: '@' is also used in the html file. If you update this constant you
2644 // also need to update the html file.
2645 const char kMultiSeparator
[] = "@";
2647 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2650 FlagsState::GetInstance()->reset();
2653 void SetExperiments(const Experiment
* e
, size_t count
) {
2655 experiments
= kExperiments
;
2656 num_experiments
= arraysize(kExperiments
);
2659 num_experiments
= count
;
2663 const Experiment
* GetExperiments(size_t* count
) {
2664 *count
= num_experiments
;
2668 } // namespace testing
2670 } // namespace about_flags