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 "enable-new-md-input-view",
1311 IDS_FLAGS_ENABLE_NEW_MD_INPUT_VIEW_NAME
,
1312 IDS_FLAGS_ENABLE_NEW_MD_INPUT_VIEW_DESCRIPTION
,
1314 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewMDInputView
)
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
)
1434 "enable-webgl-draft-extensions",
1435 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1436 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1438 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)
1441 "enable-new-profile-management",
1442 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1443 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1444 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1445 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1446 switches::kDisableNewProfileManagement
)
1449 "enable-account-consistency",
1450 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1451 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1452 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1453 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1454 switches::kDisableAccountConsistency
)
1457 "enable-fast-user-switching",
1458 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME
,
1459 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION
,
1460 kOsMac
| kOsWin
| kOsLinux
,
1461 SINGLE_VALUE_TYPE(switches::kFastUserSwitching
)
1464 "enable-new-avatar-menu",
1465 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME
,
1466 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION
,
1467 kOsMac
| kOsWin
| kOsLinux
,
1468 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu
,
1469 switches::kDisableNewAvatarMenu
)
1472 "enable-iframe-based-signin",
1473 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1474 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1475 kOsMac
| kOsWin
| kOsLinux
,
1476 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)
1479 "enable-google-profile-info",
1480 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1481 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1482 kOsMac
| kOsWin
| kOsLinux
,
1483 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)
1486 "reset-app-list-install-state",
1487 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1488 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1489 kOsMac
| kOsWin
| kOsLinux
,
1490 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState
)
1492 #if defined(ENABLE_APP_LIST)
1493 #if defined(OS_LINUX)
1495 // This is compiled out on non-Linux platforms because otherwise it would be
1496 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1497 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1499 IDS_FLAGS_ENABLE_APP_LIST_NAME
,
1500 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION
,
1502 SINGLE_VALUE_TYPE(switches::kEnableAppList
)
1505 #if defined(ENABLE_EXTENSIONS)
1507 "enable-surface-worker",
1508 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1509 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1511 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)
1515 "disable-drive-apps-in-app-list",
1516 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1517 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1519 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)
1522 #if defined(OS_ANDROID)
1524 "enable-accessibility-tab-switcher",
1525 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1526 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1528 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)
1531 // TODO(dmazzoni): remove this flag when native android accessibility
1532 // ships in the stable channel. http://crbug.com/356775
1533 "enable-accessibility-script-injection",
1534 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1535 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1537 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1538 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
1543 IDS_FLAGS_ONE_COPY_NAME
,
1544 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1546 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy
,
1547 switches::kDisableOneCopy
)
1551 IDS_FLAGS_ZERO_COPY_NAME
,
1552 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1554 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)
1556 #if defined(OS_CHROMEOS)
1558 "enable-first-run-ui-transitions",
1559 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1560 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1562 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)
1566 "disable-new-bookmark-apps",
1567 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1568 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1569 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1570 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1571 switches::kDisableNewBookmarkApps
)
1573 #if defined(OS_MACOSX)
1575 "disable-hosted-app-shim-creation",
1576 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1577 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1579 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)
1582 "enable-hosted-app-quit-notification",
1583 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1584 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1586 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)
1590 "enable-ephemeral-apps-in-webstore",
1591 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1592 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1594 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)
1597 "enable-linkable-ephemeral-apps",
1598 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1599 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1601 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)
1604 "enable-service-worker-sync",
1605 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME
,
1606 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION
,
1608 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync
)
1610 #if defined(OS_ANDROID)
1612 "disable-click-delay",
1613 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1614 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1616 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1617 SINGLE_VALUE_TYPE("disable-click-delay")
1620 "disable-pull-to-refresh-effect",
1621 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1622 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1624 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)
1627 #if defined(OS_MACOSX)
1629 "enable-translate-new-ux",
1630 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1631 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1633 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)
1636 #if defined(TOOLKIT_VIEWS)
1638 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1639 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1640 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1641 kOsCrOS
| kOsWin
| kOsLinux
,
1642 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)
1645 "enable-link-disambiguation-popup",
1646 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1647 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1649 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)
1652 #if defined(ENABLE_EXTENSIONS)
1654 "enable-apps-show-on-first-paint",
1655 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1656 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1658 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)
1662 "enhanced-bookmarks-experiment",
1663 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1664 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1665 kOsDesktop
| kOsAndroid
,
1666 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1667 switches::kEnhancedBookmarksExperiment
, "1",
1668 switches::kEnhancedBookmarksExperiment
, "0")
1670 #if defined(OS_ANDROID)
1672 "enable-zero-suggest-experiment",
1673 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1674 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1676 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)
1679 "enable-reader-mode-toolbar-icon",
1680 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1681 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1683 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)
1687 "num-raster-threads",
1688 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1689 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1691 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)
1694 "ignore-autocomplete-off-autofill",
1695 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_NAME
,
1696 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_DESCRIPTION
,
1697 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1698 ENABLE_DISABLE_VALUE_TYPE(
1699 autofill::switches::kIgnoreAutocompleteOffForAutofill
,
1700 autofill::switches::kRespectAutocompleteOffForAutofill
)
1703 "enable-single-click-autofill",
1704 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1705 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1706 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1707 ENABLE_DISABLE_VALUE_TYPE(
1708 autofill::switches::kEnableSingleClickAutofill
,
1709 autofill::switches::kDisableSingleClickAutofill
)
1712 "enable-permissions-bubbles",
1713 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME
,
1714 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION
,
1715 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1716 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles
,
1717 switches::kDisablePermissionsBubbles
)
1720 "enable-session-crashed-bubble",
1721 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1722 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1724 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1725 switches::kDisableSessionCrashedBubble
)
1728 "enable-out-of-process-pdf",
1729 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME
,
1730 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION
,
1732 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOutOfProcessPdf
,
1733 switches::kDisableOutOfProcessPdf
)
1736 "enable-pdf-material-ui",
1737 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1738 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1740 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1741 switches::kDisablePdfMaterialUI
)
1744 "disable-cast-streaming-hw-encoding",
1745 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1746 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1748 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)
1750 #if defined(OS_ANDROID)
1753 IDS_FLAGS_DISABLE_CAST_NAME
,
1754 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1756 SINGLE_VALUE_TYPE(switches::kDisableCast
)
1759 "prefetch-search-results",
1760 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1761 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1763 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)
1766 #if defined(ENABLE_APP_LIST)
1768 "enable-experimental-app-list",
1769 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1770 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1771 kOsWin
| kOsLinux
| kOsCrOS
,
1772 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList
,
1773 app_list::switches::kDisableExperimentalAppList
)
1776 "enable-centered-app-list",
1777 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1778 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1779 kOsWin
| kOsLinux
| kOsCrOS
,
1780 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)
1784 "disable-threaded-scrolling",
1785 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1786 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1787 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
1788 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)
1791 "bleeding-edge-renderer-mode",
1792 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1793 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1795 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)
1798 "enable-settings-window",
1799 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1800 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1802 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1803 switches::kDisableSettingsWindow
)
1805 #if defined(OS_ANDROID)
1807 "enable-instant-search-clicks",
1808 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME
,
1809 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION
,
1811 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks
)
1815 "enable-save-password-bubble",
1816 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1817 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1818 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1819 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1820 switches::kDisableSavePasswordBubble
)
1822 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1823 // crbug.com/366483 for the target milestone.
1825 "allow-insecure-websocket-from-https-origin",
1826 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME
,
1827 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION
,
1829 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin
)
1832 "enable-apps-file-associations",
1833 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1834 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1836 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)
1838 #if defined(OS_ANDROID)
1840 "enable-embeddedsearch-api",
1841 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1842 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1844 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)
1847 "enable-app-install-alerts",
1848 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME
,
1849 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION
,
1851 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts
)
1855 "distance-field-text",
1856 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1857 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1859 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1860 switches::kDisableDistanceFieldText
)
1863 "extension-content-verification",
1864 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1865 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1867 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)
1869 #if defined(USE_AURA)
1871 "text-input-focus-manager",
1872 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME
,
1873 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION
,
1874 kOsCrOS
| kOsLinux
| kOsWin
,
1875 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager
,
1876 switches::kDisableTextInputFocusManager
)
1879 #if defined(ENABLE_EXTENSIONS)
1881 "extension-active-script-permission",
1882 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1883 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1885 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)
1889 "answers-in-suggest",
1890 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME
,
1891 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION
,
1892 kOsAndroid
| kOsWin
| kOsLinux
| kOsCrOS
,
1893 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest
,
1894 switches::kDisableAnswersInSuggest
)
1896 #if defined(OS_ANDROID)
1898 "enable-data-reduction-proxy-dev",
1899 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1900 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1902 ENABLE_DISABLE_VALUE_TYPE(
1903 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1904 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)
1907 "enable-data-reduction-proxy-alt",
1908 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME
,
1909 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION
,
1912 data_reduction_proxy::switches::kEnableDataReductionProxyAlt
)
1916 "enable-hotword-hardware",
1917 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1918 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1920 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)
1922 #if defined(ENABLE_EXTENSIONS)
1924 "enable-embedded-extension-options",
1925 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1926 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1928 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)
1931 #if defined(USE_ASH)
1933 "enable-web-app-frame",
1934 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1935 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1937 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)
1941 "enable-website-settings-manager",
1942 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME
,
1943 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION
,
1945 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager
)
1948 "remember-cert-error-decisions",
1949 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME
,
1950 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION
,
1952 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices
)
1955 "enable-drop-sync-credential",
1956 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1957 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1959 ENABLE_DISABLE_VALUE_TYPE(
1960 password_manager::switches::kEnableDropSyncCredential
,
1961 password_manager::switches::kDisableDropSyncCredential
)
1963 #if defined(ENABLE_EXTENSIONS)
1965 "enable-extension-action-redesign",
1966 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1967 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1969 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)
1973 "autofill-sync-credential",
1974 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1975 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1977 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)
1979 #if !defined(OS_ANDROID)
1981 "enable-message-center-always-scroll-up-upon-notification-removal",
1982 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1983 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1986 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)
1989 "enable-md-settings",
1990 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
1991 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
1994 switches::kEnableMaterialDesignSettings
)
1997 #if defined(OS_CHROMEOS)
1999 "disable-memory-pressure-chromeos",
2000 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME
,
2001 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION
,
2003 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS
)
2006 "memory-pressure-thresholds",
2007 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
2008 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
2010 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)
2014 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
2015 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
2017 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)
2019 #endif // OS_CHROMEOS
2021 "enable-tab-audio-muting",
2022 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
2023 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
2025 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)
2028 "enable-credential-manager-api",
2029 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
2030 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
2032 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)
2035 "reduced-referrer-granularity",
2036 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
2037 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
2039 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)
2041 #if defined(ENABLE_PLUGINS)
2043 "enable-plugin-power-saver",
2044 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
2045 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
2047 SINGLE_VALUE_TYPE(switches::kEnablePluginPowerSaver
)
2050 #if defined(OS_CHROMEOS)
2052 "disable-new-zip-unpacker",
2053 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
2054 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
2056 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)
2058 #endif // defined(OS_CHROMEOS)
2061 IDS_FLAGS_SSL_VERSION_MIN_NAME
,
2062 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION
,
2064 MULTI_VALUE_TYPE(kSSLVersionMinChoices
)
2067 "enable-credit-card-scan",
2068 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
2069 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
2071 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
2072 autofill::switches::kDisableCreditCardScan
)
2074 #if defined(OS_CHROMEOS)
2076 "enable-captive-portal-bypass-proxy",
2077 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
2078 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
2080 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCaptivePortalBypassProxyOption
)
2083 "disable-roboto-font-ui",
2084 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_NAME
,
2085 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_DESCRIPTION
,
2087 SINGLE_VALUE_TYPE(switches::kDisableRobotoFontUI
)
2089 #endif // defined(OS_CHROMEOS)
2090 #if defined(OS_ANDROID)
2092 "enable-seccomp-filter-sandbox",
2093 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
2094 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
2096 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)
2100 "enable-touch-hover",
2101 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
2102 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
2104 SINGLE_VALUE_TYPE("enable-touch-hover")
2107 "enable-fill-on-account-select",
2108 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
2109 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
2111 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)
2113 #if defined(OS_CHROMEOS)
2115 "enable-wifi-credential-sync", // FLAGS:RECORD_UMA
2116 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
2117 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
2119 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)
2122 "enable-potentially-annoying-security-features",
2123 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
2124 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
2126 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)
2130 "enable-delay-agnostic-aec",
2131 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
2132 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
2134 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)
2137 "mark-non-secure-as", // FLAGS:RECORD_UMA
2138 IDS_MARK_NON_SECURE_AS_NAME
,
2139 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
2141 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)
2144 "enable-site-per-process",
2145 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
2146 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
2148 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)
2150 #if defined(OS_MACOSX)
2152 "enable-harfbuzz-rendertext",
2153 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
2154 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
2156 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)
2158 #endif // defined(OS_MACOSX)
2159 #if defined(OS_CHROMEOS)
2161 "disable-timezone-tracking",
2162 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
2163 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
2165 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)
2168 "disable-webview-signin-flow",
2169 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME
,
2170 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION
,
2172 SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow
)
2174 #endif // defined(OS_CHROMEOS)
2176 "enable-data-reduction-proxy-lo-fi",
2177 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_NAME
,
2178 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
2180 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2181 kEnableDataReductionProxyLoFi
)
2184 "clear-data-reduction-proxy-data-savings",
2185 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
2186 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
2188 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2189 kClearDataReductionProxyDataSavings
)
2191 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2193 "enable-data-reduction-proxy-bypass-warnings",
2194 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
2195 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
2197 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2198 kEnableDataReductionProxyBypassWarning
)
2202 "allow-insecure-localhost",
2203 IDS_ALLOW_INSECURE_LOCALHOST
,
2204 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
2206 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)
2209 "bypass-app-banner-engagement-checks",
2210 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
2211 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
2213 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)
2217 IDS_FLAGS_SYNC_SANDBOX_NAME
,
2218 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
2220 SINGLE_VALUE_TYPE_AND_VALUE(
2221 switches::kSyncServiceURL
,
2222 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")
2225 "enable-child-account-detection",
2226 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
2227 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
2228 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
2229 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
2230 switches::kDisableChildAccountDetection
)
2232 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
2234 "ozone-test-single-overlay-support",
2235 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
2236 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
2238 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)
2240 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
2242 "v8-pac-mojo-out-of-process",
2243 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
2244 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
2246 SINGLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
),
2248 #if defined(OS_CHROMEOS)
2250 "enable-firewall-hole-punching",
2251 IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_NAME
,
2252 IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_DESCRIPTION
,
2254 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirewallHolePunching
)
2256 #endif // defined(OS_CHROMEOS)
2258 "enable-media-router",
2259 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
2260 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
2262 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)
2265 // NOTE: Adding new command-line switches requires adding corresponding
2266 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2267 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2270 const Experiment
* experiments
= kExperiments
;
2271 size_t num_experiments
= arraysize(kExperiments
);
2273 // Stores and encapsulates the little state that about:flags has.
2276 FlagsState() : needs_restart_(false) {}
2277 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2278 base::CommandLine
* command_line
,
2279 SentinelsMode sentinels
);
2280 bool IsRestartNeededToCommitChanges();
2281 void SetExperimentEnabled(
2282 FlagsStorage
* flags_storage
,
2283 const std::string
& internal_name
,
2285 void RemoveFlagsSwitches(
2286 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2287 void ResetAllFlags(FlagsStorage
* flags_storage
);
2290 // Returns the singleton instance of this class
2291 static FlagsState
* GetInstance() {
2292 return Singleton
<FlagsState
>::get();
2296 bool needs_restart_
;
2297 std::map
<std::string
, std::string
> flags_switches_
;
2299 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2302 // Adds the internal names for the specified experiment to |names|.
2303 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2304 if (e
.type
== Experiment::SINGLE_VALUE
) {
2305 names
->insert(e
.internal_name
);
2307 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2308 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2309 for (int i
= 0; i
< e
.num_choices
; ++i
)
2310 names
->insert(e
.NameForChoice(i
));
2314 // Confirms that an experiment is valid, used in a DCHECK in
2315 // SanitizeList below.
2316 bool ValidateExperiment(const Experiment
& e
) {
2318 case Experiment::SINGLE_VALUE
:
2319 DCHECK_EQ(0, e
.num_choices
);
2322 case Experiment::MULTI_VALUE
:
2323 DCHECK_GT(e
.num_choices
, 0);
2325 DCHECK(e
.choices
[0].command_line_switch
);
2326 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2328 case Experiment::ENABLE_DISABLE_VALUE
:
2329 DCHECK_EQ(3, e
.num_choices
);
2331 DCHECK(e
.command_line_switch
);
2332 DCHECK(e
.command_line_value
);
2333 DCHECK(e
.disable_command_line_switch
);
2334 DCHECK(e
.disable_command_line_value
);
2342 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2343 // unknown, to prevent this list to become very long as experiments are added
2345 void SanitizeList(FlagsStorage
* flags_storage
) {
2346 std::set
<std::string
> known_experiments
;
2347 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2348 DCHECK(ValidateExperiment(experiments
[i
]));
2349 AddInternalName(experiments
[i
], &known_experiments
);
2352 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2354 std::set
<std::string
> new_enabled_experiments
=
2355 base::STLSetIntersection
<std::set
<std::string
> >(
2356 known_experiments
, enabled_experiments
);
2358 if (new_enabled_experiments
!= enabled_experiments
)
2359 flags_storage
->SetFlags(new_enabled_experiments
);
2362 void GetSanitizedEnabledFlags(
2363 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2364 SanitizeList(flags_storage
);
2365 *result
= flags_storage
->GetFlags();
2368 bool SkipConditionalExperiment(const Experiment
& experiment
,
2369 FlagsStorage
* flags_storage
) {
2370 #if defined(OS_ANDROID) || defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2371 chrome::VersionInfo::Channel channel
= chrome::VersionInfo::GetChannel();
2374 #if defined(OS_ANDROID)
2375 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2376 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2377 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2378 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2381 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2382 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2383 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2386 // enable-data-reduction-proxy-lo-fi is only available for Chromium builds and
2387 // the Canary/Dev channel.
2388 if (!strcmp("enable-data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2389 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2390 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2391 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2396 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2397 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2398 // builds and Canary/Dev channel.
2399 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2400 experiment
.internal_name
) &&
2401 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
&&
2402 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2403 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2412 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2413 // enabled on the current platform.
2414 void GetSanitizedEnabledFlagsForCurrentPlatform(
2415 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2416 GetSanitizedEnabledFlags(flags_storage
, result
);
2418 // Filter out any experiments that aren't enabled on the current platform. We
2419 // don't remove these from prefs else syncing to a platform with a different
2420 // set of experiments would be lossy.
2421 std::set
<std::string
> platform_experiments
;
2422 int current_platform
= GetCurrentPlatform();
2423 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2424 if (experiments
[i
].supported_platforms
& current_platform
)
2425 AddInternalName(experiments
[i
], &platform_experiments
);
2426 #if defined(OS_CHROMEOS)
2427 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2428 AddInternalName(experiments
[i
], &platform_experiments
);
2432 std::set
<std::string
> new_enabled_experiments
=
2433 base::STLSetIntersection
<std::set
<std::string
> >(
2434 platform_experiments
, *result
);
2436 result
->swap(new_enabled_experiments
);
2439 // Returns the Value representing the choice data in the specified experiment.
2440 base::Value
* CreateChoiceData(
2441 const Experiment
& experiment
,
2442 const std::set
<std::string
>& enabled_experiments
) {
2443 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2444 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2445 base::ListValue
* result
= new base::ListValue
;
2446 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2447 base::DictionaryValue
* value
= new base::DictionaryValue
;
2448 const std::string name
= experiment
.NameForChoice(i
);
2449 value
->SetString("internal_name", name
);
2450 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2451 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2452 result
->Append(value
);
2459 std::string
Experiment::NameForChoice(int index
) const {
2460 DCHECK(type
== Experiment::MULTI_VALUE
||
2461 type
== Experiment::ENABLE_DISABLE_VALUE
);
2462 DCHECK_LT(index
, num_choices
);
2463 return std::string(internal_name
) + testing::kMultiSeparator
+
2464 base::IntToString(index
);
2467 base::string16
Experiment::DescriptionForChoice(int index
) const {
2468 DCHECK(type
== Experiment::MULTI_VALUE
||
2469 type
== Experiment::ENABLE_DISABLE_VALUE
);
2470 DCHECK_LT(index
, num_choices
);
2472 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2473 const int kEnableDisableDescriptionIds
[] = {
2474 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2475 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2476 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2478 description_id
= kEnableDisableDescriptionIds
[index
];
2480 description_id
= choices
[index
].description_id
;
2482 return l10n_util::GetStringUTF16(description_id
);
2485 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2486 base::CommandLine
* command_line
,
2487 SentinelsMode sentinels
) {
2488 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2493 bool AreSwitchesIdenticalToCurrentCommandLine(
2494 const base::CommandLine
& new_cmdline
,
2495 const base::CommandLine
& active_cmdline
,
2496 std::set
<base::CommandLine::StringType
>* out_difference
) {
2497 std::set
<base::CommandLine::StringType
> new_flags
=
2498 ExtractFlagsFromCommandLine(new_cmdline
);
2499 std::set
<base::CommandLine::StringType
> active_flags
=
2500 ExtractFlagsFromCommandLine(active_cmdline
);
2502 bool result
= false;
2503 // Needed because std::equal doesn't check if the 2nd set is empty.
2504 if (new_flags
.size() == active_flags
.size()) {
2506 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2509 if (out_difference
&& !result
) {
2510 std::set_symmetric_difference(
2513 active_flags
.begin(),
2515 std::inserter(*out_difference
, out_difference
->begin()));
2521 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2523 base::ListValue
* supported_experiments
,
2524 base::ListValue
* unsupported_experiments
) {
2525 std::set
<std::string
> enabled_experiments
;
2526 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2528 int current_platform
= GetCurrentPlatform();
2530 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2531 const Experiment
& experiment
= experiments
[i
];
2532 if (SkipConditionalExperiment(experiment
, flags_storage
))
2535 base::DictionaryValue
* data
= new base::DictionaryValue();
2536 data
->SetString("internal_name", experiment
.internal_name
);
2537 data
->SetString("name",
2538 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2539 data
->SetString("description",
2540 l10n_util::GetStringUTF16(
2541 experiment
.visible_description_id
));
2543 base::ListValue
* supported_platforms
= new base::ListValue();
2544 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2545 data
->Set("supported_platforms", supported_platforms
);
2547 switch (experiment
.type
) {
2548 case Experiment::SINGLE_VALUE
:
2551 enabled_experiments
.count(experiment
.internal_name
) > 0);
2553 case Experiment::MULTI_VALUE
:
2554 case Experiment::ENABLE_DISABLE_VALUE
:
2555 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2561 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2562 #if defined(OS_CHROMEOS)
2563 if (access
== kOwnerAccessToFlags
&&
2564 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2569 supported_experiments
->Append(data
);
2571 unsupported_experiments
->Append(data
);
2575 bool IsRestartNeededToCommitChanges() {
2576 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2579 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2580 const std::string
& internal_name
,
2582 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2583 internal_name
, enable
);
2586 void RemoveFlagsSwitches(
2587 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2588 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2591 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2592 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2595 int GetCurrentPlatform() {
2596 #if defined(OS_MACOSX)
2598 #elif defined(OS_WIN)
2600 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2602 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2604 #elif defined(OS_ANDROID)
2607 #error Unknown platform
2611 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2612 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2613 for (const std::string
& flag
: flags
) {
2614 std::string
action("AboutFlags_");
2616 content::RecordComputedAction(action
);
2618 // Since flag metrics are recorded every startup, add a tick so that the
2619 // stats can be made meaningful.
2621 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2622 content::RecordAction(base::UserMetricsAction("StartupTick"));
2625 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2626 return static_cast<base::HistogramBase::Sample
>(
2627 metrics::HashMetricName(switch_name
));
2630 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2631 const std::set
<std::string
>& command_line_difference
) {
2632 for (const std::string
& flag
: command_line_difference
) {
2633 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2634 if (StartsWithASCII(flag
, "--", true /* case_sensitive */)) {
2635 // Skip '--' before switch name.
2636 std::string
switch_name(flag
.substr(2));
2638 // Kill value, if any.
2639 const size_t value_pos
= switch_name
.find('=');
2640 if (value_pos
!= std::string::npos
)
2641 switch_name
.resize(value_pos
);
2643 uma_id
= GetSwitchUMAId(switch_name
);
2645 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2646 << "' has incorrect format.";
2648 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2649 << "' '" << flag
<< "', uma_id=" << uma_id
;
2651 // Sparse histogram macro does not cache the histogram, so it's safe
2652 // to use macro with non-static histogram name here.
2653 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2657 //////////////////////////////////////////////////////////////////////////////
2658 // FlagsState implementation.
2662 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2663 NameToSwitchAndValueMap
;
2665 void SetFlagToSwitchMapping(const std::string
& key
,
2666 const std::string
& switch_name
,
2667 const std::string
& switch_value
,
2668 NameToSwitchAndValueMap
* name_to_switch_map
) {
2669 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2670 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2673 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2674 base::CommandLine
* command_line
,
2675 SentinelsMode sentinels
) {
2676 if (command_line
->HasSwitch(switches::kNoExperiments
))
2679 std::set
<std::string
> enabled_experiments
;
2681 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2682 &enabled_experiments
);
2684 NameToSwitchAndValueMap name_to_switch_map
;
2685 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2686 const Experiment
& e
= experiments
[i
];
2687 if (e
.type
== Experiment::SINGLE_VALUE
) {
2688 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2689 e
.command_line_value
, &name_to_switch_map
);
2690 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2691 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2692 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2693 e
.choices
[j
].command_line_switch
,
2694 e
.choices
[j
].command_line_value
,
2695 &name_to_switch_map
);
2698 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2699 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2700 &name_to_switch_map
);
2701 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2702 e
.command_line_value
, &name_to_switch_map
);
2703 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2704 e
.disable_command_line_value
, &name_to_switch_map
);
2708 if (sentinels
== kAddSentinels
) {
2709 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2710 flags_switches_
.insert(
2711 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2714 for (const std::string
& experiment_name
: enabled_experiments
) {
2715 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2716 name_to_switch_map
.find(experiment_name
);
2717 if (name_to_switch_it
== name_to_switch_map
.end()) {
2722 const std::pair
<std::string
, std::string
>&
2723 switch_and_value_pair
= name_to_switch_it
->second
;
2725 CHECK(!switch_and_value_pair
.first
.empty());
2726 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2727 switch_and_value_pair
.second
);
2728 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2730 if (sentinels
== kAddSentinels
) {
2731 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2732 flags_switches_
.insert(
2733 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2738 bool FlagsState::IsRestartNeededToCommitChanges() {
2739 return needs_restart_
;
2742 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2743 const std::string
& internal_name
,
2745 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2746 if (at_index
!= std::string::npos
) {
2748 // We're being asked to enable a multi-choice experiment. Disable the
2749 // currently selected choice.
2750 DCHECK_NE(at_index
, 0u);
2751 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2752 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2754 // And enable the new choice, if it is not the default first choice.
2755 if (internal_name
!= experiment_name
+ "@0") {
2756 std::set
<std::string
> enabled_experiments
;
2757 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2758 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2759 flags_storage
->SetFlags(enabled_experiments
);
2764 std::set
<std::string
> enabled_experiments
;
2765 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2767 const Experiment
* e
= NULL
;
2768 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2769 if (experiments
[i
].internal_name
== internal_name
) {
2770 e
= experiments
+ i
;
2776 if (e
->type
== Experiment::SINGLE_VALUE
) {
2778 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2780 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2783 // Enable the first choice.
2784 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2786 // Find the currently enabled choice and disable it.
2787 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2788 std::string choice_name
= e
->NameForChoice(i
);
2789 if (enabled_experiments
.find(choice_name
) !=
2790 enabled_experiments
.end()) {
2791 needs_restart_
= true;
2792 enabled_experiments
.erase(choice_name
);
2793 // Continue on just in case there's a bug and more than one
2794 // experiment for this choice was enabled.
2800 flags_storage
->SetFlags(enabled_experiments
);
2803 void FlagsState::RemoveFlagsSwitches(
2804 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2805 for (const auto& entry
: flags_switches_
)
2806 switch_list
->erase(entry
.first
);
2809 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2810 needs_restart_
= true;
2812 std::set
<std::string
> no_experiments
;
2813 flags_storage
->SetFlags(no_experiments
);
2816 void FlagsState::reset() {
2817 needs_restart_
= false;
2818 flags_switches_
.clear();
2825 // WARNING: '@' is also used in the html file. If you update this constant you
2826 // also need to update the html file.
2827 const char kMultiSeparator
[] = "@";
2829 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2832 FlagsState::GetInstance()->reset();
2835 void SetExperiments(const Experiment
* e
, size_t count
) {
2837 experiments
= kExperiments
;
2838 num_experiments
= arraysize(kExperiments
);
2841 num_experiments
= count
;
2845 const Experiment
* GetExperiments(size_t* count
) {
2846 *count
= num_experiments
;
2850 } // namespace testing
2852 } // namespace about_flags