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/grit/generated_resources.h"
25 #include "components/autofill/core/common/autofill_switches.h"
26 #include "components/cloud_devices/common/cloud_devices_switches.h"
27 #include "components/metrics/metrics_hashes.h"
28 #include "components/nacl/common/nacl_switches.h"
29 #include "components/omnibox/omnibox_switches.h"
30 #include "components/proximity_auth/switches.h"
31 #include "components/search/search_switches.h"
32 #include "content/public/browser/user_metrics.h"
33 #include "media/base/media_switches.h"
34 #include "ui/base/l10n/l10n_util.h"
35 #include "ui/base/ui_base_switches.h"
36 #include "ui/display/display_switches.h"
37 #include "ui/events/event_switches.h"
38 #include "ui/gfx/switches.h"
39 #include "ui/gl/gl_switches.h"
40 #include "ui/keyboard/keyboard_switches.h"
41 #include "ui/native_theme/native_theme_switches.h"
42 #include "ui/views/views_switches.h"
44 #if defined(OS_ANDROID)
45 #include "chrome/common/chrome_version_info.h"
46 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
48 #include "ui/message_center/message_center_switches.h"
52 #include "ash/ash_switches.h"
55 #if defined(OS_CHROMEOS)
56 #include "chromeos/chromeos_switches.h"
57 #include "third_party/cros_system_api/switches/chrome_switches.h"
60 #if defined(ENABLE_APP_LIST)
61 #include "ui/app_list/app_list_switches.h"
64 #if defined(ENABLE_EXTENSIONS)
65 #include "extensions/common/switches.h"
68 #if defined(USE_OZONE)
69 #include "ui/ozone/public/ozone_switches.h"
72 namespace about_flags
{
74 // Macros to simplify specifying the type.
75 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
76 Experiment::SINGLE_VALUE, \
77 command_line_switch, switch_value, NULL, NULL, NULL, 0
78 #define SINGLE_VALUE_TYPE(command_line_switch) \
79 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
80 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
81 disable_switch, disable_value) \
82 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
83 disable_switch, disable_value, NULL, 3
84 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
85 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
86 #define MULTI_VALUE_TYPE(choices) \
87 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
91 // Enumeration of OSs.
98 kOsCrOSOwnerOnly
= 1 << 5
101 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
102 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
104 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
105 // whether the experiment is available on that platform.
106 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
109 const char* const name
;
114 {kOsCrOS
, "Chrome OS"},
115 {kOsAndroid
, "Android"},
116 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
118 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
119 if (bitmask
& kBitsToOs
[i
].bit
)
120 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
124 // Convert switch constants to proper CommandLine::StringType strings.
125 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
126 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
127 cmd_line
.AppendSwitch(flag
);
128 DCHECK_EQ(2U, cmd_line
.argv().size());
129 return cmd_line
.argv()[1];
132 // Scoops flags from a command line.
133 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
134 const base::CommandLine
& cmdline
) {
135 std::set
<base::CommandLine::StringType
> flags
;
136 // First do the ones between --flag-switches-begin and --flag-switches-end.
137 base::CommandLine::StringVector::const_iterator first
=
138 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
139 GetSwitchString(switches::kFlagSwitchesBegin
));
140 base::CommandLine::StringVector::const_iterator last
=
141 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
142 GetSwitchString(switches::kFlagSwitchesEnd
));
143 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
144 flags
.insert(first
+ 1, last
);
145 #if defined(OS_CHROMEOS)
146 // Then add those between --policy-switches-begin and --policy-switches-end.
147 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
148 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
149 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
150 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
151 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
152 flags
.insert(first
+ 1, last
);
157 const Experiment::Choice kTouchEventsChoices
[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
159 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
160 switches::kTouchEvents
,
161 switches::kTouchEventsEnabled
},
162 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
163 switches::kTouchEvents
,
164 switches::kTouchEventsDisabled
}
167 #if defined(USE_AURA)
168 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
169 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
170 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
171 switches::kOverscrollHistoryNavigation
,
173 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
174 switches::kOverscrollHistoryNavigation
,
179 #if !defined(DISABLE_NACL)
180 const Experiment::Choice kNaClDebugMaskChoices
[] = {
181 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
182 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
183 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
184 // so by default we want to avoid debugging that.
185 // NOTE: As the default value must be the empty string, the mask excluding
186 // the PNaCl translator and secure shell is substituted elsewhere.
187 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
188 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
189 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
190 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
194 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
195 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
196 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
197 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
198 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
199 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
},
200 { IDS_MARK_NON_SECURE_AS_DUBIOUS
,
201 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsDubious
}
204 const Experiment::Choice kMaxTilesForInterestAreaChoices
[] = {
205 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
206 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT
,
207 cc::switches::kMaxTilesForInterestArea
, "64"},
208 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL
,
209 cc::switches::kMaxTilesForInterestArea
, "128"},
210 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE
,
211 cc::switches::kMaxTilesForInterestArea
, "256"},
212 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI
,
213 cc::switches::kMaxTilesForInterestArea
, "512"}
216 const Experiment::Choice kShowSavedCopyChoices
[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
218 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_PRIMARY
,
219 switches::kShowSavedCopy
, switches::kEnableShowSavedCopyPrimary
},
220 { IDS_FLAGS_ENABLE_SHOW_SAVED_COPY_SECONDARY
,
221 switches::kShowSavedCopy
, switches::kEnableShowSavedCopySecondary
},
222 { IDS_FLAGS_DISABLE_SHOW_SAVED_COPY
,
223 switches::kShowSavedCopy
, switches::kDisableShowSavedCopy
}
226 const Experiment::Choice kDefaultTileWidthChoices
[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
228 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
229 switches::kDefaultTileWidth
, "128"},
230 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
231 switches::kDefaultTileWidth
, "256"},
232 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
233 switches::kDefaultTileWidth
, "512"},
234 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
235 switches::kDefaultTileWidth
, "1024"}
238 const Experiment::Choice kDefaultTileHeightChoices
[] = {
239 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
240 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT
,
241 switches::kDefaultTileHeight
, "128"},
242 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL
,
243 switches::kDefaultTileHeight
, "256"},
244 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE
,
245 switches::kDefaultTileHeight
, "512"},
246 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI
,
247 switches::kDefaultTileHeight
, "1024"}
250 const Experiment::Choice kSimpleCacheBackendChoices
[] = {
251 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
252 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
253 switches::kUseSimpleCacheBackend
, "off" },
254 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
255 switches::kUseSimpleCacheBackend
, "on"}
258 #if defined(USE_AURA)
259 const Experiment::Choice kTabCaptureUpscaleQualityChoices
[] = {
260 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
261 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
262 switches::kTabCaptureUpscaleQuality
, "fast" },
263 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
264 switches::kTabCaptureUpscaleQuality
, "good" },
265 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
266 switches::kTabCaptureUpscaleQuality
, "best" },
269 const Experiment::Choice kTabCaptureDownscaleQualityChoices
[] = {
270 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
271 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
272 switches::kTabCaptureDownscaleQuality
, "fast" },
273 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
274 switches::kTabCaptureDownscaleQuality
, "good" },
275 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
276 switches::kTabCaptureDownscaleQuality
, "best" },
280 #if defined(OS_ANDROID)
281 const Experiment::Choice kZeroSuggestExperimentsChoices
[] = {
282 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
283 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED
,
284 switches::kEnableZeroSuggestMostVisited
, ""},
285 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP
,
286 switches::kEnableZeroSuggestMostVisitedWithoutSerp
, ""},
287 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
288 switches::kDisableZeroSuggest
, ""}
292 const Experiment::Choice kNumRasterThreadsChoices
[] = {
293 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
294 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
295 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
296 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
297 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
300 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
301 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
302 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
303 switches::kEnableGpuRasterization
, "" },
304 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
305 switches::kDisableGpuRasterization
, "" },
306 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
307 switches::kForceGpuRasterization
, "" },
310 #if defined(OS_CHROMEOS)
311 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
312 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
313 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
314 chromeos::switches::kMemoryPressureThresholds
,
315 chromeos::switches::kConservativeThreshold
},
316 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
317 chromeos::switches::kMemoryPressureThresholds
,
318 chromeos::switches::kAggressiveCacheDiscardThreshold
},
319 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
320 chromeos::switches::kMemoryPressureThresholds
,
321 chromeos::switches::kAggressiveTabDiscardThreshold
},
322 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
323 chromeos::switches::kMemoryPressureThresholds
,
324 chromeos::switches::kAggressiveThreshold
},
328 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
329 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
330 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
331 switches::kExtensionContentVerification
,
332 switches::kExtensionContentVerificationBootstrap
},
333 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
334 switches::kExtensionContentVerification
,
335 switches::kExtensionContentVerificationEnforce
},
336 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
337 switches::kExtensionContentVerification
,
338 switches::kExtensionContentVerificationEnforceStrict
},
341 // Note that the value is specified in seconds (where 0 is equivalent to
343 const Experiment::Choice kRememberCertificateErrorDecisionsChoices
[] = {
344 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
345 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
346 switches::kRememberCertErrorDecisions
,
348 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY
,
349 switches::kRememberCertErrorDecisions
,
351 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS
,
352 switches::kRememberCertErrorDecisions
,
354 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK
,
355 switches::kRememberCertErrorDecisions
,
357 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH
,
358 switches::kRememberCertErrorDecisions
,
360 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS
,
361 switches::kRememberCertErrorDecisions
,
365 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
366 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
367 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
368 password_manager::switches::kAllowAutofillSyncCredential
, ""},
369 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
370 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
371 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
372 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
375 const Experiment::Choice kSSLVersionMinChoices
[] = {
376 { IDS_FLAGS_SSL_VERSION_DEFAULT
, "", "" },
377 { IDS_FLAGS_SSL_VERSION_SSLV3
, switches::kSSLVersionMin
,
378 switches::kSSLVersionSSLv3
},
379 { IDS_FLAGS_SSL_VERSION_TLSV1
, switches::kSSLVersionMin
,
380 switches::kSSLVersionTLSv1
},
381 { IDS_FLAGS_SSL_VERSION_TLSV11
, switches::kSSLVersionMin
,
382 switches::kSSLVersionTLSv11
},
383 { IDS_FLAGS_SSL_VERSION_TLSV12
, switches::kSSLVersionMin
,
384 switches::kSSLVersionTLSv12
},
387 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
388 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
389 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
390 autofill::switches::kDisableFillOnAccountSelect
, "" },
391 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
392 autofill::switches::kEnableFillOnAccountSelect
, "" },
393 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
394 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
398 const Experiment::Choice kAshScreenRotationAnimationChoices
[] = {
399 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
, "", "" },
400 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION
,
401 ash::switches::kAshEnableScreenRotationAnimation
, "partial-rotation" },
402 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION_SLOW
,
403 ash::switches::kAshEnableScreenRotationAnimation
, "partial-rotation-slow" },
404 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION
,
405 ash::switches::kAshEnableScreenRotationAnimation
, "full-rotation" },
406 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION_SLOW
,
407 ash::switches::kAshEnableScreenRotationAnimation
, "full-rotation-slow" }
411 // RECORDING USER METRICS FOR FLAGS:
412 // -----------------------------------------------------------------------------
413 // The first line of the experiment is the internal name. If you'd like to
414 // gather statistics about the usage of your flag, you should append a marker
415 // comment to the end of the feature name, like so:
416 // "my-special-feature", // FLAGS:RECORD_UMA
418 // After doing that, run
419 // tools/metrics/actions/extract_actions.py
420 // to add the metric to actions.xml (which will enable UMA to record your
421 // feature flag), then update the <owner>s and <description> sections. Make sure
422 // to include the actions.xml file when you upload your code for review!
424 // After your feature has shipped under a flag, you can locate the metrics under
425 // the action name AboutFlags_internal-action-name. Actions are recorded once
426 // per startup, so you should divide this number by AboutFlags_StartupTick to
427 // get a sense of usage. Note that this will not be the same as number of users
428 // with a given feature enabled because users can quit and relaunch the
429 // application multiple times over a given time interval. The dashboard also
430 // shows you how many (metrics reporting) users have enabled the flag over the
431 // last seven days. However, note that this is not the same as the number of
432 // users who have the flag enabled, since enabling the flag happens once,
433 // whereas running with the flag enabled happens until the user flips the flag
436 // To add a new experiment add to the end of kExperiments. There are two
437 // distinct types of experiments:
438 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
439 // macro for this type supplying the command line to the macro.
440 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
441 // deactivated state for this lab (i.e. no command line option). To specify
442 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
444 // See the documentation of Experiment for details on the fields.
446 // Command-line switches must have entries in enum "LoginCustomFlags" in
447 // histograms.xml. See note in histograms.xml and don't forget to run
448 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
450 // When adding a new choice, add it to the end of the list.
451 const Experiment kExperiments
[] = {
453 "ignore-gpu-blacklist",
454 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
455 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
457 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)
461 "disable-direct-write",
462 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
463 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
465 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)
468 "enable-win32k-renderer-lockdown",
469 IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_NAME
,
470 IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_DESCRIPTION
,
472 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableWin32kRendererLockDown
,
473 switches::kDisableWin32kRendererLockDown
)
477 "enable-experimental-canvas-features",
478 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
479 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
481 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)
484 "disable-accelerated-2d-canvas",
485 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
486 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
488 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)
491 "enable-display-list-2d-canvas",
492 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
493 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
495 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
496 switches::kDisableDisplayList2dCanvas
)
499 "composited-layer-borders",
500 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
501 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
503 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)
507 IDS_FLAGS_SHOW_FPS_COUNTER
,
508 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
510 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)
514 IDS_FLAGS_DISABLE_WEBGL_NAME
,
515 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
517 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)
519 #if defined(OS_WIN) || defined(OS_MACOSX)
522 IDS_FLAGS_ENABLE_NPAPI_NAME
,
523 IDS_FLAGS_ENABLE_NPAPI_DESCRIPTION
,
525 SINGLE_VALUE_TYPE(switches::kEnableNpapi
)
530 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
531 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
533 #if defined(OS_ANDROID)
534 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
536 SINGLE_VALUE_TYPE("")
539 #if defined(ENABLE_WEBRTC)
541 "disable-webrtc-hw-decoding",
542 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
543 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
544 kOsAndroid
| kOsCrOS
,
545 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)
548 "disable-webrtc-hw-encoding",
549 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
550 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
551 kOsAndroid
| kOsCrOS
,
552 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)
555 "enable-webrtc-stun-origin",
556 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
557 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
559 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)
562 #if defined(OS_ANDROID)
565 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
566 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
568 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)
571 // Native client is compiled out when DISABLE_NACL is defined.
572 #if !defined(DISABLE_NACL)
574 "enable-nacl", // FLAGS:RECORD_UMA
575 IDS_FLAGS_ENABLE_NACL_NAME
,
576 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
578 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)
581 "enable-nacl-debug", // FLAGS:RECORD_UMA
582 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
583 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
585 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)
588 "nacl-debug-mask", // FLAGS:RECORD_UMA
589 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
590 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
592 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)
595 #if defined(ENABLE_EXTENSIONS)
597 "extension-apis", // FLAGS:RECORD_UMA
598 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
599 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
601 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)
604 "extensions-on-chrome-urls",
605 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
606 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
608 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)
612 "enable-fast-unload",
613 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
614 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
616 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)
618 #if defined(ENABLE_EXTENSIONS)
620 "enable-app-window-controls",
621 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
622 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
624 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)
628 "disable-hyperlink-auditing",
629 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
630 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
632 SINGLE_VALUE_TYPE(switches::kNoPings
)
634 #if defined(OS_ANDROID)
637 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
638 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
640 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
641 switches::kDisableContextualSearch
)
645 "show-autofill-type-predictions",
646 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
647 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
649 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)
652 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
653 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
654 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
655 // Can't expose the switch unless the code is compiled in.
656 // On by default for the Mac (different implementation in WebKit).
658 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)
660 #if defined(USE_AURA) || defined(OS_LINUX)
662 "overlay-scrollbars",
663 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
664 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
665 // Uses the system preference on Mac (a different implementation).
666 // On Android, this is always enabled.
667 kOsLinux
| kOsCrOS
| kOsWin
,
668 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
669 switches::kDisableOverlayScrollbar
)
674 IDS_FLAGS_ENABLE_PANELS_NAME
,
675 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
677 SINGLE_VALUE_TYPE(switches::kEnablePanels
)
680 // See http://crbug.com/120416 for how to remove this flag.
681 "save-page-as-mhtml", // FLAGS:RECORD_UMA
682 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
683 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
684 kOsMac
| kOsWin
| kOsLinux
,
685 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)
689 IDS_FLAGS_ENABLE_QUIC_NAME
,
690 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
692 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
,
693 switches::kDisableQuic
)
697 IDS_FLAGS_ENABLE_SPDY4_NAME
,
698 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION
,
700 SINGLE_VALUE_TYPE(switches::kEnableSpdy4
)
703 "disable-media-source",
704 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
705 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
707 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)
710 "disable-encrypted-media",
711 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
712 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
714 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)
717 "disable-prefixed-encrypted-media",
718 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
719 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
721 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)
723 #if defined(OS_ANDROID)
725 "disable-infobar-for-protected-media-identifier",
726 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME
,
727 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION
,
729 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier
)
732 "mediadrm-enable-non-compositing",
733 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME
,
734 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION
,
736 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing
)
738 #endif // defined(OS_ANDROID)
740 "disable-javascript-harmony-shipping",
741 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
742 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
744 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)
747 "enable-javascript-harmony",
748 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
749 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
751 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)
754 "disable-software-rasterizer",
755 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
756 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
757 #if defined(ENABLE_SWIFTSHADER)
762 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)
765 "enable-gpu-rasterization",
766 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
767 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
769 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)
772 "enable-threaded-gpu-rasterization",
773 IDS_FLAGS_ENABLE_THREADED_GPU_RASTERIZATION_NAME
,
774 IDS_FLAGS_ENABLE_THREADED_GPU_RASTERIZATION_DESCRIPTION
,
776 ENABLE_DISABLE_VALUE_TYPE(
777 switches::kEnableThreadedGpuRasterization
,
778 switches::kDisableThreadedGpuRasterization
)
781 "enable-experimental-web-platform-features",
782 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
783 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
785 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)
788 "disable-ntp-other-sessions-menu",
789 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME
,
790 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION
,
792 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu
)
795 "enable-devtools-experiments",
796 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
797 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
799 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)
802 "silent-debugger-extension-api",
803 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
804 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
806 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)
808 #if defined(ENABLE_SPELLCHECK)
810 "spellcheck-autocorrect",
811 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
812 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
813 kOsWin
| kOsLinux
| kOsCrOS
,
814 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)
818 "enable-scroll-prediction",
819 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
820 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
822 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)
826 IDS_TOUCH_EVENTS_NAME
,
827 IDS_TOUCH_EVENTS_DESCRIPTION
,
829 MULTI_VALUE_TYPE(kTouchEventsChoices
)
832 "disable-touch-adjustment",
833 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
834 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
835 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
836 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)
838 #if defined(OS_CHROMEOS)
840 "network-portal-notification",
841 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
842 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
844 ENABLE_DISABLE_VALUE_TYPE(
845 chromeos::switches::kEnableNetworkPortalNotification
,
846 chromeos::switches::kDisableNetworkPortalNotification
)
850 "enable-download-resumption",
851 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
852 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
854 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)
857 "enable-download-notification",
858 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
859 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
861 SINGLE_VALUE_TYPE(switches::kEnableDownloadNotification
)
863 #if defined(ENABLE_PLUGINS)
865 "allow-nacl-socket-api",
866 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
867 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
869 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")
872 #if defined(OS_CHROMEOS)
874 "allow-touchpad-three-finger-click",
875 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
876 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
878 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)
881 "disable-easy-unlock",
882 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
883 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
885 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)
888 "enable-easy-unlock-proximity-detection",
889 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
890 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
892 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)
897 "disable-minimize-on-second-launcher-item-click",
898 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
899 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
901 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)
905 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
906 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
908 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)
912 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
913 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
914 kOsLinux
| kOsWin
| kOsCrOS
,
915 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
917 #endif // defined(USE_ASH)
919 "enable-pinch-virtual-viewport",
920 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME
,
921 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION
,
922 kOsLinux
| kOsWin
| kOsCrOS
| kOsAndroid
,
923 ENABLE_DISABLE_VALUE_TYPE(
924 cc::switches::kEnablePinchVirtualViewport
,
925 cc::switches::kDisablePinchVirtualViewport
),
928 "enable-viewport-meta",
929 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
930 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
931 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
932 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
934 #if defined(OS_CHROMEOS)
936 "disable-boot-animation",
937 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
938 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
940 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
943 "enable-video-player-chromecast-support",
944 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
945 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
947 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport
)
950 "disable-office-editing-component-app",
951 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
952 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
954 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
957 "disable-display-color-calibration",
958 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
959 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
961 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
964 "ash-disable-screen-orientation-lock",
965 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
966 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
968 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
970 #endif // defined(OS_CHROMEOS)
971 { "disable-accelerated-video-decode",
972 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
973 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
974 kOsMac
| kOsWin
| kOsCrOS
,
975 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
979 "ash-debug-shortcuts",
980 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
981 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
983 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
985 { "ash-enable-touch-view-testing",
986 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
987 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
989 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
992 "disable-touch-feedback",
993 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
994 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
996 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
998 { "ash-enable-mirrored-screen",
999 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1000 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1002 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1005 "ash-enable-screen-rotation-animations",
1006 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME
,
1007 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION
,
1009 MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices
)
1011 #endif // defined(USE_ASH)
1012 #if defined(OS_CHROMEOS)
1014 "enable-carrier-switching",
1015 IDS_FLAGS_ENABLE_CARRIER_SWITCHING
,
1016 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION
,
1018 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching
)
1021 "disable-cloud-import",
1022 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1023 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1025 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)
1028 "enable-request-tablet-site",
1029 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1030 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1032 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)
1036 "debug-packed-apps",
1037 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1038 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1040 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)
1043 "enable-password-generation",
1044 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1045 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1046 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1047 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1048 autofill::switches::kDisablePasswordGeneration
)
1051 "enable-automatic-password-saving",
1052 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1053 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1056 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
)
1066 "enable-password-link",
1067 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1068 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1069 kOsAndroid
| kOsDesktop
,
1070 ENABLE_DISABLE_VALUE_TYPE(
1071 password_manager::switches::kEnablePasswordLink
,
1072 password_manager::switches::kDisablePasswordLink
)
1075 "enable-password-save-in-page-navigation",
1076 IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_NAME
,
1077 IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_DESCRIPTION
,
1080 autofill::switches::kEnablePasswordSaveOnInPageNavigation
)
1083 "enable-affiliation-based-matching",
1084 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1085 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1086 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1087 ENABLE_DISABLE_VALUE_TYPE(
1088 password_manager::switches::kEnableAffiliationBasedMatching
,
1089 password_manager::switches::kDisableAffiliationBasedMatching
)
1092 "enable-deferred-image-decoding",
1093 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME
,
1094 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION
,
1095 kOsMac
| kOsLinux
| kOsCrOS
,
1096 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding
)
1099 "wallet-service-use-sandbox",
1100 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1101 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1102 kOsAndroid
| kOsDesktop
,
1103 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1104 autofill::switches::kWalletServiceUseSandbox
, "1",
1105 autofill::switches::kWalletServiceUseSandbox
, "0")
1107 #if defined(USE_AURA)
1109 "overscroll-history-navigation",
1110 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1111 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1113 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)
1117 "scroll-end-effect",
1118 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1119 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1121 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1122 switches::kScrollEndEffect
, "1",
1123 switches::kScrollEndEffect
, "0")
1126 "enable-touch-drag-drop",
1127 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1128 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1130 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1131 switches::kDisableTouchDragDrop
)
1134 "enable-touch-editing",
1135 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1136 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1137 kOsCrOS
| kOsWin
| kOsLinux
,
1138 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1139 switches::kDisableTouchEditing
)
1142 "enable-stale-while-revalidate",
1143 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1144 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1146 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)
1149 "enable-suggestions-service",
1150 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1151 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1152 kOsAndroid
| kOsCrOS
,
1153 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1154 switches::kDisableSuggestionsService
)
1157 "enable-supervised-user-blacklist",
1158 IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME
,
1159 IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION
,
1160 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1161 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSupervisedUserBlacklist
,
1162 switches::kDisableSupervisedUserBlacklist
)
1165 "enable-supervised-user-managed-bookmarks-folder",
1166 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1167 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1168 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1169 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)
1172 "enable-supervised-user-safesites",
1173 IDS_FLAGS_ENABLE_SUPERVISED_USER_SAFESITES_NAME
,
1174 IDS_FLAGS_ENABLE_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1175 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1176 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSupervisedUserSafeSites
,
1177 switches::kDisableSupervisedUserSafeSites
)
1179 #if defined(ENABLE_APP_LIST)
1181 "enable-sync-app-list",
1182 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1183 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1185 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1186 app_list::switches::kDisableSyncAppList
)
1189 #if defined(OS_MACOSX)
1191 "enable-avfoundation",
1192 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1193 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1195 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1196 switches::kForceQTKit
)
1201 IDS_FLAGS_LCD_TEXT_NAME
,
1202 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1204 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1205 switches::kDisableLCDText
)
1207 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1209 "delegated-renderer",
1210 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1211 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1212 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1213 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1214 switches::kDisableDelegatedRenderer
)
1218 "max-tiles-for-interest-area",
1219 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME
,
1220 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION
,
1222 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices
)
1225 "enable-offline-auto-reload",
1226 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1227 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1229 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1230 switches::kDisableOfflineAutoReload
)
1233 "enable-offline-auto-reload-visible-only",
1234 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1235 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1237 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1238 switches::kDisableOfflineAutoReloadVisibleOnly
)
1242 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1243 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1245 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)
1248 "default-tile-width",
1249 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1250 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1252 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)
1255 "default-tile-height",
1256 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1257 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1259 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)
1261 #if defined(OS_ANDROID)
1263 "disable-gesture-requirement-for-media-playback",
1264 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1265 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1267 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)
1270 #if defined(OS_CHROMEOS)
1272 "enable-virtual-keyboard",
1273 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1274 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1276 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)
1279 "enable-virtual-keyboard-overscroll",
1280 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1281 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1283 ENABLE_DISABLE_VALUE_TYPE(
1284 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1285 keyboard::switches::kDisableVirtualKeyboardOverscroll
)
1288 "enable-swipe-selection",
1289 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME
,
1290 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION
,
1292 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection
)
1295 "enable-input-view",
1296 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1297 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1299 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1300 keyboard::switches::kDisableInputView
)
1303 "enable-new-korean-ime",
1304 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_NAME
,
1305 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_DESCRIPTION
,
1307 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewKoreanIme
)
1310 "disable-new-md-input-view",
1311 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_NAME
,
1312 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_DESCRIPTION
,
1314 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewMDInputView
)
1317 "enable-physical-keyboard-autocorrect",
1318 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1319 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1321 ENABLE_DISABLE_VALUE_TYPE(
1322 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1323 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)
1326 "disable-voice-input",
1327 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1328 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1330 SINGLE_VALUE_TYPE(chromeos::switches::kDisableVoiceInput
)
1333 "enable-experimental-input-view-features",
1334 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1335 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1337 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures
)
1340 "enable-gesture-typing",
1341 IDS_FLAGS_ENABLE_GESTURE_TYPING_NAME
,
1342 IDS_FLAGS_ENABLE_GESTURE_TYPING_DESCRIPTION
,
1344 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureTyping
)
1347 "enable-gesture-deletion",
1348 IDS_FLAGS_ENABLE_GESTURE_DELETION_NAME
,
1349 IDS_FLAGS_ENABLE_GESTURE_DELETION_DESCRIPTION
,
1351 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureDeletion
)
1354 "enable-gesture-selection",
1355 IDS_FLAGS_ENABLE_GESTURE_SELECTION_NAME
,
1356 IDS_FLAGS_ENABLE_GESTURE_SELECTION_DESCRIPTION
,
1358 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureSelection
)
1361 "disable-smart-virtual-keyboard",
1362 IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_NAME
,
1363 IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1365 SINGLE_VALUE_TYPE(keyboard::switches::kDisableSmartVirtualKeyboard
)
1369 "enable-simple-cache-backend",
1370 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1371 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1372 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1373 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)
1376 "enable-tcp-fast-open",
1377 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1378 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1379 kOsLinux
| kOsCrOS
| kOsAndroid
,
1380 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)
1382 #if defined(ENABLE_SERVICE_DISCOVERY)
1384 "device-discovery-notifications",
1385 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1386 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1388 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1389 switches::kDisableDeviceDiscoveryNotifications
)
1392 "enable-print-preview-register-promos",
1393 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1394 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1396 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)
1398 #endif // ENABLE_SERVICE_DISCOVERY
1401 "enable-cloud-print-xps",
1402 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1403 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1405 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)
1408 #if defined(USE_AURA)
1410 "tab-capture-upscale-quality",
1411 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1412 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1414 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)
1417 "tab-capture-downscale-quality",
1418 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1419 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1421 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)
1424 #if defined(TOOLKIT_VIEWS)
1426 "disable-hide-inactive-stacked-tab-close-buttons",
1427 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1428 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1429 kOsCrOS
| kOsWin
| kOsLinux
,
1430 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)
1433 #if defined(ENABLE_SPELLCHECK)
1435 "enable-spelling-feedback-field-trial",
1436 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1437 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1439 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)
1443 "enable-webgl-draft-extensions",
1444 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1445 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1447 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)
1450 "enable-new-profile-management",
1451 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1452 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1453 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1454 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1455 switches::kDisableNewProfileManagement
)
1458 "enable-account-consistency",
1459 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1460 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1461 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1462 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1463 switches::kDisableAccountConsistency
)
1466 "enable-fast-user-switching",
1467 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME
,
1468 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION
,
1469 kOsMac
| kOsWin
| kOsLinux
,
1470 SINGLE_VALUE_TYPE(switches::kFastUserSwitching
)
1473 "enable-new-avatar-menu",
1474 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME
,
1475 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION
,
1476 kOsMac
| kOsWin
| kOsLinux
,
1477 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu
,
1478 switches::kDisableNewAvatarMenu
)
1481 "enable-iframe-based-signin",
1482 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1483 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1484 kOsMac
| kOsWin
| kOsLinux
,
1485 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)
1488 "enable-google-profile-info",
1489 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1490 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1491 kOsMac
| kOsWin
| kOsLinux
,
1492 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)
1495 "reset-app-list-install-state",
1496 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1497 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1498 kOsMac
| kOsWin
| kOsLinux
,
1499 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState
)
1501 #if defined(ENABLE_APP_LIST)
1502 #if defined(OS_LINUX)
1504 // This is compiled out on non-Linux platforms because otherwise it would be
1505 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1506 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1508 IDS_FLAGS_ENABLE_APP_LIST_NAME
,
1509 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION
,
1511 SINGLE_VALUE_TYPE(switches::kEnableAppList
)
1514 #if defined(ENABLE_EXTENSIONS)
1516 "enable-surface-worker",
1517 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1518 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1520 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)
1524 "disable-drive-apps-in-app-list",
1525 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1526 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1528 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)
1531 #if defined(OS_ANDROID)
1533 "enable-accessibility-tab-switcher",
1534 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1535 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1537 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)
1540 // TODO(dmazzoni): remove this flag when native android accessibility
1541 // ships in the stable channel. http://crbug.com/356775
1542 "enable-accessibility-script-injection",
1543 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1544 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1546 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1547 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
1552 IDS_FLAGS_ONE_COPY_NAME
,
1553 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1555 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy
,
1556 switches::kDisableOneCopy
)
1560 IDS_FLAGS_ZERO_COPY_NAME
,
1561 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1563 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)
1565 #if defined(OS_CHROMEOS)
1567 "enable-first-run-ui-transitions",
1568 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1569 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1571 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)
1575 "disable-new-bookmark-apps",
1576 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1577 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1578 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1579 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1580 switches::kDisableNewBookmarkApps
)
1582 #if defined(OS_MACOSX)
1584 "disable-hosted-app-shim-creation",
1585 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1586 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1588 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)
1591 "enable-hosted-app-quit-notification",
1592 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1593 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1595 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)
1599 "enable-ephemeral-apps-in-webstore",
1600 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1601 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1603 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)
1606 "enable-linkable-ephemeral-apps",
1607 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1608 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1610 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)
1613 "enable-service-worker-sync",
1614 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME
,
1615 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION
,
1617 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync
)
1619 #if defined(OS_ANDROID)
1621 "disable-click-delay",
1622 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1623 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1625 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1626 SINGLE_VALUE_TYPE("disable-click-delay")
1629 "disable-pull-to-refresh-effect",
1630 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1631 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1633 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)
1636 #if defined(OS_MACOSX)
1638 "enable-translate-new-ux",
1639 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1640 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1642 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)
1645 #if defined(TOOLKIT_VIEWS)
1647 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1648 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1649 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1650 kOsCrOS
| kOsWin
| kOsLinux
,
1651 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)
1654 "enable-link-disambiguation-popup",
1655 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1656 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1658 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)
1661 #if defined(ENABLE_EXTENSIONS)
1663 "enable-apps-show-on-first-paint",
1664 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1665 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1667 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)
1671 "enhanced-bookmarks-experiment",
1672 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1673 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1674 kOsDesktop
| kOsAndroid
,
1675 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1676 switches::kEnhancedBookmarksExperiment
, "1",
1677 switches::kEnhancedBookmarksExperiment
, "0")
1679 #if defined(OS_ANDROID)
1681 "enable-zero-suggest-experiment",
1682 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1683 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1685 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)
1688 "enable-reader-mode-toolbar-icon",
1689 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1690 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1692 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)
1696 "num-raster-threads",
1697 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1698 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1700 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)
1703 "ignore-autocomplete-off-autofill",
1704 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_NAME
,
1705 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_DESCRIPTION
,
1706 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1707 ENABLE_DISABLE_VALUE_TYPE(
1708 autofill::switches::kIgnoreAutocompleteOffForAutofill
,
1709 autofill::switches::kRespectAutocompleteOffForAutofill
)
1712 "enable-single-click-autofill",
1713 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1714 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1715 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1716 ENABLE_DISABLE_VALUE_TYPE(
1717 autofill::switches::kEnableSingleClickAutofill
,
1718 autofill::switches::kDisableSingleClickAutofill
)
1721 "enable-permissions-bubbles",
1722 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME
,
1723 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION
,
1724 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1725 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles
,
1726 switches::kDisablePermissionsBubbles
)
1729 "enable-session-crashed-bubble",
1730 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1731 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1733 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1734 switches::kDisableSessionCrashedBubble
)
1737 "enable-out-of-process-pdf",
1738 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME
,
1739 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION
,
1741 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOutOfProcessPdf
,
1742 switches::kDisableOutOfProcessPdf
)
1745 "enable-pdf-material-ui",
1746 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1747 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1749 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1750 switches::kDisablePdfMaterialUI
)
1753 "disable-cast-streaming-hw-encoding",
1754 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1755 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1757 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)
1759 #if defined(OS_ANDROID)
1762 IDS_FLAGS_DISABLE_CAST_NAME
,
1763 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1765 SINGLE_VALUE_TYPE(switches::kDisableCast
)
1768 "prefetch-search-results",
1769 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1770 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1772 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)
1775 #if defined(ENABLE_APP_LIST)
1777 "enable-experimental-app-list",
1778 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1779 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1780 kOsWin
| kOsLinux
| kOsCrOS
,
1781 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList
,
1782 app_list::switches::kDisableExperimentalAppList
)
1785 "enable-centered-app-list",
1786 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1787 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1788 kOsWin
| kOsLinux
| kOsCrOS
,
1789 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)
1793 "disable-threaded-scrolling",
1794 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1795 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1796 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
1797 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)
1800 "bleeding-edge-renderer-mode",
1801 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1802 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1804 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)
1807 "enable-settings-window",
1808 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1809 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1811 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1812 switches::kDisableSettingsWindow
)
1814 #if defined(OS_ANDROID)
1816 "enable-instant-search-clicks",
1817 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME
,
1818 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION
,
1820 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks
)
1824 "enable-save-password-bubble",
1825 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1826 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1827 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1828 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1829 switches::kDisableSavePasswordBubble
)
1831 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1832 // crbug.com/366483 for the target milestone.
1834 "allow-insecure-websocket-from-https-origin",
1835 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME
,
1836 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION
,
1838 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin
)
1841 "enable-apps-file-associations",
1842 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1843 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1845 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)
1847 #if defined(OS_ANDROID)
1849 "enable-embeddedsearch-api",
1850 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1851 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1853 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)
1856 "enable-app-install-alerts",
1857 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME
,
1858 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION
,
1860 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts
)
1864 "distance-field-text",
1865 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1866 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1868 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1869 switches::kDisableDistanceFieldText
)
1872 "extension-content-verification",
1873 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1874 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1876 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)
1878 #if defined(USE_AURA)
1880 "text-input-focus-manager",
1881 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME
,
1882 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION
,
1883 kOsCrOS
| kOsLinux
| kOsWin
,
1884 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager
,
1885 switches::kDisableTextInputFocusManager
)
1888 #if defined(ENABLE_EXTENSIONS)
1890 "extension-active-script-permission",
1891 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1892 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1894 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)
1898 "answers-in-suggest",
1899 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME
,
1900 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION
,
1901 kOsAndroid
| kOsWin
| kOsLinux
| kOsCrOS
,
1902 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest
,
1903 switches::kDisableAnswersInSuggest
)
1905 #if defined(OS_ANDROID)
1907 "enable-data-reduction-proxy-dev",
1908 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1909 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1911 ENABLE_DISABLE_VALUE_TYPE(
1912 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1913 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)
1916 "enable-data-reduction-proxy-alt",
1917 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME
,
1918 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION
,
1921 data_reduction_proxy::switches::kEnableDataReductionProxyAlt
)
1925 "enable-hotword-hardware",
1926 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1927 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1929 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)
1931 #if defined(ENABLE_EXTENSIONS)
1933 "enable-embedded-extension-options",
1934 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1935 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1937 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)
1940 #if defined(USE_ASH)
1942 "enable-web-app-frame",
1943 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1944 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1946 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)
1950 "enable-website-settings-manager",
1951 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME
,
1952 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION
,
1954 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager
)
1957 "remember-cert-error-decisions",
1958 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME
,
1959 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION
,
1961 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices
)
1964 "enable-drop-sync-credential",
1965 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1966 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1968 ENABLE_DISABLE_VALUE_TYPE(
1969 password_manager::switches::kEnableDropSyncCredential
,
1970 password_manager::switches::kDisableDropSyncCredential
)
1972 #if defined(ENABLE_EXTENSIONS)
1974 "enable-extension-action-redesign",
1975 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1976 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1978 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)
1982 "autofill-sync-credential",
1983 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1984 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1986 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)
1988 #if !defined(OS_ANDROID)
1990 "enable-message-center-always-scroll-up-upon-notification-removal",
1991 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1992 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1995 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)
1998 "enable-md-settings",
1999 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
2000 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
2003 switches::kEnableMaterialDesignSettings
)
2006 #if defined(OS_CHROMEOS)
2008 "disable-memory-pressure-chromeos",
2009 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME
,
2010 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION
,
2012 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS
)
2015 "memory-pressure-thresholds",
2016 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
2017 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
2019 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)
2023 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
2024 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
2026 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)
2028 #endif // OS_CHROMEOS
2030 "enable-tab-audio-muting",
2031 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
2032 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
2034 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)
2037 "enable-credential-manager-api",
2038 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
2039 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
2041 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)
2044 "reduced-referrer-granularity",
2045 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
2046 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
2048 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)
2050 #if defined(ENABLE_PLUGINS)
2052 "enable-plugin-power-saver",
2053 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
2054 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
2056 SINGLE_VALUE_TYPE(switches::kEnablePluginPowerSaver
)
2059 #if defined(OS_CHROMEOS)
2061 "disable-new-zip-unpacker",
2062 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
2063 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
2065 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)
2067 #endif // defined(OS_CHROMEOS)
2070 IDS_FLAGS_SSL_VERSION_MIN_NAME
,
2071 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION
,
2073 MULTI_VALUE_TYPE(kSSLVersionMinChoices
)
2076 "enable-credit-card-scan",
2077 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
2078 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
2080 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
2081 autofill::switches::kDisableCreditCardScan
)
2083 #if defined(OS_CHROMEOS)
2085 "enable-captive-portal-bypass-proxy",
2086 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
2087 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
2089 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCaptivePortalBypassProxyOption
)
2092 "disable-roboto-font-ui",
2093 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_NAME
,
2094 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_DESCRIPTION
,
2096 SINGLE_VALUE_TYPE(switches::kDisableRobotoFontUI
)
2098 #endif // defined(OS_CHROMEOS)
2099 #if defined(OS_ANDROID)
2101 "enable-seccomp-filter-sandbox",
2102 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
2103 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
2105 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)
2109 "enable-touch-hover",
2110 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
2111 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
2113 SINGLE_VALUE_TYPE("enable-touch-hover")
2116 "enable-fill-on-account-select",
2117 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
2118 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
2120 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)
2122 #if defined(OS_CHROMEOS)
2124 "enable-wifi-credential-sync", // FLAGS:RECORD_UMA
2125 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
2126 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
2128 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)
2131 "enable-potentially-annoying-security-features",
2132 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
2133 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
2135 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)
2139 "enable-delay-agnostic-aec",
2140 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
2141 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
2143 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)
2146 "mark-non-secure-as", // FLAGS:RECORD_UMA
2147 IDS_MARK_NON_SECURE_AS_NAME
,
2148 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
2150 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)
2153 "enable-site-per-process",
2154 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
2155 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
2157 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)
2159 #if defined(OS_MACOSX)
2161 "enable-harfbuzz-rendertext",
2162 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
2163 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
2165 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)
2167 #endif // defined(OS_MACOSX)
2168 #if defined(OS_CHROMEOS)
2170 "disable-timezone-tracking",
2171 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
2172 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
2174 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)
2177 "disable-webview-signin-flow",
2178 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME
,
2179 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION
,
2181 SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow
)
2183 #endif // defined(OS_CHROMEOS)
2185 "enable-data-reduction-proxy-lo-fi",
2186 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_NAME
,
2187 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
2189 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2190 kEnableDataReductionProxyLoFi
)
2193 "clear-data-reduction-proxy-data-savings",
2194 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
2195 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
2197 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2198 kClearDataReductionProxyDataSavings
)
2200 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2202 "enable-data-reduction-proxy-bypass-warnings",
2203 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
2204 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
2206 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2207 kEnableDataReductionProxyBypassWarning
)
2211 "allow-insecure-localhost",
2212 IDS_ALLOW_INSECURE_LOCALHOST
,
2213 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
2215 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)
2218 "bypass-app-banner-engagement-checks",
2219 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
2220 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
2222 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)
2226 IDS_FLAGS_SYNC_SANDBOX_NAME
,
2227 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
2229 SINGLE_VALUE_TYPE_AND_VALUE(
2230 switches::kSyncServiceURL
,
2231 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")
2234 "enable-child-account-detection",
2235 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
2236 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
2237 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
2238 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
2239 switches::kDisableChildAccountDetection
)
2241 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
2243 "ozone-test-single-overlay-support",
2244 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
2245 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
2247 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)
2249 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
2251 "v8-pac-mojo-out-of-process",
2252 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
2253 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
2255 SINGLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
),
2257 #if defined(OS_CHROMEOS)
2259 "enable-firewall-hole-punching",
2260 IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_NAME
,
2261 IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_DESCRIPTION
,
2263 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirewallHolePunching
)
2265 #endif // defined(OS_CHROMEOS)
2267 "enable-media-router",
2268 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
2269 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
2271 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)
2274 "enable-cert-collection",
2275 IDS_ENABLE_INVALID_CERT_COLLECTION
,
2276 IDS_ENABLE_INVALID_CERT_COLLECTION_DESCRIPTION
,
2278 SINGLE_VALUE_TYPE(switches::kEnableInvalidCertCollection
)
2281 // NOTE: Adding new command-line switches requires adding corresponding
2282 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2283 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2286 const Experiment
* experiments
= kExperiments
;
2287 size_t num_experiments
= arraysize(kExperiments
);
2289 // Stores and encapsulates the little state that about:flags has.
2292 FlagsState() : needs_restart_(false) {}
2293 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2294 base::CommandLine
* command_line
,
2295 SentinelsMode sentinels
);
2296 bool IsRestartNeededToCommitChanges();
2297 void SetExperimentEnabled(
2298 FlagsStorage
* flags_storage
,
2299 const std::string
& internal_name
,
2301 void RemoveFlagsSwitches(
2302 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2303 void ResetAllFlags(FlagsStorage
* flags_storage
);
2306 // Returns the singleton instance of this class
2307 static FlagsState
* GetInstance() {
2308 return Singleton
<FlagsState
>::get();
2312 bool needs_restart_
;
2313 std::map
<std::string
, std::string
> flags_switches_
;
2315 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2318 // Adds the internal names for the specified experiment to |names|.
2319 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2320 if (e
.type
== Experiment::SINGLE_VALUE
) {
2321 names
->insert(e
.internal_name
);
2323 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2324 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2325 for (int i
= 0; i
< e
.num_choices
; ++i
)
2326 names
->insert(e
.NameForChoice(i
));
2330 // Confirms that an experiment is valid, used in a DCHECK in
2331 // SanitizeList below.
2332 bool ValidateExperiment(const Experiment
& e
) {
2334 case Experiment::SINGLE_VALUE
:
2335 DCHECK_EQ(0, e
.num_choices
);
2338 case Experiment::MULTI_VALUE
:
2339 DCHECK_GT(e
.num_choices
, 0);
2341 DCHECK(e
.choices
[0].command_line_switch
);
2342 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2344 case Experiment::ENABLE_DISABLE_VALUE
:
2345 DCHECK_EQ(3, e
.num_choices
);
2347 DCHECK(e
.command_line_switch
);
2348 DCHECK(e
.command_line_value
);
2349 DCHECK(e
.disable_command_line_switch
);
2350 DCHECK(e
.disable_command_line_value
);
2358 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2359 // unknown, to prevent this list to become very long as experiments are added
2361 void SanitizeList(FlagsStorage
* flags_storage
) {
2362 std::set
<std::string
> known_experiments
;
2363 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2364 DCHECK(ValidateExperiment(experiments
[i
]));
2365 AddInternalName(experiments
[i
], &known_experiments
);
2368 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2370 std::set
<std::string
> new_enabled_experiments
=
2371 base::STLSetIntersection
<std::set
<std::string
> >(
2372 known_experiments
, enabled_experiments
);
2374 if (new_enabled_experiments
!= enabled_experiments
)
2375 flags_storage
->SetFlags(new_enabled_experiments
);
2378 void GetSanitizedEnabledFlags(
2379 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2380 SanitizeList(flags_storage
);
2381 *result
= flags_storage
->GetFlags();
2384 bool SkipConditionalExperiment(const Experiment
& experiment
,
2385 FlagsStorage
* flags_storage
) {
2386 #if defined(OS_ANDROID) || defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2387 chrome::VersionInfo::Channel channel
= chrome::VersionInfo::GetChannel();
2390 #if defined(OS_ANDROID)
2391 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2392 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2393 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2394 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2397 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2398 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2399 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2402 // enable-data-reduction-proxy-lo-fi is only available for Chromium builds and
2403 // the Canary/Dev channel.
2404 if (!strcmp("enable-data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2405 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2406 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2407 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2412 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2413 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2414 // builds and Canary/Dev channel.
2415 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2416 experiment
.internal_name
) &&
2417 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
&&
2418 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2419 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2428 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2429 // enabled on the current platform.
2430 void GetSanitizedEnabledFlagsForCurrentPlatform(
2431 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2432 GetSanitizedEnabledFlags(flags_storage
, result
);
2434 // Filter out any experiments that aren't enabled on the current platform. We
2435 // don't remove these from prefs else syncing to a platform with a different
2436 // set of experiments would be lossy.
2437 std::set
<std::string
> platform_experiments
;
2438 int current_platform
= GetCurrentPlatform();
2439 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2440 if (experiments
[i
].supported_platforms
& current_platform
)
2441 AddInternalName(experiments
[i
], &platform_experiments
);
2442 #if defined(OS_CHROMEOS)
2443 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2444 AddInternalName(experiments
[i
], &platform_experiments
);
2448 std::set
<std::string
> new_enabled_experiments
=
2449 base::STLSetIntersection
<std::set
<std::string
> >(
2450 platform_experiments
, *result
);
2452 result
->swap(new_enabled_experiments
);
2455 // Returns the Value representing the choice data in the specified experiment.
2456 base::Value
* CreateChoiceData(
2457 const Experiment
& experiment
,
2458 const std::set
<std::string
>& enabled_experiments
) {
2459 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2460 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2461 base::ListValue
* result
= new base::ListValue
;
2462 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2463 base::DictionaryValue
* value
= new base::DictionaryValue
;
2464 const std::string name
= experiment
.NameForChoice(i
);
2465 value
->SetString("internal_name", name
);
2466 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2467 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2468 result
->Append(value
);
2475 std::string
Experiment::NameForChoice(int index
) const {
2476 DCHECK(type
== Experiment::MULTI_VALUE
||
2477 type
== Experiment::ENABLE_DISABLE_VALUE
);
2478 DCHECK_LT(index
, num_choices
);
2479 return std::string(internal_name
) + testing::kMultiSeparator
+
2480 base::IntToString(index
);
2483 base::string16
Experiment::DescriptionForChoice(int index
) const {
2484 DCHECK(type
== Experiment::MULTI_VALUE
||
2485 type
== Experiment::ENABLE_DISABLE_VALUE
);
2486 DCHECK_LT(index
, num_choices
);
2488 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2489 const int kEnableDisableDescriptionIds
[] = {
2490 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2491 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2492 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2494 description_id
= kEnableDisableDescriptionIds
[index
];
2496 description_id
= choices
[index
].description_id
;
2498 return l10n_util::GetStringUTF16(description_id
);
2501 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2502 base::CommandLine
* command_line
,
2503 SentinelsMode sentinels
) {
2504 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2509 bool AreSwitchesIdenticalToCurrentCommandLine(
2510 const base::CommandLine
& new_cmdline
,
2511 const base::CommandLine
& active_cmdline
,
2512 std::set
<base::CommandLine::StringType
>* out_difference
) {
2513 std::set
<base::CommandLine::StringType
> new_flags
=
2514 ExtractFlagsFromCommandLine(new_cmdline
);
2515 std::set
<base::CommandLine::StringType
> active_flags
=
2516 ExtractFlagsFromCommandLine(active_cmdline
);
2518 bool result
= false;
2519 // Needed because std::equal doesn't check if the 2nd set is empty.
2520 if (new_flags
.size() == active_flags
.size()) {
2522 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2525 if (out_difference
&& !result
) {
2526 std::set_symmetric_difference(
2529 active_flags
.begin(),
2531 std::inserter(*out_difference
, out_difference
->begin()));
2537 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2539 base::ListValue
* supported_experiments
,
2540 base::ListValue
* unsupported_experiments
) {
2541 std::set
<std::string
> enabled_experiments
;
2542 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2544 int current_platform
= GetCurrentPlatform();
2546 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2547 const Experiment
& experiment
= experiments
[i
];
2548 if (SkipConditionalExperiment(experiment
, flags_storage
))
2551 base::DictionaryValue
* data
= new base::DictionaryValue();
2552 data
->SetString("internal_name", experiment
.internal_name
);
2553 data
->SetString("name",
2554 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2555 data
->SetString("description",
2556 l10n_util::GetStringUTF16(
2557 experiment
.visible_description_id
));
2559 base::ListValue
* supported_platforms
= new base::ListValue();
2560 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2561 data
->Set("supported_platforms", supported_platforms
);
2563 switch (experiment
.type
) {
2564 case Experiment::SINGLE_VALUE
:
2567 enabled_experiments
.count(experiment
.internal_name
) > 0);
2569 case Experiment::MULTI_VALUE
:
2570 case Experiment::ENABLE_DISABLE_VALUE
:
2571 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2577 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2578 #if defined(OS_CHROMEOS)
2579 if (access
== kOwnerAccessToFlags
&&
2580 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2585 supported_experiments
->Append(data
);
2587 unsupported_experiments
->Append(data
);
2591 bool IsRestartNeededToCommitChanges() {
2592 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2595 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2596 const std::string
& internal_name
,
2598 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2599 internal_name
, enable
);
2602 void RemoveFlagsSwitches(
2603 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2604 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2607 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2608 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2611 int GetCurrentPlatform() {
2612 #if defined(OS_MACOSX)
2614 #elif defined(OS_WIN)
2616 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2618 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2620 #elif defined(OS_ANDROID)
2623 #error Unknown platform
2627 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2628 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2629 for (const std::string
& flag
: flags
) {
2630 std::string
action("AboutFlags_");
2632 content::RecordComputedAction(action
);
2634 // Since flag metrics are recorded every startup, add a tick so that the
2635 // stats can be made meaningful.
2637 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2638 content::RecordAction(base::UserMetricsAction("StartupTick"));
2641 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2642 return static_cast<base::HistogramBase::Sample
>(
2643 metrics::HashMetricName(switch_name
));
2646 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2647 const std::set
<std::string
>& command_line_difference
) {
2648 for (const std::string
& flag
: command_line_difference
) {
2649 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2650 if (StartsWithASCII(flag
, "--", true /* case_sensitive */)) {
2651 // Skip '--' before switch name.
2652 std::string
switch_name(flag
.substr(2));
2654 // Kill value, if any.
2655 const size_t value_pos
= switch_name
.find('=');
2656 if (value_pos
!= std::string::npos
)
2657 switch_name
.resize(value_pos
);
2659 uma_id
= GetSwitchUMAId(switch_name
);
2661 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2662 << "' has incorrect format.";
2664 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2665 << "' '" << flag
<< "', uma_id=" << uma_id
;
2667 // Sparse histogram macro does not cache the histogram, so it's safe
2668 // to use macro with non-static histogram name here.
2669 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2673 //////////////////////////////////////////////////////////////////////////////
2674 // FlagsState implementation.
2678 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2679 NameToSwitchAndValueMap
;
2681 void SetFlagToSwitchMapping(const std::string
& key
,
2682 const std::string
& switch_name
,
2683 const std::string
& switch_value
,
2684 NameToSwitchAndValueMap
* name_to_switch_map
) {
2685 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2686 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2689 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2690 base::CommandLine
* command_line
,
2691 SentinelsMode sentinels
) {
2692 if (command_line
->HasSwitch(switches::kNoExperiments
))
2695 std::set
<std::string
> enabled_experiments
;
2697 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2698 &enabled_experiments
);
2700 NameToSwitchAndValueMap name_to_switch_map
;
2701 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2702 const Experiment
& e
= experiments
[i
];
2703 if (e
.type
== Experiment::SINGLE_VALUE
) {
2704 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2705 e
.command_line_value
, &name_to_switch_map
);
2706 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2707 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2708 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2709 e
.choices
[j
].command_line_switch
,
2710 e
.choices
[j
].command_line_value
,
2711 &name_to_switch_map
);
2714 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2715 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2716 &name_to_switch_map
);
2717 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2718 e
.command_line_value
, &name_to_switch_map
);
2719 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2720 e
.disable_command_line_value
, &name_to_switch_map
);
2724 if (sentinels
== kAddSentinels
) {
2725 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2726 flags_switches_
.insert(
2727 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2730 for (const std::string
& experiment_name
: enabled_experiments
) {
2731 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2732 name_to_switch_map
.find(experiment_name
);
2733 if (name_to_switch_it
== name_to_switch_map
.end()) {
2738 const std::pair
<std::string
, std::string
>&
2739 switch_and_value_pair
= name_to_switch_it
->second
;
2741 CHECK(!switch_and_value_pair
.first
.empty());
2742 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2743 switch_and_value_pair
.second
);
2744 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2746 if (sentinels
== kAddSentinels
) {
2747 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2748 flags_switches_
.insert(
2749 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2754 bool FlagsState::IsRestartNeededToCommitChanges() {
2755 return needs_restart_
;
2758 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2759 const std::string
& internal_name
,
2761 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2762 if (at_index
!= std::string::npos
) {
2764 // We're being asked to enable a multi-choice experiment. Disable the
2765 // currently selected choice.
2766 DCHECK_NE(at_index
, 0u);
2767 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2768 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2770 // And enable the new choice, if it is not the default first choice.
2771 if (internal_name
!= experiment_name
+ "@0") {
2772 std::set
<std::string
> enabled_experiments
;
2773 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2774 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2775 flags_storage
->SetFlags(enabled_experiments
);
2780 std::set
<std::string
> enabled_experiments
;
2781 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2783 const Experiment
* e
= NULL
;
2784 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2785 if (experiments
[i
].internal_name
== internal_name
) {
2786 e
= experiments
+ i
;
2792 if (e
->type
== Experiment::SINGLE_VALUE
) {
2794 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2796 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2799 // Enable the first choice.
2800 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2802 // Find the currently enabled choice and disable it.
2803 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2804 std::string choice_name
= e
->NameForChoice(i
);
2805 if (enabled_experiments
.find(choice_name
) !=
2806 enabled_experiments
.end()) {
2807 needs_restart_
= true;
2808 enabled_experiments
.erase(choice_name
);
2809 // Continue on just in case there's a bug and more than one
2810 // experiment for this choice was enabled.
2816 flags_storage
->SetFlags(enabled_experiments
);
2819 void FlagsState::RemoveFlagsSwitches(
2820 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2821 for (const auto& entry
: flags_switches_
)
2822 switch_list
->erase(entry
.first
);
2825 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2826 needs_restart_
= true;
2828 std::set
<std::string
> no_experiments
;
2829 flags_storage
->SetFlags(no_experiments
);
2832 void FlagsState::reset() {
2833 needs_restart_
= false;
2834 flags_switches_
.clear();
2841 // WARNING: '@' is also used in the html file. If you update this constant you
2842 // also need to update the html file.
2843 const char kMultiSeparator
[] = "@";
2845 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2848 FlagsState::GetInstance()->reset();
2851 void SetExperiments(const Experiment
* e
, size_t count
) {
2853 experiments
= kExperiments
;
2854 num_experiments
= arraysize(kExperiments
);
2857 num_experiments
= count
;
2861 const Experiment
* GetExperiments(size_t* count
) {
2862 *count
= num_experiments
;
2866 } // namespace testing
2868 } // namespace about_flags