blob: 362351f58e65158cb9fdf5f2ca867ad41446e57a [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
[email protected]ad2a3ded2010-08-27 13:19:057#include <iterator>
8#include <map>
9#include <set>
[email protected]83e9fa702013-02-25 19:30:4410#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0511
[email protected]ad2a3ded2010-08-27 13:19:0512#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1513#include "base/memory/singleton.h"
[email protected]4b66a7d2014-08-15 17:13:3114#include "base/metrics/sparse_histogram.h"
[email protected]09f3fde82014-05-14 15:08:1515#include "base/stl_util.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]4b66a7d2014-08-15 17:13:3117#include "base/strings/string_util.h"
[email protected]135cb802013-06-09 16:44:2018#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0519#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5220#include "cc/base/switches.h"
[email protected]11534552013-12-05 02:09:3021#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
[email protected]e6d1c4f2013-06-12 17:37:4022#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0323#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0524#include "chrome/common/chrome_switches.h"
[email protected]af39f002014-08-22 10:18:1825#include "chrome/grit/generated_resources.h"
[email protected]58bc1c32013-12-16 22:52:0726#include "components/autofill/core/common/autofill_switches.h"
[email protected]4e6c96e2014-05-17 18:41:1927#include "components/cloud_devices/common/cloud_devices_switches.h"
[email protected]4b66a7d2014-08-15 17:13:3128#include "components/metrics/metrics_hashes.h"
[email protected]cbb22eb2013-06-24 23:53:1029#include "components/nacl/common/nacl_switches.h"
isherman96bfc8d22014-11-06 00:42:4630#include "components/proximity_auth/switches.h"
[email protected]720b10492014-07-23 08:48:4031#include "components/search/search_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3832#include "content/public/browser/user_metrics.h"
[email protected]e2e8e322012-09-12 04:37:0233#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1734#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5935#include "ui/base/ui_base_switches.h"
[email protected]bf3f4592014-03-31 19:50:4436#include "ui/display/display_switches.h"
[email protected]a6147a22013-09-26 06:55:0937#include "ui/events/event_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4838#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2739#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2440#include "ui/keyboard/keyboard_switches.h"
[email protected]e3d512a72014-03-18 20:50:4741#include "ui/native_theme/native_theme_switches.h"
[email protected]c4f51d22013-11-05 03:11:2642#include "ui/views/views_switches.h"
[email protected]9a224572013-05-12 23:08:5643
[email protected]3dfb4012014-06-11 07:33:3844#if defined(OS_ANDROID)
45#include "chrome/common/chrome_version_info.h"
megjablon3476e042014-10-14 19:21:5946#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
[email protected]4c583b62014-08-08 10:37:2347#include "components/omnibox/omnibox_switches.h"
juyika7be5192014-08-26 23:01:0448#else
49#include "ui/message_center/message_center_switches.h"
[email protected]3dfb4012014-06-11 07:33:3850#endif
51
[email protected]dc04be7c2012-03-15 23:57:4952#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3153#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4954#endif
55
[email protected]badba1ad2012-11-16 17:21:4656#if defined(OS_CHROMEOS)
57#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5158#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4659#endif
60
[email protected]fe2b77f62013-11-09 04:30:5161#if defined(ENABLE_APP_LIST)
62#include "ui/app_list/app_list_switches.h"
63#endif
64
thestigb012bc3d2014-09-18 22:57:1365#if defined(ENABLE_EXTENSIONS)
66#include "extensions/common/switches.h"
67#endif
68
[email protected]1a47d7e2010-10-15 00:37:2469namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0570
[email protected]8a6ff28d2010-12-02 16:35:1971// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5372#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4473 Experiment::SINGLE_VALUE, \
74 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5375#define SINGLE_VALUE_TYPE(command_line_switch) \
76 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4477#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
78 disable_switch, disable_value) \
79 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
80 disable_switch, disable_value, NULL, 3
81#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
82 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5383#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4484 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1985
[email protected]e2ddbc92010-10-15 20:02:0786namespace {
87
asvitkinebff63b22014-11-25 01:03:5288// Enumeration of OSs.
89enum {
90 kOsMac = 1 << 0,
91 kOsWin = 1 << 1,
92 kOsLinux = 1 << 2,
93 kOsCrOS = 1 << 3,
94 kOsAndroid = 1 << 4,
95 kOsCrOSOwnerOnly = 1 << 5
96};
97
[email protected]9c7453d2012-01-21 00:45:4098const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5699const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:05100
[email protected]cc3e2052011-12-20 01:01:40101// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
102// whether the experiment is available on that platform.
[email protected]5bcdd99d2013-12-23 18:28:30103void AddOsStrings(unsigned bitmask, base::ListValue* list) {
[email protected]cc3e2052011-12-20 01:01:40104 struct {
105 unsigned bit;
106 const char* const name;
107 } kBitsToOs[] = {
108 {kOsMac, "Mac"},
109 {kOsWin, "Windows"},
110 {kOsLinux, "Linux"},
111 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:01112 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:58113 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:40114 };
asvitkinebff63b22014-11-25 01:03:52115 for (size_t i = 0; i < arraysize(kBitsToOs); ++i) {
[email protected]cc3e2052011-12-20 01:01:40116 if (bitmask & kBitsToOs[i].bit)
[email protected]5bcdd99d2013-12-23 18:28:30117 list->Append(new base::StringValue(kBitsToOs[i].name));
asvitkinebff63b22014-11-25 01:03:52118 }
[email protected]cc3e2052011-12-20 01:01:40119}
120
[email protected]6d98abf2013-06-17 23:35:51121// Convert switch constants to proper CommandLine::StringType strings.
122CommandLine::StringType GetSwitchString(const std::string& flag) {
123 CommandLine cmd_line(CommandLine::NO_PROGRAM);
124 cmd_line.AppendSwitch(flag);
[email protected]4ac579b2014-05-20 06:43:23125 DCHECK_EQ(2U, cmd_line.argv().size());
[email protected]6d98abf2013-06-17 23:35:51126 return cmd_line.argv()[1];
127}
128
129// Scoops flags from a command line.
130std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
131 const CommandLine& cmdline) {
132 std::set<CommandLine::StringType> flags;
133 // First do the ones between --flag-switches-begin and --flag-switches-end.
134 CommandLine::StringVector::const_iterator first =
135 std::find(cmdline.argv().begin(), cmdline.argv().end(),
136 GetSwitchString(switches::kFlagSwitchesBegin));
137 CommandLine::StringVector::const_iterator last =
138 std::find(cmdline.argv().begin(), cmdline.argv().end(),
139 GetSwitchString(switches::kFlagSwitchesEnd));
140 if (first != cmdline.argv().end() && last != cmdline.argv().end())
141 flags.insert(first + 1, last);
142#if defined(OS_CHROMEOS)
143 // Then add those between --policy-switches-begin and --policy-switches-end.
144 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
145 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
146 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
147 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
148 if (first != cmdline.argv().end() && last != cmdline.argv().end())
149 flags.insert(first + 1, last);
150#endif
151 return flags;
152}
153
[email protected]d7932532012-11-21 21:10:31154const Experiment::Choice kTouchEventsChoices[] = {
155 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
157 switches::kTouchEvents,
158 switches::kTouchEventsEnabled },
159 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
160 switches::kTouchEvents,
161 switches::kTouchEventsDisabled }
162};
163
[email protected]c38e9802014-02-18 21:32:12164#if defined(USE_AURA)
165const Experiment::Choice kOverscrollHistoryNavigationChoices[] = {
166 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" },
167 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
168 switches::kOverscrollHistoryNavigation,
169 "0" },
170 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI,
171 switches::kOverscrollHistoryNavigation,
172 "2" }
173};
174#endif
175
[email protected]d33d2222014-06-04 15:39:58176#if !defined(DISABLE_NACL)
[email protected]66f409c2012-10-04 20:59:04177const Experiment::Choice kNaClDebugMaskChoices[] = {
[email protected]66f409c2012-10-04 20:59:04178 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
[email protected]402bed6e2014-03-07 08:33:09179 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
180 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
181 // so by default we want to avoid debugging that.
182 // NOTE: As the default value must be the empty string, the mask excluding
183 // the PNaCl translator and secure shell is substituted elsewhere.
184 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" },
185 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" },
[email protected]66f409c2012-10-04 20:59:04186 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
187 switches::kNaClDebugMask, "*://*/*debug.nmf" }
188};
[email protected]d33d2222014-06-04 15:39:58189#endif
[email protected]66f409c2012-10-04 20:59:04190
[email protected]a42c85f2013-04-04 18:15:12191const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
192 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
193 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
194 cc::switches::kMaxTilesForInterestArea, "64"},
195 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
196 cc::switches::kMaxTilesForInterestArea, "128"},
197 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
198 cc::switches::kMaxTilesForInterestArea, "256"},
199 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
200 cc::switches::kMaxTilesForInterestArea, "512"}
201};
202
[email protected]a3618122013-04-26 21:15:34203const Experiment::Choice kDefaultTileWidthChoices[] = {
204 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
205 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
206 switches::kDefaultTileWidth, "128"},
207 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
208 switches::kDefaultTileWidth, "256"},
209 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
210 switches::kDefaultTileWidth, "512"},
211 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
212 switches::kDefaultTileWidth, "1024"}
213};
214
215const Experiment::Choice kDefaultTileHeightChoices[] = {
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
217 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
218 switches::kDefaultTileHeight, "128"},
219 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
220 switches::kDefaultTileHeight, "256"},
221 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
222 switches::kDefaultTileHeight, "512"},
223 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
224 switches::kDefaultTileHeight, "1024"}
225};
226
[email protected]38484df12013-04-10 16:42:03227const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21228 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
230 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03231 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
232 switches::kUseSimpleCacheBackend, "on"}
233};
234
[email protected]9afc14e22013-09-25 22:34:14235#if defined(USE_AURA)
[email protected]910ecfe2013-06-03 23:38:14236const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
237 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
238 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
239 switches::kTabCaptureUpscaleQuality, "fast" },
240 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
241 switches::kTabCaptureUpscaleQuality, "good" },
242 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
243 switches::kTabCaptureUpscaleQuality, "best" },
244};
245
246const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
247 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
248 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
249 switches::kTabCaptureDownscaleQuality, "fast" },
250 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
251 switches::kTabCaptureDownscaleQuality, "good" },
252 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
253 switches::kTabCaptureDownscaleQuality, "best" },
254};
[email protected]9afc14e22013-09-25 22:34:14255#endif
[email protected]910ecfe2013-06-03 23:38:14256
[email protected]d5874f12013-12-05 04:30:00257#if defined(OS_ANDROID)
258const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
259 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
260 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
261 switches::kEnableZeroSuggestMostVisited, ""},
mariakhomenkoad3bfef2014-10-27 22:57:33262 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED_WITHOUT_SERP,
263 switches::kEnableZeroSuggestMostVisitedWithoutSerp, ""},
[email protected]d5874f12013-12-05 04:30:00264 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
265 switches::kDisableZeroSuggest, ""}
266};
267#endif
268
[email protected]1a82f7372013-12-06 12:46:52269const Experiment::Choice kNumRasterThreadsChoices[] = {
270 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]00d92d32014-01-23 09:46:50271 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
272 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
273 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
274 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
[email protected]1a82f7372013-12-06 12:46:52275};
276
[email protected]a23530d2014-03-11 06:04:14277const Experiment::Choice kEnableGpuRasterizationChoices[] = {
278 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
279 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
280 switches::kEnableGpuRasterization, "" },
281 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
282 switches::kDisableGpuRasterization, "" },
283 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
284 switches::kForceGpuRasterization, "" },
285};
286
[email protected]dc920d62013-12-13 22:12:47287// We're using independent flags here (as opposed to a common flag with
288// different values) to be able to enable/disable the entire experience
289// associated with this feature server-side from the FieldTrial (the complete
290// experience includes other flag changes as well). It is not currently possible
291// to do that with "flag=value" flags.
292const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
293 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
294 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
295 switches::kDisableSearchButtonInOmnibox, ""},
296 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
297 switches::kEnableSearchButtonInOmniboxForStr, ""},
298 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
299 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
300 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
301 switches::kEnableSearchButtonInOmniboxAlways, ""}
302};
303
[email protected]78dd09e2014-01-12 02:41:46304// See comment above for kSearchButtonInOmniboxChoices. The same reasoning
305// applies here.
306const Experiment::Choice kOriginChipChoices[] = {
307 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
308 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
[email protected]5d58f952014-05-20 21:12:47309 { IDS_FLAGS_ORIGIN_CHIP_ALWAYS, switches::kEnableOriginChipAlways, ""},
310 { IDS_FLAGS_ORIGIN_CHIP_ON_SRP, switches::kEnableOriginChipOnSrp, ""}
[email protected]7a54bf4b2014-02-06 19:21:54311};
[email protected]78dd09e2014-01-12 02:41:46312
[email protected]f42cffb2014-03-08 18:03:25313const Experiment::Choice kTouchScrollingModeChoices[] = {
314 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
315 { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL,
316 switches::kTouchScrollingMode,
317 switches::kTouchScrollingModeTouchcancel },
[email protected]372f52e2014-04-28 16:15:49318 { IDS_FLAGS_TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE,
[email protected]f42cffb2014-03-08 18:03:25319 switches::kTouchScrollingMode,
[email protected]372f52e2014-04-28 16:15:49320 switches::kTouchScrollingModeAsyncTouchmove },
[email protected]f42cffb2014-03-08 18:03:25321 { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE,
322 switches::kTouchScrollingMode,
323 switches::kTouchScrollingModeSyncTouchmove },
324};
325
[email protected]6f8ede32014-05-09 13:58:45326const Experiment::Choice kExtensionContentVerificationChoices[] = {
327 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
328 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP,
[email protected]8bb62162014-06-23 09:45:50329 switches::kExtensionContentVerification,
330 switches::kExtensionContentVerificationBootstrap },
[email protected]6f8ede32014-05-09 13:58:45331 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE,
[email protected]8bb62162014-06-23 09:45:50332 switches::kExtensionContentVerification,
333 switches::kExtensionContentVerificationEnforce },
[email protected]6f8ede32014-05-09 13:58:45334 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT,
[email protected]8bb62162014-06-23 09:45:50335 switches::kExtensionContentVerification,
336 switches::kExtensionContentVerificationEnforceStrict },
[email protected]6f8ede32014-05-09 13:58:45337};
338
[email protected]c5bbe0e2014-08-01 23:23:30339// Note that the value is specified in seconds (where 0 is equivalent to
340// disabled).
341const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = {
342 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
343 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
344 switches::kRememberCertErrorDecisions,
345 "-1" },
346 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY,
347 switches::kRememberCertErrorDecisions,
348 "86400" },
349 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS,
350 switches::kRememberCertErrorDecisions,
351 "259200" },
352 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK,
353 switches::kRememberCertErrorDecisions,
354 "604800" },
355 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH,
356 switches::kRememberCertErrorDecisions,
357 "2592000" },
358 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS,
359 switches::kRememberCertErrorDecisions,
360 "7776000" },
361};
362
[email protected]524dd702014-08-16 00:00:45363const Experiment::Choice kAutofillSyncCredentialChoices[] = {
364 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
365 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL,
366 password_manager::switches::kAllowAutofillSyncCredential, ""},
367 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH,
368 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""},
369 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL,
370 password_manager::switches::kDisallowAutofillSyncCredential, ""},
371};
372
agl0a4a16342014-11-05 04:17:05373const Experiment::Choice kSSLVersionMinChoices[] = {
374 { IDS_FLAGS_SSL_VERSION_DEFAULT, "", "" },
375 { IDS_FLAGS_SSL_VERSION_SSLV3, switches::kSSLVersionMin,
376 switches::kSSLVersionSSLv3 },
377 { IDS_FLAGS_SSL_VERSION_TLSV1, switches::kSSLVersionMin,
378 switches::kSSLVersionTLSv1 },
379 { IDS_FLAGS_SSL_VERSION_TLSV11, switches::kSSLVersionMin,
380 switches::kSSLVersionTLSv11 },
381 { IDS_FLAGS_SSL_VERSION_TLSV12, switches::kSSLVersionMin,
382 switches::kSSLVersionTLSv12 },
383};
384
[email protected]4bc5050c2010-11-18 17:55:54385// RECORDING USER METRICS FOR FLAGS:
386// -----------------------------------------------------------------------------
387// The first line of the experiment is the internal name. If you'd like to
388// gather statistics about the usage of your flag, you should append a marker
389// comment to the end of the feature name, like so:
390// "my-special-feature", // FLAGS:RECORD_UMA
391//
[email protected]d8320fb62014-03-22 03:16:37392// After doing that, run
393// tools/metrics/actions/extract_actions.py
394// to add the metric to actions.xml (which will enable UMA to record your
395// feature flag), then update the <owner>s and <description> sections. Make sure
396// to include the actions.xml file when you upload your code for review!
[email protected]4bc5050c2010-11-18 17:55:54397//
[email protected]783d5bb2012-10-24 03:47:14398// After your feature has shipped under a flag, you can locate the metrics under
399// the action name AboutFlags_internal-action-name. Actions are recorded once
400// per startup, so you should divide this number by AboutFlags_StartupTick to
401// get a sense of usage. Note that this will not be the same as number of users
402// with a given feature enabled because users can quit and relaunch the
403// application multiple times over a given time interval. The dashboard also
404// shows you how many (metrics reporting) users have enabled the flag over the
405// last seven days. However, note that this is not the same as the number of
406// users who have the flag enabled, since enabling the flag happens once,
407// whereas running with the flag enabled happens until the user flips the flag
408// again.
[email protected]4bc5050c2010-11-18 17:55:54409
[email protected]8a6ff28d2010-12-02 16:35:19410// To add a new experiment add to the end of kExperiments. There are two
411// distinct types of experiments:
412// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
413// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22414// . MULTI_VALUE: a list of choices, the first of which should correspond to a
415// deactivated state for this lab (i.e. no command line option). To specify
416// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
417// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19418// See the documentation of Experiment for details on the fields.
419//
[email protected]4b66a7d2014-08-15 17:13:31420// Command-line switches must have entries in enum "LoginCustomFlags" in
421// histograms.xml. See note in histograms.xml and don't forget to run
422// AboutFlagsHistogramTest unit test to calculate and verify checksum.
423//
[email protected]8a6ff28d2010-12-02 16:35:19424// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05425const Experiment kExperiments[] = {
426 {
[email protected]96c6f4c2011-05-18 19:36:22427 "ignore-gpu-blacklist",
428 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
429 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
430 kOsAll,
431 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
432 },
433 {
[email protected]85603362014-04-21 16:18:14434 "disable_layer_squashing",
435 IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME,
436 IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION,
437 kOsAll,
438 SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing)
439 },
[email protected]5b7033fc2013-12-07 22:32:07440#if defined(OS_WIN)
441 {
[email protected]5b263b6a2014-06-09 21:47:34442 "disable-direct-write",
443 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME,
444 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION,
[email protected]5b7033fc2013-12-07 22:32:07445 kOsWin,
[email protected]5b263b6a2014-06-09 21:47:34446 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite)
[email protected]5b7033fc2013-12-07 22:32:07447 },
448#endif
[email protected]8b1c3c72013-01-25 01:48:43449 {
[email protected]2b608752013-05-01 03:34:36450 "enable-experimental-canvas-features",
451 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
452 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
453 kOsAll,
454 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
455 },
456 {
[email protected]81c64af62012-06-06 20:15:52457 "disable-accelerated-2d-canvas",
458 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
459 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
460 kOsAll,
461 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
462 },
463 {
[email protected]72d37352014-07-24 02:34:41464 "enable-display-list-2d-canvas",
465 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME,
466 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION,
467 kOsAll,
asvitkinebff63b22014-11-25 01:03:52468 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas,
469 switches::kDisableDisplayList2dCanvas)
[email protected]72d37352014-07-24 02:34:41470 },
471 {
[email protected]5963b772011-02-09 22:55:38472 "composited-layer-borders",
473 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
474 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
475 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57476 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38477 },
478 {
[email protected]a8f1eaa2011-03-07 19:00:58479 "show-fps-counter",
480 IDS_FLAGS_SHOW_FPS_COUNTER,
481 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
482 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57483 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58484 },
[email protected]8ff7f342011-05-25 01:49:47485 {
[email protected]deaba6d52011-09-23 14:47:12486 "disable-webgl",
487 IDS_FLAGS_DISABLE_WEBGL_NAME,
488 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28489 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12490 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
491 },
[email protected]09096e02012-05-24 11:12:04492 {
[email protected]ce585bf2013-03-14 16:25:16493 "disable-webrtc",
494 IDS_FLAGS_DISABLE_WEBRTC_NAME,
495 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05496 kOsAndroid,
497#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16498 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05499#else
500 SINGLE_VALUE_TYPE("")
501#endif
502 },
[email protected]5e2bc8c2013-05-28 22:59:57503#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30504 {
[email protected]fdf631e2013-09-13 09:06:07505 "disable-webrtc-hw-decoding",
506 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
507 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
[email protected]6442b022013-12-05 11:09:05508 kOsAndroid | kOsCrOS,
[email protected]fdf631e2013-09-13 09:06:07509 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
510 },
511 {
[email protected]96cbf422013-09-11 12:42:22512 "disable-webrtc-hw-encoding",
513 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
514 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
[email protected]6998f01f22013-12-04 09:27:57515 kOsAndroid | kOsCrOS,
[email protected]96cbf422013-09-11 12:42:22516 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
517 },
[email protected]5e2bc8c2013-05-28 22:59:57518#endif
[email protected]34cb5292013-04-15 06:06:31519#if defined(OS_ANDROID)
520 {
[email protected]7b8a31632013-06-13 22:42:37521 "disable-webaudio",
522 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
523 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31524 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37525 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31526 },
527#endif
[email protected]d9da9582013-01-31 04:59:05528 {
[email protected]d8221b22013-05-23 05:35:43529 "enable-compositing-for-transition",
530 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
531 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
532 kOsAll,
asvitkinebff63b22014-11-25 01:03:52533 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableCompositingForTransition,
534 switches::kDisableCompositingForTransition)
[email protected]d8221b22013-05-23 05:35:43535 },
[email protected]d33d2222014-06-04 15:39:58536 // Native client is compiled out when DISABLE_NACL is defined.
537#if !defined(DISABLE_NACL)
[email protected]2fe15fcb2010-10-21 20:39:53538 {
[email protected]e3791ce92011-08-09 01:03:32539 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40540 IDS_FLAGS_ENABLE_NACL_NAME,
541 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]d33d2222014-06-04 15:39:58542 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19543 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40544 },
545 {
[email protected]9addd1c2012-09-15 14:28:24546 "enable-nacl-debug", // FLAGS:RECORD_UMA
547 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
548 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56549 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24550 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13551 },
552 {
[email protected]66f409c2012-10-04 20:59:04553 "nacl-debug-mask", // FLAGS:RECORD_UMA
554 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
555 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56556 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04557 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
558 },
[email protected]d33d2222014-06-04 15:39:58559#endif
thestigb012bc3d2014-09-18 22:57:13560#if defined(ENABLE_EXTENSIONS)
[email protected]66f409c2012-10-04 20:59:04561 {
[email protected]4bc5050c2010-11-18 17:55:54562 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32563 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
564 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56565 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51566 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32567 },
[email protected]3627b06d2010-11-12 16:36:16568 {
[email protected]ac2e2acd2013-03-21 12:57:29569 "extensions-on-chrome-urls",
570 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
571 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
572 kOsAll,
[email protected]49d9b142013-07-19 08:50:27573 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29574 },
thestigb012bc3d2014-09-18 22:57:13575#endif
[email protected]ac2e2acd2013-03-21 12:57:29576 {
[email protected]88c92012013-07-02 11:56:34577 "enable-fast-unload",
578 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
579 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
580 kOsAll,
581 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
582 },
thestigb012bc3d2014-09-18 22:57:13583#if defined(ENABLE_EXTENSIONS)
[email protected]88c92012013-07-02 11:56:34584 {
[email protected]1f4da9e2013-06-27 05:23:44585 "enable-app-window-controls",
586 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
587 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
588 kOsDesktop,
hashimotof784afd2014-09-05 02:38:31589 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls)
[email protected]1f4da9e2013-06-27 05:23:44590 },
thestigb012bc3d2014-09-18 22:57:13591#endif
[email protected]1f4da9e2013-06-27 05:23:44592 {
[email protected]80bd24e2010-11-30 09:34:38593 "disable-hyperlink-auditing",
594 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
595 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
596 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19597 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51598 },
[email protected]333bdc52013-07-16 00:37:04599#if defined(OS_ANDROID)
600 {
[email protected]26d1b4d2014-02-08 02:42:17601 "contextual-search",
602 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
603 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
604 kOsAndroid,
[email protected]41d32bb2014-05-30 08:26:05605 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch,
606 switches::kDisableContextualSearch)
[email protected]26d1b4d2014-02-08 02:42:17607 },
[email protected]333bdc52013-07-16 00:37:04608#endif
[email protected]8cc9e532013-05-06 21:01:47609 {
[email protected]3eb5728c2011-06-20 22:32:24610 "show-autofill-type-predictions",
611 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
612 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
613 kOsAll,
[email protected]e217c5632013-04-12 19:11:48614 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24615 },
[email protected]bff4d3e2011-06-21 23:58:52616 {
estade9c7159ea2014-11-15 03:52:51617 "disambiguate-autofill-server-name-types",
618 IDS_FLAGS_DISAMBIGUATE_SERVER_NAME_TYPES_NAME,
619 IDS_FLAGS_DISAMBIGUATE_SERVER_NAME_TYPES_DESCRIPTION,
620 kOsAll,
621 ENABLE_DISABLE_VALUE_TYPE(
622 autofill::switches::kDisambiguateAutofillServerNameTypes,
623 autofill::switches::kTrustAutofillServerNameTypes)
624 },
625 {
[email protected]a22ebd812011-06-23 00:05:39626 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
627 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
628 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
629 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40630 // On by default for the Mac (different implementation in WebKit).
[email protected]a5a5aaf2013-12-19 02:10:10631 kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39632 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
633 },
[email protected]54c8d282014-01-24 17:31:08634#if defined(USE_AURA) || defined(OS_LINUX)
[email protected]81a6b0b2011-06-24 17:55:40635 {
[email protected]54c8d282014-01-24 17:31:08636 "overlay-scrollbars",
[email protected]23eecbd02013-09-19 18:13:37637 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
638 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
639 // Uses the system preference on Mac (a different implementation).
640 // On Android, this is always enabled.
[email protected]54c8d282014-01-24 17:31:08641 kOsLinux | kOsCrOS | kOsWin,
asvitkinebff63b22014-11-25 01:03:52642 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOverlayScrollbar,
643 switches::kDisableOverlayScrollbar)
[email protected]23eecbd02013-09-19 18:13:37644 },
[email protected]54c8d282014-01-24 17:31:08645#endif
[email protected]23eecbd02013-09-19 18:13:37646 {
[email protected]7e7a28092011-12-09 22:24:55647 "enable-panels",
648 IDS_FLAGS_ENABLE_PANELS_NAME,
649 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56650 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55651 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54652 },
[email protected]e3749d12011-07-25 22:22:12653 {
[email protected]27c14f02012-06-22 17:29:58654 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27655 "save-page-as-mhtml", // FLAGS:RECORD_UMA
656 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
657 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
658 kOsMac | kOsWin | kOsLinux,
659 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
660 },
661 {
[email protected]903e63382013-06-01 00:40:58662 "enable-quic",
663 IDS_FLAGS_ENABLE_QUIC_NAME,
664 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
665 kOsAll,
666 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
667 switches::kDisableQuic)
668 },
669 {
[email protected]d10833bc2014-04-14 17:50:46670 "enable-spdy4",
671 IDS_FLAGS_ENABLE_SPDY4_NAME,
672 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION,
[email protected]bca09b9982013-06-27 22:30:46673 kOsAll,
[email protected]d10833bc2014-04-14 17:50:46674 SINGLE_VALUE_TYPE(switches::kEnableSpdy4)
[email protected]88a332622013-07-30 07:13:32675 },
676 {
[email protected]27b3fe92012-03-21 05:35:06677 "enable-async-dns",
678 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
679 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46680 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44681 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
682 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06683 },
684 {
[email protected]c3a47f8d2014-04-15 14:39:28685 "disable-media-source",
686 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
687 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32688 kOsAll,
[email protected]c3a47f8d2014-04-15 14:39:28689 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]722b4d484f2013-10-08 20:33:59690 },
691 {
[email protected]16c242d2013-05-31 23:56:47692 "enable-encrypted-media",
693 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
694 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50695 kOsAll,
[email protected]16c242d2013-05-31 23:56:47696 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
697 },
698 {
[email protected]e76d92f2013-09-26 20:03:35699 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47700 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
701 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50702 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35703 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03704 },
[email protected]ce3934bb2013-09-10 02:02:56705#if defined(OS_ANDROID)
706 {
[email protected]3c56ec12013-09-25 02:03:42707 "disable-infobar-for-protected-media-identifier",
708 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
709 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
710 kOsAndroid,
711 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
712 },
713 {
[email protected]ce3934bb2013-09-10 02:02:56714 "mediadrm-enable-non-compositing",
715 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
716 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
717 kOsAndroid,
718 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
719 },
720#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06721 {
[email protected]bf88c032011-12-22 19:05:47722 "enable-javascript-harmony",
723 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
724 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
725 kOsAll,
erikcorryb251cb92014-09-25 23:48:51726 SINGLE_VALUE_TYPE(switches::kJavaScriptHarmony)
[email protected]bf88c032011-12-22 19:05:47727 },
[email protected]7e7f378a2012-01-05 14:35:37728 {
[email protected]88864db2012-01-18 20:56:35729 "disable-software-rasterizer",
730 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
731 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
732#if defined(ENABLE_SWIFTSHADER)
733 kOsAll,
734#else
735 0,
736#endif
737 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
738 },
[email protected]15a5d722012-01-23 09:11:14739 {
[email protected]d1ddf8c52014-02-06 22:09:31740 "enable-gpu-rasterization",
741 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
742 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
[email protected]96d25e22014-03-04 05:56:18743 kOsAndroid,
[email protected]a23530d2014-03-11 06:04:14744 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)
[email protected]d1ddf8c52014-02-06 22:09:31745 },
746 {
[email protected]c1b18ea2013-07-10 13:01:16747 "enable-experimental-web-platform-features",
748 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
749 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16750 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16751 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49752 },
753 {
[email protected]3e8befc2012-03-13 01:17:03754 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16755 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
756 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56757 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03758 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16759 },
[email protected]184ec592012-03-01 11:54:28760 {
[email protected]2b8290d2014-08-02 00:29:36761 "enable-material-design-ntp",
762 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_NAME,
763 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_DESCRIPTION,
764 kOsDesktop,
765 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignNTP,
766 switches::kDisableMaterialDesignNTP)
767 },
768 {
[email protected]184ec592012-03-01 11:54:28769 "enable-devtools-experiments",
770 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
771 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56772 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28773 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
774 },
[email protected]76d1854e2012-03-02 23:57:44775 {
[email protected]2fefdb32013-02-26 14:28:10776 "silent-debugger-extension-api",
777 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
778 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
779 kOsDesktop,
780 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
781 },
oshima66a9f962014-11-07 20:01:16782#if defined(ENABLE_SPELLCHECK)
[email protected]2fefdb32013-02-26 14:28:10783 {
[email protected]1dbaf5e2012-11-30 05:51:32784 "spellcheck-autocorrect",
785 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
786 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
787 kOsWin | kOsLinux | kOsCrOS,
788 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
789 },
oshima66a9f962014-11-07 20:01:16790#endif
[email protected]1dbaf5e2012-11-30 05:51:32791 {
[email protected]e27137282013-06-20 02:38:35792 "enable-scroll-prediction",
793 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
794 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
795 kOsDesktop,
796 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
797 },
798 {
[email protected]d7932532012-11-21 21:10:31799 "touch-events",
800 IDS_TOUCH_EVENTS_NAME,
801 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56802 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31803 MULTI_VALUE_TYPE(kTouchEventsChoices)
804 },
805 {
[email protected]b9c96ff2012-11-26 22:24:40806 "disable-touch-adjustment",
807 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
808 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
zeeshanqcf855b02014-09-25 18:09:49809 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
[email protected]b9c96ff2012-11-26 22:24:40810 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
811 },
[email protected]0b60afa2012-04-19 17:36:39812#if defined(OS_CHROMEOS)
813 {
[email protected]81f89e92014-02-21 14:27:35814 "network-portal-notification",
815 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME,
816 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION,
817 kOsCrOS,
818 ENABLE_DISABLE_VALUE_TYPE(
819 chromeos::switches::kEnableNetworkPortalNotification,
820 chromeos::switches::kDisableNetworkPortalNotification)
821 },
[email protected]0b60afa2012-04-19 17:36:39822#endif
[email protected]79be6d32012-04-24 20:47:44823 {
[email protected]8d68a3e02013-01-12 15:57:10824 "enable-download-resumption",
825 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
826 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56827 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10828 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
829 },
[email protected]67fe3642014-08-05 00:00:42830#if defined(ENABLE_PLUGINS)
[email protected]8d68a3e02013-01-12 15:57:10831 {
[email protected]9a5940d2012-04-27 19:16:23832 "allow-nacl-socket-api",
833 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
834 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56835 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23836 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
837 },
[email protected]d33d2222014-06-04 15:39:58838#endif
[email protected]190349fd2012-05-02 00:10:47839#if defined(OS_CHROMEOS)
840 {
841 "allow-touchpad-three-finger-click",
842 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
843 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
844 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24845 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47846 },
xiyuana0e92b082014-09-15 22:24:08847 {
ishermane72a697a2014-11-26 05:08:21848 "easy-unlock",
849 IDS_FLAGS_EASY_UNLOCK_NAME,
850 IDS_FLAGS_EASY_UNLOCK_DESCRIPTION,
851 kOsCrOS,
852 ENABLE_DISABLE_VALUE_TYPE(proximity_auth::switches::kEnableEasyUnlock,
853 proximity_auth::switches::kDisableEasyUnlock)
854 },
855 {
856 "easy-signin",
857 IDS_FLAGS_EASY_SIGNIN_NAME,
858 IDS_FLAGS_EASY_SIGNIN_DESCRIPTION,
xiyuana0e92b082014-09-15 22:24:08859 kOsCrOSOwnerOnly,
ishermane72a697a2014-11-26 05:08:21860 ENABLE_DISABLE_VALUE_TYPE(proximity_auth::switches::kEnableEasySignin,
861 proximity_auth::switches::kDisableEasySignin)
xiyuana0e92b082014-09-15 22:24:08862 },
isherman96bfc8d22014-11-06 00:42:46863 {
864 "enable-easy-unlock-proximity-detection",
865 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_NAME,
866 IDS_FLAGS_ENABLE_EASY_UNLOCK_PROXIMITY_DETECTION_DESCRIPTION,
867 kOsCrOS,
868 SINGLE_VALUE_TYPE(proximity_auth::switches::kEnableProximityDetection)
869 },
[email protected]190349fd2012-05-02 00:10:47870#endif
[email protected]53520b1b2012-05-07 21:43:37871#if defined(USE_ASH)
872 {
[email protected]2ddf37b2013-04-20 01:15:58873 "disable-minimize-on-second-launcher-item-click",
874 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
875 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
876 kOsAll,
877 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
878 },
879 {
[email protected]73074742012-05-17 01:44:41880 "show-touch-hud",
881 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
882 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
883 kOsAll,
884 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
885 },
886 {
[email protected]9f0940b62012-05-23 22:56:35887 "enable-pinch",
888 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
889 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:06890 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:38891 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
892 },
[email protected]adcdcdd02014-04-25 03:30:24893#endif // defined(USE_ASH)
[email protected]e4cd82e2013-04-10 15:20:38894 {
[email protected]de0aaed2013-05-27 18:16:43895 "enable-pinch-virtual-viewport",
896 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
897 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
[email protected]fe89d822014-04-28 10:29:00898 kOsLinux | kOsWin | kOsCrOS | kOsAndroid,
899 ENABLE_DISABLE_VALUE_TYPE(
900 cc::switches::kEnablePinchVirtualViewport,
901 cc::switches::kDisablePinchVirtualViewport),
[email protected]de0aaed2013-05-27 18:16:43902 },
[email protected]68bc37c2014-01-07 15:56:48903 {
904 "enable-viewport-meta",
905 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
906 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
907 kOsLinux | kOsWin | kOsCrOS | kOsMac,
908 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
909 },
[email protected]ed7b67f32012-05-28 10:12:28910#if defined(OS_CHROMEOS)
911 {
[email protected]8b04a1652012-08-04 02:59:49912 "disable-boot-animation",
913 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
914 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58915 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:24916 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:49917 },
[email protected]95058572012-08-20 14:57:29918 {
[email protected]d739c1db2014-07-08 07:19:59919 "enable-video-player-chromecast-support",
920 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME,
921 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION,
922 kOsCrOS,
923 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport)
924 },
925 {
[email protected]f2ad22e2014-07-10 17:52:08926 "disable-office-editing-component-app",
927 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME,
928 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION,
[email protected]099b890c2013-04-25 19:16:26929 kOsCrOS,
[email protected]f2ad22e2014-07-10 17:52:08930 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp),
[email protected]099b890c2013-04-25 19:16:26931 },
[email protected]31cf1472013-09-13 00:36:42932 {
[email protected]bf3f4592014-03-31 19:50:44933 "disable-display-color-calibration",
934 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME,
935 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION,
936 kOsCrOS,
937 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration),
938 },
[email protected]62018dc2012-12-13 00:37:35939#endif // defined(OS_CHROMEOS)
[email protected]7db8893a2012-07-26 00:49:40940 { "disable-accelerated-video-decode",
941 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
942 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:19943 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:40944 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:15945 },
[email protected]1d9bb9cd2012-08-28 22:02:50946#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:38947 {
948 "ash-debug-shortcuts",
949 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
950 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
951 kOsAll,
952 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
953 },
[email protected]b19b09a2014-02-26 05:34:34954 { "ash-enable-touch-view-testing",
955 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME,
956 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION,
957 kOsCrOS,
958 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting),
959 },
jonross367a1bee2014-09-06 12:37:08960 {
jonrossd24d766f2014-12-01 23:55:30961 "disable-touch-feedback",
962 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_NAME,
963 IDS_FLAGS_DISABLE_TOUCH_FEEDBACK_DESCRIPTION,
jonross367a1bee2014-09-06 12:37:08964 kOsCrOS,
jonrossd24d766f2014-12-01 23:55:30965 SINGLE_VALUE_TYPE(switches::kDisableTouchFeedback),
jonross367a1bee2014-09-06 12:37:08966 },
[email protected]88474872014-07-04 22:51:06967 { "ash-disable-text-filtering-in-overview-mode",
968 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_NAME,
969 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_DESCRIPTION,
970 kOsCrOS,
971 SINGLE_VALUE_TYPE(ash::switches::kAshDisableTextFilteringInOverviewMode),
972 },
oshima04a995822014-11-14 04:04:43973 { "ash-enable-mirrored-screen",
974 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_NAME,
975 IDS_FLAGS_ASH_ENABLE_MIRRORED_SCREEN_DESCRIPTION,
976 kOsCrOS,
977 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen),
978 },
jonross367a1bee2014-09-06 12:37:08979#endif // defined(USE_ASH)
[email protected]9b7ab882012-09-10 23:46:36980#if defined(OS_CHROMEOS)
981 {
[email protected]205f07892012-10-16 20:26:22982 "enable-carrier-switching",
983 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
984 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
985 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24986 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:22987 },
988 {
smckay451de882014-10-22 21:43:29989 "enable-cloud-backup",
990 IDS_FLAGS_ENABLE_CLOUD_BACKUP,
991 IDS_FLAGS_ENABLE_CLOUD_BACKUP_DESCRIPTION,
992 kOsCrOS,
993 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCloudBackup)
994 },
995 {
[email protected]9b7ab882012-09-10 23:46:36996 "enable-request-tablet-site",
997 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
998 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
999 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241000 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361001 },
1002#endif
[email protected]dab49c0b2012-10-04 05:55:351003 {
1004 "debug-packed-apps",
1005 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1006 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561007 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351008 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1009 },
[email protected]d1459ed2012-10-10 01:29:331010 {
1011 "enable-password-generation",
1012 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1013 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
rouslanb2237a9c2014-10-28 00:58:471014 kOsWin | kOsLinux | kOsCrOS | kOsMac | kOsAndroid,
[email protected]c3cc0632013-10-03 21:54:431015 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1016 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331017 },
[email protected]26d045f2012-10-18 21:18:431018 {
[email protected]0477c062014-04-30 15:02:181019 "enable-automatic-password-saving",
1020 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME,
1021 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION,
1022 kOsDesktop,
1023 SINGLE_VALUE_TYPE(
1024 password_manager::switches::kEnableAutomaticPasswordSaving)
1025 },
1026 {
[email protected]f2a394b2013-11-28 20:08:041027 "password-manager-reauthentication",
[email protected]429a6e02013-10-23 18:40:481028 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1029 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
[email protected]48293fb2013-12-04 04:02:031030 kOsMac | kOsWin,
[email protected]f2a394b2013-11-28 20:08:041031 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
[email protected]429a6e02013-10-23 18:40:481032 },
1033 {
Garrett Casto22299122014-11-03 21:35:471034 "enable-password-link",
1035 IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME,
1036 IDS_FLAGS_PASSWORD_MANAGER_LINK_DESCRIPTION,
1037 kOsAndroid | kOsDesktop,
[email protected]0f1f70852014-08-09 05:56:011038 ENABLE_DISABLE_VALUE_TYPE(
Garrett Casto22299122014-11-03 21:35:471039 password_manager::switches::kEnablePasswordLink,
1040 password_manager::switches::kDisablePasswordLink)
[email protected]0f1f70852014-08-09 05:56:011041 },
1042 {
[email protected]76f7d4882012-10-26 21:09:221043 "enable-deferred-image-decoding",
1044 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1045 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221046 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221047 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1048 },
1049 {
[email protected]45476982013-10-01 03:22:291050 "wallet-service-use-sandbox",
1051 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1052 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
[email protected]d4d59992014-06-04 23:48:071053 kOsAndroid | kOsDesktop,
[email protected]45476982013-10-01 03:22:291054 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1055 autofill::switches::kWalletServiceUseSandbox, "1",
1056 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541057 },
[email protected]177260c2013-04-24 01:47:381058#if defined(USE_AURA)
1059 {
1060 "overscroll-history-navigation",
1061 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1062 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1063 kOsAll,
[email protected]c38e9802014-02-18 21:32:121064 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices)
[email protected]177260c2013-04-24 01:47:381065 },
1066#endif
[email protected]edbea622012-11-28 20:39:381067 {
[email protected]888878e82013-07-24 22:49:401068 "scroll-end-effect",
1069 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1070 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1071 kOsCrOS,
1072 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1073 switches::kScrollEndEffect, "1",
1074 switches::kScrollEndEffect, "0")
1075 },
1076 {
[email protected]cc7c069d2014-08-07 20:42:051077 "enable-renderer-mojo-channel",
1078 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_NAME,
1079 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_DESCRIPTION,
1080 kOsAll,
1081 SINGLE_VALUE_TYPE(switches::kEnableRendererMojoChannel)
1082 },
1083 {
[email protected]edbea622012-11-28 20:39:381084 "enable-touch-drag-drop",
1085 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1086 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1087 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271088 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1089 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381090 },
[email protected]0e2f43b62013-02-21 00:47:151091 {
1092 "enable-touch-editing",
1093 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1094 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
[email protected]877dd942014-06-06 16:02:011095 kOsCrOS | kOsWin | kOsLinux,
[email protected]1400e6dc2013-04-27 02:36:271096 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1097 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151098 },
[email protected]92e12dd92012-12-11 03:33:201099 {
ricea64c07d792014-10-08 03:37:001100 "enable-stale-while-revalidate",
1101 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_NAME,
1102 IDS_FLAGS_ENABLE_STALE_WHILE_REVALIDATE_DESCRIPTION,
1103 kOsAll,
1104 SINGLE_VALUE_TYPE(switches::kEnableStaleWhileRevalidate)
1105 },
1106 {
[email protected]06a82ff2014-04-25 02:24:461107 "enable-suggestions-service",
1108 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME,
1109 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION,
1110 kOsAndroid | kOsCrOS,
1111 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService,
1112 switches::kDisableSuggestionsService)
1113 },
1114 {
treibfd04f152014-09-08 16:31:061115 "enable-supervised-user-blacklist",
1116 IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME,
1117 IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION,
1118 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
treib63b9dc02014-10-02 22:30:151119 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSupervisedUserBlacklist,
1120 switches::kDisableSupervisedUserBlacklist)
treibfd04f152014-09-08 16:31:061121 },
1122 {
treib9e4fab902014-10-29 14:25:261123 "enable-supervised-user-safesites",
1124 IDS_FLAGS_ENABLE_SUPERVISED_USER_SAFESITES_NAME,
1125 IDS_FLAGS_ENABLE_SUPERVISED_USER_SAFESITES_DESCRIPTION,
1126 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
1127 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSupervisedUserSafeSites,
1128 switches::kDisableSupervisedUserSafeSites)
1129 },
1130 {
[email protected]ddec1aa2013-04-28 23:22:451131 "enable-sync-synced-notifications",
1132 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1133 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181134 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451135 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1136 switches::kDisableSyncSyncedNotifications)
1137 },
[email protected]630a27a2014-01-15 08:24:091138#if defined(ENABLE_APP_LIST)
1139 {
[email protected]4734b902014-04-03 16:42:101140 "enable-sync-app-list",
1141 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1142 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
[email protected]630a27a2014-01-15 08:24:091143 kOsDesktop,
asvitkinebff63b22014-11-25 01:03:521144 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableSyncAppList,
1145 app_list::switches::kDisableSyncAppList)
[email protected]630a27a2014-01-15 08:24:091146 },
1147#endif
[email protected]d41cf1b2014-02-21 01:24:351148#if defined(OS_MACOSX)
1149 {
[email protected]0039b0be2014-03-12 20:24:111150 "enable-avfoundation",
1151 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME,
1152 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION,
[email protected]d41cf1b2014-02-21 01:24:351153 kOsMac,
asvitkinebff63b22014-11-25 01:03:521154 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAVFoundation,
1155 switches::kForceQTKit)
[email protected]d41cf1b2014-02-21 01:24:351156 },
1157#endif
[email protected]5b93e162013-02-19 06:33:091158 {
[email protected]9323fdd12013-02-23 00:31:361159 "impl-side-painting",
1160 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1161 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521162 kOsAll,
asvitkinebff63b22014-11-25 01:03:521163 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableImplSidePainting,
1164 switches::kDisableImplSidePainting)
[email protected]9323fdd12013-02-23 00:31:361165 },
[email protected]a42c85f2013-04-04 18:15:121166 {
[email protected]7621af22013-09-12 23:06:331167 "lcd-text-aa",
1168 IDS_FLAGS_LCD_TEXT_NAME,
1169 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1170 kOsDesktop,
asvitkinebff63b22014-11-25 01:03:521171 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLCDText,
1172 switches::kDisableLCDText)
[email protected]7621af22013-09-12 23:06:331173 },
[email protected]4ac579b2014-05-20 06:43:231174#if defined(OS_ANDROID) || defined(OS_MACOSX)
[email protected]7621af22013-09-12 23:06:331175 {
[email protected]0c04d1c2013-07-10 00:02:321176 "delegated-renderer",
1177 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1178 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
[email protected]4ac579b2014-05-20 06:43:231179 kOsAndroid, // TODO(ccameron) Add mac support soon.
asvitkinebff63b22014-11-25 01:03:521180 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDelegatedRenderer,
1181 switches::kDisableDelegatedRenderer)
[email protected]0c04d1c2013-07-10 00:02:321182 },
[email protected]758efb02014-04-05 07:53:451183#endif
[email protected]0c04d1c2013-07-10 00:02:321184 {
[email protected]a42c85f2013-04-04 18:15:121185 "max-tiles-for-interest-area",
1186 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1187 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521188 kOsAll,
[email protected]a42c85f2013-04-04 18:15:121189 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1190 },
[email protected]7cf7ccb2013-04-20 02:53:081191 {
[email protected]5676e7482013-12-17 08:05:371192 "enable-offline-auto-reload",
1193 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1194 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1195 kOsAll,
[email protected]bd519e32014-05-09 01:33:171196 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload,
1197 switches::kDisableOfflineAutoReload)
[email protected]5676e7482013-12-17 08:05:371198 },
1199 {
[email protected]d2e1a0a2014-06-16 15:49:371200 "enable-offline-auto-reload-visible-only",
1201 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME,
1202 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION,
1203 kOsAll,
1204 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly,
1205 switches::kDisableOfflineAutoReloadVisibleOnly)
1206 },
1207 {
[email protected]d8bc9132014-05-02 15:56:371208 "enable-offline-load-stale-cache",
1209 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME,
1210 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION,
afakhryf0227a02014-11-17 23:12:411211 kOsAll,
[email protected]e83140a02014-05-07 14:04:581212 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache,
1213 switches::kDisableOfflineLoadStaleCache)
[email protected]d8bc9132014-05-02 15:56:371214 },
1215 {
[email protected]a3618122013-04-26 21:15:341216 "default-tile-width",
1217 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1218 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1219 kOsAll,
1220 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1221 },
1222 {
1223 "default-tile-height",
1224 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1225 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1226 kOsAll,
1227 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1228 },
[email protected]2289b432014-08-08 17:52:111229#if defined(OS_ANDROID)
1230 {
1231 "disable-gesture-requirement-for-media-playback",
1232 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1233 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1234 kOsAndroid,
1235 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1236 },
1237#endif
sashab555505792014-10-24 13:19:321238#if defined(ENABLE_EXTENSIONS)
1239 {
1240 "disable-extension-info-dialog",
1241 IDS_FLAGS_DISABLE_EXTENSION_INFO_DIALOG_NAME,
1242 IDS_FLAGS_DISABLE_EXTENSION_INFO_DIALOG_DESCRIPTION,
1243 kOsWin | kOsLinux | kOsCrOS,
1244 SINGLE_VALUE_TYPE(extensions::switches::kDisableExtensionInfoDialog)
1245 },
1246#endif
[email protected]86459e2c2013-04-10 13:39:241247#if defined(OS_CHROMEOS)
1248 {
1249 "enable-virtual-keyboard",
1250 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1251 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1252 kOsCrOS,
1253 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1254 },
[email protected]8b4321e2013-10-25 01:16:181255 {
[email protected]bb6378fe2014-04-28 21:19:441256 "enable-virtual-keyboard-overscroll",
1257 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME,
1258 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION,
1259 kOsCrOS,
1260 ENABLE_DISABLE_VALUE_TYPE(
1261 keyboard::switches::kEnableVirtualKeyboardOverscroll,
1262 keyboard::switches::kDisableVirtualKeyboardOverscroll)
1263 },
1264 {
[email protected]8b4321e2013-10-25 01:16:181265 "enable-swipe-selection",
1266 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1267 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1268 kOsCrOS,
1269 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1270 },
[email protected]0e627fb12014-03-25 18:18:531271 {
1272 "enable-input-view",
1273 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME,
1274 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION,
1275 kOsCrOS,
1276 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView,
1277 keyboard::switches::kDisableInputView)
1278 },
[email protected]90933412014-06-05 21:11:021279 {
shuchend9008942014-10-23 15:17:141280 "enable-new-korean-ime",
1281 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_NAME,
1282 IDS_FLAGS_ENABLE_NEW_KOREAN_IME_DESCRIPTION,
1283 kOsCrOS,
1284 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewKoreanIme)
1285 },
1286 {
1287 "enable-physical-keyboard-autocorrect",
1288 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_NAME,
1289 IDS_FLAGS_ENABLE_PHYSICAL_KEYBOARD_AUTOCORRECT_DESCRIPTION,
1290 kOsCrOS,
1291 SINGLE_VALUE_TYPE(chromeos::switches::kEnablePhysicalKeyboardAutocorrect)
1292 },
1293 {
[email protected]90933412014-06-05 21:11:021294 "enable-experimental-input-view-features",
1295 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME,
1296 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION,
1297 kOsCrOS,
1298 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures)
1299 },
rsadam9172bc8a2014-10-29 23:37:381300 {
1301 "auto-virtual-keyboard",
1302 IDS_FLAGS_AUTO_VIRTUAL_KEYBOARD_NAME,
1303 IDS_FLAGS_AUTO_VIRTUAL_KEYBOARD_DESCRIPTION,
1304 kOsCrOS,
1305 SINGLE_VALUE_TYPE(keyboard::switches::kAutoVirtualKeyboard)
1306 },
[email protected]86459e2c2013-04-10 13:39:241307#endif
[email protected]38484df12013-04-10 16:42:031308 {
1309 "enable-simple-cache-backend",
1310 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1311 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]957cd5a2014-03-27 19:54:171312 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]38484df12013-04-10 16:42:031313 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1314 },
[email protected]717e4e22013-04-10 20:52:231315 {
1316 "enable-tcp-fast-open",
1317 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1318 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111319 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231320 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1321 },
[email protected]2188c8d2014-03-21 00:58:561322#if defined(ENABLE_SERVICE_DISCOVERY)
[email protected]a4ed7e12013-05-24 01:00:281323 {
[email protected]d394d9762013-09-22 06:00:251324 "device-discovery-notifications",
1325 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1326 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191327 kOsDesktop,
[email protected]d394d9762013-09-22 06:00:251328 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1329 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551330 },
[email protected]53ffe0d2013-10-30 01:20:401331 {
[email protected]4e6c96e2014-05-17 18:41:191332 "enable-cloud-devices",
1333 IDS_FLAGS_ENABLE_CLOUD_DEVICES_NAME,
1334 IDS_FLAGS_ENABLE_CLOUD_DEVICES_DESCRIPTION,
1335 kOsDesktop,
1336 SINGLE_VALUE_TYPE(switches::kEnableCloudDevices)
1337 },
1338 {
[email protected]f0392392014-03-10 20:07:521339 "enable-print-preview-register-promos",
1340 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME,
1341 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191342 kOsDesktop,
[email protected]f0392392014-03-10 20:07:521343 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos)
1344 },
[email protected]2188c8d2014-03-21 00:58:561345#endif // ENABLE_SERVICE_DISCOVERY
[email protected]ca53b142014-02-25 22:42:231346#if defined(OS_WIN)
1347 {
1348 "enable-cloud-print-xps",
1349 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME,
1350 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION,
1351 kOsWin,
1352 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)
1353 },
1354#endif
[email protected]910ecfe2013-06-03 23:38:141355#if defined(USE_AURA)
1356 {
1357 "tab-capture-upscale-quality",
1358 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1359 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1360 kOsAll,
1361 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1362 },
1363 {
1364 "tab-capture-downscale-quality",
1365 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1366 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1367 kOsAll,
1368 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1369 },
1370#endif
oshima66a9f962014-11-07 20:01:161371#if defined(ENABLE_SPELLCHECK)
[email protected]71d4f602013-06-04 23:21:101372 {
[email protected]ba7993d2013-11-26 23:44:561373 "enable-spelling-feedback-field-trial",
1374 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1375 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
[email protected]5e099c62013-06-08 05:46:231376 kOsAll,
[email protected]ba7993d2013-11-26 23:44:561377 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
[email protected]5e099c62013-06-08 05:46:231378 },
oshima66a9f962014-11-07 20:01:161379#endif
[email protected]5e099c62013-06-08 05:46:231380 {
[email protected]71d4f602013-06-04 23:21:101381 "enable-webgl-draft-extensions",
1382 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1383 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1384 kOsAll,
1385 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1386 },
[email protected]deadc492013-06-07 21:39:281387 {
[email protected]bc1697a82013-06-27 15:48:311388 "enable-web-midi",
1389 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1390 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
[email protected]28e56e92014-01-03 07:52:391391 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
[email protected]bc1697a82013-06-27 15:48:311392 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1393 },
[email protected]020df792013-06-29 14:26:211394 {
1395 "enable-new-profile-management",
1396 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1397 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
[email protected]a3b75bd2014-05-28 17:49:421398 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531399 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement,
1400 switches::kDisableNewProfileManagement)
[email protected]020df792013-06-29 14:26:211401 },
1402 {
[email protected]1017a3212014-05-30 10:34:591403 "enable-account-consistency",
1404 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME,
1405 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION,
1406 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531407 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency,
1408 switches::kDisableAccountConsistency)
[email protected]1017a3212014-05-30 10:34:591409 },
1410 {
[email protected]8f569882014-03-25 21:12:121411 "enable-fast-user-switching",
1412 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME,
1413 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION,
1414 kOsMac | kOsWin | kOsLinux,
1415 SINGLE_VALUE_TYPE(switches::kFastUserSwitching)
1416 },
1417 {
[email protected]274171e2014-04-11 23:10:081418 "enable-new-avatar-menu",
1419 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME,
1420 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION,
1421 kOsMac | kOsWin | kOsLinux,
[email protected]9152a542014-08-06 05:37:451422 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu,
1423 switches::kDisableNewAvatarMenu)
[email protected]274171e2014-04-11 23:10:081424 },
1425 {
[email protected]85777bc2013-12-23 00:07:061426 "enable-web-based-signin",
1427 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1428 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
[email protected]2d279f72013-10-21 23:10:161429 kOsMac | kOsWin | kOsLinux,
[email protected]85777bc2013-12-23 00:07:061430 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
[email protected]2d279f72013-10-21 23:10:161431 },
1432 {
guohui69cf14732014-10-24 17:14:211433 "enable-webview-based-signin",
1434 IDS_FLAGS_ENABLE_WEBVIEW_BASED_SIGNIN_NAME,
1435 IDS_FLAGS_ENABLE_WEBVIEW_BASED_SIGNIN_DESCRIPTION,
1436 kOsMac | kOsWin | kOsLinux,
1437 SINGLE_VALUE_TYPE(switches::kEnableWebviewBasedSignin)
1438 },
1439 {
[email protected]115d5728c2013-10-23 18:06:141440 "enable-google-profile-info",
1441 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1442 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221443 kOsMac | kOsWin | kOsLinux,
[email protected]115d5728c2013-10-23 18:06:141444 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
[email protected]020df792013-06-29 14:26:211445 },
[email protected]dcf6cf32013-07-03 10:53:281446 {
[email protected]056ed7092014-01-09 12:57:211447 "reset-app-list-install-state",
[email protected]a85aa332013-10-22 11:09:591448 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1449 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
[email protected]7199367d2014-01-20 04:06:211450 kOsMac | kOsWin | kOsLinux,
[email protected]a85aa332013-10-22 11:09:591451 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
[email protected]dcf6cf32013-07-03 10:53:281452 },
[email protected]919b2f82013-10-04 03:11:261453#if defined(ENABLE_APP_LIST)
[email protected]7199367d2014-01-20 04:06:211454#if defined(OS_LINUX)
1455 {
1456 // This is compiled out on non-Linux platforms because otherwise it would be
1457 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1458 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1459 "enable-app-list",
1460 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1461 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1462 kOsLinux,
1463 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1464 },
1465#endif
[email protected]97df3be2014-07-03 07:49:101466 {
[email protected]9e0a44c2014-06-07 14:26:211467 "disable-app-list-app-info",
1468 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST,
1469 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1470 kOsLinux | kOsWin | kOsCrOS,
1471 SINGLE_VALUE_TYPE(app_list::switches::kDisableAppInfo)
1472 },
xiyuan37407a72014-10-15 00:06:221473 {
1474 "disable-drive-apps-in-app-list",
1475 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_NAME,
1476 IDS_FLAGS_DISABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION,
1477 kOsCrOS,
1478 SINGLE_VALUE_TYPE(app_list::switches::kDisableDriveAppsInAppList)
1479 },
[email protected]919b2f82013-10-04 03:11:261480#endif
[email protected]0e38c3252013-08-14 22:18:511481#if defined(OS_ANDROID)
1482 {
1483 "enable-accessibility-tab-switcher",
1484 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1485 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1486 kOsAndroid,
1487 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561488 },
[email protected]738384172013-12-05 01:59:561489 {
[email protected]0e174722014-03-31 21:23:271490 // TODO(dmazzoni): remove this flag when native android accessibility
1491 // ships in the stable channel. http://crbug.com/356775
1492 "enable-accessibility-script-injection",
1493 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1494 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
[email protected]738384172013-12-05 01:59:561495 kOsAndroid,
[email protected]0e174722014-03-31 21:23:271496 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1497 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
[email protected]738384172013-12-05 01:59:561498 },
[email protected]0e38c3252013-08-14 22:18:511499#endif
[email protected]2e9d79f2013-08-16 05:45:561500 {
[email protected]2cccfef2014-05-01 06:05:161501 "enable-one-copy",
1502 IDS_FLAGS_ONE_COPY_NAME,
1503 IDS_FLAGS_ONE_COPY_DESCRIPTION,
[email protected]be2e40a2013-08-27 02:49:201504 kOsAll,
asvitkinebff63b22014-11-25 01:03:521505 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOneCopy,
1506 switches::kDisableOneCopy)
[email protected]2cccfef2014-05-01 06:05:161507 },
1508 {
1509 "enable-zero-copy",
1510 IDS_FLAGS_ZERO_COPY_NAME,
1511 IDS_FLAGS_ZERO_COPY_DESCRIPTION,
1512 kOsAll,
reveman91a0a872014-11-04 03:40:321513 SINGLE_VALUE_TYPE(switches::kEnableZeroCopy)
[email protected]4fdc518f2013-08-28 21:37:271514 },
[email protected]bbb4beae2013-09-27 17:20:311515#if defined(OS_CHROMEOS)
1516 {
[email protected]407d82b2013-12-13 11:50:591517 "enable-first-run-ui-transitions",
1518 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1519 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1520 kOsCrOS,
1521 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1522 },
[email protected]bbb4beae2013-09-27 17:20:311523#endif
[email protected]ed1aab12013-10-08 14:27:071524 {
[email protected]f95e6df2013-10-11 13:05:171525 "enable-streamlined-hosted-apps",
1526 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1527 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
mitchelljones6d1594de2014-12-02 01:42:441528 kOsWin | kOsCrOS | kOsLinux | kOsMac,
[email protected]f95e6df2013-10-11 13:05:171529 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1530 },
[email protected]a0ef5212013-10-15 18:08:261531 {
[email protected]912576e2013-10-21 10:33:131532 "enable-ephemeral-apps",
1533 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1534 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201535 kOsAll,
[email protected]912576e2013-10-21 10:33:131536 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1537 },
1538 {
[email protected]5ec67052013-12-19 05:40:211539 "enable-linkable-ephemeral-apps",
1540 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1541 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201542 kOsAll,
[email protected]5ec67052013-12-19 05:40:211543 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1544 },
1545 {
[email protected]7d8056d2014-04-14 15:55:211546 "enable-service-worker-sync",
1547 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME,
1548 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION,
1549 kOsAll,
1550 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync)
1551 },
[email protected]dfb66c522013-10-22 19:46:321552#if defined(OS_ANDROID)
1553 {
1554 "disable-click-delay",
1555 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1556 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1557 kOsAndroid,
1558 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1559 SINGLE_VALUE_TYPE("disable-click-delay")
1560 },
jdduke0fa512992014-11-21 03:18:451561 {
1562 "disable-pull-to-refresh-effect",
1563 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_NAME,
1564 IDS_FLAGS_DISABLE_PULL_TO_REFRESH_EFFECT_DESCRIPTION,
1565 kOsAndroid,
1566 SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)
1567 },
[email protected]dfb66c522013-10-22 19:46:321568#endif
[email protected]5a606592014-01-31 10:32:311569#if defined(OS_MACOSX)
[email protected]c2c84ab2013-11-18 03:05:091570 {
1571 "enable-translate-new-ux",
1572 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1573 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
[email protected]5a606592014-01-31 10:32:311574 kOsMac,
[email protected]c2c84ab2013-11-18 03:05:091575 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1576 },
[email protected]5a606592014-01-31 10:32:311577#endif
[email protected]c4f51d22013-11-05 03:11:261578#if defined(TOOLKIT_VIEWS)
1579 {
[email protected]88b47ad72013-11-21 03:34:381580 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1581 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1582 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
[email protected]42f5fe542014-07-25 17:59:331583 kOsCrOS | kOsWin | kOsLinux,
[email protected]88b47ad72013-11-21 03:34:381584 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
[email protected]c4f51d22013-11-05 03:11:261585 },
lukene23094a2014-11-23 14:12:311586 {
luken30ef5622014-11-24 19:37:551587 "enable-link-disambiguation-popup",
1588 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_NAME,
1589 IDS_FLAGS_ENABLE_LINK_DISAMBIGUATION_POPUP_DESCRIPTION,
lukene23094a2014-11-23 14:12:311590 kOsCrOS | kOsWin,
luken30ef5622014-11-24 19:37:551591 SINGLE_VALUE_TYPE(switches::kEnableLinkDisambiguationPopup)
lukene23094a2014-11-23 14:12:311592 },
[email protected]c4f51d22013-11-05 03:11:261593#endif
thestigb012bc3d2014-09-18 22:57:131594#if defined(ENABLE_EXTENSIONS)
[email protected]9f268072013-11-07 00:02:151595 {
1596 "enable-apps-show-on-first-paint",
1597 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1598 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1599 kOsDesktop,
[email protected]6fa202452014-08-19 05:34:071600 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint)
[email protected]9f268072013-11-07 00:02:151601 },
thestigb012bc3d2014-09-18 22:57:131602#endif
[email protected]12271632013-11-26 03:06:391603 {
[email protected]4d7552f2014-03-04 04:53:331604 "enhanced-bookmarks-experiment",
[email protected]12271632013-11-26 03:06:391605 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1606 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
kkimlabseedd8b82014-09-05 13:01:091607 kOsDesktop | kOsAndroid,
[email protected]4d7552f2014-03-04 04:53:331608 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1609 switches::kEnhancedBookmarksExperiment, "1",
1610 switches::kEnhancedBookmarksExperiment, "0")
[email protected]12271632013-11-26 03:06:391611 },
[email protected]cb13d462014-03-14 21:38:581612 {
1613 "manual-enhanced-bookmarks",
1614 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1615 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
kkimlabseedd8b82014-09-05 13:01:091616 kOsDesktop | kOsAndroid,
[email protected]cb13d462014-03-14 21:38:581617 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks)
1618 },
1619 {
1620 "manual-enhanced-bookmarks-optout",
1621 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1622 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
kkimlabseedd8b82014-09-05 13:01:091623 kOsDesktop | kOsAndroid,
[email protected]cb13d462014-03-14 21:38:581624 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout)
1625 },
[email protected]d5874f12013-12-05 04:30:001626#if defined(OS_ANDROID)
1627 {
1628 "enable-zero-suggest-experiment",
1629 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1630 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1631 kOsAndroid,
1632 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
[email protected]1a82f7372013-12-06 12:46:521633 },
Yaron Friedman7f37900b2014-08-26 16:37:261634 {
1635 "enable-reader-mode-toolbar-icon",
1636 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME,
1637 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION,
1638 kOsAndroid,
1639 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon)
1640 },
[email protected]d5874f12013-12-05 04:30:001641#endif
[email protected]1a82f7372013-12-06 12:46:521642 {
1643 "num-raster-threads",
1644 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1645 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1646 kOsAll,
1647 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
[email protected]dc920d62013-12-13 22:12:471648 },
1649 {
[email protected]5d58f952014-05-20 21:12:471650 "origin-chip-in-omnibox",
[email protected]dc920d62013-12-13 22:12:471651 IDS_FLAGS_ORIGIN_CHIP_NAME,
1652 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
[email protected]393a6462014-04-28 15:28:271653 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]5d58f952014-05-20 21:12:471654 MULTI_VALUE_TYPE(kOriginChipChoices)
[email protected]7a54bf4b2014-02-06 19:21:541655 },
1656 {
[email protected]dc920d62013-12-13 22:12:471657 "search-button-in-omnibox",
1658 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1659 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
[email protected]266cd0a2014-05-07 19:55:051660 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]dc920d62013-12-13 22:12:471661 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
[email protected]58bc1c32013-12-16 22:52:071662 },
1663 {
estade0ee91262014-10-23 19:29:191664 "ignore-autocomplete-off-autofill",
1665 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_NAME,
1666 IDS_FLAGS_IGNORE_AUTOCOMPLETE_OFF_AUTOFILL_DESCRIPTION,
1667 kOsCrOS | kOsMac | kOsWin | kOsLinux,
estade31420732014-11-17 20:04:161668 ENABLE_DISABLE_VALUE_TYPE(
1669 autofill::switches::kIgnoreAutocompleteOffForAutofill,
1670 autofill::switches::kRespectAutocompleteOffForAutofill)
estade0ee91262014-10-23 19:29:191671 },
1672 {
brettwb505b7a2014-11-26 22:05:321673 "enable-single-click-autofill",
1674 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_NAME,
1675 IDS_FLAGS_ENABLE_SINGLE_CLICK_AUTOFILL_DESCRIPTION,
1676 kOsCrOS | kOsMac | kOsWin | kOsLinux,
1677 ENABLE_DISABLE_VALUE_TYPE(
1678 autofill::switches::kEnableSingleClickAutofill,
1679 autofill::switches::kDisableSingleClickAutofill)
1680 },
1681 {
[email protected]24ad58782014-01-23 23:43:451682 "enable-permissions-bubbles",
1683 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1684 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
[email protected]4e6d54a2014-06-27 14:32:121685 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]7d198222014-06-17 08:24:221686 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles,
1687 switches::kDisablePermissionsBubbles)
[email protected]24ad58782014-01-23 23:43:451688 },
[email protected]4d11b08b2014-01-27 22:19:071689 {
[email protected]546d8d32014-04-30 15:40:461690 "enable-session-crashed-bubble",
1691 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME,
1692 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION,
1693 kOsWin | kOsLinux,
[email protected]3d990b72014-05-27 21:16:131694 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble,
1695 switches::kDisableSessionCrashedBubble)
[email protected]546d8d32014-04-30 15:40:461696 },
1697 {
raymes35a4ea62014-11-26 00:49:141698 "enable-out-of-process-pdf",
[email protected]1231adf2014-01-31 02:22:331699 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1700 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1701 kOsDesktop,
raymes35a4ea62014-11-26 00:49:141702 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOutOfProcessPdf,
1703 switches::kDisableOutOfProcessPdf)
[email protected]1231adf2014-01-31 02:22:331704 },
hclam674f12e2014-11-06 00:25:181705 {
1706 "disable-cast-streaming-hw-encoding",
1707 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_NAME,
1708 IDS_FLAGS_DISABLE_CAST_STREAMING_HW_ENCODING_DESCRIPTION,
1709 kOsAll,
1710 SINGLE_VALUE_TYPE(switches::kDisableCastStreamingHWEncoding)
1711 },
[email protected]181624c2014-02-04 17:03:341712#if defined(OS_ANDROID)
1713 {
[email protected]276bdfa52014-02-24 14:03:091714 "disable-cast",
1715 IDS_FLAGS_DISABLE_CAST_NAME,
1716 IDS_FLAGS_DISABLE_CAST_DESCRIPTION,
[email protected]30a8cec92014-02-24 10:09:091717 kOsAndroid,
[email protected]276bdfa52014-02-24 14:03:091718 SINGLE_VALUE_TYPE(switches::kDisableCast)
[email protected]30a8cec92014-02-24 10:09:091719 },
[email protected]99af9382014-02-12 09:02:551720 {
1721 "prefetch-search-results",
1722 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1723 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
[email protected]8ca7e09c2014-06-17 18:42:031724 kOsAndroid,
[email protected]99af9382014-02-12 09:02:551725 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
1726 },
[email protected]8ca7e09c2014-06-17 18:42:031727#endif
[email protected]9bd76572014-02-17 05:17:311728#if defined(ENABLE_APP_LIST)
1729 {
1730 "enable-experimental-app-list",
1731 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1732 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1733 kOsWin | kOsLinux | kOsCrOS,
calamity9b4f185b2014-11-26 00:54:551734 ENABLE_DISABLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList,
1735 app_list::switches::kDisableExperimentalAppList)
[email protected]9bd76572014-02-17 05:17:311736 },
[email protected]b18d51182014-03-13 10:38:271737 {
[email protected]61bce6992014-05-02 17:35:571738 "enable-centered-app-list",
1739 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME,
1740 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION,
[email protected]b18d51182014-03-13 10:38:271741 kOsWin | kOsLinux | kOsCrOS,
[email protected]61bce6992014-05-02 17:35:571742 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList)
[email protected]b18d51182014-03-13 10:38:271743 },
[email protected]9bd76572014-02-17 05:17:311744#endif
[email protected]f42cffb2014-03-08 18:03:251745 {
1746 "touch-scrolling-mode",
1747 IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME,
1748 IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION,
1749 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1750 MULTI_VALUE_TYPE(kTouchScrollingModeChoices)
1751 },
[email protected]67c5a212014-03-17 12:28:001752 {
jdduke2eee6cb2014-09-25 17:02:211753 "disable-threaded-scrolling",
1754 IDS_FLAGS_DISABLE_THREADED_SCROLLING_NAME,
1755 IDS_FLAGS_DISABLE_THREADED_SCROLLING_DESCRIPTION,
1756 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1757 SINGLE_VALUE_TYPE(switches::kDisableThreadedScrolling)
1758 },
1759 {
[email protected]67c5a212014-03-17 12:28:001760 "bleeding-edge-renderer-mode",
1761 IDS_FLAGS_BLEEDING_RENDERER_NAME,
1762 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION,
[email protected]a8a97512014-03-24 18:28:201763 kOsAndroid,
[email protected]67c5a212014-03-17 12:28:001764 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths)
1765 },
[email protected]8a585cb2014-03-21 17:13:521766 {
1767 "enable-settings-window",
1768 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME,
1769 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION,
1770 kOsDesktop,
asvitkinebff63b22014-11-25 01:03:521771 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSettingsWindow,
1772 switches::kDisableSettingsWindow)
[email protected]8a585cb2014-03-21 17:13:521773 },
[email protected]812b82a2014-05-15 19:01:381774#if defined(OS_ANDROID)
1775 {
1776 "enable-instant-search-clicks",
1777 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME,
1778 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION,
1779 kOsAndroid,
1780 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks)
1781 },
1782#endif
[email protected]4dffb662014-03-31 11:31:221783 {
1784 "enable-save-password-bubble",
1785 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME,
1786 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION,
dconnelly35f985b32014-08-29 10:40:551787 kOsWin | kOsLinux | kOsCrOS | kOsMac,
[email protected]ea61c082014-04-07 16:57:241788 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble,
1789 switches::kDisableSavePasswordBubble)
[email protected]9804dad9102014-04-01 09:34:181790 },
[email protected]7fe71f02014-04-26 00:47:561791 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1792 // crbug.com/366483 for the target milestone.
1793 {
1794 "allow-insecure-websocket-from-https-origin",
1795 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME,
1796 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION,
1797 kOsAll,
1798 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin)
1799 },
[email protected]64505f72014-04-29 11:07:521800 {
1801 "enable-apps-file-associations",
1802 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME,
1803 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION,
1804 kOsMac,
1805 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations)
1806 },
[email protected]0443e082014-04-30 04:52:501807#if defined(OS_ANDROID)
1808 {
1809 "enable-embeddedsearch-api",
1810 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME,
1811 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION,
1812 kOsAndroid,
1813 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI)
1814 },
[email protected]1d1349292014-05-02 05:22:331815 {
1816 "enable-app-install-alerts",
1817 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME,
1818 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION,
1819 kOsAndroid,
1820 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts)
1821 },
[email protected]0443e082014-04-30 04:52:501822#endif
[email protected]b242b142014-05-07 14:48:491823 {
1824 "distance-field-text",
1825 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME,
1826 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION,
1827 kOsAll,
asvitkinebff63b22014-11-25 01:03:521828 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDistanceFieldText,
1829 switches::kDisableDistanceFieldText)
[email protected]b242b142014-05-07 14:48:491830 },
[email protected]6f8ede32014-05-09 13:58:451831 {
1832 "extension-content-verification",
1833 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME,
1834 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION,
1835 kOsDesktop,
1836 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices)
1837 },
[email protected]8f374ce2014-05-08 23:51:521838#if defined(USE_AURA)
1839 {
1840 "text-input-focus-manager",
1841 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME,
1842 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION,
1843 kOsCrOS | kOsLinux | kOsWin,
1844 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager,
1845 switches::kDisableTextInputFocusManager)
1846 },
1847#endif
thestigb012bc3d2014-09-18 22:57:131848#if defined(ENABLE_EXTENSIONS)
[email protected]98585412014-05-13 19:01:371849 {
1850 "extension-active-script-permission",
1851 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME,
1852 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION,
1853 kOsAll,
1854 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction)
1855 },
thestigb012bc3d2014-09-18 22:57:131856#endif
[email protected]52848022014-05-22 19:01:071857 {
[email protected]e79cec22014-07-26 16:20:291858 "harfbuzz-rendertext",
1859 IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME,
1860 IDS_FLAGS_HARFBUZZ_RENDERTEXT_DESCRIPTION,
[email protected]52848022014-05-22 19:01:071861 kOsDesktop,
[email protected]e79cec22014-07-26 16:20:291862 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText,
1863 switches::kDisableHarfBuzzRenderText)
[email protected]52848022014-05-22 19:01:071864 },
[email protected]1c790df2014-06-03 22:51:121865#if defined(OS_ANDROID)
1866 {
[email protected]85f710c2014-06-20 17:29:111867 "answers-in-suggest",
[email protected]1c790df2014-06-03 22:51:121868 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME,
1869 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION,
1870 kOsAndroid,
asvitkinebff63b22014-11-25 01:03:521871 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAnswersInSuggest,
1872 switches::kDisableAnswersInSuggest)
[email protected]1c790df2014-06-03 22:51:121873 },
1874#endif
[email protected]3dfb4012014-06-11 07:33:381875#if defined(OS_ANDROID)
1876 {
1877 "enable-data-reduction-proxy-dev",
1878 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME,
1879 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION,
1880 kOsAndroid,
1881 ENABLE_DISABLE_VALUE_TYPE(
1882 data_reduction_proxy::switches::kEnableDataReductionProxyDev,
1883 data_reduction_proxy::switches::kDisableDataReductionProxyDev)
1884 },
bengr470a8592014-10-24 00:31:481885 {
1886 "enable-data-reduction-proxy-alt",
1887 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_NAME,
1888 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_ALTERNATIVE_DESCRIPTION,
1889 kOsAndroid,
1890 SINGLE_VALUE_TYPE(
1891 data_reduction_proxy::switches::kEnableDataReductionProxyAlt)
1892 },
[email protected]3dfb4012014-06-11 07:33:381893#endif
[email protected]48e67ee72014-07-01 06:53:431894 {
[email protected]49b05f82014-08-11 09:16:521895 "enable-experimental-hotwording",
1896 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_NAME,
1897 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION,
1898 kOsDesktop,
1899 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording)
[email protected]48e67ee72014-07-01 06:53:431900 },
rlp69ebfce2014-11-18 21:03:461901 {
1902 "enable-hotword-hardware",
1903 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_NAME,
1904 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORD_HARDWARE_DESCRIPTION,
1905 kOsCrOS,
1906 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwordHardware)
1907 },
thestigb012bc3d2014-09-18 22:57:131908#if defined(ENABLE_EXTENSIONS)
[email protected]409d9202014-07-08 01:32:411909 {
Ken Rockot19f0e7f2014-09-15 23:54:271910 "enable-embedded-extension-options",
1911 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME,
1912 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION,
1913 kOsDesktop,
1914 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions)
1915 },
thestigb012bc3d2014-09-18 22:57:131916#endif
Ken Rockot19f0e7f2014-09-15 23:54:271917 {
[email protected]3ba3eb712014-07-16 07:47:191918 "enable-website-settings-manager",
1919 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME,
1920 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION,
1921 kOsDesktop,
1922 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager)
1923 },
[email protected]c5bbe0e2014-08-01 23:23:301924 {
1925 "remember-cert-error-decisions",
1926 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME,
1927 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION,
1928 kOsAll,
1929 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices)
1930 },
[email protected]bdbf5cb2014-08-07 23:38:081931 {
1932 "enable-drop-sync-credential",
1933 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME,
1934 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION,
1935 kOsAll,
asvitkinebff63b22014-11-25 01:03:521936 ENABLE_DISABLE_VALUE_TYPE(
1937 password_manager::switches::kEnableDropSyncCredential,
1938 password_manager::switches::kDisableDropSyncCredential)
[email protected]2f0b7e0f2014-08-15 02:18:231939 },
thestigb012bc3d2014-09-18 22:57:131940#if defined(ENABLE_EXTENSIONS)
[email protected]2f0b7e0f2014-08-15 02:18:231941 {
1942 "enable-extension-action-redesign",
1943 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME,
1944 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION,
1945 kOsWin | kOsLinux | kOsCrOS,
1946 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign)
1947 },
thestigb012bc3d2014-09-18 22:57:131948#endif
[email protected]524dd702014-08-16 00:00:451949 {
1950 "autofill-sync-credential",
1951 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME,
1952 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION,
1953 kOsAll,
1954 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices)
1955 },
juyika7be5192014-08-26 23:01:041956#if !defined(OS_ANDROID)
1957 {
1958 "enable-message-center-always-scroll-up-upon-notification-removal",
1959 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME,
1960 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION,
1961 kOsDesktop,
1962 SINGLE_VALUE_TYPE(
1963 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)
1964 },
1965#endif
chirantan6e3f35b2014-09-16 02:06:111966#if defined(OS_CHROMEOS)
1967 {
1968 "wake-on-packets",
1969 IDS_FLAGS_WAKE_ON_PACKETS_NAME,
1970 IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION,
1971 kOsCrOSOwnerOnly,
1972 SINGLE_VALUE_TYPE(chromeos::switches::kWakeOnPackets)
1973 },
1974#endif // OS_CHROMEOS
miu094342f2014-09-26 03:09:461975 {
1976 "enable-tab-audio-muting",
1977 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_NAME,
1978 IDS_FLAGS_ENABLE_TAB_AUDIO_MUTING_DESCRIPTION,
miu2178ec82014-11-01 01:59:061979 kOsDesktop,
miu094342f2014-09-26 03:09:461980 SINGLE_VALUE_TYPE(switches::kEnableTabAudioMuting)
1981 },
mkwst531d29fa2014-10-02 09:42:071982 {
1983 "enable-credential-manager-api",
1984 IDS_FLAGS_CREDENTIAL_MANAGER_API_NAME,
1985 IDS_FLAGS_CREDENTIAL_MANAGER_API_DESCRIPTION,
1986 kOsAll,
1987 SINGLE_VALUE_TYPE(switches::kEnableCredentialManagerAPI)
1988 },
mkwstae2d60392014-11-11 07:41:451989 {
1990 "reduced-referrer-granularity",
1991 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_NAME,
1992 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION,
1993 kOsAll,
1994 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity)
1995 },
tommycli3c366b32014-10-06 23:05:461996#if defined(ENABLE_PLUGINS)
1997 {
1998 "enable-plugin-power-saver",
1999 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME,
2000 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION,
2001 kOsDesktop,
2002 SINGLE_VALUE_TYPE(switches::kEnablePluginPowerSaver)
2003 },
2004#endif
kelvinp3b73f5092014-10-07 21:49:392005#if defined(OS_CHROMEOS)
2006 {
2007 "enable-remote-assistance",
2008 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_NAME,
2009 IDS_FLAGS_ENABLE_REMOTE_ASSISTANCE_DESCRIPTION,
2010 kOsCrOS,
2011 SINGLE_VALUE_TYPE(extensions::switches::kEnableRemoteAssistance)
2012 },
mtomasz644ca402014-10-30 00:51:372013 {
2014 "disable-new-zip-unpacker",
2015 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME,
2016 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION,
2017 kOsCrOS,
2018 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker)
agl0a4a16342014-11-05 04:17:052019 },
kelvinp3b73f5092014-10-07 21:49:392020#endif // defined(OS_CHROMEOS)
agl0a4a16342014-11-05 04:17:052021 {
2022 "ssl-version-min",
2023 IDS_FLAGS_SSL_VERSION_MIN_NAME,
2024 IDS_FLAGS_SSL_VERSION_MIN_DESCRIPTION,
2025 kOsAll,
2026 MULTI_VALUE_TYPE(kSSLVersionMinChoices)
2027 },
rouslan497109da2014-11-26 20:30:342028 {
2029 "enable-credit-card-scan",
2030 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_NAME,
2031 IDS_FLAGS_ENABLE_CREDIT_CARD_SCAN_DESCRIPTION,
2032 kOsAndroid,
2033 SINGLE_VALUE_TYPE(autofill::switches::kEnableCreditCardScan)
2034 },
alemate94e69ad2014-11-27 17:30:282035#if defined(OS_CHROMEOS)
2036 {
2037 "enable-captive-portal-bypass-proxy",
2038 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_NAME,
2039 IDS_FLAGS_ENABLE_CAPTIVE_PORTAL_BYPASS_PROXY_DESCRIPTION,
2040 kOsCrOS,
2041 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCaptivePortalBypassProxy)
2042 },
2043#endif // defined(OS_CHROMEOS)
rseseka30ebba2014-12-01 21:55:542044#if defined(OS_ANDROID)
2045 {
2046 "enable-seccomp-filter-sandbox",
2047 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_NAME,
2048 IDS_FLAGS_ENABLE_SECCOMP_FILTER_SANDBOX_ANDROID_DESCRIPTION,
2049 kOsAndroid,
2050 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox)
2051 },
2052#endif
lanweid74bc3e12014-12-03 23:12:292053 {
2054 "enable-touch-hover",
2055 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME,
2056 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION,
2057 kOsAndroid,
2058 SINGLE_VALUE_TYPE("enable-touch-hover")
2059 },
alemate94e69ad2014-11-27 17:30:282060
[email protected]4b66a7d2014-08-15 17:13:312061 // NOTE: Adding new command-line switches requires adding corresponding
2062 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2063 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
[email protected]a0e4b072011-08-17 01:47:072064};
[email protected]ad2a3ded2010-08-27 13:19:052065
[email protected]a314ee5a2010-10-26 21:23:282066const Experiment* experiments = kExperiments;
2067size_t num_experiments = arraysize(kExperiments);
2068
[email protected]e2ddbc92010-10-15 20:02:072069// Stores and encapsulates the little state that about:flags has.
2070class FlagsState {
2071 public:
2072 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:402073 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212074 CommandLine* command_line,
2075 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:072076 bool IsRestartNeededToCommitChanges();
2077 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:402078 FlagsStorage* flags_storage,
2079 const std::string& internal_name,
2080 bool enable);
[email protected]e2ddbc92010-10-15 20:02:072081 void RemoveFlagsSwitches(
2082 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:402083 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:072084 void reset();
2085
2086 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:552087 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:072088 return Singleton<FlagsState>::get();
2089 }
2090
2091 private:
2092 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:532093 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:072094
2095 DISALLOW_COPY_AND_ASSIGN(FlagsState);
2096};
2097
[email protected]8a6ff28d2010-12-02 16:35:192098// Adds the internal names for the specified experiment to |names|.
2099void AddInternalName(const Experiment& e, std::set<std::string>* names) {
2100 if (e.type == Experiment::SINGLE_VALUE) {
2101 names->insert(e.internal_name);
2102 } else {
[email protected]83e9fa702013-02-25 19:30:442103 DCHECK(e.type == Experiment::MULTI_VALUE ||
2104 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:192105 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:442106 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:192107 }
2108}
2109
[email protected]28e35af2011-02-09 12:56:222110// Confirms that an experiment is valid, used in a DCHECK in
2111// SanitizeList below.
2112bool ValidateExperiment(const Experiment& e) {
2113 switch (e.type) {
2114 case Experiment::SINGLE_VALUE:
2115 DCHECK_EQ(0, e.num_choices);
2116 DCHECK(!e.choices);
2117 break;
2118 case Experiment::MULTI_VALUE:
2119 DCHECK_GT(e.num_choices, 0);
2120 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:532121 DCHECK(e.choices[0].command_line_switch);
2122 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:222123 break;
[email protected]83e9fa702013-02-25 19:30:442124 case Experiment::ENABLE_DISABLE_VALUE:
2125 DCHECK_EQ(3, e.num_choices);
2126 DCHECK(!e.choices);
2127 DCHECK(e.command_line_switch);
2128 DCHECK(e.command_line_value);
2129 DCHECK(e.disable_command_line_switch);
2130 DCHECK(e.disable_command_line_value);
2131 break;
[email protected]28e35af2011-02-09 12:56:222132 default:
2133 NOTREACHED();
2134 }
2135 return true;
2136}
2137
[email protected]ad2a3ded2010-08-27 13:19:052138// Removes all experiments from prefs::kEnabledLabsExperiments that are
2139// unknown, to prevent this list to become very long as experiments are added
2140// and removed.
[email protected]e6d1c4f2013-06-12 17:37:402141void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:052142 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:222143 for (size_t i = 0; i < num_experiments; ++i) {
2144 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:192145 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:222146 }
[email protected]ad2a3ded2010-08-27 13:19:052147
[email protected]07d666d2013-07-21 23:56:262148 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052149
[email protected]09f3fde82014-05-14 15:08:152150 std::set<std::string> new_enabled_experiments =
2151 base::STLSetIntersection<std::set<std::string> >(
2152 known_experiments, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052153
[email protected]07d666d2013-07-21 23:56:262154 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:402155 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052156}
2157
[email protected]1a47d7e2010-10-15 00:37:242158void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:402159 FlagsStorage* flags_storage, std::set<std::string>* result) {
2160 SanitizeList(flags_storage);
2161 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052162}
2163
yefimff0c52f2014-09-24 20:19:502164bool SkipConditionalExperiment(const Experiment& experiment,
2165 FlagsStorage* flags_storage) {
[email protected]cb13d462014-03-14 21:38:582166 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) ||
2167 (experiment.internal_name ==
2168 std::string("manual-enhanced-bookmarks-optout"))) {
2169 return true;
2170 }
[email protected]4d7552f2014-03-04 04:53:332171
[email protected]3dfb4012014-06-11 07:33:382172#if defined(OS_ANDROID)
bolian44ee3baf2014-10-01 02:41:542173 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
[email protected]3dfb4012014-06-11 07:33:382174 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
bolian44ee3baf2014-10-01 02:41:542175 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA &&
[email protected]3dfb4012014-06-11 07:33:382176 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2177 return true;
2178 }
bengr470a8592014-10-24 00:31:482179 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2180 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) &&
2181 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2182 return true;
2183 }
[email protected]3dfb4012014-06-11 07:33:382184#endif
2185
[email protected]12271632013-11-26 03:06:392186 return false;
2187}
2188
2189
[email protected]a314ee5a2010-10-26 21:23:282190// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2191// enabled on the current platform.
2192void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:402193 FlagsStorage* flags_storage, std::set<std::string>* result) {
2194 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:282195
2196 // Filter out any experiments that aren't enabled on the current platform. We
2197 // don't remove these from prefs else syncing to a platform with a different
2198 // set of experiments would be lossy.
2199 std::set<std::string> platform_experiments;
2200 int current_platform = GetCurrentPlatform();
2201 for (size_t i = 0; i < num_experiments; ++i) {
2202 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:192203 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:582204#if defined(OS_CHROMEOS)
2205 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2206 AddInternalName(experiments[i], &platform_experiments);
2207#endif
[email protected]a314ee5a2010-10-26 21:23:282208 }
2209
[email protected]09f3fde82014-05-14 15:08:152210 std::set<std::string> new_enabled_experiments =
2211 base::STLSetIntersection<std::set<std::string> >(
2212 platform_experiments, *result);
[email protected]a314ee5a2010-10-26 21:23:282213
2214 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052215}
2216
[email protected]8a6ff28d2010-12-02 16:35:192217// Returns the Value representing the choice data in the specified experiment.
[email protected]5bcdd99d2013-12-23 18:28:302218base::Value* CreateChoiceData(
2219 const Experiment& experiment,
2220 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:442221 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2222 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]5bcdd99d2013-12-23 18:28:302223 base::ListValue* result = new base::ListValue;
[email protected]8a6ff28d2010-12-02 16:35:192224 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]5bcdd99d2013-12-23 18:28:302225 base::DictionaryValue* value = new base::DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:442226 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192227 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:442228 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:222229 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192230 result->Append(value);
2231 }
2232 return result;
2233}
2234
[email protected]e2ddbc92010-10-15 20:02:072235} // namespace
2236
[email protected]83e9fa702013-02-25 19:30:442237std::string Experiment::NameForChoice(int index) const {
2238 DCHECK(type == Experiment::MULTI_VALUE ||
2239 type == Experiment::ENABLE_DISABLE_VALUE);
2240 DCHECK_LT(index, num_choices);
2241 return std::string(internal_name) + testing::kMultiSeparator +
2242 base::IntToString(index);
2243}
2244
[email protected]96920152013-12-04 21:00:162245base::string16 Experiment::DescriptionForChoice(int index) const {
[email protected]83e9fa702013-02-25 19:30:442246 DCHECK(type == Experiment::MULTI_VALUE ||
2247 type == Experiment::ENABLE_DISABLE_VALUE);
2248 DCHECK_LT(index, num_choices);
2249 int description_id;
2250 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2251 const int kEnableDisableDescriptionIds[] = {
2252 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2253 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2254 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2255 };
2256 description_id = kEnableDisableDescriptionIds[index];
2257 } else {
2258 description_id = choices[index].description_id;
2259 }
2260 return l10n_util::GetStringUTF16(description_id);
2261}
2262
[email protected]e6d1c4f2013-06-12 17:37:402263void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212264 CommandLine* command_line,
2265 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:402266 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:212267 command_line,
2268 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:052269}
2270
[email protected]6d98abf2013-06-17 23:35:512271bool AreSwitchesIdenticalToCurrentCommandLine(
[email protected]4b66a7d2014-08-15 17:13:312272 const CommandLine& new_cmdline,
2273 const CommandLine& active_cmdline,
2274 std::set<CommandLine::StringType>* out_difference) {
[email protected]6d98abf2013-06-17 23:35:512275 std::set<CommandLine::StringType> new_flags =
2276 ExtractFlagsFromCommandLine(new_cmdline);
2277 std::set<CommandLine::StringType> active_flags =
2278 ExtractFlagsFromCommandLine(active_cmdline);
2279
[email protected]4b66a7d2014-08-15 17:13:312280 bool result = false;
[email protected]6d98abf2013-06-17 23:35:512281 // Needed because std::equal doesn't check if the 2nd set is empty.
[email protected]4b66a7d2014-08-15 17:13:312282 if (new_flags.size() == active_flags.size()) {
2283 result =
2284 std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2285 }
[email protected]6d98abf2013-06-17 23:35:512286
[email protected]4b66a7d2014-08-15 17:13:312287 if (out_difference && !result) {
2288 std::set_symmetric_difference(
2289 new_flags.begin(),
2290 new_flags.end(),
2291 active_flags.begin(),
2292 active_flags.end(),
2293 std::inserter(*out_difference, out_difference->begin()));
2294 }
2295
2296 return result;
[email protected]6d98abf2013-06-17 23:35:512297}
2298
[email protected]e6d1c4f2013-06-12 17:37:402299void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:522300 FlagAccess access,
2301 base::ListValue* supported_experiments,
2302 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:052303 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402304 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052305
2306 int current_platform = GetCurrentPlatform();
2307
[email protected]a314ee5a2010-10-26 21:23:282308 for (size_t i = 0; i < num_experiments; ++i) {
2309 const Experiment& experiment = experiments[i];
yefimff0c52f2014-09-24 20:19:502310 if (SkipConditionalExperiment(experiment, flags_storage))
[email protected]12271632013-11-26 03:06:392311 continue;
[email protected]ad2a3ded2010-08-27 13:19:052312
[email protected]5bcdd99d2013-12-23 18:28:302313 base::DictionaryValue* data = new base::DictionaryValue();
[email protected]ad2a3ded2010-08-27 13:19:052314 data->SetString("internal_name", experiment.internal_name);
2315 data->SetString("name",
2316 l10n_util::GetStringUTF16(experiment.visible_name_id));
2317 data->SetString("description",
2318 l10n_util::GetStringUTF16(
2319 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:402320
[email protected]5bcdd99d2013-12-23 18:28:302321 base::ListValue* supported_platforms = new base::ListValue();
[email protected]cc3e2052011-12-20 01:01:402322 AddOsStrings(experiment.supported_platforms, supported_platforms);
2323 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:052324
[email protected]28e35af2011-02-09 12:56:222325 switch (experiment.type) {
2326 case Experiment::SINGLE_VALUE:
2327 data->SetBoolean(
2328 "enabled",
2329 enabled_experiments.count(experiment.internal_name) > 0);
2330 break;
2331 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:442332 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:222333 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2334 break;
2335 default:
2336 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192337 }
2338
[email protected]ee28495a2013-05-20 04:10:522339 bool supported = (experiment.supported_platforms & current_platform) != 0;
2340#if defined(OS_CHROMEOS)
2341 if (access == kOwnerAccessToFlags &&
2342 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2343 supported = true;
2344 }
2345#endif
2346 if (supported)
2347 supported_experiments->Append(data);
2348 else
2349 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052350 }
[email protected]ad2a3ded2010-08-27 13:19:052351}
2352
[email protected]ad2a3ded2010-08-27 13:19:052353bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552354 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052355}
2356
[email protected]e6d1c4f2013-06-12 17:37:402357void SetExperimentEnabled(FlagsStorage* flags_storage,
2358 const std::string& internal_name,
2359 bool enable) {
2360 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2361 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072362}
2363
2364void RemoveFlagsSwitches(
2365 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552366 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072367}
2368
[email protected]e6d1c4f2013-06-12 17:37:402369void ResetAllFlags(FlagsStorage* flags_storage) {
2370 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002371}
2372
[email protected]a314ee5a2010-10-26 21:23:282373int GetCurrentPlatform() {
2374#if defined(OS_MACOSX)
2375 return kOsMac;
2376#elif defined(OS_WIN)
2377 return kOsWin;
2378#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2379 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212380#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282381 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402382#elif defined(OS_ANDROID)
2383 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282384#else
2385#error Unknown platform
2386#endif
2387}
2388
[email protected]e6d1c4f2013-06-12 17:37:402389void RecordUMAStatistics(FlagsStorage* flags_storage) {
2390 std::set<std::string> flags = flags_storage->GetFlags();
asvitkinebff63b22014-11-25 01:03:522391 for (const std::string& flag : flags) {
[email protected]4bc5050c2010-11-18 17:55:542392 std::string action("AboutFlags_");
asvitkinebff63b22014-11-25 01:03:522393 action += flag;
[email protected]7f6f44c2011-12-14 13:23:382394 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542395 }
2396 // Since flag metrics are recorded every startup, add a tick so that the
2397 // stats can be made meaningful.
2398 if (flags.size())
asvitkinebff63b22014-11-25 01:03:522399 content::RecordAction(base::UserMetricsAction("AboutFlags_StartupTick"));
2400 content::RecordAction(base::UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542401}
2402
alemate0107c3272014-09-03 04:30:042403base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name) {
2404 return static_cast<base::HistogramBase::Sample>(
2405 metrics::HashMetricName(switch_name));
[email protected]4b66a7d2014-08-15 17:13:312406}
2407
2408void ReportCustomFlags(const std::string& uma_histogram_hame,
2409 const std::set<std::string>& command_line_difference) {
asvitkinebff63b22014-11-25 01:03:522410 for (const std::string& flag : command_line_difference) {
2411 int uma_id = about_flags::testing::kBadSwitchFormatHistogramId;
2412 if (StartsWithASCII(flag, "--", true /* case_sensitive */)) {
[email protected]4b66a7d2014-08-15 17:13:312413 // Skip '--' before switch name.
asvitkinebff63b22014-11-25 01:03:522414 std::string switch_name(flag.substr(2));
[email protected]4b66a7d2014-08-15 17:13:312415
2416 // Kill value, if any.
2417 const size_t value_pos = switch_name.find('=');
2418 if (value_pos != std::string::npos)
2419 switch_name.resize(value_pos);
2420
2421 uma_id = GetSwitchUMAId(switch_name);
2422 } else {
asvitkinebff63b22014-11-25 01:03:522423 NOTREACHED() << "ReportCustomFlags(): flag '" << flag
[email protected]4b66a7d2014-08-15 17:13:312424 << "' has incorrect format.";
2425 }
2426 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
asvitkinebff63b22014-11-25 01:03:522427 << "' '" << flag << "', uma_id=" << uma_id;
[email protected]4b66a7d2014-08-15 17:13:312428
2429 // Sparse histogram macro does not cache the histogram, so it's safe
2430 // to use macro with non-static histogram name here.
2431 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id);
2432 }
2433}
2434
[email protected]e2ddbc92010-10-15 20:02:072435//////////////////////////////////////////////////////////////////////////////
2436// FlagsState implementation.
2437
2438namespace {
2439
[email protected]83e9fa702013-02-25 19:30:442440typedef std::map<std::string, std::pair<std::string, std::string> >
2441 NameToSwitchAndValueMap;
2442
2443void SetFlagToSwitchMapping(const std::string& key,
2444 const std::string& switch_name,
2445 const std::string& switch_value,
2446 NameToSwitchAndValueMap* name_to_switch_map) {
2447 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2448 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2449}
2450
[email protected]578f2092013-09-16 17:16:212451void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2452 CommandLine* command_line,
2453 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072454 if (command_line->HasSwitch(switches::kNoExperiments))
2455 return;
2456
2457 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002458
[email protected]e6d1c4f2013-06-12 17:37:402459 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2460 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072461
[email protected]a82744532011-02-11 16:15:532462 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192463 for (size_t i = 0; i < num_experiments; ++i) {
2464 const Experiment& e = experiments[i];
2465 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442466 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2467 e.command_line_value, &name_to_switch_map);
2468 } else if (e.type == Experiment::MULTI_VALUE) {
2469 for (int j = 0; j < e.num_choices; ++j) {
2470 SetFlagToSwitchMapping(e.NameForChoice(j),
2471 e.choices[j].command_line_switch,
2472 e.choices[j].command_line_value,
2473 &name_to_switch_map);
2474 }
[email protected]8a6ff28d2010-12-02 16:35:192475 } else {
[email protected]83e9fa702013-02-25 19:30:442476 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2477 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2478 &name_to_switch_map);
2479 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2480 e.command_line_value, &name_to_switch_map);
2481 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2482 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192483 }
2484 }
[email protected]e2ddbc92010-10-15 20:02:072485
[email protected]578f2092013-09-16 17:16:212486 if (sentinels == kAddSentinels) {
2487 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2488 flags_switches_.insert(
2489 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2490 std::string()));
2491 }
asvitkinebff63b22014-11-25 01:03:522492 for (const std::string& experiment_name : enabled_experiments) {
[email protected]a82744532011-02-11 16:15:532493 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192494 name_to_switch_map.find(experiment_name);
2495 if (name_to_switch_it == name_to_switch_map.end()) {
2496 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072497 continue;
[email protected]8a6ff28d2010-12-02 16:35:192498 }
[email protected]e2ddbc92010-10-15 20:02:072499
yefimff0c52f2014-09-24 20:19:502500#if defined(OS_CHROMEOS)
2501 // On Chrome OS setting command line flag may make browser to restart on
2502 // user login. As this flag eventually will be set to a significant number
2503 // of users skip manual-enhanced-bookmarks to avoid restart.
2504 if (experiment_name == "manual-enhanced-bookmarks")
2505 continue;
2506#endif
2507
[email protected]a82744532011-02-11 16:15:532508 const std::pair<std::string, std::string>&
2509 switch_and_value_pair = name_to_switch_it->second;
2510
[email protected]9737b3632013-08-26 09:23:232511 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532512 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2513 switch_and_value_pair.second);
2514 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072515 }
[email protected]578f2092013-09-16 17:16:212516 if (sentinels == kAddSentinels) {
2517 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2518 flags_switches_.insert(
2519 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2520 std::string()));
2521 }
[email protected]e2ddbc92010-10-15 20:02:072522}
2523
2524bool FlagsState::IsRestartNeededToCommitChanges() {
2525 return needs_restart_;
2526}
2527
[email protected]e6d1c4f2013-06-12 17:37:402528void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2529 const std::string& internal_name,
2530 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442531 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192532 if (at_index != std::string::npos) {
2533 DCHECK(enable);
2534 // We're being asked to enable a multi-choice experiment. Disable the
2535 // currently selected choice.
2536 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222537 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402538 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192539
[email protected]28e35af2011-02-09 12:56:222540 // And enable the new choice, if it is not the default first choice.
2541 if (internal_name != experiment_name + "@0") {
2542 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402543 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082544 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402545 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222546 }
[email protected]8a6ff28d2010-12-02 16:35:192547 return;
2548 }
2549
[email protected]ad2a3ded2010-08-27 13:19:052550 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402551 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052552
[email protected]8a6ff28d2010-12-02 16:35:192553 const Experiment* e = NULL;
2554 for (size_t i = 0; i < num_experiments; ++i) {
2555 if (experiments[i].internal_name == internal_name) {
2556 e = experiments + i;
2557 break;
2558 }
2559 }
2560 DCHECK(e);
2561
2562 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592563 if (enable)
[email protected]147492b2013-03-19 23:52:082564 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592565 else
[email protected]147492b2013-03-19 23:52:082566 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192567 } else {
2568 if (enable) {
2569 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082570 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192571 } else {
2572 // Find the currently enabled choice and disable it.
2573 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442574 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192575 if (enabled_experiments.find(choice_name) !=
2576 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082577 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192578 enabled_experiments.erase(choice_name);
2579 // Continue on just in case there's a bug and more than one
2580 // experiment for this choice was enabled.
2581 }
2582 }
2583 }
2584 }
[email protected]ad2a3ded2010-08-27 13:19:052585
[email protected]e6d1c4f2013-06-12 17:37:402586 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052587}
2588
[email protected]e2ddbc92010-10-15 20:02:072589void FlagsState::RemoveFlagsSwitches(
2590 std::map<std::string, CommandLine::StringType>* switch_list) {
asvitkinebff63b22014-11-25 01:03:522591 for (const auto& entry : flags_switches_)
2592 switch_list->erase(entry.first);
[email protected]e2ddbc92010-10-15 20:02:072593}
2594
[email protected]e6d1c4f2013-06-12 17:37:402595void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002596 needs_restart_ = true;
2597
2598 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402599 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002600}
2601
[email protected]e2ddbc92010-10-15 20:02:072602void FlagsState::reset() {
2603 needs_restart_ = false;
2604 flags_switches_.clear();
2605}
2606
[email protected]38e46812011-05-09 20:49:222607} // namespace
[email protected]e2ddbc92010-10-15 20:02:072608
2609namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192610
2611// WARNING: '@' is also used in the html file. If you update this constant you
2612// also need to update the html file.
2613const char kMultiSeparator[] = "@";
2614
asvitkinebff63b22014-11-25 01:03:522615const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2616
[email protected]e2ddbc92010-10-15 20:02:072617void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552618 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072619}
[email protected]a314ee5a2010-10-26 21:23:282620
2621void SetExperiments(const Experiment* e, size_t count) {
2622 if (!e) {
2623 experiments = kExperiments;
2624 num_experiments = arraysize(kExperiments);
2625 } else {
2626 experiments = e;
2627 num_experiments = count;
2628 }
2629}
2630
[email protected]8a6ff28d2010-12-02 16:35:192631const Experiment* GetExperiments(size_t* count) {
2632 *count = num_experiments;
2633 return experiments;
2634}
2635
[email protected]e2ddbc92010-10-15 20:02:072636} // namespace testing
2637
[email protected]1a47d7e2010-10-15 00:37:242638} // namespace about_flags