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/bookmarks/enhanced_bookmarks_features.h"
22 #include "chrome/browser/flags_storage.h"
23 #include "chrome/common/chrome_content_client.h"
24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/grit/generated_resources.h"
26 #include "components/autofill/core/common/autofill_switches.h"
27 #include "components/cloud_devices/common/cloud_devices_switches.h"
28 #include "components/metrics/metrics_hashes.h"
29 #include "components/nacl/common/nacl_switches.h"
30 #include "components/omnibox/omnibox_switches.h"
31 #include "components/proximity_auth/switches.h"
32 #include "components/search/search_switches.h"
33 #include "content/public/browser/user_metrics.h"
34 #include "media/base/media_switches.h"
35 #include "ui/base/l10n/l10n_util.h"
36 #include "ui/base/ui_base_switches.h"
37 #include "ui/display/display_switches.h"
38 #include "ui/events/event_switches.h"
39 #include "ui/gfx/switches.h"
40 #include "ui/gl/gl_switches.h"
41 #include "ui/keyboard/keyboard_switches.h"
42 #include "ui/native_theme/native_theme_switches.h"
43 #include "ui/views/views_switches.h"
45 #if defined(OS_ANDROID)
46 #include "chrome/common/chrome_version_info.h"
47 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
49 #include "ui/message_center/message_center_switches.h"
53 #include "ash/ash_switches.h"
56 #if defined(OS_CHROMEOS)
57 #include "chromeos/chromeos_switches.h"
58 #include "third_party/cros_system_api/switches/chrome_switches.h"
61 #if defined(ENABLE_APP_LIST)
62 #include "ui/app_list/app_list_switches.h"
65 #if defined(ENABLE_EXTENSIONS)
66 #include "extensions/common/switches.h"
69 namespace about_flags
{
71 // Macros to simplify specifying the type.
72 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
73 Experiment::SINGLE_VALUE, \
74 command_line_switch, switch_value, NULL, NULL, NULL, 0
75 #define SINGLE_VALUE_TYPE(command_line_switch) \
76 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
77 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
78 disable_switch, disable_value) \
79 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
80 disable_switch, disable_value, NULL, 3
81 #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
82 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
83 #define MULTI_VALUE_TYPE(choices) \
84 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
88 // Enumeration of OSs.
95 kOsCrOSOwnerOnly
= 1 << 5
98 const unsigned kOsAll
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
;
99 const unsigned kOsDesktop
= kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
;
101 // Adds a |StringValue| to |list| for each platform where |bitmask| indicates
102 // whether the experiment is available on that platform.
103 void AddOsStrings(unsigned bitmask
, base::ListValue
* list
) {
106 const char* const name
;
111 {kOsCrOS
, "Chrome OS"},
112 {kOsAndroid
, "Android"},
113 {kOsCrOSOwnerOnly
, "Chrome OS (owner only)"},
115 for (size_t i
= 0; i
< arraysize(kBitsToOs
); ++i
) {
116 if (bitmask
& kBitsToOs
[i
].bit
)
117 list
->Append(new base::StringValue(kBitsToOs
[i
].name
));
121 // Convert switch constants to proper CommandLine::StringType strings.
122 base::CommandLine::StringType
GetSwitchString(const std::string
& flag
) {
123 base::CommandLine
cmd_line(base::CommandLine::NO_PROGRAM
);
124 cmd_line
.AppendSwitch(flag
);
125 DCHECK_EQ(2U, cmd_line
.argv().size());
126 return cmd_line
.argv()[1];
129 // Scoops flags from a command line.
130 std::set
<base::CommandLine::StringType
> ExtractFlagsFromCommandLine(
131 const base::CommandLine
& cmdline
) {
132 std::set
<base::CommandLine::StringType
> flags
;
133 // First do the ones between --flag-switches-begin and --flag-switches-end.
134 base::CommandLine::StringVector::const_iterator first
=
135 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
136 GetSwitchString(switches::kFlagSwitchesBegin
));
137 base::CommandLine::StringVector::const_iterator last
=
138 std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
139 GetSwitchString(switches::kFlagSwitchesEnd
));
140 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
141 flags
.insert(first
+ 1, last
);
142 #if defined(OS_CHROMEOS)
143 // Then add those between --policy-switches-begin and --policy-switches-end.
144 first
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
145 GetSwitchString(chromeos::switches::kPolicySwitchesBegin
));
146 last
= std::find(cmdline
.argv().begin(), cmdline
.argv().end(),
147 GetSwitchString(chromeos::switches::kPolicySwitchesEnd
));
148 if (first
!= cmdline
.argv().end() && last
!= cmdline
.argv().end())
149 flags
.insert(first
+ 1, last
);
154 const Experiment::Choice kTouchEventsChoices
[] = {
155 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC
, "", "" },
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
157 switches::kTouchEvents
,
158 switches::kTouchEventsEnabled
},
159 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
160 switches::kTouchEvents
,
161 switches::kTouchEventsDisabled
}
164 #if defined(USE_AURA)
165 const Experiment::Choice kOverscrollHistoryNavigationChoices
[] = {
166 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
, "", "" },
167 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
168 switches::kOverscrollHistoryNavigation
,
170 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI
,
171 switches::kOverscrollHistoryNavigation
,
176 #if !defined(DISABLE_NACL)
177 const Experiment::Choice kNaClDebugMaskChoices
[] = {
178 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
179 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
180 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
181 // so by default we want to avoid debugging that.
182 // NOTE: As the default value must be the empty string, the mask excluding
183 // the PNaCl translator and secure shell is substituted elsewhere.
184 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
, "", "" },
185 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
, switches::kNaClDebugMask
, "*://*" },
186 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
,
187 switches::kNaClDebugMask
, "*://*/*debug.nmf" }
191 const Experiment::Choice kMarkNonSecureAsChoices
[] = {
192 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
193 { IDS_MARK_NON_SECURE_AS_NEUTRAL
,
194 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNeutral
},
195 { IDS_MARK_NON_SECURE_AS_NON_SECURE
,
196 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsNonSecure
},
197 { IDS_MARK_NON_SECURE_AS_DUBIOUS
,
198 switches::kMarkNonSecureAs
, switches::kMarkNonSecureAsDubious
}
201 const Experiment::Choice kMaxTilesForInterestAreaChoices
[] = {
202 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
203 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT
,
204 cc::switches::kMaxTilesForInterestArea
, "64"},
205 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL
,
206 cc::switches::kMaxTilesForInterestArea
, "128"},
207 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE
,
208 cc::switches::kMaxTilesForInterestArea
, "256"},
209 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI
,
210 cc::switches::kMaxTilesForInterestArea
, "512"}
213 const Experiment::Choice kDefaultTileWidthChoices
[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
215 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
,
216 switches::kDefaultTileWidth
, "128"},
217 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
,
218 switches::kDefaultTileWidth
, "256"},
219 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE
,
220 switches::kDefaultTileWidth
, "512"},
221 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
,
222 switches::kDefaultTileWidth
, "1024"}
225 const Experiment::Choice kDefaultTileHeightChoices
[] = {
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
227 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT
,
228 switches::kDefaultTileHeight
, "128"},
229 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL
,
230 switches::kDefaultTileHeight
, "256"},
231 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE
,
232 switches::kDefaultTileHeight
, "512"},
233 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI
,
234 switches::kDefaultTileHeight
, "1024"}
237 const Experiment::Choice kSimpleCacheBackendChoices
[] = {
238 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
239 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
240 switches::kUseSimpleCacheBackend
, "off" },
241 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
242 switches::kUseSimpleCacheBackend
, "on"}
245 #if defined(USE_AURA)
246 const Experiment::Choice kTabCaptureUpscaleQualityChoices
[] = {
247 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
248 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
249 switches::kTabCaptureUpscaleQuality
, "fast" },
250 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
251 switches::kTabCaptureUpscaleQuality
, "good" },
252 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
253 switches::kTabCaptureUpscaleQuality
, "best" },
256 const Experiment::Choice kTabCaptureDownscaleQualityChoices
[] = {
257 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
258 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST
,
259 switches::kTabCaptureDownscaleQuality
, "fast" },
260 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD
,
261 switches::kTabCaptureDownscaleQuality
, "good" },
262 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST
,
263 switches::kTabCaptureDownscaleQuality
, "best" },
267 #if defined(TOOLKIT_VIEWS)
268 const Experiment::Choice kTabCloseButtonsHiddenWithTouchChoices
[] = {
269 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
270 { IDS_FLAGS_TAB_CLOSE_BUTTONS_HIDDEN_WITH_TOUCH_ALWAYS
,
271 switches::kTabCloseButtonsHiddenWithTouch
, "always" },
272 { IDS_FLAGS_TAB_CLOSE_BUTTONS_HIDDEN_WITH_TOUCH_NARROW
,
273 switches::kTabCloseButtonsHiddenWithTouch
, "narrow" },
274 { IDS_FLAGS_TAB_CLOSE_BUTTONS_HIDDEN_WITH_TOUCH_STACKED
,
275 switches::kTabCloseButtonsHiddenWithTouch
, "stacked" },
279 #if defined(OS_ANDROID)
280 const Experiment::Choice kZeroSuggestExperimentsChoices
[] = {
281 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
282 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED
,
283 switches::kEnableZeroSuggestMostVisited
, ""},
284 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP
,
285 switches::kEnableZeroSuggestMostVisitedWithoutSerp
, ""},
286 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
287 switches::kDisableZeroSuggest
, ""}
291 const Experiment::Choice kNumRasterThreadsChoices
[] = {
292 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
293 { IDS_FLAGS_NUM_RASTER_THREADS_ONE
, switches::kNumRasterThreads
, "1" },
294 { IDS_FLAGS_NUM_RASTER_THREADS_TWO
, switches::kNumRasterThreads
, "2" },
295 { IDS_FLAGS_NUM_RASTER_THREADS_THREE
, switches::kNumRasterThreads
, "3" },
296 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR
, switches::kNumRasterThreads
, "4" }
299 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
300 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
301 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
302 switches::kEnableGpuRasterization
, "" },
303 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
304 switches::kDisableGpuRasterization
, "" },
305 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
306 switches::kForceGpuRasterization
, "" },
309 #if defined(OS_CHROMEOS)
310 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
311 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
312 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
313 chromeos::switches::kMemoryPressureThresholds
,
314 chromeos::switches::kConservativeThreshold
},
315 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
316 chromeos::switches::kMemoryPressureThresholds
,
317 chromeos::switches::kAggressiveCacheDiscardThreshold
},
318 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
319 chromeos::switches::kMemoryPressureThresholds
,
320 chromeos::switches::kAggressiveTabDiscardThreshold
},
321 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
322 chromeos::switches::kMemoryPressureThresholds
,
323 chromeos::switches::kAggressiveThreshold
},
327 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
328 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
329 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
330 switches::kExtensionContentVerification
,
331 switches::kExtensionContentVerificationBootstrap
},
332 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
333 switches::kExtensionContentVerification
,
334 switches::kExtensionContentVerificationEnforce
},
335 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
336 switches::kExtensionContentVerification
,
337 switches::kExtensionContentVerificationEnforceStrict
},
340 // Note that the value is specified in seconds (where 0 is equivalent to
342 const Experiment::Choice kRememberCertificateErrorDecisionsChoices
[] = {
343 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
344 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
345 switches::kRememberCertErrorDecisions
,
347 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY
,
348 switches::kRememberCertErrorDecisions
,
350 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS
,
351 switches::kRememberCertErrorDecisions
,
353 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK
,
354 switches::kRememberCertErrorDecisions
,
356 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH
,
357 switches::kRememberCertErrorDecisions
,
359 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS
,
360 switches::kRememberCertErrorDecisions
,
364 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
365 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
366 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
367 password_manager::switches::kAllowAutofillSyncCredential
, ""},
368 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
369 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
370 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
371 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
374 const Experiment::Choice kSSLVersionMinChoices
[] = {
375 { IDS_FLAGS_SSL_VERSION_DEFAULT
, "", "" },
376 { IDS_FLAGS_SSL_VERSION_SSLV3
, switches::kSSLVersionMin
,
377 switches::kSSLVersionSSLv3
},
378 { IDS_FLAGS_SSL_VERSION_TLSV1
, switches::kSSLVersionMin
,
379 switches::kSSLVersionTLSv1
},
380 { IDS_FLAGS_SSL_VERSION_TLSV11
, switches::kSSLVersionMin
,
381 switches::kSSLVersionTLSv11
},
382 { IDS_FLAGS_SSL_VERSION_TLSV12
, switches::kSSLVersionMin
,
383 switches::kSSLVersionTLSv12
},
386 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
387 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
388 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
389 autofill::switches::kDisableFillOnAccountSelect
, "" },
390 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
391 autofill::switches::kEnableFillOnAccountSelect
, "" },
392 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
393 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
396 // RECORDING USER METRICS FOR FLAGS:
397 // -----------------------------------------------------------------------------
398 // The first line of the experiment is the internal name. If you'd like to
399 // gather statistics about the usage of your flag, you should append a marker
400 // comment to the end of the feature name, like so:
401 // "my-special-feature", // FLAGS:RECORD_UMA
403 // After doing that, run
404 // tools/metrics/actions/extract_actions.py
405 // to add the metric to actions.xml (which will enable UMA to record your
406 // feature flag), then update the <owner>s and <description> sections. Make sure
407 // to include the actions.xml file when you upload your code for review!
409 // After your feature has shipped under a flag, you can locate the metrics under
410 // the action name AboutFlags_internal-action-name. Actions are recorded once
411 // per startup, so you should divide this number by AboutFlags_StartupTick to
412 // get a sense of usage. Note that this will not be the same as number of users
413 // with a given feature enabled because users can quit and relaunch the
414 // application multiple times over a given time interval. The dashboard also
415 // shows you how many (metrics reporting) users have enabled the flag over the
416 // last seven days. However, note that this is not the same as the number of
417 // users who have the flag enabled, since enabling the flag happens once,
418 // whereas running with the flag enabled happens until the user flips the flag
421 // To add a new experiment add to the end of kExperiments. There are two
422 // distinct types of experiments:
423 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
424 // macro for this type supplying the command line to the macro.
425 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
426 // deactivated state for this lab (i.e. no command line option). To specify
427 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
429 // See the documentation of Experiment for details on the fields.
431 // Command-line switches must have entries in enum "LoginCustomFlags" in
432 // histograms.xml. See note in histograms.xml and don't forget to run
433 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
435 // When adding a new choice, add it to the end of the list.
436 const Experiment kExperiments
[] = {
438 "ignore-gpu-blacklist",
439 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
440 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
442 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)
446 "disable-direct-write",
447 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
448 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
450 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)
453 "enable-win32k-renderer-lockdown",
454 IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_NAME
,
455 IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_DESCRIPTION
,
457 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableWin32kRendererLockDown
,
458 switches::kDisableWin32kRendererLockDown
)
462 "enable-experimental-canvas-features",
463 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
464 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
466 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)
469 "disable-accelerated-2d-canvas",
470 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
471 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
473 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)
476 "enable-display-list-2d-canvas",
477 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
478 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
480 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
481 switches::kDisableDisplayList2dCanvas
)
484 "composited-layer-borders",
485 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
486 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
488 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)
492 IDS_FLAGS_SHOW_FPS_COUNTER
,
493 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
495 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)
499 IDS_FLAGS_DISABLE_WEBGL_NAME
,
500 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
502 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)
504 #if defined(OS_WIN) || defined(OS_MACOSX)
507 IDS_FLAGS_ENABLE_NPAPI_NAME
,
508 IDS_FLAGS_ENABLE_NPAPI_DESCRIPTION
,
510 SINGLE_VALUE_TYPE(switches::kEnableNpapi
)
515 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
516 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
518 #if defined(OS_ANDROID)
519 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
521 SINGLE_VALUE_TYPE("")
524 #if defined(ENABLE_WEBRTC)
526 "disable-webrtc-hw-decoding",
527 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
528 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
529 kOsAndroid
| kOsCrOS
,
530 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)
533 "disable-webrtc-hw-encoding",
534 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
535 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
536 kOsAndroid
| kOsCrOS
,
537 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)
540 #if defined(OS_ANDROID)
543 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
544 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
546 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)
549 // Native client is compiled out when DISABLE_NACL is defined.
550 #if !defined(DISABLE_NACL)
552 "enable-nacl", // FLAGS:RECORD_UMA
553 IDS_FLAGS_ENABLE_NACL_NAME
,
554 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
556 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)
559 "enable-nacl-debug", // FLAGS:RECORD_UMA
560 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
561 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
563 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)
566 "nacl-debug-mask", // FLAGS:RECORD_UMA
567 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
568 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
570 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)
573 #if defined(ENABLE_EXTENSIONS)
575 "extension-apis", // FLAGS:RECORD_UMA
576 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
577 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
579 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)
582 "extensions-on-chrome-urls",
583 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
584 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
586 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)
590 "enable-fast-unload",
591 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
592 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
594 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)
596 #if defined(ENABLE_EXTENSIONS)
598 "enable-app-window-controls",
599 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
600 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
602 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)
606 "disable-hyperlink-auditing",
607 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
608 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
610 SINGLE_VALUE_TYPE(switches::kNoPings
)
612 #if defined(OS_ANDROID)
615 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
616 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
618 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
619 switches::kDisableContextualSearch
)
623 "show-autofill-type-predictions",
624 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
625 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
627 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)
630 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
631 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
632 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
633 // Can't expose the switch unless the code is compiled in.
634 // On by default for the Mac (different implementation in WebKit).
636 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)
638 #if defined(USE_AURA) || defined(OS_LINUX)
640 "overlay-scrollbars",
641 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
642 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
643 // Uses the system preference on Mac (a different implementation).
644 // On Android, this is always enabled.
645 kOsLinux
| kOsCrOS
| kOsWin
,
646 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
647 switches::kDisableOverlayScrollbar
)
652 IDS_FLAGS_ENABLE_PANELS_NAME
,
653 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
655 SINGLE_VALUE_TYPE(switches::kEnablePanels
)
658 // See http://crbug.com/120416 for how to remove this flag.
659 "save-page-as-mhtml", // FLAGS:RECORD_UMA
660 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
661 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
662 kOsMac
| kOsWin
| kOsLinux
,
663 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)
667 IDS_FLAGS_ENABLE_QUIC_NAME
,
668 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
670 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
,
671 switches::kDisableQuic
)
675 IDS_FLAGS_ENABLE_SPDY4_NAME
,
676 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION
,
678 SINGLE_VALUE_TYPE(switches::kEnableSpdy4
)
682 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME
,
683 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION
,
684 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
685 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns
,
686 switches::kDisableAsyncDns
)
689 "disable-media-source",
690 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
691 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
693 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)
696 "disable-encrypted-media",
697 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
698 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
700 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)
703 "disable-prefixed-encrypted-media",
704 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
705 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
707 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)
709 #if defined(OS_ANDROID)
711 "disable-infobar-for-protected-media-identifier",
712 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME
,
713 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION
,
715 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier
)
718 "mediadrm-enable-non-compositing",
719 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME
,
720 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION
,
722 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing
)
724 #endif // defined(OS_ANDROID)
726 "disable-javascript-harmony-shipping",
727 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
728 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
730 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)
733 "enable-javascript-harmony",
734 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
735 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
737 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)
740 "disable-software-rasterizer",
741 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
742 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
743 #if defined(ENABLE_SWIFTSHADER)
748 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)
751 "enable-gpu-rasterization",
752 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
753 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
755 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)
758 "enable-threaded-gpu-rasterization",
759 IDS_FLAGS_ENABLE_THREADED_GPU_RASTERIZATION_NAME
,
760 IDS_FLAGS_ENABLE_THREADED_GPU_RASTERIZATION_DESCRIPTION
,
762 ENABLE_DISABLE_VALUE_TYPE(
763 switches::kEnableThreadedGpuRasterization
,
764 switches::kDisableThreadedGpuRasterization
)
767 "enable-experimental-web-platform-features",
768 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
769 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
771 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)
774 "disable-ntp-other-sessions-menu",
775 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME
,
776 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION
,
778 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu
)
781 "enable-devtools-experiments",
782 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
783 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
785 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)
788 "silent-debugger-extension-api",
789 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
790 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
792 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)
794 #if defined(ENABLE_SPELLCHECK)
796 "spellcheck-autocorrect",
797 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
798 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
799 kOsWin
| kOsLinux
| kOsCrOS
,
800 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)
804 "enable-scroll-prediction",
805 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
806 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
808 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)
812 IDS_TOUCH_EVENTS_NAME
,
813 IDS_TOUCH_EVENTS_DESCRIPTION
,
815 MULTI_VALUE_TYPE(kTouchEventsChoices
)
818 "disable-touch-adjustment",
819 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
820 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
821 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
822 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)
824 #if defined(OS_CHROMEOS)
826 "network-portal-notification",
827 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
828 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
830 ENABLE_DISABLE_VALUE_TYPE(
831 chromeos::switches::kEnableNetworkPortalNotification
,
832 chromeos::switches::kDisableNetworkPortalNotification
)
836 "enable-download-resumption",
837 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
838 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
840 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)
843 "enable-download-notification",
844 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
845 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
847 SINGLE_VALUE_TYPE(switches::kEnableDownloadNotification
)
849 #if defined(ENABLE_PLUGINS)
851 "allow-nacl-socket-api",
852 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
853 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
855 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")
858 #if defined(OS_CHROMEOS)
860 "allow-touchpad-three-finger-click",
861 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
862 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
864 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)
867 "disable-easy-unlock",
868 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
869 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
871 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)
874 "enable-easy-unlock-proximity-detection",
875 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
876 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
878 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)
883 "disable-minimize-on-second-launcher-item-click",
884 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
885 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
887 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)
891 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
892 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
894 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)
898 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
899 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
900 kOsLinux
| kOsWin
| kOsCrOS
,
901 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
903 #endif // defined(USE_ASH)
905 "enable-pinch-virtual-viewport",
906 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME
,
907 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION
,
908 kOsLinux
| kOsWin
| kOsCrOS
| kOsAndroid
,
909 ENABLE_DISABLE_VALUE_TYPE(
910 cc::switches::kEnablePinchVirtualViewport
,
911 cc::switches::kDisablePinchVirtualViewport
),
914 "enable-viewport-meta",
915 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
916 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
917 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
918 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
920 #if defined(OS_CHROMEOS)
922 "disable-boot-animation",
923 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
924 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
926 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
929 "enable-video-player-chromecast-support",
930 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
931 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
933 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport
)
936 "disable-office-editing-component-app",
937 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
938 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
940 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
943 "disable-display-color-calibration",
944 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
945 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
947 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
950 "ash-disable-screen-orientation-lock",
951 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
952 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
954 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
956 #endif // defined(OS_CHROMEOS)
957 { "disable-accelerated-video-decode",
958 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
959 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
960 kOsMac
| kOsWin
| kOsCrOS
,
961 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
965 "ash-debug-shortcuts",
966 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
967 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
969 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
971 { "ash-enable-touch-view-testing",
972 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
973 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
975 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
978 "disable-touch-feedback",
979 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
980 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
982 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
984 { "ash-enable-mirrored-screen",
985 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
986 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
988 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
990 #endif // defined(USE_ASH)
991 #if defined(OS_CHROMEOS)
993 "enable-carrier-switching",
994 IDS_FLAGS_ENABLE_CARRIER_SWITCHING
,
995 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION
,
997 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching
)
1000 "disable-cloud-import",
1001 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1002 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1004 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)
1007 "enable-request-tablet-site",
1008 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1009 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1011 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)
1015 "debug-packed-apps",
1016 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1017 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1019 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)
1022 "enable-password-generation",
1023 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1024 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1025 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1026 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1027 autofill::switches::kDisablePasswordGeneration
)
1030 "enable-automatic-password-saving",
1031 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1032 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1035 password_manager::switches::kEnableAutomaticPasswordSaving
)
1038 "password-manager-reauthentication",
1039 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1040 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1042 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)
1045 "enable-password-link",
1046 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1047 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1048 kOsAndroid
| kOsDesktop
,
1049 ENABLE_DISABLE_VALUE_TYPE(
1050 password_manager::switches::kEnablePasswordLink
,
1051 password_manager::switches::kDisablePasswordLink
)
1054 "enable-password-save-in-page-navigation",
1055 IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_NAME
,
1056 IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_DESCRIPTION
,
1059 autofill::switches::kEnablePasswordSaveOnInPageNavigation
)
1062 "enable-affiliation-based-matching",
1063 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1064 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1065 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1066 ENABLE_DISABLE_VALUE_TYPE(
1067 password_manager::switches::kEnableAffiliationBasedMatching
,
1068 password_manager::switches::kDisableAffiliationBasedMatching
)
1071 "enable-deferred-image-decoding",
1072 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME
,
1073 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION
,
1074 kOsMac
| kOsLinux
| kOsCrOS
,
1075 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding
)
1078 "wallet-service-use-sandbox",
1079 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1080 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1081 kOsAndroid
| kOsDesktop
,
1082 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1083 autofill::switches::kWalletServiceUseSandbox
, "1",
1084 autofill::switches::kWalletServiceUseSandbox
, "0")
1086 #if defined(USE_AURA)
1088 "overscroll-history-navigation",
1089 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1090 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1092 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)
1096 "scroll-end-effect",
1097 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1098 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1100 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1101 switches::kScrollEndEffect
, "1",
1102 switches::kScrollEndEffect
, "0")
1105 "enable-touch-drag-drop",
1106 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1107 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1109 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1110 switches::kDisableTouchDragDrop
)
1113 "enable-touch-editing",
1114 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1115 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1116 kOsCrOS
| kOsWin
| kOsLinux
,
1117 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1118 switches::kDisableTouchEditing
)
1121 "enable-stale-while-revalidate",
1122 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1123 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1125 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)
1128 "enable-suggestions-service",
1129 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1130 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1131 kOsAndroid
| kOsCrOS
,
1132 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1133 switches::kDisableSuggestionsService
)
1136 "enable-supervised-user-blacklist",
1137 IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME
,
1138 IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION
,
1139 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1140 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSupervisedUserBlacklist
,
1141 switches::kDisableSupervisedUserBlacklist
)
1144 "enable-supervised-user-managed-bookmarks-folder",
1145 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1146 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1147 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1148 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)
1151 "enable-supervised-user-safesites",
1152 IDS_FLAGS_ENABLE_SUPERVISED_USER_SAFESITES_NAME
,
1153 IDS_FLAGS_ENABLE_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
1154 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1155 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSupervisedUserSafeSites
,
1156 switches::kDisableSupervisedUserSafeSites
)
1158 #if defined(ENABLE_APP_LIST)
1160 "enable-sync-app-list",
1161 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1162 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1164 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1165 app_list::switches::kDisableSyncAppList
)
1168 #if defined(OS_MACOSX)
1170 "enable-avfoundation",
1171 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1172 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1174 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1175 switches::kForceQTKit
)
1180 IDS_FLAGS_LCD_TEXT_NAME
,
1181 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1183 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1184 switches::kDisableLCDText
)
1186 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1188 "delegated-renderer",
1189 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1190 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1191 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1192 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1193 switches::kDisableDelegatedRenderer
)
1197 "max-tiles-for-interest-area",
1198 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME
,
1199 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION
,
1201 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices
)
1204 "enable-offline-auto-reload",
1205 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1206 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1208 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1209 switches::kDisableOfflineAutoReload
)
1212 "enable-offline-auto-reload-visible-only",
1213 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1214 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1216 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1217 switches::kDisableOfflineAutoReloadVisibleOnly
)
1220 "enable-offline-load-stale-cache",
1221 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME
,
1222 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION
,
1224 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache
,
1225 switches::kDisableOfflineLoadStaleCache
)
1228 "default-tile-width",
1229 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1230 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1232 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)
1235 "default-tile-height",
1236 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1237 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1239 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)
1241 #if defined(OS_ANDROID)
1243 "disable-gesture-requirement-for-media-playback",
1244 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1245 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1247 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)
1250 #if defined(OS_CHROMEOS)
1252 "enable-virtual-keyboard",
1253 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1254 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1256 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)
1259 "enable-virtual-keyboard-overscroll",
1260 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1261 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1263 ENABLE_DISABLE_VALUE_TYPE(
1264 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1265 keyboard::switches::kDisableVirtualKeyboardOverscroll
)
1268 "enable-swipe-selection",
1269 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME
,
1270 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION
,
1272 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection
)
1275 "enable-input-view",
1276 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1277 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1279 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1280 keyboard::switches::kDisableInputView
)
1283 "enable-new-korean-ime",
1284 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_NAME
,
1285 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_DESCRIPTION
,
1287 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewKoreanIme
)
1290 "enable-new-md-input-view",
1291 IDS_FLAGS_ENABLE_NEW_MD_INPUT_VIEW_NAME
,
1292 IDS_FLAGS_ENABLE_NEW_MD_INPUT_VIEW_DESCRIPTION
,
1294 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewMDInputView
)
1297 "enable-physical-keyboard-autocorrect",
1298 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1299 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1301 ENABLE_DISABLE_VALUE_TYPE(
1302 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1303 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)
1306 "disable-voice-input",
1307 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1308 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1310 SINGLE_VALUE_TYPE(chromeos::switches::kDisableVoiceInput
)
1313 "enable-experimental-input-view-features",
1314 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1315 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1317 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures
)
1320 "enable-gesture-typing",
1321 IDS_FLAGS_ENABLE_GESTURE_TYPING_NAME
,
1322 IDS_FLAGS_ENABLE_GESTURE_TYPING_DESCRIPTION
,
1324 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureTyping
)
1327 "disable-smart-virtual-keyboard",
1328 IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_NAME
,
1329 IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1331 SINGLE_VALUE_TYPE(keyboard::switches::kDisableSmartVirtualKeyboard
)
1335 "enable-simple-cache-backend",
1336 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1337 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1338 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1339 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)
1342 "enable-tcp-fast-open",
1343 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1344 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1345 kOsLinux
| kOsCrOS
| kOsAndroid
,
1346 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)
1348 #if defined(ENABLE_SERVICE_DISCOVERY)
1350 "device-discovery-notifications",
1351 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1352 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1354 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1355 switches::kDisableDeviceDiscoveryNotifications
)
1358 "enable-print-preview-register-promos",
1359 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1360 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1362 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)
1364 #endif // ENABLE_SERVICE_DISCOVERY
1367 "enable-cloud-print-xps",
1368 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1369 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1371 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)
1374 #if defined(USE_AURA)
1376 "tab-capture-upscale-quality",
1377 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1378 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1380 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)
1383 "tab-capture-downscale-quality",
1384 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1385 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1387 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)
1390 #if defined(TOOLKIT_VIEWS)
1392 "tab-close-buttons-hidden-with-touch",
1393 IDS_FLAGS_TAB_CLOSE_BUTTONS_HIDDEN_WITH_TOUCH_NAME
,
1394 IDS_FLAGS_TAB_CLOSE_BUTTONS_HIDDEN_WITH_TOUCH_DESCRIPTION
,
1395 kOsCrOS
| kOsWin
| kOsLinux
,
1396 MULTI_VALUE_TYPE(kTabCloseButtonsHiddenWithTouchChoices
)
1400 "enable-webgl-draft-extensions",
1401 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1402 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1404 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)
1408 IDS_FLAGS_ENABLE_WEB_MIDI_NAME
,
1409 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION
,
1410 kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
1411 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI
)
1414 "enable-new-profile-management",
1415 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1416 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1417 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1418 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1419 switches::kDisableNewProfileManagement
)
1422 "enable-account-consistency",
1423 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1424 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1425 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1426 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1427 switches::kDisableAccountConsistency
)
1430 "enable-fast-user-switching",
1431 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME
,
1432 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION
,
1433 kOsMac
| kOsWin
| kOsLinux
,
1434 SINGLE_VALUE_TYPE(switches::kFastUserSwitching
)
1437 "enable-new-avatar-menu",
1438 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME
,
1439 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION
,
1440 kOsMac
| kOsWin
| kOsLinux
,
1441 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu
,
1442 switches::kDisableNewAvatarMenu
)
1445 "enable-iframe-based-signin",
1446 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1447 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1448 kOsMac
| kOsWin
| kOsLinux
,
1449 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)
1452 "enable-google-profile-info",
1453 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1454 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1455 kOsMac
| kOsWin
| kOsLinux
,
1456 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)
1459 "reset-app-list-install-state",
1460 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1461 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1462 kOsMac
| kOsWin
| kOsLinux
,
1463 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState
)
1465 #if defined(ENABLE_APP_LIST)
1466 #if defined(OS_LINUX)
1468 // This is compiled out on non-Linux platforms because otherwise it would be
1469 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1470 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1472 IDS_FLAGS_ENABLE_APP_LIST_NAME
,
1473 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION
,
1475 SINGLE_VALUE_TYPE(switches::kEnableAppList
)
1478 #if defined(ENABLE_EXTENSIONS)
1480 "enable-surface-worker",
1481 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1482 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1484 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)
1488 "disable-drive-apps-in-app-list",
1489 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1490 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1492 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)
1495 #if defined(OS_ANDROID)
1497 "enable-accessibility-tab-switcher",
1498 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1499 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1501 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)
1504 // TODO(dmazzoni): remove this flag when native android accessibility
1505 // ships in the stable channel. http://crbug.com/356775
1506 "enable-accessibility-script-injection",
1507 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1508 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1510 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1511 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
1516 IDS_FLAGS_ONE_COPY_NAME
,
1517 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1519 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy
,
1520 switches::kDisableOneCopy
)
1524 IDS_FLAGS_ZERO_COPY_NAME
,
1525 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1527 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)
1529 #if defined(OS_CHROMEOS)
1531 "enable-first-run-ui-transitions",
1532 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1533 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1535 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)
1539 "disable-new-bookmark-apps",
1540 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1541 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1542 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1543 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1544 switches::kDisableNewBookmarkApps
)
1546 #if defined(OS_MACOSX)
1548 "disable-hosted-app-shim-creation",
1549 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1550 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1552 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)
1555 "enable-hosted-app-quit-notification",
1556 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1557 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1559 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)
1563 "enable-ephemeral-apps-in-webstore",
1564 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1565 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1567 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)
1570 "enable-linkable-ephemeral-apps",
1571 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1572 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1574 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)
1577 "enable-service-worker-sync",
1578 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME
,
1579 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION
,
1581 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync
)
1583 #if defined(OS_ANDROID)
1585 "disable-click-delay",
1586 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1587 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1589 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1590 SINGLE_VALUE_TYPE("disable-click-delay")
1593 "disable-pull-to-refresh-effect",
1594 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1595 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1597 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)
1600 #if defined(OS_MACOSX)
1602 "enable-translate-new-ux",
1603 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1604 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1606 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)
1609 #if defined(TOOLKIT_VIEWS)
1611 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1612 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1613 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1614 kOsCrOS
| kOsWin
| kOsLinux
,
1615 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)
1618 "enable-link-disambiguation-popup",
1619 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1620 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1622 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)
1625 #if defined(ENABLE_EXTENSIONS)
1627 "enable-apps-show-on-first-paint",
1628 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1629 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1631 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)
1635 "enhanced-bookmarks-experiment",
1636 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1637 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1638 kOsDesktop
| kOsAndroid
,
1639 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1640 switches::kEnhancedBookmarksExperiment
, "1",
1641 switches::kEnhancedBookmarksExperiment
, "0")
1644 "manual-enhanced-bookmarks",
1645 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1646 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1647 kOsDesktop
| kOsAndroid
,
1648 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks
)
1651 "manual-enhanced-bookmarks-optout",
1652 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1653 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1654 kOsDesktop
| kOsAndroid
,
1655 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout
)
1657 #if defined(OS_ANDROID)
1659 "enable-zero-suggest-experiment",
1660 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1661 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1663 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)
1666 "enable-reader-mode-toolbar-icon",
1667 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1668 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1670 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)
1674 "num-raster-threads",
1675 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1676 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1678 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)
1681 "ignore-autocomplete-off-autofill",
1682 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_NAME
,
1683 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_DESCRIPTION
,
1684 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1685 ENABLE_DISABLE_VALUE_TYPE(
1686 autofill::switches::kIgnoreAutocompleteOffForAutofill
,
1687 autofill::switches::kRespectAutocompleteOffForAutofill
)
1690 "enable-single-click-autofill",
1691 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1692 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1693 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1694 ENABLE_DISABLE_VALUE_TYPE(
1695 autofill::switches::kEnableSingleClickAutofill
,
1696 autofill::switches::kDisableSingleClickAutofill
)
1699 "enable-permissions-bubbles",
1700 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME
,
1701 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION
,
1702 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1703 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles
,
1704 switches::kDisablePermissionsBubbles
)
1707 "enable-session-crashed-bubble",
1708 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1709 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1711 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1712 switches::kDisableSessionCrashedBubble
)
1715 "enable-out-of-process-pdf",
1716 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME
,
1717 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION
,
1719 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOutOfProcessPdf
,
1720 switches::kDisableOutOfProcessPdf
)
1723 "enable-pdf-material-ui",
1724 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1725 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1727 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1728 switches::kDisablePdfMaterialUI
)
1731 "disable-cast-streaming-hw-encoding",
1732 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1733 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1735 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)
1737 #if defined(OS_ANDROID)
1740 IDS_FLAGS_DISABLE_CAST_NAME
,
1741 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1743 SINGLE_VALUE_TYPE(switches::kDisableCast
)
1746 "prefetch-search-results",
1747 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1748 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1750 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)
1753 #if defined(ENABLE_APP_LIST)
1755 "enable-experimental-app-list",
1756 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1757 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1758 kOsWin
| kOsLinux
| kOsCrOS
,
1759 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList
,
1760 app_list::switches::kDisableExperimentalAppList
)
1763 "enable-centered-app-list",
1764 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1765 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1766 kOsWin
| kOsLinux
| kOsCrOS
,
1767 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)
1771 "disable-threaded-scrolling",
1772 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1773 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1774 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
1775 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)
1778 "bleeding-edge-renderer-mode",
1779 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1780 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1782 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)
1785 "enable-settings-window",
1786 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1787 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1789 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1790 switches::kDisableSettingsWindow
)
1792 #if defined(OS_ANDROID)
1794 "enable-instant-search-clicks",
1795 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME
,
1796 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION
,
1798 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks
)
1802 "enable-save-password-bubble",
1803 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1804 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1805 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1806 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1807 switches::kDisableSavePasswordBubble
)
1809 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1810 // crbug.com/366483 for the target milestone.
1812 "allow-insecure-websocket-from-https-origin",
1813 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME
,
1814 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION
,
1816 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin
)
1819 "enable-apps-file-associations",
1820 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1821 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1823 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)
1825 #if defined(OS_ANDROID)
1827 "enable-embeddedsearch-api",
1828 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1829 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1831 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)
1834 "enable-app-install-alerts",
1835 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME
,
1836 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION
,
1838 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts
)
1842 "distance-field-text",
1843 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1844 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1846 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1847 switches::kDisableDistanceFieldText
)
1850 "extension-content-verification",
1851 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1852 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1854 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)
1856 #if defined(USE_AURA)
1858 "text-input-focus-manager",
1859 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME
,
1860 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION
,
1861 kOsCrOS
| kOsLinux
| kOsWin
,
1862 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager
,
1863 switches::kDisableTextInputFocusManager
)
1866 #if defined(ENABLE_EXTENSIONS)
1868 "extension-active-script-permission",
1869 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1870 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1872 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)
1876 "answers-in-suggest",
1877 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME
,
1878 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION
,
1879 kOsAndroid
| kOsWin
| kOsLinux
| kOsCrOS
,
1880 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest
,
1881 switches::kDisableAnswersInSuggest
)
1883 #if defined(OS_ANDROID)
1885 "enable-data-reduction-proxy-dev",
1886 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1887 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1889 ENABLE_DISABLE_VALUE_TYPE(
1890 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1891 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)
1894 "enable-data-reduction-proxy-alt",
1895 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME
,
1896 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION
,
1899 data_reduction_proxy::switches::kEnableDataReductionProxyAlt
)
1903 "disable-experimental-hotwording",
1904 IDS_FLAGS_DISABLE_EXPERIMENTAL_HOTWORDING_NAME
,
1905 IDS_FLAGS_DISABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION
,
1907 SINGLE_VALUE_TYPE(switches::kDisableExperimentalHotwording
)
1910 "enable-hotword-hardware",
1911 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1912 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1914 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)
1916 #if defined(ENABLE_EXTENSIONS)
1918 "enable-embedded-extension-options",
1919 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1920 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1922 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)
1925 #if defined(USE_ASH)
1927 "enable-web-app-frame",
1928 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1929 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1931 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)
1935 "enable-website-settings-manager",
1936 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME
,
1937 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION
,
1939 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager
)
1942 "remember-cert-error-decisions",
1943 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME
,
1944 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION
,
1946 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices
)
1949 "enable-drop-sync-credential",
1950 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
1951 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
1953 ENABLE_DISABLE_VALUE_TYPE(
1954 password_manager::switches::kEnableDropSyncCredential
,
1955 password_manager::switches::kDisableDropSyncCredential
)
1957 #if defined(ENABLE_EXTENSIONS)
1959 "enable-extension-action-redesign",
1960 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
1961 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
1963 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)
1967 "autofill-sync-credential",
1968 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
1969 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
1971 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)
1973 #if !defined(OS_ANDROID)
1975 "enable-message-center-always-scroll-up-upon-notification-removal",
1976 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
1977 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
1980 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)
1983 "enable-md-settings",
1984 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
1985 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
1988 switches::kEnableMaterialDesignSettings
)
1991 #if defined(OS_CHROMEOS)
1993 "disable-memory-pressure-chromeos",
1994 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME
,
1995 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION
,
1997 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS
)
2000 "memory-pressure-thresholds",
2001 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
2002 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
2004 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)
2008 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
2009 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
2011 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)
2013 #endif // OS_CHROMEOS
2015 "enable-tab-audio-muting",
2016 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
2017 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
2019 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)
2022 "enable-credential-manager-api",
2023 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
2024 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
2026 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)
2029 "reduced-referrer-granularity",
2030 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
2031 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
2033 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)
2035 #if defined(ENABLE_PLUGINS)
2037 "enable-plugin-power-saver",
2038 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
2039 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
2041 SINGLE_VALUE_TYPE(switches::kEnablePluginPowerSaver
)
2044 #if defined(OS_CHROMEOS)
2046 "disable-new-zip-unpacker",
2047 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
2048 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
2050 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)
2052 #endif // defined(OS_CHROMEOS)
2055 IDS_FLAGS_SSL_VERSION_MIN_NAME
,
2056 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION
,
2058 MULTI_VALUE_TYPE(kSSLVersionMinChoices
)
2061 "enable-credit-card-scan",
2062 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
2063 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
2065 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
2066 autofill::switches::kDisableCreditCardScan
)
2068 #if defined(OS_CHROMEOS)
2070 "enable-captive-portal-bypass-proxy",
2071 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
2072 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
2074 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCaptivePortalBypassProxyOption
)
2077 "disable-roboto-font-ui",
2078 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_NAME
,
2079 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_DESCRIPTION
,
2081 SINGLE_VALUE_TYPE(switches::kDisableRobotoFontUI
)
2083 #endif // defined(OS_CHROMEOS)
2084 #if defined(OS_ANDROID)
2086 "enable-seccomp-filter-sandbox",
2087 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
2088 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
2090 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)
2094 "enable-touch-hover",
2095 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
2096 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
2098 SINGLE_VALUE_TYPE("enable-touch-hover")
2101 "enable-fill-on-account-select",
2102 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
2103 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
2105 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)
2107 #if defined(OS_CHROMEOS)
2109 "enable-wifi-credential-sync", // FLAGS:RECORD_UMA
2110 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
2111 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
2113 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)
2116 "enable-potentially-annoying-security-features",
2117 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
2118 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
2120 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)
2124 "enable-delay-agnostic-aec",
2125 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
2126 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
2128 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)
2131 "mark-non-secure-as", // FLAGS:RECORD_UMA
2132 IDS_MARK_NON_SECURE_AS_NAME
,
2133 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
2135 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)
2138 "enable-site-per-process",
2139 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
2140 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
2142 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)
2144 #if defined(OS_MACOSX)
2146 "enable-harfbuzz-rendertext",
2147 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
2148 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
2150 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)
2152 #endif // defined(OS_MACOSX)
2153 #if defined(OS_CHROMEOS)
2155 "disable-timezone-tracking",
2156 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
2157 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
2159 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)
2161 #endif // defined(OS_CHROMEOS)
2163 "enable-data-reduction-proxy-lo-fi",
2164 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_NAME
,
2165 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
2167 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2168 kEnableDataReductionProxyLoFi
)
2170 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2172 "enable-data-reduction-proxy-bypass-warnings",
2173 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
2174 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
2176 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2177 kEnableDataReductionProxyBypassWarning
)
2181 "allow-insecure-localhost",
2182 IDS_ALLOW_INSECURE_LOCALHOST
,
2183 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
2185 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)
2188 "bypass-app-banner-engagement-checks",
2189 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
2190 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
2192 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)
2196 IDS_FLAGS_SYNC_SANDBOX_NAME
,
2197 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
2199 SINGLE_VALUE_TYPE_AND_VALUE(
2200 switches::kSyncServiceURL
,
2201 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")
2204 // NOTE: Adding new command-line switches requires adding corresponding
2205 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2206 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2209 const Experiment
* experiments
= kExperiments
;
2210 size_t num_experiments
= arraysize(kExperiments
);
2212 // Stores and encapsulates the little state that about:flags has.
2215 FlagsState() : needs_restart_(false) {}
2216 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2217 base::CommandLine
* command_line
,
2218 SentinelsMode sentinels
);
2219 bool IsRestartNeededToCommitChanges();
2220 void SetExperimentEnabled(
2221 FlagsStorage
* flags_storage
,
2222 const std::string
& internal_name
,
2224 void RemoveFlagsSwitches(
2225 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2226 void ResetAllFlags(FlagsStorage
* flags_storage
);
2229 // Returns the singleton instance of this class
2230 static FlagsState
* GetInstance() {
2231 return Singleton
<FlagsState
>::get();
2235 bool needs_restart_
;
2236 std::map
<std::string
, std::string
> flags_switches_
;
2238 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2241 // Adds the internal names for the specified experiment to |names|.
2242 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2243 if (e
.type
== Experiment::SINGLE_VALUE
) {
2244 names
->insert(e
.internal_name
);
2246 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2247 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2248 for (int i
= 0; i
< e
.num_choices
; ++i
)
2249 names
->insert(e
.NameForChoice(i
));
2253 // Confirms that an experiment is valid, used in a DCHECK in
2254 // SanitizeList below.
2255 bool ValidateExperiment(const Experiment
& e
) {
2257 case Experiment::SINGLE_VALUE
:
2258 DCHECK_EQ(0, e
.num_choices
);
2261 case Experiment::MULTI_VALUE
:
2262 DCHECK_GT(e
.num_choices
, 0);
2264 DCHECK(e
.choices
[0].command_line_switch
);
2265 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2267 case Experiment::ENABLE_DISABLE_VALUE
:
2268 DCHECK_EQ(3, e
.num_choices
);
2270 DCHECK(e
.command_line_switch
);
2271 DCHECK(e
.command_line_value
);
2272 DCHECK(e
.disable_command_line_switch
);
2273 DCHECK(e
.disable_command_line_value
);
2281 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2282 // unknown, to prevent this list to become very long as experiments are added
2284 void SanitizeList(FlagsStorage
* flags_storage
) {
2285 std::set
<std::string
> known_experiments
;
2286 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2287 DCHECK(ValidateExperiment(experiments
[i
]));
2288 AddInternalName(experiments
[i
], &known_experiments
);
2291 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2293 std::set
<std::string
> new_enabled_experiments
=
2294 base::STLSetIntersection
<std::set
<std::string
> >(
2295 known_experiments
, enabled_experiments
);
2297 if (new_enabled_experiments
!= enabled_experiments
)
2298 flags_storage
->SetFlags(new_enabled_experiments
);
2301 void GetSanitizedEnabledFlags(
2302 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2303 SanitizeList(flags_storage
);
2304 *result
= flags_storage
->GetFlags();
2307 bool SkipConditionalExperiment(const Experiment
& experiment
,
2308 FlagsStorage
* flags_storage
) {
2309 if ((experiment
.internal_name
== std::string("manual-enhanced-bookmarks")) ||
2310 (experiment
.internal_name
==
2311 std::string("manual-enhanced-bookmarks-optout"))) {
2315 #if defined(OS_ANDROID) || defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2316 chrome::VersionInfo::Channel channel
= chrome::VersionInfo::GetChannel();
2319 #if defined(OS_ANDROID)
2320 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2321 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2322 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2323 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2326 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2327 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2328 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2331 // enable-data-reduction-proxy-lo-fi is only available for Chromium builds and
2332 // the Canary/Dev channel.
2333 if (!strcmp("enable-data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2334 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2335 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2336 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2341 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2342 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2343 // builds and Canary/Dev channel.
2344 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2345 experiment
.internal_name
) &&
2346 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
&&
2347 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2348 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2357 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2358 // enabled on the current platform.
2359 void GetSanitizedEnabledFlagsForCurrentPlatform(
2360 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2361 GetSanitizedEnabledFlags(flags_storage
, result
);
2363 // Filter out any experiments that aren't enabled on the current platform. We
2364 // don't remove these from prefs else syncing to a platform with a different
2365 // set of experiments would be lossy.
2366 std::set
<std::string
> platform_experiments
;
2367 int current_platform
= GetCurrentPlatform();
2368 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2369 if (experiments
[i
].supported_platforms
& current_platform
)
2370 AddInternalName(experiments
[i
], &platform_experiments
);
2371 #if defined(OS_CHROMEOS)
2372 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2373 AddInternalName(experiments
[i
], &platform_experiments
);
2377 std::set
<std::string
> new_enabled_experiments
=
2378 base::STLSetIntersection
<std::set
<std::string
> >(
2379 platform_experiments
, *result
);
2381 result
->swap(new_enabled_experiments
);
2384 // Returns the Value representing the choice data in the specified experiment.
2385 base::Value
* CreateChoiceData(
2386 const Experiment
& experiment
,
2387 const std::set
<std::string
>& enabled_experiments
) {
2388 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2389 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2390 base::ListValue
* result
= new base::ListValue
;
2391 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2392 base::DictionaryValue
* value
= new base::DictionaryValue
;
2393 const std::string name
= experiment
.NameForChoice(i
);
2394 value
->SetString("internal_name", name
);
2395 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2396 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2397 result
->Append(value
);
2404 std::string
Experiment::NameForChoice(int index
) const {
2405 DCHECK(type
== Experiment::MULTI_VALUE
||
2406 type
== Experiment::ENABLE_DISABLE_VALUE
);
2407 DCHECK_LT(index
, num_choices
);
2408 return std::string(internal_name
) + testing::kMultiSeparator
+
2409 base::IntToString(index
);
2412 base::string16
Experiment::DescriptionForChoice(int index
) const {
2413 DCHECK(type
== Experiment::MULTI_VALUE
||
2414 type
== Experiment::ENABLE_DISABLE_VALUE
);
2415 DCHECK_LT(index
, num_choices
);
2417 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2418 const int kEnableDisableDescriptionIds
[] = {
2419 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2420 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2421 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2423 description_id
= kEnableDisableDescriptionIds
[index
];
2425 description_id
= choices
[index
].description_id
;
2427 return l10n_util::GetStringUTF16(description_id
);
2430 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2431 base::CommandLine
* command_line
,
2432 SentinelsMode sentinels
) {
2433 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2438 bool AreSwitchesIdenticalToCurrentCommandLine(
2439 const base::CommandLine
& new_cmdline
,
2440 const base::CommandLine
& active_cmdline
,
2441 std::set
<base::CommandLine::StringType
>* out_difference
) {
2442 std::set
<base::CommandLine::StringType
> new_flags
=
2443 ExtractFlagsFromCommandLine(new_cmdline
);
2444 std::set
<base::CommandLine::StringType
> active_flags
=
2445 ExtractFlagsFromCommandLine(active_cmdline
);
2447 bool result
= false;
2448 // Needed because std::equal doesn't check if the 2nd set is empty.
2449 if (new_flags
.size() == active_flags
.size()) {
2451 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2454 if (out_difference
&& !result
) {
2455 std::set_symmetric_difference(
2458 active_flags
.begin(),
2460 std::inserter(*out_difference
, out_difference
->begin()));
2466 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2468 base::ListValue
* supported_experiments
,
2469 base::ListValue
* unsupported_experiments
) {
2470 std::set
<std::string
> enabled_experiments
;
2471 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2473 int current_platform
= GetCurrentPlatform();
2475 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2476 const Experiment
& experiment
= experiments
[i
];
2477 if (SkipConditionalExperiment(experiment
, flags_storage
))
2480 base::DictionaryValue
* data
= new base::DictionaryValue();
2481 data
->SetString("internal_name", experiment
.internal_name
);
2482 data
->SetString("name",
2483 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2484 data
->SetString("description",
2485 l10n_util::GetStringUTF16(
2486 experiment
.visible_description_id
));
2488 base::ListValue
* supported_platforms
= new base::ListValue();
2489 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2490 data
->Set("supported_platforms", supported_platforms
);
2492 switch (experiment
.type
) {
2493 case Experiment::SINGLE_VALUE
:
2496 enabled_experiments
.count(experiment
.internal_name
) > 0);
2498 case Experiment::MULTI_VALUE
:
2499 case Experiment::ENABLE_DISABLE_VALUE
:
2500 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2506 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2507 #if defined(OS_CHROMEOS)
2508 if (access
== kOwnerAccessToFlags
&&
2509 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2514 supported_experiments
->Append(data
);
2516 unsupported_experiments
->Append(data
);
2520 bool IsRestartNeededToCommitChanges() {
2521 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2524 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2525 const std::string
& internal_name
,
2527 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2528 internal_name
, enable
);
2531 void RemoveFlagsSwitches(
2532 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2533 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2536 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2537 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2540 int GetCurrentPlatform() {
2541 #if defined(OS_MACOSX)
2543 #elif defined(OS_WIN)
2545 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2547 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2549 #elif defined(OS_ANDROID)
2552 #error Unknown platform
2556 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2557 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2558 for (const std::string
& flag
: flags
) {
2559 std::string
action("AboutFlags_");
2561 content::RecordComputedAction(action
);
2563 // Since flag metrics are recorded every startup, add a tick so that the
2564 // stats can be made meaningful.
2566 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2567 content::RecordAction(base::UserMetricsAction("StartupTick"));
2570 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2571 return static_cast<base::HistogramBase::Sample
>(
2572 metrics::HashMetricName(switch_name
));
2575 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2576 const std::set
<std::string
>& command_line_difference
) {
2577 for (const std::string
& flag
: command_line_difference
) {
2578 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2579 if (StartsWithASCII(flag
, "--", true /* case_sensitive */)) {
2580 // Skip '--' before switch name.
2581 std::string
switch_name(flag
.substr(2));
2583 // Kill value, if any.
2584 const size_t value_pos
= switch_name
.find('=');
2585 if (value_pos
!= std::string::npos
)
2586 switch_name
.resize(value_pos
);
2588 uma_id
= GetSwitchUMAId(switch_name
);
2590 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2591 << "' has incorrect format.";
2593 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2594 << "' '" << flag
<< "', uma_id=" << uma_id
;
2596 // Sparse histogram macro does not cache the histogram, so it's safe
2597 // to use macro with non-static histogram name here.
2598 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2602 //////////////////////////////////////////////////////////////////////////////
2603 // FlagsState implementation.
2607 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2608 NameToSwitchAndValueMap
;
2610 void SetFlagToSwitchMapping(const std::string
& key
,
2611 const std::string
& switch_name
,
2612 const std::string
& switch_value
,
2613 NameToSwitchAndValueMap
* name_to_switch_map
) {
2614 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2615 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2618 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2619 base::CommandLine
* command_line
,
2620 SentinelsMode sentinels
) {
2621 if (command_line
->HasSwitch(switches::kNoExperiments
))
2624 std::set
<std::string
> enabled_experiments
;
2626 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2627 &enabled_experiments
);
2629 NameToSwitchAndValueMap name_to_switch_map
;
2630 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2631 const Experiment
& e
= experiments
[i
];
2632 if (e
.type
== Experiment::SINGLE_VALUE
) {
2633 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2634 e
.command_line_value
, &name_to_switch_map
);
2635 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2636 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2637 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2638 e
.choices
[j
].command_line_switch
,
2639 e
.choices
[j
].command_line_value
,
2640 &name_to_switch_map
);
2643 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2644 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2645 &name_to_switch_map
);
2646 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2647 e
.command_line_value
, &name_to_switch_map
);
2648 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2649 e
.disable_command_line_value
, &name_to_switch_map
);
2653 if (sentinels
== kAddSentinels
) {
2654 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2655 flags_switches_
.insert(
2656 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2659 for (const std::string
& experiment_name
: enabled_experiments
) {
2660 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2661 name_to_switch_map
.find(experiment_name
);
2662 if (name_to_switch_it
== name_to_switch_map
.end()) {
2667 #if defined(OS_CHROMEOS)
2668 // On Chrome OS setting command line flag may make browser to restart on
2669 // user login. As this flag eventually will be set to a significant number
2670 // of users skip manual-enhanced-bookmarks to avoid restart.
2671 if (experiment_name
== "manual-enhanced-bookmarks")
2675 const std::pair
<std::string
, std::string
>&
2676 switch_and_value_pair
= name_to_switch_it
->second
;
2678 CHECK(!switch_and_value_pair
.first
.empty());
2679 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2680 switch_and_value_pair
.second
);
2681 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2683 if (sentinels
== kAddSentinels
) {
2684 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2685 flags_switches_
.insert(
2686 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2691 bool FlagsState::IsRestartNeededToCommitChanges() {
2692 return needs_restart_
;
2695 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2696 const std::string
& internal_name
,
2698 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2699 if (at_index
!= std::string::npos
) {
2701 // We're being asked to enable a multi-choice experiment. Disable the
2702 // currently selected choice.
2703 DCHECK_NE(at_index
, 0u);
2704 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2705 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2707 // And enable the new choice, if it is not the default first choice.
2708 if (internal_name
!= experiment_name
+ "@0") {
2709 std::set
<std::string
> enabled_experiments
;
2710 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2711 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2712 flags_storage
->SetFlags(enabled_experiments
);
2717 std::set
<std::string
> enabled_experiments
;
2718 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2720 const Experiment
* e
= NULL
;
2721 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2722 if (experiments
[i
].internal_name
== internal_name
) {
2723 e
= experiments
+ i
;
2729 if (e
->type
== Experiment::SINGLE_VALUE
) {
2731 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2733 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2736 // Enable the first choice.
2737 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2739 // Find the currently enabled choice and disable it.
2740 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2741 std::string choice_name
= e
->NameForChoice(i
);
2742 if (enabled_experiments
.find(choice_name
) !=
2743 enabled_experiments
.end()) {
2744 needs_restart_
= true;
2745 enabled_experiments
.erase(choice_name
);
2746 // Continue on just in case there's a bug and more than one
2747 // experiment for this choice was enabled.
2753 flags_storage
->SetFlags(enabled_experiments
);
2756 void FlagsState::RemoveFlagsSwitches(
2757 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2758 for (const auto& entry
: flags_switches_
)
2759 switch_list
->erase(entry
.first
);
2762 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2763 needs_restart_
= true;
2765 std::set
<std::string
> no_experiments
;
2766 flags_storage
->SetFlags(no_experiments
);
2769 void FlagsState::reset() {
2770 needs_restart_
= false;
2771 flags_switches_
.clear();
2778 // WARNING: '@' is also used in the html file. If you update this constant you
2779 // also need to update the html file.
2780 const char kMultiSeparator
[] = "@";
2782 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2785 FlagsState::GetInstance()->reset();
2788 void SetExperiments(const Experiment
* e
, size_t count
) {
2790 experiments
= kExperiments
;
2791 num_experiments
= arraysize(kExperiments
);
2794 num_experiments
= count
;
2798 const Experiment
* GetExperiments(size_t* count
) {
2799 *count
= num_experiments
;
2803 } // namespace testing
2805 } // namespace about_flags