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 kGpuRasterizationMSAASampleCountChoices
[] = {
301 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
304 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_ZERO
,
305 switches::kGpuRasterizationMSAASampleCount
, "0" },
306 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_TWO
,
307 switches::kGpuRasterizationMSAASampleCount
, "2" },
308 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_FOUR
,
309 switches::kGpuRasterizationMSAASampleCount
, "4" },
310 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_EIGHT
,
311 switches::kGpuRasterizationMSAASampleCount
, "8" },
312 { IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_SIXTEEN
,
313 switches::kGpuRasterizationMSAASampleCount
, "16" },
316 const Experiment::Choice kEnableGpuRasterizationChoices
[] = {
317 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
318 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
319 switches::kEnableGpuRasterization
, "" },
320 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
321 switches::kDisableGpuRasterization
, "" },
322 { IDS_FLAGS_FORCE_GPU_RASTERIZATION
,
323 switches::kForceGpuRasterization
, "" },
326 #if defined(OS_CHROMEOS)
327 const Experiment::Choice kMemoryPressureThresholdChoices
[] = {
328 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
329 { IDS_FLAGS_CONSERVATIVE_THRESHOLDS
,
330 chromeos::switches::kMemoryPressureThresholds
,
331 chromeos::switches::kConservativeThreshold
},
332 { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS
,
333 chromeos::switches::kMemoryPressureThresholds
,
334 chromeos::switches::kAggressiveCacheDiscardThreshold
},
335 { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS
,
336 chromeos::switches::kMemoryPressureThresholds
,
337 chromeos::switches::kAggressiveTabDiscardThreshold
},
338 { IDS_FLAGS_AGGRESSIVE_THRESHOLDS
,
339 chromeos::switches::kMemoryPressureThresholds
,
340 chromeos::switches::kAggressiveThreshold
},
344 const Experiment::Choice kExtensionContentVerificationChoices
[] = {
345 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
346 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP
,
347 switches::kExtensionContentVerification
,
348 switches::kExtensionContentVerificationBootstrap
},
349 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE
,
350 switches::kExtensionContentVerification
,
351 switches::kExtensionContentVerificationEnforce
},
352 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT
,
353 switches::kExtensionContentVerification
,
354 switches::kExtensionContentVerificationEnforceStrict
},
357 // Note that the value is specified in seconds (where 0 is equivalent to
359 const Experiment::Choice kRememberCertificateErrorDecisionsChoices
[] = {
360 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
361 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
362 switches::kRememberCertErrorDecisions
,
364 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY
,
365 switches::kRememberCertErrorDecisions
,
367 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS
,
368 switches::kRememberCertErrorDecisions
,
370 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK
,
371 switches::kRememberCertErrorDecisions
,
373 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH
,
374 switches::kRememberCertErrorDecisions
,
376 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS
,
377 switches::kRememberCertErrorDecisions
,
381 const Experiment::Choice kAutofillSyncCredentialChoices
[] = {
382 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", ""},
383 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL
,
384 password_manager::switches::kAllowAutofillSyncCredential
, ""},
385 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH
,
386 password_manager::switches::kDisallowAutofillSyncCredentialForReauth
, ""},
387 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL
,
388 password_manager::switches::kDisallowAutofillSyncCredential
, ""},
391 const Experiment::Choice kSSLVersionMinChoices
[] = {
392 { IDS_FLAGS_SSL_VERSION_DEFAULT
, "", "" },
393 { IDS_FLAGS_SSL_VERSION_SSLV3
, switches::kSSLVersionMin
,
394 switches::kSSLVersionSSLv3
},
395 { IDS_FLAGS_SSL_VERSION_TLSV1
, switches::kSSLVersionMin
,
396 switches::kSSLVersionTLSv1
},
397 { IDS_FLAGS_SSL_VERSION_TLSV11
, switches::kSSLVersionMin
,
398 switches::kSSLVersionTLSv11
},
399 { IDS_FLAGS_SSL_VERSION_TLSV12
, switches::kSSLVersionMin
,
400 switches::kSSLVersionTLSv12
},
403 const Experiment::Choice kFillOnAccountSelectChoices
[] = {
404 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
405 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
406 autofill::switches::kDisableFillOnAccountSelect
, "" },
407 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_HIGHLIGHTING
,
408 autofill::switches::kEnableFillOnAccountSelect
, "" },
409 { IDS_FLAGS_FILL_ON_ACCOUNT_SELECT_ENABLE_NO_HIGHLIGHTING
,
410 autofill::switches::kEnableFillOnAccountSelectNoHighlighting
, "" },
414 const Experiment::Choice kAshScreenRotationAnimationChoices
[] = {
415 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
416 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
417 ash::switches::kAshEnableScreenRotationAnimation
,
419 { IDS_ASH_SCREEN_ROTATION_ANIMATION_PARTIAL_ROTATION
,
420 ash::switches::kAshEnableScreenRotationAnimation
,
421 "partial-rotation" },
422 { IDS_ASH_SCREEN_ROTATION_ANIMATION_FULL_ROTATION
,
423 ash::switches::kAshEnableScreenRotationAnimation
,
428 #if defined(OS_CHROMEOS)
429 const Experiment::Choice kDataSaverPromptChoices
[] = {
430 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
431 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
432 chromeos::switches::kDisableDataSaverPrompt
, "" },
433 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
434 chromeos::switches::kEnableDataSaverPrompt
, "" },
435 { IDS_FLAGS_DATASAVER_PROMPT_DEMO_MODE
,
436 chromeos::switches::kEnableDataSaverPrompt
,
437 chromeos::switches::kDataSaverPromptDemoMode
},
441 const Experiment::Choice kSupervisedUserSafeSitesChoices
[] = {
442 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
, "", "" },
443 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
444 switches::kSupervisedUserSafeSites
,
446 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
447 switches::kSupervisedUserSafeSites
,
449 { IDS_SUPERVISED_USER_SAFESITES_BLACKLIST_ONLY
,
450 switches::kSupervisedUserSafeSites
,
452 { IDS_SUPERVISED_USER_SAFESITES_ONLINE_CHECK_ONLY
,
453 switches::kSupervisedUserSafeSites
,
454 "online-check-only" }
457 // RECORDING USER METRICS FOR FLAGS:
458 // -----------------------------------------------------------------------------
459 // The first line of the experiment is the internal name. If you'd like to
460 // gather statistics about the usage of your flag, you should append a marker
461 // comment to the end of the feature name, like so:
462 // "my-special-feature", // FLAGS:RECORD_UMA
464 // After doing that, run
465 // tools/metrics/actions/extract_actions.py
466 // to add the metric to actions.xml (which will enable UMA to record your
467 // feature flag), then update the <owner>s and <description> sections. Make sure
468 // to include the actions.xml file when you upload your code for review!
470 // After your feature has shipped under a flag, you can locate the metrics under
471 // the action name AboutFlags_internal-action-name. Actions are recorded once
472 // per startup, so you should divide this number by AboutFlags_StartupTick to
473 // get a sense of usage. Note that this will not be the same as number of users
474 // with a given feature enabled because users can quit and relaunch the
475 // application multiple times over a given time interval. The dashboard also
476 // shows you how many (metrics reporting) users have enabled the flag over the
477 // last seven days. However, note that this is not the same as the number of
478 // users who have the flag enabled, since enabling the flag happens once,
479 // whereas running with the flag enabled happens until the user flips the flag
482 // To add a new experiment add to the end of kExperiments. There are two
483 // distinct types of experiments:
484 // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
485 // macro for this type supplying the command line to the macro.
486 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
487 // deactivated state for this lab (i.e. no command line option). To specify
488 // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
490 // See the documentation of Experiment for details on the fields.
492 // Command-line switches must have entries in enum "LoginCustomFlags" in
493 // histograms.xml. See note in histograms.xml and don't forget to run
494 // AboutFlagsHistogramTest unit test to calculate and verify checksum.
496 // When adding a new choice, add it to the end of the list.
497 const Experiment kExperiments
[] = {
499 "ignore-gpu-blacklist",
500 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
,
501 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
,
503 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist
)
507 "disable-direct-write",
508 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME
,
509 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION
,
511 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite
)
514 "enable-win32k-renderer-lockdown",
515 IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_NAME
,
516 IDS_FLAGS_ENABLE_WIN32K_RENDERER_LOCKDOWN_DESCRIPTION
,
518 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableWin32kRendererLockDown
,
519 switches::kDisableWin32kRendererLockDown
)
523 "enable-experimental-canvas-features",
524 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
,
525 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
,
527 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures
)
530 "disable-accelerated-2d-canvas",
531 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
,
532 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
,
534 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas
)
537 "enable-display-list-2d-canvas",
538 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME
,
539 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION
,
541 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas
,
542 switches::kDisableDisplayList2dCanvas
)
545 "composited-layer-borders",
546 IDS_FLAGS_COMPOSITED_LAYER_BORDERS
,
547 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
,
549 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders
)
553 IDS_FLAGS_SHOW_FPS_COUNTER
,
554 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION
,
556 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter
)
560 IDS_FLAGS_DISABLE_WEBGL_NAME
,
561 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
,
563 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL
)
565 #if defined(OS_WIN) || defined(OS_MACOSX)
568 IDS_FLAGS_ENABLE_NPAPI_NAME
,
569 IDS_FLAGS_ENABLE_NPAPI_DESCRIPTION
,
571 SINGLE_VALUE_TYPE(switches::kEnableNpapi
)
576 IDS_FLAGS_DISABLE_WEBRTC_NAME
,
577 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
,
579 #if defined(OS_ANDROID)
580 SINGLE_VALUE_TYPE(switches::kDisableWebRTC
)
582 SINGLE_VALUE_TYPE("")
585 #if defined(ENABLE_WEBRTC)
587 "disable-webrtc-hw-decoding",
588 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME
,
589 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION
,
590 kOsAndroid
| kOsCrOS
,
591 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding
)
594 "disable-webrtc-hw-encoding",
595 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME
,
596 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION
,
597 kOsAndroid
| kOsCrOS
,
598 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding
)
601 "enable-webrtc-stun-origin",
602 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME
,
603 IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_DESCRIPTION
,
605 SINGLE_VALUE_TYPE(switches::kEnableWebRtcStunOrigin
)
608 #if defined(OS_ANDROID)
611 IDS_FLAGS_DISABLE_WEBAUDIO_NAME
,
612 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION
,
614 SINGLE_VALUE_TYPE(switches::kDisableWebAudio
)
617 // Native client is compiled out when DISABLE_NACL is defined.
618 #if !defined(DISABLE_NACL)
620 "enable-nacl", // FLAGS:RECORD_UMA
621 IDS_FLAGS_ENABLE_NACL_NAME
,
622 IDS_FLAGS_ENABLE_NACL_DESCRIPTION
,
624 SINGLE_VALUE_TYPE(switches::kEnableNaCl
)
627 "enable-nacl-debug", // FLAGS:RECORD_UMA
628 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
,
629 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
,
631 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug
)
634 "nacl-debug-mask", // FLAGS:RECORD_UMA
635 IDS_FLAGS_NACL_DEBUG_MASK_NAME
,
636 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
,
638 MULTI_VALUE_TYPE(kNaClDebugMaskChoices
)
641 #if defined(ENABLE_EXTENSIONS)
643 "extension-apis", // FLAGS:RECORD_UMA
644 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
,
645 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
,
647 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis
)
650 "extensions-on-chrome-urls",
651 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
,
652 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
,
654 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs
)
658 "enable-fast-unload",
659 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME
,
660 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION
,
662 SINGLE_VALUE_TYPE(switches::kEnableFastUnload
)
664 #if defined(ENABLE_EXTENSIONS)
666 "enable-app-window-controls",
667 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME
,
668 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION
,
670 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls
)
674 "disable-hyperlink-auditing",
675 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
,
676 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
,
678 SINGLE_VALUE_TYPE(switches::kNoPings
)
680 #if defined(OS_ANDROID)
683 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH
,
684 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION
,
686 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch
,
687 switches::kDisableContextualSearch
)
691 "show-autofill-type-predictions",
692 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
,
693 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
,
695 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions
)
698 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
699 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
,
700 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
,
701 // Can't expose the switch unless the code is compiled in.
702 // On by default for the Mac (different implementation in WebKit).
704 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling
)
706 #if defined(USE_AURA) || defined(OS_LINUX)
708 "overlay-scrollbars",
709 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME
,
710 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION
,
711 // Uses the system preference on Mac (a different implementation).
712 // On Android, this is always enabled.
713 kOsLinux
| kOsCrOS
| kOsWin
,
714 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar
,
715 switches::kDisableOverlayScrollbar
)
720 IDS_FLAGS_ENABLE_PANELS_NAME
,
721 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
,
723 SINGLE_VALUE_TYPE(switches::kEnablePanels
)
726 // See http://crbug.com/120416 for how to remove this flag.
727 "save-page-as-mhtml", // FLAGS:RECORD_UMA
728 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
,
729 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
,
730 kOsMac
| kOsWin
| kOsLinux
,
731 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML
)
735 IDS_FLAGS_ENABLE_QUIC_NAME
,
736 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION
,
738 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic
,
739 switches::kDisableQuic
)
743 IDS_FLAGS_ENABLE_SPDY4_NAME
,
744 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION
,
746 SINGLE_VALUE_TYPE(switches::kEnableSpdy4
)
749 "disable-media-source",
750 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
,
751 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
,
753 SINGLE_VALUE_TYPE(switches::kDisableMediaSource
)
756 "disable-encrypted-media",
757 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
,
758 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
,
760 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia
)
763 "disable-prefixed-encrypted-media",
764 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME
,
765 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION
,
767 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia
)
769 #if defined(OS_ANDROID)
771 "disable-infobar-for-protected-media-identifier",
772 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME
,
773 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION
,
775 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier
)
777 #endif // defined(OS_ANDROID)
779 "disable-javascript-harmony-shipping",
780 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_NAME
,
781 IDS_FLAGS_DISABLE_JAVASCRIPT_HARMONY_SHIPPING_DESCRIPTION
,
783 SINGLE_VALUE_TYPE(switches::kDisableJavaScriptHarmonyShipping
)
786 "enable-javascript-harmony",
787 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
,
788 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
,
790 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony
)
793 "disable-software-rasterizer",
794 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
,
795 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
,
796 #if defined(ENABLE_SWIFTSHADER)
801 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer
)
804 "enable-gpu-rasterization",
805 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME
,
806 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION
,
808 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices
)
811 "gpu-rasterization-msaa-sample-count",
812 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_NAME
,
813 IDS_FLAGS_GPU_RASTERIZATION_MSAA_SAMPLE_COUNT_DESCRIPTION
,
815 MULTI_VALUE_TYPE(kGpuRasterizationMSAASampleCountChoices
)
818 "enable-slimming-paint",
819 IDS_FLAGS_ENABLE_SLIMMING_PAINT_NAME
,
820 IDS_FLAGS_ENABLE_SLIMMING_PAINT_DESCRIPTION
,
822 SINGLE_VALUE_TYPE(switches::kEnableSlimmingPaint
)
825 "enable-experimental-web-platform-features",
826 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
,
827 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
,
829 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures
)
832 "disable-ntp-other-sessions-menu",
833 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME
,
834 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION
,
836 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu
)
839 "enable-devtools-experiments",
840 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
,
841 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
,
843 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments
)
846 "silent-debugger-extension-api",
847 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME
,
848 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION
,
850 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI
)
852 #if defined(ENABLE_SPELLCHECK)
854 "spellcheck-autocorrect",
855 IDS_FLAGS_SPELLCHECK_AUTOCORRECT
,
856 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
,
857 kOsWin
| kOsLinux
| kOsCrOS
,
858 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect
)
862 "enable-scroll-prediction",
863 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME
,
864 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION
,
866 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction
)
870 IDS_TOUCH_EVENTS_NAME
,
871 IDS_TOUCH_EVENTS_DESCRIPTION
,
873 MULTI_VALUE_TYPE(kTouchEventsChoices
)
876 "disable-touch-adjustment",
877 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
,
878 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
,
879 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
,
880 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment
)
882 #if defined(OS_CHROMEOS)
884 "network-portal-notification",
885 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME
,
886 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION
,
888 ENABLE_DISABLE_VALUE_TYPE(
889 chromeos::switches::kEnableNetworkPortalNotification
,
890 chromeos::switches::kDisableNetworkPortalNotification
)
894 "enable-download-resumption",
895 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
,
896 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
,
898 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption
)
901 "enable-download-notification",
902 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_NAME
,
903 IDS_FLAGS_ENABLE_DOWNLOAD_NOTIFICATION_DESCRIPTION
,
905 SINGLE_VALUE_TYPE(switches::kEnableDownloadNotification
)
907 #if defined(ENABLE_PLUGINS)
909 "allow-nacl-socket-api",
910 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
,
911 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
,
913 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI
, "*")
916 #if defined(OS_CHROMEOS)
918 "allow-touchpad-three-finger-click",
919 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
,
920 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
,
922 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick
)
925 "disable-easy-unlock",
926 IDS_FLAGS_DISABLE_EASY_UNLOCK_NAME
,
927 IDS_FLAGS_DISABLE_EASY_UNLOCK_DESCRIPTION
,
929 SINGLE_VALUE_TYPE(proximity_auth::switches::kDisableEasyUnlock
)
932 "enable-easy-unlock-proximity-detection",
933 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME
,
934 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION
,
936 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection
)
941 "disable-minimize-on-second-launcher-item-click",
942 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME
,
943 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION
,
945 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick
)
949 IDS_FLAGS_SHOW_TOUCH_HUD_NAME
,
950 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION
,
952 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud
)
956 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
,
957 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
,
958 kOsLinux
| kOsWin
| kOsCrOS
,
959 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch
, switches::kDisablePinch
),
961 #endif // defined(USE_ASH)
963 "enable-pinch-virtual-viewport",
964 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME
,
965 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION
,
966 kOsLinux
| kOsWin
| kOsCrOS
| kOsAndroid
,
967 ENABLE_DISABLE_VALUE_TYPE(
968 cc::switches::kEnablePinchVirtualViewport
,
969 cc::switches::kDisablePinchVirtualViewport
),
972 "enable-viewport-meta",
973 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME
,
974 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION
,
975 kOsLinux
| kOsWin
| kOsCrOS
| kOsMac
,
976 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta
),
978 #if defined(OS_CHROMEOS)
980 "disable-boot-animation",
981 IDS_FLAGS_DISABLE_BOOT_ANIMATION
,
982 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
,
984 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation
),
987 "enable-video-player-chromecast-support",
988 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME
,
989 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION
,
991 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport
)
994 "disable-office-editing-component-app",
995 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME
,
996 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION
,
998 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp
),
1001 "disable-display-color-calibration",
1002 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME
,
1003 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION
,
1005 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration
),
1008 "ash-disable-screen-orientation-lock",
1009 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_NAME
,
1010 IDS_FLAGS_ASH_DISABLE_SCREEN_ORIENTATION_LOCK_DESCRIPTION
,
1012 SINGLE_VALUE_TYPE(ash::switches::kAshDisableScreenOrientationLock
),
1014 #endif // defined(OS_CHROMEOS)
1015 { "disable-accelerated-video-decode",
1016 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
,
1017 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
,
1018 kOsMac
| kOsWin
| kOsCrOS
,
1019 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode
),
1021 #if defined(USE_ASH)
1023 "ash-debug-shortcuts",
1024 IDS_FLAGS_DEBUG_SHORTCUTS_NAME
,
1025 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION
,
1027 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts
),
1030 "ash-disable-maximize-mode-window-backdrop",
1031 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_NAME
,
1032 IDS_FLAGS_ASH_DISABLE_MAXIMIZE_MODE_WINDOW_BACKDROP_DESCRIPTION
,
1034 SINGLE_VALUE_TYPE(ash::switches::kAshDisableMaximizeModeWindowBackdrop
),
1036 { "ash-enable-touch-view-testing",
1037 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME
,
1038 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION
,
1040 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting
),
1043 "disable-touch-feedback",
1044 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME
,
1045 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION
,
1047 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback
),
1049 { "ash-enable-mirrored-screen",
1050 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME
,
1051 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION
,
1053 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen
),
1056 "ash-enable-screen-rotation-animations",
1057 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_NAME
,
1058 IDS_FLAGS_ASH_ENABLE_SCREEN_ROTATION_ANIMATION_DESCRIPTION
,
1060 MULTI_VALUE_TYPE(kAshScreenRotationAnimationChoices
)
1062 #endif // defined(USE_ASH)
1063 #if defined(OS_CHROMEOS)
1065 "enable-carrier-switching",
1066 IDS_FLAGS_ENABLE_CARRIER_SWITCHING
,
1067 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION
,
1069 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching
)
1072 "disable-cloud-import",
1073 IDS_FLAGS_DISABLE_CLOUD_IMPORT
,
1074 IDS_FLAGS_DISABLE_CLOUD_IMPORT_DESCRIPTION
,
1076 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCloudImport
)
1079 "enable-request-tablet-site",
1080 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
,
1081 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
,
1083 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite
)
1087 "debug-packed-apps",
1088 IDS_FLAGS_DEBUG_PACKED_APP_NAME
,
1089 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION
,
1091 SINGLE_VALUE_TYPE(switches::kDebugPackedApps
)
1094 "enable-password-generation",
1095 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME
,
1096 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
,
1097 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1098 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration
,
1099 autofill::switches::kDisablePasswordGeneration
)
1102 "enable-automatic-password-saving",
1103 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME
,
1104 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION
,
1107 password_manager::switches::kEnableAutomaticPasswordSaving
)
1110 "password-manager-reauthentication",
1111 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME
,
1112 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION
,
1114 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication
)
1117 "enable-password-link",
1118 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME
,
1119 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION
,
1120 kOsAndroid
| kOsDesktop
,
1121 ENABLE_DISABLE_VALUE_TYPE(
1122 password_manager::switches::kEnablePasswordLink
,
1123 password_manager::switches::kDisablePasswordLink
)
1126 "enable-password-save-in-page-navigation",
1127 IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_NAME
,
1128 IDS_FLAGS_ENABLE_SAVE_PASSOWRD_ON_IN_PAGE_NAVIGATION_DESCRIPTION
,
1131 autofill::switches::kEnablePasswordSaveOnInPageNavigation
)
1134 "enable-affiliation-based-matching",
1135 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_NAME
,
1136 IDS_FLAGS_ENABLE_AFFILIATION_BASED_MATCHING_DESCRIPTION
,
1137 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
| kOsAndroid
,
1138 ENABLE_DISABLE_VALUE_TYPE(
1139 password_manager::switches::kEnableAffiliationBasedMatching
,
1140 password_manager::switches::kDisableAffiliationBasedMatching
)
1143 "enable-deferred-image-decoding",
1144 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME
,
1145 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION
,
1146 kOsMac
| kOsLinux
| kOsCrOS
,
1147 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding
)
1150 "wallet-service-use-sandbox",
1151 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
,
1152 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
,
1153 kOsAndroid
| kOsDesktop
,
1154 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1155 autofill::switches::kWalletServiceUseSandbox
, "1",
1156 autofill::switches::kWalletServiceUseSandbox
, "0")
1158 #if defined(USE_AURA)
1160 "overscroll-history-navigation",
1161 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME
,
1162 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
,
1164 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices
)
1168 "scroll-end-effect",
1169 IDS_FLAGS_SCROLL_END_EFFECT_NAME
,
1170 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION
,
1172 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1173 switches::kScrollEndEffect
, "1",
1174 switches::kScrollEndEffect
, "0")
1178 IDS_FLAGS_ENABLE_ICON_NTP_NAME
,
1179 IDS_FLAGS_ENABLE_ICON_NTP_DESCRIPTION
,
1180 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1181 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableIconNtp
,
1182 switches::kDisableIconNtp
)
1185 "enable-touch-drag-drop",
1186 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
,
1187 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
,
1189 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop
,
1190 switches::kDisableTouchDragDrop
)
1193 "enable-touch-editing",
1194 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
,
1195 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
,
1196 kOsCrOS
| kOsWin
| kOsLinux
,
1197 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing
,
1198 switches::kDisableTouchEditing
)
1201 "enable-stale-while-revalidate",
1202 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME
,
1203 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION
,
1205 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate
)
1208 "enable-suggestions-service",
1209 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
,
1210 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
,
1211 kOsAndroid
| kOsCrOS
,
1212 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService
,
1213 switches::kDisableSuggestionsService
)
1216 "enable-supervised-user-managed-bookmarks-folder",
1217 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_NAME
,
1218 IDS_FLAGS_ENABLE_SUPERVISED_USER_MANAGED_BOOKMARKS_FOLDER_DESCRIPTION
,
1219 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1220 SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserManagedBookmarksFolder
)
1222 #if defined(ENABLE_APP_LIST)
1224 "enable-sync-app-list",
1225 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME
,
1226 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION
,
1228 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList
,
1229 app_list::switches::kDisableSyncAppList
)
1232 #if defined(OS_MACOSX)
1234 "enable-avfoundation",
1235 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME
,
1236 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION
,
1238 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation
,
1239 switches::kForceQTKit
)
1244 IDS_FLAGS_LCD_TEXT_NAME
,
1245 IDS_FLAGS_LCD_TEXT_DESCRIPTION
,
1247 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText
,
1248 switches::kDisableLCDText
)
1250 #if defined(OS_ANDROID) || defined(OS_MACOSX)
1252 "delegated-renderer",
1253 IDS_FLAGS_DELEGATED_RENDERER_NAME
,
1254 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION
,
1255 kOsAndroid
, // TODO(ccameron) Add mac support soon.
1256 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer
,
1257 switches::kDisableDelegatedRenderer
)
1261 "max-tiles-for-interest-area",
1262 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME
,
1263 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION
,
1265 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices
)
1268 "enable-offer-store-unmasked-wallet-cards",
1269 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS
,
1270 IDS_FLAGS_ENABLE_OFFER_STORE_UNMASKED_WALLET_CARDS_DESCRIPTION
,
1272 ENABLE_DISABLE_VALUE_TYPE(
1273 autofill::switches::kEnableOfferStoreUnmaskedWalletCards
,
1274 autofill::switches::kDisableOfferStoreUnmaskedWalletCards
)
1277 "enable-offline-auto-reload",
1278 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME
,
1279 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION
,
1281 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload
,
1282 switches::kDisableOfflineAutoReload
)
1285 "enable-offline-auto-reload-visible-only",
1286 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME
,
1287 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION
,
1289 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly
,
1290 switches::kDisableOfflineAutoReloadVisibleOnly
)
1294 IDS_FLAGS_SHOW_SAVED_COPY_NAME
,
1295 IDS_FLAGS_SHOW_SAVED_COPY_DESCRIPTION
,
1297 MULTI_VALUE_TYPE(kShowSavedCopyChoices
)
1300 "default-tile-width",
1301 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
,
1302 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION
,
1304 MULTI_VALUE_TYPE(kDefaultTileWidthChoices
)
1307 "default-tile-height",
1308 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME
,
1309 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION
,
1311 MULTI_VALUE_TYPE(kDefaultTileHeightChoices
)
1313 #if defined(OS_ANDROID)
1315 "disable-gesture-requirement-for-media-playback",
1316 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
,
1317 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
,
1319 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback
)
1322 #if defined(OS_CHROMEOS)
1324 "enable-virtual-keyboard",
1325 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME
,
1326 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION
,
1328 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard
)
1331 "enable-virtual-keyboard-overscroll",
1332 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME
,
1333 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION
,
1335 ENABLE_DISABLE_VALUE_TYPE(
1336 keyboard::switches::kEnableVirtualKeyboardOverscroll
,
1337 keyboard::switches::kDisableVirtualKeyboardOverscroll
)
1340 "enable-swipe-selection",
1341 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME
,
1342 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION
,
1344 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection
)
1347 "enable-input-view",
1348 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME
,
1349 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION
,
1351 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView
,
1352 keyboard::switches::kDisableInputView
)
1355 "enable-new-korean-ime",
1356 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_NAME
,
1357 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_DESCRIPTION
,
1359 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewKoreanIme
)
1362 "disable-new-md-input-view",
1363 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_NAME
,
1364 IDS_FLAGS_DISABLE_NEW_MD_INPUT_VIEW_DESCRIPTION
,
1366 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewMDInputView
)
1369 "enable-physical-keyboard-autocorrect",
1370 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME
,
1371 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION
,
1373 ENABLE_DISABLE_VALUE_TYPE(
1374 chromeos::switches::kEnablePhysicalKeyboardAutocorrect
,
1375 chromeos::switches::kDisablePhysicalKeyboardAutocorrect
)
1378 "disable-voice-input",
1379 IDS_FLAGS_DISABLE_VOICE_INPUT_NAME
,
1380 IDS_FLAGS_DISABLE_VOICE_INPUT_DESCRIPTION
,
1382 SINGLE_VALUE_TYPE(chromeos::switches::kDisableVoiceInput
)
1385 "enable-experimental-input-view-features",
1386 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME
,
1387 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION
,
1389 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures
)
1392 "enable-gesture-typing",
1393 IDS_FLAGS_ENABLE_GESTURE_TYPING_NAME
,
1394 IDS_FLAGS_ENABLE_GESTURE_TYPING_DESCRIPTION
,
1396 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureTyping
)
1399 "enable-gesture-deletion",
1400 IDS_FLAGS_ENABLE_GESTURE_DELETION_NAME
,
1401 IDS_FLAGS_ENABLE_GESTURE_DELETION_DESCRIPTION
,
1403 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureDeletion
)
1406 "enable-gesture-selection",
1407 IDS_FLAGS_ENABLE_GESTURE_SELECTION_NAME
,
1408 IDS_FLAGS_ENABLE_GESTURE_SELECTION_DESCRIPTION
,
1410 SINGLE_VALUE_TYPE(keyboard::switches::kEnableGestureSelection
)
1413 "disable-smart-virtual-keyboard",
1414 IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_NAME
,
1415 IDS_FLAGS_DISABLE_SMART_VIRTUAL_KEYBOARD_DESCRIPTION
,
1417 SINGLE_VALUE_TYPE(keyboard::switches::kDisableSmartVirtualKeyboard
)
1421 "enable-simple-cache-backend",
1422 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
,
1423 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
,
1424 kOsWin
| kOsMac
| kOsLinux
| kOsCrOS
,
1425 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices
)
1428 "enable-tcp-fast-open",
1429 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
,
1430 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
,
1431 kOsLinux
| kOsCrOS
| kOsAndroid
,
1432 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen
)
1434 #if defined(ENABLE_SERVICE_DISCOVERY)
1436 "device-discovery-notifications",
1437 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME
,
1438 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION
,
1440 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications
,
1441 switches::kDisableDeviceDiscoveryNotifications
)
1444 "enable-print-preview-register-promos",
1445 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME
,
1446 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION
,
1448 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos
)
1450 #endif // ENABLE_SERVICE_DISCOVERY
1453 "enable-cloud-print-xps",
1454 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME
,
1455 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION
,
1457 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps
)
1460 #if defined(USE_AURA)
1462 "tab-capture-upscale-quality",
1463 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME
,
1464 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION
,
1466 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices
)
1469 "tab-capture-downscale-quality",
1470 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME
,
1471 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION
,
1473 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices
)
1476 #if defined(TOOLKIT_VIEWS)
1478 "disable-hide-inactive-stacked-tab-close-buttons",
1479 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_NAME
,
1480 IDS_FLAGS_DISABLE_HIDE_INACTIVE_STACKED_TAB_CLOSE_BUTTONS_DESCRIPTION
,
1481 kOsCrOS
| kOsWin
| kOsLinux
,
1482 SINGLE_VALUE_TYPE(switches::kDisableHideInactiveStackedTabCloseButtons
)
1485 #if defined(ENABLE_SPELLCHECK)
1487 "enable-spelling-feedback-field-trial",
1488 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME
,
1489 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION
,
1491 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial
)
1495 "enable-webgl-draft-extensions",
1496 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME
,
1497 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION
,
1499 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions
)
1502 "enable-new-profile-management",
1503 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME
,
1504 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION
,
1505 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1506 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement
,
1507 switches::kDisableNewProfileManagement
)
1510 "enable-account-consistency",
1511 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME
,
1512 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION
,
1513 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
1514 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency
,
1515 switches::kDisableAccountConsistency
)
1518 "enable-fast-user-switching",
1519 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME
,
1520 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION
,
1521 kOsMac
| kOsWin
| kOsLinux
,
1522 SINGLE_VALUE_TYPE(switches::kFastUserSwitching
)
1525 "enable-new-avatar-menu",
1526 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME
,
1527 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION
,
1528 kOsMac
| kOsWin
| kOsLinux
,
1529 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu
,
1530 switches::kDisableNewAvatarMenu
)
1533 "enable-iframe-based-signin",
1534 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_NAME
,
1535 IDS_FLAGS_ENABLE_IFRAME_BASED_SIGNIN_DESCRIPTION
,
1536 kOsMac
| kOsWin
| kOsLinux
,
1537 SINGLE_VALUE_TYPE(switches::kEnableIframeBasedSignin
)
1540 "enable-google-profile-info",
1541 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME
,
1542 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION
,
1543 kOsMac
| kOsWin
| kOsLinux
,
1544 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo
)
1547 "reset-app-list-install-state",
1548 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME
,
1549 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION
,
1550 kOsMac
| kOsWin
| kOsLinux
,
1551 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState
)
1553 #if defined(ENABLE_APP_LIST)
1554 #if defined(OS_LINUX)
1556 // This is compiled out on non-Linux platforms because otherwise it would be
1557 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1558 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1560 IDS_FLAGS_ENABLE_APP_LIST_NAME
,
1561 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION
,
1563 SINGLE_VALUE_TYPE(switches::kEnableAppList
)
1566 #if defined(ENABLE_EXTENSIONS)
1568 "enable-surface-worker",
1569 IDS_FLAGS_ENABLE_SURFACE_WORKER_NAME
,
1570 IDS_FLAGS_ENABLE_SURFACE_WORKER_DESCRIPTION
,
1572 SINGLE_VALUE_TYPE(extensions::switches::kEnableSurfaceWorker
)
1576 "disable-drive-apps-in-app-list",
1577 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME
,
1578 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION
,
1580 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList
)
1583 #if defined(OS_ANDROID)
1585 "enable-accessibility-tab-switcher",
1586 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME
,
1587 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION
,
1589 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher
)
1592 // TODO(dmazzoni): remove this flag when native android accessibility
1593 // ships in the stable channel. http://crbug.com/356775
1594 "enable-accessibility-script-injection",
1595 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME
,
1596 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION
,
1598 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1599 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
1604 IDS_FLAGS_ONE_COPY_NAME
,
1605 IDS_FLAGS_ONE_COPY_DESCRIPTION
,
1607 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy
,
1608 switches::kDisableOneCopy
)
1612 IDS_FLAGS_ZERO_COPY_NAME
,
1613 IDS_FLAGS_ZERO_COPY_DESCRIPTION
,
1615 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy
)
1617 #if defined(OS_CHROMEOS)
1619 "enable-first-run-ui-transitions",
1620 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME
,
1621 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION
,
1623 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions
)
1627 "disable-new-bookmark-apps",
1628 IDS_FLAGS_NEW_BOOKMARK_APPS_NAME
,
1629 IDS_FLAGS_NEW_BOOKMARK_APPS_DESCRIPTION
,
1630 kOsWin
| kOsCrOS
| kOsLinux
| kOsMac
,
1631 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewBookmarkApps
,
1632 switches::kDisableNewBookmarkApps
)
1634 #if defined(OS_MACOSX)
1636 "disable-hosted-app-shim-creation",
1637 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_NAME
,
1638 IDS_FLAGS_DISABLE_HOSTED_APP_SHIM_CREATION_DESCRIPTION
,
1640 SINGLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation
)
1643 "enable-hosted-app-quit-notification",
1644 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_NAME
,
1645 IDS_FLAGS_ENABLE_HOSTED_APP_QUIT_NOTIFICATION_DESCRIPTION
,
1647 SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification
)
1651 "enable-ephemeral-apps-in-webstore",
1652 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_NAME
,
1653 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_IN_WEBSTORE_DESCRIPTION
,
1655 SINGLE_VALUE_TYPE(switches::kEnableEphemeralAppsInWebstore
)
1658 "enable-linkable-ephemeral-apps",
1659 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME
,
1660 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION
,
1662 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps
)
1665 "enable-service-worker-sync",
1666 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME
,
1667 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION
,
1669 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync
)
1671 #if defined(OS_ANDROID)
1673 "disable-click-delay",
1674 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME
,
1675 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION
,
1677 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1678 SINGLE_VALUE_TYPE("disable-click-delay")
1681 "disable-pull-to-refresh-effect",
1682 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME
,
1683 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION
,
1685 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect
)
1688 #if defined(OS_MACOSX)
1690 "enable-translate-new-ux",
1691 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME
,
1692 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION
,
1694 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX
)
1697 #if defined(TOOLKIT_VIEWS)
1699 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1700 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME
,
1701 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION
,
1702 kOsCrOS
| kOsWin
| kOsLinux
,
1703 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting
)
1706 "enable-link-disambiguation-popup",
1707 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME
,
1708 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION
,
1710 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup
)
1713 #if defined(ENABLE_EXTENSIONS)
1715 "enable-apps-show-on-first-paint",
1716 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME
,
1717 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION
,
1719 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint
)
1723 "enhanced-bookmarks-experiment",
1724 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME
,
1725 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION
,
1726 kOsDesktop
| kOsAndroid
,
1727 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1728 switches::kEnhancedBookmarksExperiment
, "1",
1729 switches::kEnhancedBookmarksExperiment
, "0")
1731 #if defined(OS_ANDROID)
1733 "enable-zero-suggest-experiment",
1734 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME
,
1735 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION
,
1737 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices
)
1740 "enable-reader-mode-toolbar-icon",
1741 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME
,
1742 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION
,
1744 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon
)
1747 "enable-dom-distiller-button-animation",
1748 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION
,
1749 IDS_FLAGS_READER_MODE_BUTTON_ANIMATION_DESCRIPTION
,
1751 SINGLE_VALUE_TYPE(switches::kEnableDomDistillerButtonAnimation
)
1755 "num-raster-threads",
1756 IDS_FLAGS_NUM_RASTER_THREADS_NAME
,
1757 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION
,
1759 MULTI_VALUE_TYPE(kNumRasterThreadsChoices
)
1762 "enable-single-click-autofill",
1763 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME
,
1764 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION
,
1765 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
| kOsAndroid
,
1766 ENABLE_DISABLE_VALUE_TYPE(
1767 autofill::switches::kEnableSingleClickAutofill
,
1768 autofill::switches::kDisableSingleClickAutofill
)
1771 "enable-permissions-bubbles",
1772 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME
,
1773 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION
,
1774 kOsCrOS
| kOsMac
| kOsWin
| kOsLinux
,
1775 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles
,
1776 switches::kDisablePermissionsBubbles
)
1779 "enable-session-crashed-bubble",
1780 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME
,
1781 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION
,
1783 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble
,
1784 switches::kDisableSessionCrashedBubble
)
1787 "enable-out-of-process-pdf",
1788 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME
,
1789 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION
,
1791 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOutOfProcessPdf
,
1792 switches::kDisableOutOfProcessPdf
)
1795 "enable-pdf-material-ui",
1796 IDS_FLAGS_PDF_MATERIAL_UI_NAME
,
1797 IDS_FLAGS_PDF_MATERIAL_UI_DESCRIPTION
,
1799 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePdfMaterialUI
,
1800 switches::kDisablePdfMaterialUI
)
1803 "disable-cast-streaming-hw-encoding",
1804 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME
,
1805 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION
,
1807 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding
)
1809 #if defined(OS_ANDROID)
1812 IDS_FLAGS_DISABLE_CAST_NAME
,
1813 IDS_FLAGS_DISABLE_CAST_DESCRIPTION
,
1815 SINGLE_VALUE_TYPE(switches::kDisableCast
)
1818 "prefetch-search-results",
1819 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME
,
1820 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION
,
1822 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults
)
1825 #if defined(ENABLE_APP_LIST)
1827 "enable-experimental-app-list",
1828 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME
,
1829 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION
,
1830 kOsWin
| kOsLinux
| kOsCrOS
,
1831 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList
,
1832 app_list::switches::kDisableExperimentalAppList
)
1835 "enable-centered-app-list",
1836 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME
,
1837 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION
,
1838 kOsWin
| kOsLinux
| kOsCrOS
,
1839 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList
)
1843 "disable-threaded-scrolling",
1844 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME
,
1845 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION
,
1846 kOsWin
| kOsLinux
| kOsCrOS
| kOsAndroid
| kOsMac
,
1847 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling
)
1850 "bleeding-edge-renderer-mode",
1851 IDS_FLAGS_BLEEDING_RENDERER_NAME
,
1852 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION
,
1854 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths
)
1857 "enable-settings-window",
1858 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME
,
1859 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION
,
1861 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow
,
1862 switches::kDisableSettingsWindow
)
1864 #if defined(OS_ANDROID)
1866 "enable-instant-search-clicks",
1867 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME
,
1868 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION
,
1870 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks
)
1874 "enable-save-password-bubble",
1875 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME
,
1876 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION
,
1877 kOsWin
| kOsLinux
| kOsCrOS
| kOsMac
,
1878 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble
,
1879 switches::kDisableSavePasswordBubble
)
1882 "enable-apps-file-associations",
1883 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME
,
1884 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION
,
1886 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations
)
1888 #if defined(OS_ANDROID)
1890 "enable-embeddedsearch-api",
1891 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME
,
1892 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION
,
1894 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI
)
1897 "enable-app-install-alerts",
1898 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME
,
1899 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION
,
1901 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts
)
1905 "distance-field-text",
1906 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME
,
1907 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION
,
1909 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText
,
1910 switches::kDisableDistanceFieldText
)
1913 "extension-content-verification",
1914 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME
,
1915 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION
,
1917 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices
)
1919 #if defined(USE_AURA)
1921 "text-input-focus-manager",
1922 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME
,
1923 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION
,
1924 kOsCrOS
| kOsLinux
| kOsWin
,
1925 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager
,
1926 switches::kDisableTextInputFocusManager
)
1929 #if defined(ENABLE_EXTENSIONS)
1931 "extension-active-script-permission",
1932 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME
,
1933 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION
,
1935 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction
)
1939 "answers-in-suggest",
1940 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME
,
1941 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION
,
1942 kOsAndroid
| kOsWin
| kOsLinux
| kOsCrOS
,
1943 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest
,
1944 switches::kDisableAnswersInSuggest
)
1946 #if defined(OS_ANDROID)
1948 "enable-data-reduction-proxy-dev",
1949 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME
,
1950 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION
,
1952 ENABLE_DISABLE_VALUE_TYPE(
1953 data_reduction_proxy::switches::kEnableDataReductionProxyDev
,
1954 data_reduction_proxy::switches::kDisableDataReductionProxyDev
)
1957 "enable-data-reduction-proxy-alt",
1958 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME
,
1959 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION
,
1962 data_reduction_proxy::switches::kEnableDataReductionProxyAlt
)
1966 "enable-hotword-hardware",
1967 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME
,
1968 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION
,
1970 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware
)
1972 #if defined(ENABLE_EXTENSIONS)
1974 "enable-embedded-extension-options",
1975 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME
,
1976 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION
,
1978 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions
)
1981 #if defined(USE_ASH)
1983 "enable-web-app-frame",
1984 IDS_FLAGS_ENABLE_WEB_APP_FRAME_NAME
,
1985 IDS_FLAGS_ENABLE_WEB_APP_FRAME_DESCRIPTION
,
1987 SINGLE_VALUE_TYPE(switches::kEnableWebAppFrame
)
1991 "enable-website-settings-manager",
1992 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME
,
1993 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION
,
1995 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager
)
1998 "remember-cert-error-decisions",
1999 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME
,
2000 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION
,
2002 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices
)
2005 "enable-drop-sync-credential",
2006 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME
,
2007 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION
,
2009 ENABLE_DISABLE_VALUE_TYPE(
2010 password_manager::switches::kEnableDropSyncCredential
,
2011 password_manager::switches::kDisableDropSyncCredential
)
2013 #if defined(ENABLE_EXTENSIONS)
2015 "enable-extension-action-redesign",
2016 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME
,
2017 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION
,
2019 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign
)
2023 "autofill-sync-credential",
2024 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME
,
2025 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION
,
2027 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices
)
2029 #if !defined(OS_ANDROID)
2031 "enable-message-center-always-scroll-up-upon-notification-removal",
2032 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME
,
2033 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION
,
2036 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval
)
2039 "enable-md-settings",
2040 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_NAME
,
2041 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_SETTINGS_DESCRIPTION
,
2044 switches::kEnableMaterialDesignSettings
)
2047 #if defined(OS_CHROMEOS)
2049 "disable-memory-pressure-chromeos",
2050 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_NAME
,
2051 IDS_FLAGS_DISABLE_MEMORY_PRESSURE_DESCRIPTION
,
2053 SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS
)
2056 "memory-pressure-thresholds",
2057 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME
,
2058 IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION
,
2060 MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices
)
2064 IDS_FLAGS_WAKE_ON_PACKETS_NAME
,
2065 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION
,
2067 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets
)
2069 #endif // OS_CHROMEOS
2071 "enable-tab-audio-muting",
2072 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME
,
2073 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION
,
2075 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting
)
2078 "enable-credential-manager-api",
2079 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME
,
2080 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION
,
2082 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI
)
2085 "reduced-referrer-granularity",
2086 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME
,
2087 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION
,
2089 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity
)
2091 #if defined(ENABLE_PLUGINS)
2093 "enable-plugin-power-saver",
2094 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME
,
2095 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION
,
2097 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePluginPowerSaver
,
2098 switches::kDisablePluginPowerSaver
)
2101 #if defined(OS_CHROMEOS)
2103 "disable-new-zip-unpacker",
2104 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME
,
2105 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION
,
2107 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker
)
2109 #endif // defined(OS_CHROMEOS)
2112 IDS_FLAGS_SSL_VERSION_MIN_NAME
,
2113 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION
,
2115 MULTI_VALUE_TYPE(kSSLVersionMinChoices
)
2118 "enable-credit-card-scan",
2119 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME
,
2120 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION
,
2122 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan
,
2123 autofill::switches::kDisableCreditCardScan
)
2125 #if defined(OS_CHROMEOS)
2127 "disable-captive-portal-bypass-proxy",
2128 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME
,
2129 IDS_FLAGS_DISABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION
,
2131 SINGLE_VALUE_TYPE(chromeos::switches::kDisableCaptivePortalBypassProxy
)
2134 "disable-roboto-font-ui",
2135 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_NAME
,
2136 IDS_FLAGS_DISABLE_ROBOTO_FONT_UI_DESCRIPTION
,
2138 SINGLE_VALUE_TYPE(switches::kDisableRobotoFontUI
)
2140 #endif // defined(OS_CHROMEOS)
2141 #if defined(OS_ANDROID)
2143 "enable-seccomp-filter-sandbox",
2144 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME
,
2145 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION
,
2147 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox
)
2151 "enable-touch-hover",
2152 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME
,
2153 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION
,
2155 SINGLE_VALUE_TYPE("enable-touch-hover")
2158 "enable-fill-on-account-select",
2159 IDS_FILL_ON_ACCOUNT_SELECT_NAME
,
2160 IDS_FILL_ON_ACCOUNT_SELECT_DESCRIPTION
,
2162 MULTI_VALUE_TYPE(kFillOnAccountSelectChoices
)
2164 #if defined(OS_CHROMEOS)
2166 "enable-wifi-credential-sync", // FLAGS:RECORD_UMA
2167 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME
,
2168 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION
,
2170 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync
)
2173 "enable-potentially-annoying-security-features",
2174 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_NAME
,
2175 IDS_FLAGS_EXPERIMENTAL_SECURITY_FEATURES_DESCRIPTION
,
2177 SINGLE_VALUE_TYPE(switches::kEnablePotentiallyAnnoyingSecurityFeatures
)
2181 "enable-delay-agnostic-aec",
2182 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_NAME
,
2183 IDS_FLAGS_ENABLE_DELAY_AGNOSTIC_AEC_DESCRIPTION
,
2185 SINGLE_VALUE_TYPE(switches::kEnableDelayAgnosticAec
)
2188 "mark-non-secure-as", // FLAGS:RECORD_UMA
2189 IDS_MARK_NON_SECURE_AS_NAME
,
2190 IDS_MARK_NON_SECURE_AS_DESCRIPTION
,
2192 MULTI_VALUE_TYPE(kMarkNonSecureAsChoices
)
2195 "enable-site-per-process",
2196 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_NAME
,
2197 IDS_FLAGS_ENABLE_SITE_PER_PROCESS_DESCRIPTION
,
2199 SINGLE_VALUE_TYPE(switches::kSitePerProcess
)
2201 #if defined(OS_MACOSX)
2203 "enable-harfbuzz-rendertext",
2204 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_NAME
,
2205 IDS_FLAGS_ENABLE_HARFBUZZ_RENDERTEXT_DESCRIPTION
,
2207 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText
)
2209 #endif // defined(OS_MACOSX)
2210 #if defined(OS_CHROMEOS)
2212 "disable-timezone-tracking",
2213 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME
,
2214 IDS_FLAGS_DISABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION
,
2216 SINGLE_VALUE_TYPE(chromeos::switches::kDisableTimeZoneTrackingOption
)
2219 "disable-webview-signin-flow",
2220 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_NAME
,
2221 IDS_FLAGS_DISABLE_WEBVIEW_SIGNIN_FLOW_DESCRIPTION
,
2223 SINGLE_VALUE_TYPE(chromeos::switches::kDisableWebviewSigninFlow
)
2225 #endif // defined(OS_CHROMEOS)
2227 "enable-data-reduction-proxy-lo-fi",
2228 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_NAME
,
2229 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION
,
2231 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2232 kEnableDataReductionProxyLoFi
)
2235 "clear-data-reduction-proxy-data-savings",
2236 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_NAME
,
2237 IDS_FLAGS_DATA_REDUCTION_PROXY_RESET_SAVINGS_DESCRIPTION
,
2239 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2240 kClearDataReductionProxyDataSavings
)
2242 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2244 "enable-data-reduction-proxy-bypass-warnings",
2245 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME
,
2246 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION
,
2248 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
2249 kEnableDataReductionProxyBypassWarning
)
2253 "allow-insecure-localhost",
2254 IDS_ALLOW_INSECURE_LOCALHOST
,
2255 IDS_ALLOW_INSECURE_LOCALHOST_DESCRIPTION
,
2257 SINGLE_VALUE_TYPE(switches::kAllowInsecureLocalhost
)
2260 "bypass-app-banner-engagement-checks",
2261 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_NAME
,
2262 IDS_FLAGS_BYPASS_APP_BANNER_ENGAGEMENT_CHECKS_DESCRIPTION
,
2264 SINGLE_VALUE_TYPE(switches::kBypassAppBannerEngagementChecks
)
2268 IDS_FLAGS_SYNC_SANDBOX_NAME
,
2269 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION
,
2271 SINGLE_VALUE_TYPE_AND_VALUE(
2272 switches::kSyncServiceURL
,
2273 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")
2276 "enable-child-account-detection",
2277 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_NAME
,
2278 IDS_FLAGS_CHILD_ACCOUNT_DETECTION_DESCRIPTION
,
2279 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
2280 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableChildAccountDetection
,
2281 switches::kDisableChildAccountDetection
)
2283 #if defined(OS_CHROMEOS) && defined(USE_OZONE)
2285 "ozone-test-single-overlay-support",
2286 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY
,
2287 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION
,
2289 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport
)
2291 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE)
2293 "v8-pac-mojo-out-of-process",
2294 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_NAME
,
2295 IDS_FLAGS_V8_PAC_MOJO_OUT_OF_PROCESS_DESCRIPTION
,
2297 SINGLE_VALUE_TYPE(switches::kV8PacMojoOutOfProcess
),
2299 #if defined(OS_CHROMEOS)
2301 "enable-firewall-hole-punching",
2302 IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_NAME
,
2303 IDS_FLAGS_ENABLE_FIREWALL_HOLE_PUNCHING_DESCRIPTION
,
2305 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirewallHolePunching
)
2307 #endif // defined(OS_CHROMEOS)
2309 "enable-media-router",
2310 IDS_FLAGS_ENABLE_MEDIA_ROUTER_NAME
,
2311 IDS_FLAGS_ENABLE_MEDIA_ROUTER_DESCRIPTION
,
2313 SINGLE_VALUE_TYPE(switches::kEnableMediaRouter
)
2315 // Since kEnableLauncherSearchProviderApi is not available when app list is
2316 // disabled, flag guard enable-launcher-search-provider-api.
2317 #if defined(ENABLE_APP_LIST)
2319 "enable-launcher-search-provider-api",
2320 IDS_FLAGS_ENABLE_LAUNCHER_SEARCH_PROVIDER_API
,
2321 IDS_FLAGS_ENABLE_LAUNCHER_SEARCH_PROVIDER_API_DESCRIPTION
,
2323 SINGLE_VALUE_TYPE(app_list::switches::kEnableLauncherSearchProviderApi
)
2325 #endif // defined(ENABLE_APP_LIST)
2326 #if defined(OS_CHROMEOS)
2328 "enable-mtp-write-support",
2329 IDS_FLAG_ENABLE_MTP_WRITE_SUPPORT_NAME
,
2330 IDS_FLAG_ENABLE_MTP_WRITE_SUPPORT_DESCRIPTION
,
2332 SINGLE_VALUE_TYPE(chromeos::switches::kEnableMtpWriteSupport
)
2334 #endif // defined(OS_CHROMEOS)
2335 #if defined(OS_CHROMEOS)
2337 "enable-datasaver-prompt",
2338 IDS_FLAGS_DATASAVER_PROMPT_NAME
,
2339 IDS_FLAGS_DATASAVER_PROMPT_DESCRIPTION
,
2341 MULTI_VALUE_TYPE(kDataSaverPromptChoices
)
2343 #endif // defined(OS_CHROMEOS)
2345 "supervised-user-safesites",
2346 IDS_FLAGS_SUPERVISED_USER_SAFESITES_NAME
,
2347 IDS_FLAGS_SUPERVISED_USER_SAFESITES_DESCRIPTION
,
2348 kOsAndroid
| kOsMac
| kOsWin
| kOsLinux
| kOsCrOS
,
2349 MULTI_VALUE_TYPE(kSupervisedUserSafeSitesChoices
)
2351 // NOTE: Adding new command-line switches requires adding corresponding
2352 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2353 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2356 const Experiment
* experiments
= kExperiments
;
2357 size_t num_experiments
= arraysize(kExperiments
);
2359 // Stores and encapsulates the little state that about:flags has.
2362 FlagsState() : needs_restart_(false) {}
2363 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2364 base::CommandLine
* command_line
,
2365 SentinelsMode sentinels
);
2366 bool IsRestartNeededToCommitChanges();
2367 void SetExperimentEnabled(
2368 FlagsStorage
* flags_storage
,
2369 const std::string
& internal_name
,
2371 void RemoveFlagsSwitches(
2372 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
);
2373 void ResetAllFlags(FlagsStorage
* flags_storage
);
2376 // Returns the singleton instance of this class
2377 static FlagsState
* GetInstance() {
2378 return Singleton
<FlagsState
>::get();
2382 bool needs_restart_
;
2383 std::map
<std::string
, std::string
> flags_switches_
;
2385 DISALLOW_COPY_AND_ASSIGN(FlagsState
);
2388 // Adds the internal names for the specified experiment to |names|.
2389 void AddInternalName(const Experiment
& e
, std::set
<std::string
>* names
) {
2390 if (e
.type
== Experiment::SINGLE_VALUE
) {
2391 names
->insert(e
.internal_name
);
2393 DCHECK(e
.type
== Experiment::MULTI_VALUE
||
2394 e
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2395 for (int i
= 0; i
< e
.num_choices
; ++i
)
2396 names
->insert(e
.NameForChoice(i
));
2400 // Confirms that an experiment is valid, used in a DCHECK in
2401 // SanitizeList below.
2402 bool ValidateExperiment(const Experiment
& e
) {
2404 case Experiment::SINGLE_VALUE
:
2405 DCHECK_EQ(0, e
.num_choices
);
2408 case Experiment::MULTI_VALUE
:
2409 DCHECK_GT(e
.num_choices
, 0);
2411 DCHECK(e
.choices
[0].command_line_switch
);
2412 DCHECK_EQ('\0', e
.choices
[0].command_line_switch
[0]);
2414 case Experiment::ENABLE_DISABLE_VALUE
:
2415 DCHECK_EQ(3, e
.num_choices
);
2417 DCHECK(e
.command_line_switch
);
2418 DCHECK(e
.command_line_value
);
2419 DCHECK(e
.disable_command_line_switch
);
2420 DCHECK(e
.disable_command_line_value
);
2428 // Removes all experiments from prefs::kEnabledLabsExperiments that are
2429 // unknown, to prevent this list to become very long as experiments are added
2431 void SanitizeList(FlagsStorage
* flags_storage
) {
2432 std::set
<std::string
> known_experiments
;
2433 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2434 DCHECK(ValidateExperiment(experiments
[i
]));
2435 AddInternalName(experiments
[i
], &known_experiments
);
2438 std::set
<std::string
> enabled_experiments
= flags_storage
->GetFlags();
2440 std::set
<std::string
> new_enabled_experiments
=
2441 base::STLSetIntersection
<std::set
<std::string
> >(
2442 known_experiments
, enabled_experiments
);
2444 if (new_enabled_experiments
!= enabled_experiments
)
2445 flags_storage
->SetFlags(new_enabled_experiments
);
2448 void GetSanitizedEnabledFlags(
2449 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2450 SanitizeList(flags_storage
);
2451 *result
= flags_storage
->GetFlags();
2454 bool SkipConditionalExperiment(const Experiment
& experiment
,
2455 FlagsStorage
* flags_storage
) {
2456 #if defined(OS_ANDROID) || defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2457 chrome::VersionInfo::Channel channel
= chrome::VersionInfo::GetChannel();
2460 #if defined(OS_ANDROID)
2461 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2462 if (!strcmp("enable-data-reduction-proxy-dev", experiment
.internal_name
) &&
2463 channel
!= chrome::VersionInfo::CHANNEL_BETA
&&
2464 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2467 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2468 if (!strcmp("enable-data-reduction-proxy-alt", experiment
.internal_name
) &&
2469 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2472 // enable-data-reduction-proxy-lo-fi is only available for Chromium builds and
2473 // the Canary/Dev channel.
2474 if (!strcmp("enable-data-reduction-proxy-lo-fi", experiment
.internal_name
) &&
2475 channel
!= chrome::VersionInfo::CHANNEL_DEV
&&
2476 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2477 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
) {
2482 #if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING)
2483 // enable-data-reduction-proxy-bypass-warning is only available for Chromium
2484 // builds and Canary/Dev channel.
2485 if (!strcmp("enable-data-reduction-proxy-bypass-warnings",
2486 experiment
.internal_name
) &&
2487 channel
!= chrome::VersionInfo::CHANNEL_UNKNOWN
&&
2488 channel
!= chrome::VersionInfo::CHANNEL_CANARY
&&
2489 channel
!= chrome::VersionInfo::CHANNEL_DEV
) {
2498 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2499 // enabled on the current platform.
2500 void GetSanitizedEnabledFlagsForCurrentPlatform(
2501 FlagsStorage
* flags_storage
, std::set
<std::string
>* result
) {
2502 GetSanitizedEnabledFlags(flags_storage
, result
);
2504 // Filter out any experiments that aren't enabled on the current platform. We
2505 // don't remove these from prefs else syncing to a platform with a different
2506 // set of experiments would be lossy.
2507 std::set
<std::string
> platform_experiments
;
2508 int current_platform
= GetCurrentPlatform();
2509 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2510 if (experiments
[i
].supported_platforms
& current_platform
)
2511 AddInternalName(experiments
[i
], &platform_experiments
);
2512 #if defined(OS_CHROMEOS)
2513 if (experiments
[i
].supported_platforms
& kOsCrOSOwnerOnly
)
2514 AddInternalName(experiments
[i
], &platform_experiments
);
2518 std::set
<std::string
> new_enabled_experiments
=
2519 base::STLSetIntersection
<std::set
<std::string
> >(
2520 platform_experiments
, *result
);
2522 result
->swap(new_enabled_experiments
);
2525 // Returns the Value representing the choice data in the specified experiment.
2526 base::Value
* CreateChoiceData(
2527 const Experiment
& experiment
,
2528 const std::set
<std::string
>& enabled_experiments
) {
2529 DCHECK(experiment
.type
== Experiment::MULTI_VALUE
||
2530 experiment
.type
== Experiment::ENABLE_DISABLE_VALUE
);
2531 base::ListValue
* result
= new base::ListValue
;
2532 for (int i
= 0; i
< experiment
.num_choices
; ++i
) {
2533 base::DictionaryValue
* value
= new base::DictionaryValue
;
2534 const std::string name
= experiment
.NameForChoice(i
);
2535 value
->SetString("internal_name", name
);
2536 value
->SetString("description", experiment
.DescriptionForChoice(i
));
2537 value
->SetBoolean("selected", enabled_experiments
.count(name
) > 0);
2538 result
->Append(value
);
2545 std::string
Experiment::NameForChoice(int index
) const {
2546 DCHECK(type
== Experiment::MULTI_VALUE
||
2547 type
== Experiment::ENABLE_DISABLE_VALUE
);
2548 DCHECK_LT(index
, num_choices
);
2549 return std::string(internal_name
) + testing::kMultiSeparator
+
2550 base::IntToString(index
);
2553 base::string16
Experiment::DescriptionForChoice(int index
) const {
2554 DCHECK(type
== Experiment::MULTI_VALUE
||
2555 type
== Experiment::ENABLE_DISABLE_VALUE
);
2556 DCHECK_LT(index
, num_choices
);
2558 if (type
== Experiment::ENABLE_DISABLE_VALUE
) {
2559 const int kEnableDisableDescriptionIds
[] = {
2560 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
,
2561 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
,
2562 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
,
2564 description_id
= kEnableDisableDescriptionIds
[index
];
2566 description_id
= choices
[index
].description_id
;
2568 return l10n_util::GetStringUTF16(description_id
);
2571 void ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2572 base::CommandLine
* command_line
,
2573 SentinelsMode sentinels
) {
2574 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage
,
2579 bool AreSwitchesIdenticalToCurrentCommandLine(
2580 const base::CommandLine
& new_cmdline
,
2581 const base::CommandLine
& active_cmdline
,
2582 std::set
<base::CommandLine::StringType
>* out_difference
) {
2583 std::set
<base::CommandLine::StringType
> new_flags
=
2584 ExtractFlagsFromCommandLine(new_cmdline
);
2585 std::set
<base::CommandLine::StringType
> active_flags
=
2586 ExtractFlagsFromCommandLine(active_cmdline
);
2588 bool result
= false;
2589 // Needed because std::equal doesn't check if the 2nd set is empty.
2590 if (new_flags
.size() == active_flags
.size()) {
2592 std::equal(new_flags
.begin(), new_flags
.end(), active_flags
.begin());
2595 if (out_difference
&& !result
) {
2596 std::set_symmetric_difference(
2599 active_flags
.begin(),
2601 std::inserter(*out_difference
, out_difference
->begin()));
2607 void GetFlagsExperimentsData(FlagsStorage
* flags_storage
,
2609 base::ListValue
* supported_experiments
,
2610 base::ListValue
* unsupported_experiments
) {
2611 std::set
<std::string
> enabled_experiments
;
2612 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2614 int current_platform
= GetCurrentPlatform();
2616 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2617 const Experiment
& experiment
= experiments
[i
];
2618 if (SkipConditionalExperiment(experiment
, flags_storage
))
2621 base::DictionaryValue
* data
= new base::DictionaryValue();
2622 data
->SetString("internal_name", experiment
.internal_name
);
2623 data
->SetString("name",
2624 l10n_util::GetStringUTF16(experiment
.visible_name_id
));
2625 data
->SetString("description",
2626 l10n_util::GetStringUTF16(
2627 experiment
.visible_description_id
));
2629 base::ListValue
* supported_platforms
= new base::ListValue();
2630 AddOsStrings(experiment
.supported_platforms
, supported_platforms
);
2631 data
->Set("supported_platforms", supported_platforms
);
2633 switch (experiment
.type
) {
2634 case Experiment::SINGLE_VALUE
:
2637 enabled_experiments
.count(experiment
.internal_name
) > 0);
2639 case Experiment::MULTI_VALUE
:
2640 case Experiment::ENABLE_DISABLE_VALUE
:
2641 data
->Set("choices", CreateChoiceData(experiment
, enabled_experiments
));
2647 bool supported
= (experiment
.supported_platforms
& current_platform
) != 0;
2648 #if defined(OS_CHROMEOS)
2649 if (access
== kOwnerAccessToFlags
&&
2650 (experiment
.supported_platforms
& kOsCrOSOwnerOnly
) != 0) {
2655 supported_experiments
->Append(data
);
2657 unsupported_experiments
->Append(data
);
2661 bool IsRestartNeededToCommitChanges() {
2662 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
2665 void SetExperimentEnabled(FlagsStorage
* flags_storage
,
2666 const std::string
& internal_name
,
2668 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage
,
2669 internal_name
, enable
);
2672 void RemoveFlagsSwitches(
2673 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2674 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list
);
2677 void ResetAllFlags(FlagsStorage
* flags_storage
) {
2678 FlagsState::GetInstance()->ResetAllFlags(flags_storage
);
2681 int GetCurrentPlatform() {
2682 #if defined(OS_MACOSX)
2684 #elif defined(OS_WIN)
2686 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2688 #elif defined(OS_LINUX) || defined(OS_OPENBSD)
2690 #elif defined(OS_ANDROID)
2693 #error Unknown platform
2697 void RecordUMAStatistics(FlagsStorage
* flags_storage
) {
2698 std::set
<std::string
> flags
= flags_storage
->GetFlags();
2699 for (const std::string
& flag
: flags
) {
2700 std::string
action("AboutFlags_");
2702 content::RecordComputedAction(action
);
2704 // Since flag metrics are recorded every startup, add a tick so that the
2705 // stats can be made meaningful.
2707 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2708 content::RecordAction(base::UserMetricsAction("StartupTick"));
2711 base::HistogramBase::Sample
GetSwitchUMAId(const std::string
& switch_name
) {
2712 return static_cast<base::HistogramBase::Sample
>(
2713 metrics::HashMetricName(switch_name
));
2716 void ReportCustomFlags(const std::string
& uma_histogram_hame
,
2717 const std::set
<std::string
>& command_line_difference
) {
2718 for (const std::string
& flag
: command_line_difference
) {
2719 int uma_id
= about_flags::testing::kBadSwitchFormatHistogramId
;
2720 if (StartsWithASCII(flag
, "--", true /* case_sensitive */)) {
2721 // Skip '--' before switch name.
2722 std::string
switch_name(flag
.substr(2));
2724 // Kill value, if any.
2725 const size_t value_pos
= switch_name
.find('=');
2726 if (value_pos
!= std::string::npos
)
2727 switch_name
.resize(value_pos
);
2729 uma_id
= GetSwitchUMAId(switch_name
);
2731 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
2732 << "' has incorrect format.";
2734 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2735 << "' '" << flag
<< "', uma_id=" << uma_id
;
2737 // Sparse histogram macro does not cache the histogram, so it's safe
2738 // to use macro with non-static histogram name here.
2739 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame
, uma_id
);
2743 //////////////////////////////////////////////////////////////////////////////
2744 // FlagsState implementation.
2748 typedef std::map
<std::string
, std::pair
<std::string
, std::string
> >
2749 NameToSwitchAndValueMap
;
2751 void SetFlagToSwitchMapping(const std::string
& key
,
2752 const std::string
& switch_name
,
2753 const std::string
& switch_value
,
2754 NameToSwitchAndValueMap
* name_to_switch_map
) {
2755 DCHECK(name_to_switch_map
->end() == name_to_switch_map
->find(key
));
2756 (*name_to_switch_map
)[key
] = std::make_pair(switch_name
, switch_value
);
2759 void FlagsState::ConvertFlagsToSwitches(FlagsStorage
* flags_storage
,
2760 base::CommandLine
* command_line
,
2761 SentinelsMode sentinels
) {
2762 if (command_line
->HasSwitch(switches::kNoExperiments
))
2765 std::set
<std::string
> enabled_experiments
;
2767 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage
,
2768 &enabled_experiments
);
2770 NameToSwitchAndValueMap name_to_switch_map
;
2771 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2772 const Experiment
& e
= experiments
[i
];
2773 if (e
.type
== Experiment::SINGLE_VALUE
) {
2774 SetFlagToSwitchMapping(e
.internal_name
, e
.command_line_switch
,
2775 e
.command_line_value
, &name_to_switch_map
);
2776 } else if (e
.type
== Experiment::MULTI_VALUE
) {
2777 for (int j
= 0; j
< e
.num_choices
; ++j
) {
2778 SetFlagToSwitchMapping(e
.NameForChoice(j
),
2779 e
.choices
[j
].command_line_switch
,
2780 e
.choices
[j
].command_line_value
,
2781 &name_to_switch_map
);
2784 DCHECK_EQ(e
.type
, Experiment::ENABLE_DISABLE_VALUE
);
2785 SetFlagToSwitchMapping(e
.NameForChoice(0), std::string(), std::string(),
2786 &name_to_switch_map
);
2787 SetFlagToSwitchMapping(e
.NameForChoice(1), e
.command_line_switch
,
2788 e
.command_line_value
, &name_to_switch_map
);
2789 SetFlagToSwitchMapping(e
.NameForChoice(2), e
.disable_command_line_switch
,
2790 e
.disable_command_line_value
, &name_to_switch_map
);
2794 if (sentinels
== kAddSentinels
) {
2795 command_line
->AppendSwitch(switches::kFlagSwitchesBegin
);
2796 flags_switches_
.insert(
2797 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesBegin
,
2800 for (const std::string
& experiment_name
: enabled_experiments
) {
2801 NameToSwitchAndValueMap::const_iterator name_to_switch_it
=
2802 name_to_switch_map
.find(experiment_name
);
2803 if (name_to_switch_it
== name_to_switch_map
.end()) {
2808 const std::pair
<std::string
, std::string
>&
2809 switch_and_value_pair
= name_to_switch_it
->second
;
2811 CHECK(!switch_and_value_pair
.first
.empty());
2812 command_line
->AppendSwitchASCII(switch_and_value_pair
.first
,
2813 switch_and_value_pair
.second
);
2814 flags_switches_
[switch_and_value_pair
.first
] = switch_and_value_pair
.second
;
2816 if (sentinels
== kAddSentinels
) {
2817 command_line
->AppendSwitch(switches::kFlagSwitchesEnd
);
2818 flags_switches_
.insert(
2819 std::pair
<std::string
, std::string
>(switches::kFlagSwitchesEnd
,
2824 bool FlagsState::IsRestartNeededToCommitChanges() {
2825 return needs_restart_
;
2828 void FlagsState::SetExperimentEnabled(FlagsStorage
* flags_storage
,
2829 const std::string
& internal_name
,
2831 size_t at_index
= internal_name
.find(testing::kMultiSeparator
);
2832 if (at_index
!= std::string::npos
) {
2834 // We're being asked to enable a multi-choice experiment. Disable the
2835 // currently selected choice.
2836 DCHECK_NE(at_index
, 0u);
2837 const std::string experiment_name
= internal_name
.substr(0, at_index
);
2838 SetExperimentEnabled(flags_storage
, experiment_name
, false);
2840 // And enable the new choice, if it is not the default first choice.
2841 if (internal_name
!= experiment_name
+ "@0") {
2842 std::set
<std::string
> enabled_experiments
;
2843 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2844 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2845 flags_storage
->SetFlags(enabled_experiments
);
2850 std::set
<std::string
> enabled_experiments
;
2851 GetSanitizedEnabledFlags(flags_storage
, &enabled_experiments
);
2853 const Experiment
* e
= NULL
;
2854 for (size_t i
= 0; i
< num_experiments
; ++i
) {
2855 if (experiments
[i
].internal_name
== internal_name
) {
2856 e
= experiments
+ i
;
2862 if (e
->type
== Experiment::SINGLE_VALUE
) {
2864 needs_restart_
|= enabled_experiments
.insert(internal_name
).second
;
2866 needs_restart_
|= (enabled_experiments
.erase(internal_name
) > 0);
2869 // Enable the first choice.
2870 needs_restart_
|= enabled_experiments
.insert(e
->NameForChoice(0)).second
;
2872 // Find the currently enabled choice and disable it.
2873 for (int i
= 0; i
< e
->num_choices
; ++i
) {
2874 std::string choice_name
= e
->NameForChoice(i
);
2875 if (enabled_experiments
.find(choice_name
) !=
2876 enabled_experiments
.end()) {
2877 needs_restart_
= true;
2878 enabled_experiments
.erase(choice_name
);
2879 // Continue on just in case there's a bug and more than one
2880 // experiment for this choice was enabled.
2886 flags_storage
->SetFlags(enabled_experiments
);
2889 void FlagsState::RemoveFlagsSwitches(
2890 std::map
<std::string
, base::CommandLine::StringType
>* switch_list
) {
2891 for (const auto& entry
: flags_switches_
)
2892 switch_list
->erase(entry
.first
);
2895 void FlagsState::ResetAllFlags(FlagsStorage
* flags_storage
) {
2896 needs_restart_
= true;
2898 std::set
<std::string
> no_experiments
;
2899 flags_storage
->SetFlags(no_experiments
);
2902 void FlagsState::reset() {
2903 needs_restart_
= false;
2904 flags_switches_
.clear();
2911 // WARNING: '@' is also used in the html file. If you update this constant you
2912 // also need to update the html file.
2913 const char kMultiSeparator
[] = "@";
2915 const base::HistogramBase::Sample kBadSwitchFormatHistogramId
= 0;
2918 FlagsState::GetInstance()->reset();
2921 void SetExperiments(const Experiment
* e
, size_t count
) {
2923 experiments
= kExperiments
;
2924 num_experiments
= arraysize(kExperiments
);
2927 num_experiments
= count
;
2931 const Experiment
* GetExperiments(size_t* count
) {
2932 *count
= num_experiments
;
2936 } // namespace testing
2938 } // namespace about_flags