blob: 34fbe4c13d0ff1ee73992db5af3a1221c5d24d1e [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"
15#include "base/numerics/safe_conversions.h"
[email protected]09f3fde82014-05-14 15:08:1516#include "base/stl_util.h"
[email protected]3ea1b182013-02-08 22:38:4117#include "base/strings/string_number_conversions.h"
[email protected]4b66a7d2014-08-15 17:13:3118#include "base/strings/string_util.h"
[email protected]135cb802013-06-09 16:44:2019#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0520#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5221#include "cc/base/switches.h"
[email protected]11534552013-12-05 02:09:3022#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
[email protected]e6d1c4f2013-06-12 17:37:4023#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0324#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "chrome/common/chrome_switches.h"
[email protected]af39f002014-08-22 10:18:1826#include "chrome/grit/generated_resources.h"
[email protected]58bc1c32013-12-16 22:52:0727#include "components/autofill/core/common/autofill_switches.h"
[email protected]4e6c96e2014-05-17 18:41:1928#include "components/cloud_devices/common/cloud_devices_switches.h"
[email protected]4b66a7d2014-08-15 17:13:3129#include "components/metrics/metrics_hashes.h"
[email protected]cbb22eb2013-06-24 23:53:1030#include "components/nacl/common/nacl_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]49d9b142013-07-19 08:50:2733#include "extensions/common/switches.h"
[email protected]e2e8e322012-09-12 04:37:0234#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1735#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5936#include "ui/base/ui_base_switches.h"
[email protected]bf3f4592014-03-31 19:50:4437#include "ui/display/display_switches.h"
[email protected]a6147a22013-09-26 06:55:0938#include "ui/events/event_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4839#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2740#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2441#include "ui/keyboard/keyboard_switches.h"
[email protected]e3d512a72014-03-18 20:50:4742#include "ui/native_theme/native_theme_switches.h"
[email protected]c4f51d22013-11-05 03:11:2643#include "ui/views/views_switches.h"
[email protected]9a224572013-05-12 23:08:5644
[email protected]3dfb4012014-06-11 07:33:3845#if defined(OS_ANDROID)
46#include "chrome/common/chrome_version_info.h"
47#include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h"
[email protected]4c583b62014-08-08 10:37:2348#include "components/omnibox/omnibox_switches.h"
juyika7be5192014-08-26 23:01:0449#else
50#include "ui/message_center/message_center_switches.h"
[email protected]3dfb4012014-06-11 07:33:3851#endif
52
[email protected]dc04be7c2012-03-15 23:57:4953#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3154#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4955#endif
56
[email protected]badba1ad2012-11-16 17:21:4657#if defined(OS_CHROMEOS)
58#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5159#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4660#endif
61
[email protected]fe2b77f62013-11-09 04:30:5162#if defined(ENABLE_APP_LIST)
63#include "ui/app_list/app_list_switches.h"
64#endif
65
[email protected]e6e30ac2014-01-13 21:24:3966using base::UserMetricsAction;
[email protected]7f6f44c2011-12-14 13:23:3867
[email protected]1a47d7e2010-10-15 00:37:2468namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0569
[email protected]4b66a7d2014-08-15 17:13:3170const uint32_t kBadSwitchFormatHistogramId = 0;
71
[email protected]8a6ff28d2010-12-02 16:35:1972// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5373#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4474 Experiment::SINGLE_VALUE, \
75 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5376#define SINGLE_VALUE_TYPE(command_line_switch) \
77 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4478#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
79 disable_switch, disable_value) \
80 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
81 disable_switch, disable_value, NULL, 3
82#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
83 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5384#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4485 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1986
[email protected]e2ddbc92010-10-15 20:02:0787namespace {
88
[email protected]9c7453d2012-01-21 00:45:4089const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5690const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0591
[email protected]cc3e2052011-12-20 01:01:4092// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
93// whether the experiment is available on that platform.
[email protected]5bcdd99d2013-12-23 18:28:3094void AddOsStrings(unsigned bitmask, base::ListValue* list) {
[email protected]cc3e2052011-12-20 01:01:4095 struct {
96 unsigned bit;
97 const char* const name;
98 } kBitsToOs[] = {
99 {kOsMac, "Mac"},
100 {kOsWin, "Windows"},
101 {kOsLinux, "Linux"},
102 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:01103 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:58104 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:40105 };
106 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
107 if (bitmask & kBitsToOs[i].bit)
[email protected]5bcdd99d2013-12-23 18:28:30108 list->Append(new base::StringValue(kBitsToOs[i].name));
[email protected]cc3e2052011-12-20 01:01:40109}
110
[email protected]6d98abf2013-06-17 23:35:51111// Convert switch constants to proper CommandLine::StringType strings.
112CommandLine::StringType GetSwitchString(const std::string& flag) {
113 CommandLine cmd_line(CommandLine::NO_PROGRAM);
114 cmd_line.AppendSwitch(flag);
[email protected]4ac579b2014-05-20 06:43:23115 DCHECK_EQ(2U, cmd_line.argv().size());
[email protected]6d98abf2013-06-17 23:35:51116 return cmd_line.argv()[1];
117}
118
119// Scoops flags from a command line.
120std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
121 const CommandLine& cmdline) {
122 std::set<CommandLine::StringType> flags;
123 // First do the ones between --flag-switches-begin and --flag-switches-end.
124 CommandLine::StringVector::const_iterator first =
125 std::find(cmdline.argv().begin(), cmdline.argv().end(),
126 GetSwitchString(switches::kFlagSwitchesBegin));
127 CommandLine::StringVector::const_iterator last =
128 std::find(cmdline.argv().begin(), cmdline.argv().end(),
129 GetSwitchString(switches::kFlagSwitchesEnd));
130 if (first != cmdline.argv().end() && last != cmdline.argv().end())
131 flags.insert(first + 1, last);
132#if defined(OS_CHROMEOS)
133 // Then add those between --policy-switches-begin and --policy-switches-end.
134 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
135 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
136 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
137 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
138 if (first != cmdline.argv().end() && last != cmdline.argv().end())
139 flags.insert(first + 1, last);
140#endif
141 return flags;
142}
143
piotaixrbc9cd5f2014-08-26 22:24:14144const Experiment::Choice kEnableDisplayList2DcanvasChoices[] = {
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
146 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
147 switches::kEnableDisplayList2dCanvas, ""},
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
149 switches::kDisableDisplayList2dCanvas, ""},
150};
151
[email protected]d8221b22013-05-23 05:35:43152const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
153 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
154 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
155 switches::kEnableCompositingForTransition, ""},
156 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
157 switches::kDisableCompositingForTransition, ""},
158};
159
[email protected]d7932532012-11-21 21:10:31160const Experiment::Choice kTouchEventsChoices[] = {
161 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
162 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
163 switches::kTouchEvents,
164 switches::kTouchEventsEnabled },
165 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
166 switches::kTouchEvents,
167 switches::kTouchEventsDisabled }
168};
169
[email protected]c38e9802014-02-18 21:32:12170#if defined(USE_AURA)
171const Experiment::Choice kOverscrollHistoryNavigationChoices[] = {
172 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" },
173 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
174 switches::kOverscrollHistoryNavigation,
175 "0" },
176 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI,
177 switches::kOverscrollHistoryNavigation,
178 "2" }
179};
180#endif
[email protected]34633be2014-06-26 09:05:59181#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
182const Experiment::Choice kDeviceScaleFactorChoices[] = {
183 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
184 { IDS_DEVICE_SCALE_FACTOR_1_1, switches::kForceDeviceScaleFactor, "1.1"},
185 { IDS_DEVICE_SCALE_FACTOR_1_2, switches::kForceDeviceScaleFactor, "1.2"},
186 { IDS_DEVICE_SCALE_FACTOR_1_25, switches::kForceDeviceScaleFactor, "1.25"},
187 { IDS_DEVICE_SCALE_FACTOR_1_3, switches::kForceDeviceScaleFactor, "1.3"},
188 { IDS_DEVICE_SCALE_FACTOR_1_4, switches::kForceDeviceScaleFactor, "1.4"},
189 { IDS_DEVICE_SCALE_FACTOR_2, switches::kForceDeviceScaleFactor, "2"},
190};
191#endif
[email protected]c38e9802014-02-18 21:32:12192
[email protected]d33d2222014-06-04 15:39:58193#if !defined(DISABLE_NACL)
[email protected]66f409c2012-10-04 20:59:04194const Experiment::Choice kNaClDebugMaskChoices[] = {
[email protected]66f409c2012-10-04 20:59:04195 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
[email protected]402bed6e2014-03-07 08:33:09196 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
197 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
198 // so by default we want to avoid debugging that.
199 // NOTE: As the default value must be the empty string, the mask excluding
200 // the PNaCl translator and secure shell is substituted elsewhere.
201 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" },
202 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" },
[email protected]66f409c2012-10-04 20:59:04203 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
204 switches::kNaClDebugMask, "*://*/*debug.nmf" }
205};
[email protected]d33d2222014-06-04 15:39:58206#endif
[email protected]66f409c2012-10-04 20:59:04207
[email protected]9323fdd12013-02-23 00:31:36208const Experiment::Choice kImplSidePaintingChoices[] = {
209 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
210 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]a23530d2014-03-11 06:04:14211 switches::kEnableImplSidePainting, ""},
[email protected]9323fdd12013-02-23 00:31:36212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]a23530d2014-03-11 06:04:14213 switches::kDisableImplSidePainting, ""}
[email protected]9323fdd12013-02-23 00:31:36214};
215
[email protected]7621af22013-09-12 23:06:33216const Experiment::Choice kLCDTextChoices[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]a23530d2014-03-11 06:04:14218 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""},
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""}
[email protected]7621af22013-09-12 23:06:33220};
221
[email protected]b242b142014-05-07 14:48:49222const Experiment::Choice kDistanceFieldTextChoices[] = {
223 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
224 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
225 switches::kEnableDistanceFieldText, "" },
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
227 switches::kDisableDistanceFieldText, "" }
228};
229
[email protected]758efb02014-04-05 07:53:45230#ifndef USE_AURA
[email protected]0c04d1c2013-07-10 00:02:32231const Experiment::Choice kDelegatedRendererChoices[] = {
232 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
233 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
234 switches::kEnableDelegatedRenderer, ""},
235 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
236 switches::kDisableDelegatedRenderer, ""}
237};
[email protected]758efb02014-04-05 07:53:45238#endif
[email protected]0c04d1c2013-07-10 00:02:32239
[email protected]a42c85f2013-04-04 18:15:12240const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
241 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
242 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
243 cc::switches::kMaxTilesForInterestArea, "64"},
244 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
245 cc::switches::kMaxTilesForInterestArea, "128"},
246 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
247 cc::switches::kMaxTilesForInterestArea, "256"},
248 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
249 cc::switches::kMaxTilesForInterestArea, "512"}
250};
251
[email protected]a3618122013-04-26 21:15:34252const Experiment::Choice kDefaultTileWidthChoices[] = {
253 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
254 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
255 switches::kDefaultTileWidth, "128"},
256 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
257 switches::kDefaultTileWidth, "256"},
258 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
259 switches::kDefaultTileWidth, "512"},
260 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
261 switches::kDefaultTileWidth, "1024"}
262};
263
264const Experiment::Choice kDefaultTileHeightChoices[] = {
265 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
266 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
267 switches::kDefaultTileHeight, "128"},
268 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
269 switches::kDefaultTileHeight, "256"},
270 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
271 switches::kDefaultTileHeight, "512"},
272 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
273 switches::kDefaultTileHeight, "1024"}
274};
275
[email protected]38484df12013-04-10 16:42:03276const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21277 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
278 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
279 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03280 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
281 switches::kUseSimpleCacheBackend, "on"}
282};
283
[email protected]9afc14e22013-09-25 22:34:14284#if defined(USE_AURA)
[email protected]910ecfe2013-06-03 23:38:14285const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
286 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
287 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
288 switches::kTabCaptureUpscaleQuality, "fast" },
289 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
290 switches::kTabCaptureUpscaleQuality, "good" },
291 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
292 switches::kTabCaptureUpscaleQuality, "best" },
293};
294
295const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
296 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
297 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
298 switches::kTabCaptureDownscaleQuality, "fast" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
300 switches::kTabCaptureDownscaleQuality, "good" },
301 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
302 switches::kTabCaptureDownscaleQuality, "best" },
303};
[email protected]9afc14e22013-09-25 22:34:14304#endif
[email protected]910ecfe2013-06-03 23:38:14305
[email protected]54c8d282014-01-24 17:31:08306#if defined(USE_AURA) || defined(OS_LINUX)
307const Experiment::Choice kOverlayScrollbarChoices[] = {
308 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
309 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
310 switches::kEnableOverlayScrollbar, ""},
311 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
312 switches::kDisableOverlayScrollbar, ""}
313};
314#endif
315
[email protected]2cccfef2014-05-01 06:05:16316const Experiment::Choice kZeroCopyChoices[] = {
[email protected]be2e40a2013-08-27 02:49:20317 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
318 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]2cccfef2014-05-01 06:05:16319 switches::kEnableZeroCopy, ""},
[email protected]be2e40a2013-08-27 02:49:20320 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]2cccfef2014-05-01 06:05:16321 switches::kDisableZeroCopy, ""}
[email protected]be2e40a2013-08-27 02:49:20322};
323
[email protected]d5874f12013-12-05 04:30:00324#if defined(OS_ANDROID)
325const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
326 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
327 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
328 switches::kEnableZeroSuggestMostVisited, ""},
329 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
330 switches::kEnableZeroSuggestEtherSerp, ""},
331 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
332 switches::kEnableZeroSuggestEtherNoSerp, ""},
[email protected]162c8d9fa2014-03-18 20:25:41333 { IDS_FLAGS_ZERO_SUGGEST_PERSONALIZED,
334 switches::kEnableZeroSuggestPersonalized, ""},
[email protected]d5874f12013-12-05 04:30:00335 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
336 switches::kDisableZeroSuggest, ""}
337};
338#endif
339
[email protected]1a82f7372013-12-06 12:46:52340const Experiment::Choice kNumRasterThreadsChoices[] = {
341 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]00d92d32014-01-23 09:46:50342 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
343 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
344 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
345 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
[email protected]1a82f7372013-12-06 12:46:52346};
347
[email protected]a23530d2014-03-11 06:04:14348const Experiment::Choice kEnableGpuRasterizationChoices[] = {
349 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
350 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
351 switches::kEnableGpuRasterization, "" },
352 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
353 switches::kDisableGpuRasterization, "" },
354 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
355 switches::kForceGpuRasterization, "" },
356};
357
[email protected]dc920d62013-12-13 22:12:47358// We're using independent flags here (as opposed to a common flag with
359// different values) to be able to enable/disable the entire experience
360// associated with this feature server-side from the FieldTrial (the complete
361// experience includes other flag changes as well). It is not currently possible
362// to do that with "flag=value" flags.
363const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
364 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
365 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
366 switches::kDisableSearchButtonInOmnibox, ""},
367 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
368 switches::kEnableSearchButtonInOmniboxForStr, ""},
369 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
370 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
371 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
372 switches::kEnableSearchButtonInOmniboxAlways, ""}
373};
374
[email protected]78dd09e2014-01-12 02:41:46375// See comment above for kSearchButtonInOmniboxChoices. The same reasoning
376// applies here.
377const Experiment::Choice kOriginChipChoices[] = {
378 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
379 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
[email protected]5d58f952014-05-20 21:12:47380 { IDS_FLAGS_ORIGIN_CHIP_ALWAYS, switches::kEnableOriginChipAlways, ""},
381 { IDS_FLAGS_ORIGIN_CHIP_ON_SRP, switches::kEnableOriginChipOnSrp, ""}
[email protected]7a54bf4b2014-02-06 19:21:54382};
[email protected]78dd09e2014-01-12 02:41:46383
[email protected]f42cffb2014-03-08 18:03:25384const Experiment::Choice kTouchScrollingModeChoices[] = {
385 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
386 { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL,
387 switches::kTouchScrollingMode,
388 switches::kTouchScrollingModeTouchcancel },
[email protected]372f52e2014-04-28 16:15:49389 { IDS_FLAGS_TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE,
[email protected]f42cffb2014-03-08 18:03:25390 switches::kTouchScrollingMode,
[email protected]372f52e2014-04-28 16:15:49391 switches::kTouchScrollingModeAsyncTouchmove },
[email protected]f42cffb2014-03-08 18:03:25392 { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE,
393 switches::kTouchScrollingMode,
394 switches::kTouchScrollingModeSyncTouchmove },
395};
396
[email protected]4734b902014-04-03 16:42:10397#if defined(ENABLE_APP_LIST)
398const Experiment::Choice kEnableSyncAppListChoices[] = {
399 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
400 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
401 app_list::switches::kEnableSyncAppList, "" },
402 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
403 app_list::switches::kDisableSyncAppList, "" },
404};
405#endif
406
[email protected]6f8ede32014-05-09 13:58:45407const Experiment::Choice kExtensionContentVerificationChoices[] = {
408 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
409 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP,
[email protected]8bb62162014-06-23 09:45:50410 switches::kExtensionContentVerification,
411 switches::kExtensionContentVerificationBootstrap },
[email protected]6f8ede32014-05-09 13:58:45412 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE,
[email protected]8bb62162014-06-23 09:45:50413 switches::kExtensionContentVerification,
414 switches::kExtensionContentVerificationEnforce },
[email protected]6f8ede32014-05-09 13:58:45415 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT,
[email protected]8bb62162014-06-23 09:45:50416 switches::kExtensionContentVerification,
417 switches::kExtensionContentVerificationEnforceStrict },
[email protected]6f8ede32014-05-09 13:58:45418};
419
[email protected]85f710c2014-06-20 17:29:11420#if defined(OS_ANDROID)
421const Experiment::Choice kAnswersInSuggestChoices[] = {
422 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
423 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
424 switches::kEnableAnswersInSuggest, ""},
425 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
426 switches::kDisableAnswersInSuggest, ""}
427};
428#endif
429
[email protected]3ecc6a12014-06-06 10:26:19430#if defined(OS_CHROMEOS)
431const Experiment::Choice kEnableFileManagerMTPChoices[] = {
432 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
433 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
434 chromeos::switches::kEnableFileManagerMTP, "true" },
435 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
436 chromeos::switches::kEnableFileManagerMTP, "false" }
437};
[email protected]3ecc6a12014-06-06 10:26:19438#endif
439
[email protected]aae79572014-06-13 00:42:58440const Experiment::Choice kEnableSettingsWindowChoices[] = {
441 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
442 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
443 ::switches::kEnableSettingsWindow, "" },
444 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
445 ::switches::kDisableSettingsWindow, "" },
446};
447
[email protected]c5bbe0e2014-08-01 23:23:30448// Note that the value is specified in seconds (where 0 is equivalent to
449// disabled).
450const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = {
451 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
452 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
453 switches::kRememberCertErrorDecisions,
454 "-1" },
455 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY,
456 switches::kRememberCertErrorDecisions,
457 "86400" },
458 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS,
459 switches::kRememberCertErrorDecisions,
460 "259200" },
461 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK,
462 switches::kRememberCertErrorDecisions,
463 "604800" },
464 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH,
465 switches::kRememberCertErrorDecisions,
466 "2592000" },
467 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS,
468 switches::kRememberCertErrorDecisions,
469 "7776000" },
470};
471
[email protected]bdbf5cb2014-08-07 23:38:08472const Experiment::Choice kEnableDropSyncCredentialChoices[] = {
473 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
474 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
475 password_manager::switches::kEnableDropSyncCredential, "" },
476 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
477 password_manager::switches::kDisableDropSyncCredential, "" },
478};
479
[email protected]469ea5c2014-08-12 20:00:56480#if defined(OS_MACOSX)
481const Experiment::Choice kEnableAVFoundationChoices[] = {
482 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
483 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""},
484 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""}
485};
486#endif
487
[email protected]524dd702014-08-16 00:00:45488const Experiment::Choice kAutofillSyncCredentialChoices[] = {
489 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
490 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL,
491 password_manager::switches::kAllowAutofillSyncCredential, ""},
492 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH,
493 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""},
494 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL,
495 password_manager::switches::kDisallowAutofillSyncCredential, ""},
496};
497
[email protected]4bc5050c2010-11-18 17:55:54498// RECORDING USER METRICS FOR FLAGS:
499// -----------------------------------------------------------------------------
500// The first line of the experiment is the internal name. If you'd like to
501// gather statistics about the usage of your flag, you should append a marker
502// comment to the end of the feature name, like so:
503// "my-special-feature", // FLAGS:RECORD_UMA
504//
[email protected]d8320fb62014-03-22 03:16:37505// After doing that, run
506// tools/metrics/actions/extract_actions.py
507// to add the metric to actions.xml (which will enable UMA to record your
508// feature flag), then update the <owner>s and <description> sections. Make sure
509// to include the actions.xml file when you upload your code for review!
[email protected]4bc5050c2010-11-18 17:55:54510//
[email protected]783d5bb2012-10-24 03:47:14511// After your feature has shipped under a flag, you can locate the metrics under
512// the action name AboutFlags_internal-action-name. Actions are recorded once
513// per startup, so you should divide this number by AboutFlags_StartupTick to
514// get a sense of usage. Note that this will not be the same as number of users
515// with a given feature enabled because users can quit and relaunch the
516// application multiple times over a given time interval. The dashboard also
517// shows you how many (metrics reporting) users have enabled the flag over the
518// last seven days. However, note that this is not the same as the number of
519// users who have the flag enabled, since enabling the flag happens once,
520// whereas running with the flag enabled happens until the user flips the flag
521// again.
[email protected]4bc5050c2010-11-18 17:55:54522
[email protected]8a6ff28d2010-12-02 16:35:19523// To add a new experiment add to the end of kExperiments. There are two
524// distinct types of experiments:
525// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
526// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22527// . MULTI_VALUE: a list of choices, the first of which should correspond to a
528// deactivated state for this lab (i.e. no command line option). To specify
529// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
530// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19531// See the documentation of Experiment for details on the fields.
532//
[email protected]4b66a7d2014-08-15 17:13:31533// Command-line switches must have entries in enum "LoginCustomFlags" in
534// histograms.xml. See note in histograms.xml and don't forget to run
535// AboutFlagsHistogramTest unit test to calculate and verify checksum.
536//
[email protected]8a6ff28d2010-12-02 16:35:19537// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05538const Experiment kExperiments[] = {
539 {
[email protected]96c6f4c2011-05-18 19:36:22540 "ignore-gpu-blacklist",
541 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
542 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
543 kOsAll,
544 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
545 },
546 {
[email protected]85603362014-04-21 16:18:14547 "disable_layer_squashing",
548 IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME,
549 IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION,
550 kOsAll,
551 SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing)
552 },
[email protected]5b7033fc2013-12-07 22:32:07553#if defined(OS_WIN)
554 {
[email protected]5b263b6a2014-06-09 21:47:34555 "disable-direct-write",
556 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME,
557 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION,
[email protected]5b7033fc2013-12-07 22:32:07558 kOsWin,
[email protected]5b263b6a2014-06-09 21:47:34559 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite)
[email protected]5b7033fc2013-12-07 22:32:07560 },
561#endif
[email protected]8b1c3c72013-01-25 01:48:43562 {
[email protected]2b608752013-05-01 03:34:36563 "enable-experimental-canvas-features",
564 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
565 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
566 kOsAll,
567 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
568 },
569 {
[email protected]81c64af62012-06-06 20:15:52570 "disable-accelerated-2d-canvas",
571 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
572 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
573 kOsAll,
574 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
575 },
576 {
[email protected]72d37352014-07-24 02:34:41577 "enable-display-list-2d-canvas",
578 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME,
579 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION,
580 kOsAll,
piotaixrbc9cd5f2014-08-26 22:24:14581 MULTI_VALUE_TYPE(kEnableDisplayList2DcanvasChoices)
[email protected]72d37352014-07-24 02:34:41582 },
583 {
[email protected]5963b772011-02-09 22:55:38584 "composited-layer-borders",
585 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
586 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
587 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57588 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38589 },
590 {
[email protected]a8f1eaa2011-03-07 19:00:58591 "show-fps-counter",
592 IDS_FLAGS_SHOW_FPS_COUNTER,
593 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
594 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57595 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58596 },
[email protected]8ff7f342011-05-25 01:49:47597 {
[email protected]deaba6d52011-09-23 14:47:12598 "disable-webgl",
599 IDS_FLAGS_DISABLE_WEBGL_NAME,
600 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28601 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12602 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
603 },
[email protected]09096e02012-05-24 11:12:04604 {
[email protected]ce585bf2013-03-14 16:25:16605 "disable-webrtc",
606 IDS_FLAGS_DISABLE_WEBRTC_NAME,
607 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05608 kOsAndroid,
609#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16610 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05611#else
612 SINGLE_VALUE_TYPE("")
613#endif
614 },
[email protected]5e2bc8c2013-05-28 22:59:57615#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30616 {
[email protected]fdf631e2013-09-13 09:06:07617 "disable-webrtc-hw-decoding",
618 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
619 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
[email protected]6442b022013-12-05 11:09:05620 kOsAndroid | kOsCrOS,
[email protected]fdf631e2013-09-13 09:06:07621 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
622 },
623 {
[email protected]96cbf422013-09-11 12:42:22624 "disable-webrtc-hw-encoding",
625 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
626 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
[email protected]6998f01f22013-12-04 09:27:57627 kOsAndroid | kOsCrOS,
[email protected]96cbf422013-09-11 12:42:22628 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
629 },
[email protected]5e2bc8c2013-05-28 22:59:57630#endif
[email protected]34cb5292013-04-15 06:06:31631#if defined(OS_ANDROID)
632 {
[email protected]7b8a31632013-06-13 22:42:37633 "disable-webaudio",
634 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
635 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31636 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37637 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31638 },
639#endif
[email protected]d9da9582013-01-31 04:59:05640 {
[email protected]d8221b22013-05-23 05:35:43641 "enable-compositing-for-transition",
642 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
643 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
644 kOsAll,
645 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
646 },
[email protected]d33d2222014-06-04 15:39:58647 // Native client is compiled out when DISABLE_NACL is defined.
648#if !defined(DISABLE_NACL)
[email protected]2fe15fcb2010-10-21 20:39:53649 {
[email protected]e3791ce92011-08-09 01:03:32650 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40651 IDS_FLAGS_ENABLE_NACL_NAME,
652 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]d33d2222014-06-04 15:39:58653 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19654 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40655 },
656 {
[email protected]9addd1c2012-09-15 14:28:24657 "enable-nacl-debug", // FLAGS:RECORD_UMA
658 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
659 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56660 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24661 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13662 },
663 {
[email protected]66f409c2012-10-04 20:59:04664 "nacl-debug-mask", // FLAGS:RECORD_UMA
665 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
666 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56667 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04668 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
669 },
[email protected]d33d2222014-06-04 15:39:58670#endif
[email protected]66f409c2012-10-04 20:59:04671 {
[email protected]4bc5050c2010-11-18 17:55:54672 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32673 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
674 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56675 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51676 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32677 },
[email protected]3627b06d2010-11-12 16:36:16678 {
[email protected]ac2e2acd2013-03-21 12:57:29679 "extensions-on-chrome-urls",
680 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
681 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
682 kOsAll,
[email protected]49d9b142013-07-19 08:50:27683 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29684 },
685 {
[email protected]88c92012013-07-02 11:56:34686 "enable-fast-unload",
687 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
688 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
689 kOsAll,
690 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
691 },
692 {
[email protected]1f4da9e2013-06-27 05:23:44693 "enable-app-window-controls",
694 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
695 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
696 kOsDesktop,
697 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
698 },
699 {
[email protected]80bd24e2010-11-30 09:34:38700 "disable-hyperlink-auditing",
701 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
702 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
703 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19704 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51705 },
[email protected]333bdc52013-07-16 00:37:04706#if defined(OS_ANDROID)
707 {
[email protected]26d1b4d2014-02-08 02:42:17708 "contextual-search",
709 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
710 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
711 kOsAndroid,
[email protected]41d32bb2014-05-30 08:26:05712 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch,
713 switches::kDisableContextualSearch)
[email protected]26d1b4d2014-02-08 02:42:17714 },
[email protected]333bdc52013-07-16 00:37:04715#endif
[email protected]8cc9e532013-05-06 21:01:47716 {
[email protected]3eb5728c2011-06-20 22:32:24717 "show-autofill-type-predictions",
718 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
719 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
720 kOsAll,
[email protected]e217c5632013-04-12 19:11:48721 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24722 },
[email protected]bff4d3e2011-06-21 23:58:52723 {
[email protected]a22ebd812011-06-23 00:05:39724 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
725 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
726 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
727 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40728 // On by default for the Mac (different implementation in WebKit).
[email protected]a5a5aaf2013-12-19 02:10:10729 kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39730 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
731 },
[email protected]54c8d282014-01-24 17:31:08732#if defined(USE_AURA) || defined(OS_LINUX)
[email protected]81a6b0b2011-06-24 17:55:40733 {
[email protected]54c8d282014-01-24 17:31:08734 "overlay-scrollbars",
[email protected]23eecbd02013-09-19 18:13:37735 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
736 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
737 // Uses the system preference on Mac (a different implementation).
738 // On Android, this is always enabled.
[email protected]54c8d282014-01-24 17:31:08739 kOsLinux | kOsCrOS | kOsWin,
740 MULTI_VALUE_TYPE(kOverlayScrollbarChoices)
[email protected]23eecbd02013-09-19 18:13:37741 },
[email protected]54c8d282014-01-24 17:31:08742#endif
[email protected]23eecbd02013-09-19 18:13:37743 {
[email protected]7e7a28092011-12-09 22:24:55744 "enable-panels",
745 IDS_FLAGS_ENABLE_PANELS_NAME,
746 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56747 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55748 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54749 },
[email protected]e3749d12011-07-25 22:22:12750 {
[email protected]27c14f02012-06-22 17:29:58751 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27752 "save-page-as-mhtml", // FLAGS:RECORD_UMA
753 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
754 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
755 kOsMac | kOsWin | kOsLinux,
756 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
757 },
758 {
[email protected]903e63382013-06-01 00:40:58759 "enable-quic",
760 IDS_FLAGS_ENABLE_QUIC_NAME,
761 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
762 kOsAll,
763 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
764 switches::kDisableQuic)
765 },
766 {
[email protected]d10833bc2014-04-14 17:50:46767 "enable-spdy4",
768 IDS_FLAGS_ENABLE_SPDY4_NAME,
769 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION,
[email protected]bca09b9982013-06-27 22:30:46770 kOsAll,
[email protected]d10833bc2014-04-14 17:50:46771 SINGLE_VALUE_TYPE(switches::kEnableSpdy4)
[email protected]88a332622013-07-30 07:13:32772 },
773 {
[email protected]27b3fe92012-03-21 05:35:06774 "enable-async-dns",
775 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
776 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46777 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44778 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
779 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06780 },
781 {
[email protected]c3a47f8d2014-04-15 14:39:28782 "disable-media-source",
783 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
784 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32785 kOsAll,
[email protected]c3a47f8d2014-04-15 14:39:28786 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]722b4d484f2013-10-08 20:33:59787 },
788 {
[email protected]16c242d2013-05-31 23:56:47789 "enable-encrypted-media",
790 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
791 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50792 kOsAll,
[email protected]16c242d2013-05-31 23:56:47793 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
794 },
795 {
[email protected]e76d92f2013-09-26 20:03:35796 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47797 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
798 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50799 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35800 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03801 },
[email protected]ce3934bb2013-09-10 02:02:56802#if defined(OS_ANDROID)
803 {
[email protected]3c56ec12013-09-25 02:03:42804 "disable-infobar-for-protected-media-identifier",
805 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
806 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
807 kOsAndroid,
808 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
809 },
810 {
[email protected]ce3934bb2013-09-10 02:02:56811 "mediadrm-enable-non-compositing",
812 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
813 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
814 kOsAndroid,
815 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
816 },
817#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06818 {
[email protected]bf88c032011-12-22 19:05:47819 "enable-javascript-harmony",
820 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
821 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
822 kOsAll,
823 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
824 },
[email protected]7e7f378a2012-01-05 14:35:37825 {
[email protected]88864db2012-01-18 20:56:35826 "disable-software-rasterizer",
827 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
828 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
829#if defined(ENABLE_SWIFTSHADER)
830 kOsAll,
831#else
832 0,
833#endif
834 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
835 },
[email protected]15a5d722012-01-23 09:11:14836 {
[email protected]d1ddf8c52014-02-06 22:09:31837 "enable-gpu-rasterization",
838 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
839 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
[email protected]96d25e22014-03-04 05:56:18840 kOsAndroid,
[email protected]a23530d2014-03-11 06:04:14841 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)
[email protected]d1ddf8c52014-02-06 22:09:31842 },
843 {
[email protected]c1b18ea2013-07-10 13:01:16844 "enable-experimental-web-platform-features",
845 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
846 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16847 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16848 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49849 },
850 {
[email protected]3e8befc2012-03-13 01:17:03851 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16852 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
853 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56854 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03855 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16856 },
[email protected]184ec592012-03-01 11:54:28857 {
[email protected]2b8290d2014-08-02 00:29:36858 "enable-material-design-ntp",
859 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_NAME,
860 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_DESCRIPTION,
861 kOsDesktop,
862 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignNTP,
863 switches::kDisableMaterialDesignNTP)
864 },
865 {
[email protected]184ec592012-03-01 11:54:28866 "enable-devtools-experiments",
867 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
868 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56869 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28870 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
871 },
[email protected]76d1854e2012-03-02 23:57:44872 {
[email protected]2fefdb32013-02-26 14:28:10873 "silent-debugger-extension-api",
874 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
875 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
876 kOsDesktop,
877 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
878 },
879 {
[email protected]1dbaf5e2012-11-30 05:51:32880 "spellcheck-autocorrect",
881 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
882 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
883 kOsWin | kOsLinux | kOsCrOS,
884 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
885 },
886 {
[email protected]e27137282013-06-20 02:38:35887 "enable-scroll-prediction",
888 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
889 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
890 kOsDesktop,
891 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
892 },
893 {
[email protected]d7932532012-11-21 21:10:31894 "touch-events",
895 IDS_TOUCH_EVENTS_NAME,
896 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56897 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31898 MULTI_VALUE_TYPE(kTouchEventsChoices)
899 },
900 {
[email protected]b9c96ff2012-11-26 22:24:40901 "disable-touch-adjustment",
902 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
903 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
904 kOsWin | kOsLinux | kOsCrOS,
905 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
906 },
[email protected]0b60afa2012-04-19 17:36:39907#if defined(OS_CHROMEOS)
908 {
[email protected]81f89e92014-02-21 14:27:35909 "network-portal-notification",
910 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME,
911 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION,
912 kOsCrOS,
913 ENABLE_DISABLE_VALUE_TYPE(
914 chromeos::switches::kEnableNetworkPortalNotification,
915 chromeos::switches::kDisableNetworkPortalNotification)
916 },
[email protected]0b60afa2012-04-19 17:36:39917#endif
[email protected]79be6d32012-04-24 20:47:44918 {
[email protected]8d68a3e02013-01-12 15:57:10919 "enable-download-resumption",
920 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
921 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56922 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10923 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
924 },
[email protected]67fe3642014-08-05 00:00:42925#if defined(ENABLE_PLUGINS)
[email protected]8d68a3e02013-01-12 15:57:10926 {
[email protected]9a5940d2012-04-27 19:16:23927 "allow-nacl-socket-api",
928 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
929 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56930 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23931 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
932 },
[email protected]d33d2222014-06-04 15:39:58933#endif
[email protected]34633be2014-06-26 09:05:59934#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
[email protected]85333732012-05-01 19:02:24935 {
[email protected]4bd20202012-06-14 17:35:01936 "force-device-scale-factor",
[email protected]34633be2014-06-26 09:05:59937 IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_NAME,
938 IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_DESCRIPTION,
939 kOsLinux | kOsWin | kOsCrOS,
940 MULTI_VALUE_TYPE(kDeviceScaleFactorChoices)
[email protected]85333732012-05-01 19:02:24941 },
[email protected]34633be2014-06-26 09:05:59942#endif
[email protected]190349fd2012-05-02 00:10:47943#if defined(OS_CHROMEOS)
944 {
945 "allow-touchpad-three-finger-click",
946 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
947 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
948 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24949 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47950 },
951#endif
[email protected]53520b1b2012-05-07 21:43:37952#if defined(USE_ASH)
953 {
[email protected]2ddf37b2013-04-20 01:15:58954 "disable-minimize-on-second-launcher-item-click",
955 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
956 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
957 kOsAll,
958 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
959 },
960 {
[email protected]73074742012-05-17 01:44:41961 "show-touch-hud",
962 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
963 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
964 kOsAll,
965 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
966 },
967 {
[email protected]9f0940b62012-05-23 22:56:35968 "enable-pinch",
969 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
970 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:06971 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:38972 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
973 },
[email protected]adcdcdd02014-04-25 03:30:24974#endif // defined(USE_ASH)
[email protected]e4cd82e2013-04-10 15:20:38975 {
[email protected]de0aaed2013-05-27 18:16:43976 "enable-pinch-virtual-viewport",
977 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
978 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
[email protected]fe89d822014-04-28 10:29:00979 kOsLinux | kOsWin | kOsCrOS | kOsAndroid,
980 ENABLE_DISABLE_VALUE_TYPE(
981 cc::switches::kEnablePinchVirtualViewport,
982 cc::switches::kDisablePinchVirtualViewport),
[email protected]de0aaed2013-05-27 18:16:43983 },
[email protected]68bc37c2014-01-07 15:56:48984 {
985 "enable-viewport-meta",
986 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
987 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
988 kOsLinux | kOsWin | kOsCrOS | kOsMac,
989 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
990 },
[email protected]ed7b67f32012-05-28 10:12:28991#if defined(OS_CHROMEOS)
992 {
[email protected]8b04a1652012-08-04 02:59:49993 "disable-boot-animation",
994 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
995 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58996 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:24997 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:49998 },
[email protected]95058572012-08-20 14:57:29999 {
[email protected]d739c1db2014-07-08 07:19:591000 "enable-video-player-chromecast-support",
1001 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME,
1002 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION,
1003 kOsCrOS,
1004 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport)
1005 },
1006 {
[email protected]f2ad22e2014-07-10 17:52:081007 "disable-office-editing-component-app",
1008 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME,
1009 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION,
[email protected]099b890c2013-04-25 19:16:261010 kOsCrOS,
[email protected]f2ad22e2014-07-10 17:52:081011 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp),
[email protected]099b890c2013-04-25 19:16:261012 },
[email protected]31cf1472013-09-13 00:36:421013 {
[email protected]bf3f4592014-03-31 19:50:441014 "disable-display-color-calibration",
1015 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME,
1016 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION,
1017 kOsCrOS,
1018 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration),
1019 },
[email protected]62018dc2012-12-13 00:37:351020#endif // defined(OS_CHROMEOS)
[email protected]7db8893a2012-07-26 00:49:401021 { "disable-accelerated-video-decode",
1022 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1023 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191024 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401025 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151026 },
[email protected]1d9bb9cd2012-08-28 22:02:501027#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:381028 {
1029 "ash-debug-shortcuts",
1030 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1031 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1032 kOsAll,
1033 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1034 },
[email protected]b19b09a2014-02-26 05:34:341035 { "ash-enable-touch-view-testing",
1036 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME,
1037 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION,
1038 kOsCrOS,
1039 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting),
1040 },
[email protected]88474872014-07-04 22:51:061041 { "ash-disable-text-filtering-in-overview-mode",
1042 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_NAME,
1043 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_DESCRIPTION,
1044 kOsCrOS,
1045 SINGLE_VALUE_TYPE(ash::switches::kAshDisableTextFilteringInOverviewMode),
1046 },
[email protected]1d9bb9cd2012-08-28 22:02:501047#endif
[email protected]9b7ab882012-09-10 23:46:361048#if defined(OS_CHROMEOS)
1049 {
[email protected]205f07892012-10-16 20:26:221050 "enable-carrier-switching",
1051 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1052 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1053 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241054 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221055 },
1056 {
[email protected]9b7ab882012-09-10 23:46:361057 "enable-request-tablet-site",
1058 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1059 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1060 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241061 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361062 },
1063#endif
[email protected]dab49c0b2012-10-04 05:55:351064 {
1065 "debug-packed-apps",
1066 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1067 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561068 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351069 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1070 },
[email protected]d1459ed2012-10-10 01:29:331071 {
1072 "enable-password-generation",
1073 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1074 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]d4855d32014-08-22 18:34:531075 kOsWin | kOsLinux | kOsCrOS | kOsMac,
[email protected]c3cc0632013-10-03 21:54:431076 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1077 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331078 },
[email protected]26d045f2012-10-18 21:18:431079 {
[email protected]0477c062014-04-30 15:02:181080 "enable-automatic-password-saving",
1081 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME,
1082 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION,
1083 kOsDesktop,
1084 SINGLE_VALUE_TYPE(
1085 password_manager::switches::kEnableAutomaticPasswordSaving)
1086 },
1087 {
[email protected]f2a394b2013-11-28 20:08:041088 "password-manager-reauthentication",
[email protected]429a6e02013-10-23 18:40:481089 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1090 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
[email protected]48293fb2013-12-04 04:02:031091 kOsMac | kOsWin,
[email protected]f2a394b2013-11-28 20:08:041092 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
[email protected]429a6e02013-10-23 18:40:481093 },
1094 {
[email protected]0f1f70852014-08-09 05:56:011095 "enable-android-password-link",
1096 IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_NAME,
1097 IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_DESCRIPTION,
1098 kOsAndroid,
1099 ENABLE_DISABLE_VALUE_TYPE(
1100 password_manager::switches::kEnableAndroidPasswordLink,
1101 password_manager::switches::kDisableAndroidPasswordLink)
1102 },
1103 {
[email protected]76f7d4882012-10-26 21:09:221104 "enable-deferred-image-decoding",
1105 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1106 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221107 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221108 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1109 },
1110 {
[email protected]075543d2012-10-24 01:29:141111 "performance-monitor-gathering",
1112 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1113 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1114 kOsAll,
1115 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1116 },
[email protected]783d5bb2012-10-24 03:47:141117 {
[email protected]45476982013-10-01 03:22:291118 "wallet-service-use-sandbox",
1119 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1120 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
[email protected]d4d59992014-06-04 23:48:071121 kOsAndroid | kOsDesktop,
[email protected]45476982013-10-01 03:22:291122 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1123 autofill::switches::kWalletServiceUseSandbox, "1",
1124 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541125 },
[email protected]177260c2013-04-24 01:47:381126#if defined(USE_AURA)
1127 {
1128 "overscroll-history-navigation",
1129 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1130 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1131 kOsAll,
[email protected]c38e9802014-02-18 21:32:121132 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices)
[email protected]177260c2013-04-24 01:47:381133 },
1134#endif
[email protected]edbea622012-11-28 20:39:381135 {
[email protected]888878e82013-07-24 22:49:401136 "scroll-end-effect",
1137 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1138 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1139 kOsCrOS,
1140 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1141 switches::kScrollEndEffect, "1",
1142 switches::kScrollEndEffect, "0")
1143 },
1144 {
[email protected]cc7c069d2014-08-07 20:42:051145 "enable-renderer-mojo-channel",
1146 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_NAME,
1147 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_DESCRIPTION,
1148 kOsAll,
1149 SINGLE_VALUE_TYPE(switches::kEnableRendererMojoChannel)
1150 },
1151 {
[email protected]edbea622012-11-28 20:39:381152 "enable-touch-drag-drop",
1153 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1154 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1155 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271156 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1157 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381158 },
[email protected]0e2f43b62013-02-21 00:47:151159 {
1160 "enable-touch-editing",
1161 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1162 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
[email protected]877dd942014-06-06 16:02:011163 kOsCrOS | kOsWin | kOsLinux,
[email protected]1400e6dc2013-04-27 02:36:271164 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1165 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151166 },
[email protected]92e12dd92012-12-11 03:33:201167 {
[email protected]06a82ff2014-04-25 02:24:461168 "enable-suggestions-service",
1169 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME,
1170 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION,
1171 kOsAndroid | kOsCrOS,
1172 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService,
1173 switches::kDisableSuggestionsService)
1174 },
1175 {
[email protected]ddec1aa2013-04-28 23:22:451176 "enable-sync-synced-notifications",
1177 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1178 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181179 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451180 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1181 switches::kDisableSyncSyncedNotifications)
1182 },
[email protected]630a27a2014-01-15 08:24:091183#if defined(ENABLE_APP_LIST)
1184 {
[email protected]4734b902014-04-03 16:42:101185 "enable-sync-app-list",
1186 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1187 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
[email protected]630a27a2014-01-15 08:24:091188 kOsDesktop,
[email protected]4734b902014-04-03 16:42:101189 MULTI_VALUE_TYPE(kEnableSyncAppListChoices)
[email protected]630a27a2014-01-15 08:24:091190 },
1191#endif
[email protected]d41cf1b2014-02-21 01:24:351192#if defined(OS_MACOSX)
1193 {
[email protected]0039b0be2014-03-12 20:24:111194 "enable-avfoundation",
1195 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME,
1196 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION,
[email protected]d41cf1b2014-02-21 01:24:351197 kOsMac,
[email protected]469ea5c2014-08-12 20:00:561198 MULTI_VALUE_TYPE(kEnableAVFoundationChoices)
[email protected]d41cf1b2014-02-21 01:24:351199 },
1200#endif
[email protected]5b93e162013-02-19 06:33:091201 {
[email protected]9323fdd12013-02-23 00:31:361202 "impl-side-painting",
1203 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1204 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521205 kOsAll,
[email protected]9323fdd12013-02-23 00:31:361206 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1207 },
[email protected]a42c85f2013-04-04 18:15:121208 {
[email protected]7621af22013-09-12 23:06:331209 "lcd-text-aa",
1210 IDS_FLAGS_LCD_TEXT_NAME,
1211 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1212 kOsDesktop,
1213 MULTI_VALUE_TYPE(kLCDTextChoices)
1214 },
[email protected]4ac579b2014-05-20 06:43:231215#if defined(OS_ANDROID) || defined(OS_MACOSX)
[email protected]7621af22013-09-12 23:06:331216 {
[email protected]0c04d1c2013-07-10 00:02:321217 "delegated-renderer",
1218 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1219 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
[email protected]4ac579b2014-05-20 06:43:231220 kOsAndroid, // TODO(ccameron) Add mac support soon.
[email protected]0c04d1c2013-07-10 00:02:321221 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1222 },
[email protected]758efb02014-04-05 07:53:451223#endif
[email protected]0c04d1c2013-07-10 00:02:321224 {
[email protected]a42c85f2013-04-04 18:15:121225 "max-tiles-for-interest-area",
1226 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1227 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521228 kOsAll,
[email protected]a42c85f2013-04-04 18:15:121229 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1230 },
[email protected]7cf7ccb2013-04-20 02:53:081231 {
[email protected]5676e7482013-12-17 08:05:371232 "enable-offline-auto-reload",
1233 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1234 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1235 kOsAll,
[email protected]bd519e32014-05-09 01:33:171236 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload,
1237 switches::kDisableOfflineAutoReload)
[email protected]5676e7482013-12-17 08:05:371238 },
1239 {
[email protected]d2e1a0a2014-06-16 15:49:371240 "enable-offline-auto-reload-visible-only",
1241 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME,
1242 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION,
1243 kOsAll,
1244 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly,
1245 switches::kDisableOfflineAutoReloadVisibleOnly)
1246 },
1247 {
[email protected]d8bc9132014-05-02 15:56:371248 "enable-offline-load-stale-cache",
1249 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME,
1250 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION,
1251 kOsLinux | kOsMac | kOsWin | kOsAndroid,
[email protected]e83140a02014-05-07 14:04:581252 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache,
1253 switches::kDisableOfflineLoadStaleCache)
[email protected]d8bc9132014-05-02 15:56:371254 },
1255 {
[email protected]a3618122013-04-26 21:15:341256 "default-tile-width",
1257 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1258 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1259 kOsAll,
1260 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1261 },
1262 {
1263 "default-tile-height",
1264 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1265 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1266 kOsAll,
1267 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1268 },
[email protected]2289b432014-08-08 17:52:111269#if defined(OS_ANDROID)
1270 {
1271 "disable-gesture-requirement-for-media-playback",
1272 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1273 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1274 kOsAndroid,
1275 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1276 },
1277#endif
[email protected]86459e2c2013-04-10 13:39:241278#if defined(OS_CHROMEOS)
1279 {
1280 "enable-virtual-keyboard",
1281 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1282 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1283 kOsCrOS,
1284 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1285 },
[email protected]8b4321e2013-10-25 01:16:181286 {
[email protected]bb6378fe2014-04-28 21:19:441287 "enable-virtual-keyboard-overscroll",
1288 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME,
1289 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION,
1290 kOsCrOS,
1291 ENABLE_DISABLE_VALUE_TYPE(
1292 keyboard::switches::kEnableVirtualKeyboardOverscroll,
1293 keyboard::switches::kDisableVirtualKeyboardOverscroll)
1294 },
1295 {
[email protected]8b4321e2013-10-25 01:16:181296 "enable-swipe-selection",
1297 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1298 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1299 kOsCrOS,
1300 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1301 },
[email protected]0e627fb12014-03-25 18:18:531302 {
1303 "enable-input-view",
1304 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME,
1305 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION,
1306 kOsCrOS,
1307 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView,
1308 keyboard::switches::kDisableInputView)
1309 },
[email protected]90933412014-06-05 21:11:021310 {
1311 "enable-experimental-input-view-features",
1312 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME,
1313 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION,
1314 kOsCrOS,
1315 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures)
1316 },
[email protected]86459e2c2013-04-10 13:39:241317#endif
[email protected]38484df12013-04-10 16:42:031318 {
1319 "enable-simple-cache-backend",
1320 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1321 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]957cd5a2014-03-27 19:54:171322 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]38484df12013-04-10 16:42:031323 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1324 },
[email protected]717e4e22013-04-10 20:52:231325 {
1326 "enable-tcp-fast-open",
1327 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1328 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111329 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231330 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1331 },
[email protected]2188c8d2014-03-21 00:58:561332#if defined(ENABLE_SERVICE_DISCOVERY)
[email protected]a4ed7e12013-05-24 01:00:281333 {
[email protected]d394d9762013-09-22 06:00:251334 "device-discovery-notifications",
1335 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1336 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191337 kOsDesktop,
[email protected]d394d9762013-09-22 06:00:251338 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1339 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551340 },
[email protected]53ffe0d2013-10-30 01:20:401341 {
[email protected]4e6c96e2014-05-17 18:41:191342 "enable-cloud-devices",
1343 IDS_FLAGS_ENABLE_CLOUD_DEVICES_NAME,
1344 IDS_FLAGS_ENABLE_CLOUD_DEVICES_DESCRIPTION,
1345 kOsDesktop,
1346 SINGLE_VALUE_TYPE(switches::kEnableCloudDevices)
1347 },
1348 {
[email protected]f0392392014-03-10 20:07:521349 "enable-print-preview-register-promos",
1350 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME,
1351 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191352 kOsDesktop,
[email protected]f0392392014-03-10 20:07:521353 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos)
1354 },
[email protected]2188c8d2014-03-21 00:58:561355#endif // ENABLE_SERVICE_DISCOVERY
[email protected]ca53b142014-02-25 22:42:231356#if defined(OS_WIN)
1357 {
1358 "enable-cloud-print-xps",
1359 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME,
1360 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION,
1361 kOsWin,
1362 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)
1363 },
1364#endif
[email protected]56d3c6e42013-05-29 11:28:011365#if defined(OS_MACOSX)
1366 {
[email protected]67604442013-06-15 00:04:331367 "enable-simplified-fullscreen",
1368 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1369 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1370 kOsMac,
1371 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1372 },
[email protected]56d3c6e42013-05-29 11:28:011373#endif
[email protected]910ecfe2013-06-03 23:38:141374#if defined(USE_AURA)
1375 {
1376 "tab-capture-upscale-quality",
1377 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1378 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1379 kOsAll,
1380 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1381 },
1382 {
1383 "tab-capture-downscale-quality",
1384 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1385 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1386 kOsAll,
1387 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1388 },
1389#endif
[email protected]71d4f602013-06-04 23:21:101390 {
[email protected]ba7993d2013-11-26 23:44:561391 "enable-spelling-feedback-field-trial",
1392 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1393 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
[email protected]5e099c62013-06-08 05:46:231394 kOsAll,
[email protected]ba7993d2013-11-26 23:44:561395 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
[email protected]5e099c62013-06-08 05:46:231396 },
1397 {
[email protected]71d4f602013-06-04 23:21:101398 "enable-webgl-draft-extensions",
1399 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1400 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1401 kOsAll,
1402 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1403 },
[email protected]deadc492013-06-07 21:39:281404 {
[email protected]bc1697a82013-06-27 15:48:311405 "enable-web-midi",
1406 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1407 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
[email protected]28e56e92014-01-03 07:52:391408 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
[email protected]bc1697a82013-06-27 15:48:311409 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1410 },
[email protected]020df792013-06-29 14:26:211411 {
1412 "enable-new-profile-management",
1413 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1414 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
[email protected]a3b75bd2014-05-28 17:49:421415 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531416 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement,
1417 switches::kDisableNewProfileManagement)
[email protected]020df792013-06-29 14:26:211418 },
1419 {
[email protected]1017a3212014-05-30 10:34:591420 "enable-account-consistency",
1421 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME,
1422 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION,
1423 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531424 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency,
1425 switches::kDisableAccountConsistency)
[email protected]1017a3212014-05-30 10:34:591426 },
1427 {
[email protected]8f569882014-03-25 21:12:121428 "enable-fast-user-switching",
1429 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME,
1430 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION,
1431 kOsMac | kOsWin | kOsLinux,
1432 SINGLE_VALUE_TYPE(switches::kFastUserSwitching)
1433 },
1434 {
[email protected]274171e2014-04-11 23:10:081435 "enable-new-avatar-menu",
1436 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME,
1437 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION,
1438 kOsMac | kOsWin | kOsLinux,
[email protected]9152a542014-08-06 05:37:451439 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu,
1440 switches::kDisableNewAvatarMenu)
[email protected]274171e2014-04-11 23:10:081441 },
1442 {
[email protected]85777bc2013-12-23 00:07:061443 "enable-web-based-signin",
1444 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1445 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
[email protected]2d279f72013-10-21 23:10:161446 kOsMac | kOsWin | kOsLinux,
[email protected]85777bc2013-12-23 00:07:061447 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
[email protected]2d279f72013-10-21 23:10:161448 },
1449 {
[email protected]115d5728c2013-10-23 18:06:141450 "enable-google-profile-info",
1451 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1452 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221453 kOsMac | kOsWin | kOsLinux,
[email protected]115d5728c2013-10-23 18:06:141454 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
[email protected]020df792013-06-29 14:26:211455 },
[email protected]dcf6cf32013-07-03 10:53:281456 {
[email protected]056ed7092014-01-09 12:57:211457 "reset-app-list-install-state",
[email protected]a85aa332013-10-22 11:09:591458 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1459 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
[email protected]7199367d2014-01-20 04:06:211460 kOsMac | kOsWin | kOsLinux,
[email protected]a85aa332013-10-22 11:09:591461 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
[email protected]dcf6cf32013-07-03 10:53:281462 },
[email protected]919b2f82013-10-04 03:11:261463#if defined(ENABLE_APP_LIST)
[email protected]7199367d2014-01-20 04:06:211464#if defined(OS_LINUX)
1465 {
1466 // This is compiled out on non-Linux platforms because otherwise it would be
1467 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1468 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1469 "enable-app-list",
1470 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1471 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1472 kOsLinux,
1473 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1474 },
1475#endif
[email protected]fe2b77f62013-11-09 04:30:511476 {
[email protected]97df3be2014-07-03 07:49:101477 "enable-app-view",
1478 IDS_FLAGS_ENABLE_APP_VIEW_NAME,
1479 IDS_FLAGS_ENABLE_APP_VIEW_DESCRIPTION,
fsamuelbb30da92014-08-27 21:20:291480 kOsDesktop,
[email protected]b4ef1212014-08-21 18:31:261481 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppView)
[email protected]97df3be2014-07-03 07:49:101482 },
1483 {
[email protected]9e0a44c2014-06-07 14:26:211484 "disable-app-list-app-info",
1485 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST,
1486 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1487 kOsLinux | kOsWin | kOsCrOS,
1488 SINGLE_VALUE_TYPE(app_list::switches::kDisableAppInfo)
1489 },
1490 {
[email protected]c30bda262014-06-19 04:10:131491 "enable-drive-apps-in-app-list",
1492 IDS_FLAGS_ENABLE_DRIVE_APPS_IN_APP_LIST_NAME,
1493 IDS_FLAGS_ENABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION,
1494 kOsDesktop,
1495 SINGLE_VALUE_TYPE(app_list::switches::kEnableDriveAppsInAppList)
1496 },
[email protected]919b2f82013-10-04 03:11:261497#endif
[email protected]0e38c3252013-08-14 22:18:511498#if defined(OS_ANDROID)
1499 {
1500 "enable-accessibility-tab-switcher",
1501 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1502 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1503 kOsAndroid,
1504 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561505 },
[email protected]738384172013-12-05 01:59:561506 {
[email protected]0e174722014-03-31 21:23:271507 // TODO(dmazzoni): remove this flag when native android accessibility
1508 // ships in the stable channel. http://crbug.com/356775
1509 "enable-accessibility-script-injection",
1510 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1511 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
[email protected]738384172013-12-05 01:59:561512 kOsAndroid,
[email protected]0e174722014-03-31 21:23:271513 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1514 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
[email protected]738384172013-12-05 01:59:561515 },
[email protected]0e38c3252013-08-14 22:18:511516#endif
[email protected]2e9d79f2013-08-16 05:45:561517 {
[email protected]2cccfef2014-05-01 06:05:161518 "enable-one-copy",
1519 IDS_FLAGS_ONE_COPY_NAME,
1520 IDS_FLAGS_ONE_COPY_DESCRIPTION,
[email protected]be2e40a2013-08-27 02:49:201521 kOsAll,
[email protected]2cccfef2014-05-01 06:05:161522 SINGLE_VALUE_TYPE(switches::kEnableOneCopy)
1523 },
1524 {
1525 "enable-zero-copy",
1526 IDS_FLAGS_ZERO_COPY_NAME,
1527 IDS_FLAGS_ZERO_COPY_DESCRIPTION,
1528 kOsAll,
1529 MULTI_VALUE_TYPE(kZeroCopyChoices)
[email protected]4fdc518f2013-08-28 21:37:271530 },
[email protected]bbb4beae2013-09-27 17:20:311531#if defined(OS_CHROMEOS)
1532 {
[email protected]407d82b2013-12-13 11:50:591533 "enable-first-run-ui-transitions",
1534 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1535 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1536 kOsCrOS,
1537 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1538 },
[email protected]bbb4beae2013-09-27 17:20:311539#endif
[email protected]ed1aab12013-10-08 14:27:071540 {
[email protected]f95e6df2013-10-11 13:05:171541 "enable-streamlined-hosted-apps",
1542 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1543 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
[email protected]abe7f8722013-12-13 11:38:061544 kOsWin | kOsCrOS | kOsLinux,
[email protected]f95e6df2013-10-11 13:05:171545 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1546 },
[email protected]a0ef5212013-10-15 18:08:261547 {
[email protected]912576e2013-10-21 10:33:131548 "enable-ephemeral-apps",
1549 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1550 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201551 kOsAll,
[email protected]912576e2013-10-21 10:33:131552 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1553 },
1554 {
[email protected]5ec67052013-12-19 05:40:211555 "enable-linkable-ephemeral-apps",
1556 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1557 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201558 kOsAll,
[email protected]5ec67052013-12-19 05:40:211559 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1560 },
1561 {
[email protected]7d8056d2014-04-14 15:55:211562 "enable-service-worker-sync",
1563 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME,
1564 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION,
1565 kOsAll,
1566 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync)
1567 },
[email protected]dfb66c522013-10-22 19:46:321568#if defined(OS_ANDROID)
1569 {
1570 "disable-click-delay",
1571 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1572 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1573 kOsAndroid,
1574 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1575 SINGLE_VALUE_TYPE("disable-click-delay")
1576 },
1577#endif
[email protected]5a606592014-01-31 10:32:311578#if defined(OS_MACOSX)
[email protected]c2c84ab2013-11-18 03:05:091579 {
1580 "enable-translate-new-ux",
1581 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1582 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
[email protected]5a606592014-01-31 10:32:311583 kOsMac,
[email protected]c2c84ab2013-11-18 03:05:091584 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1585 },
[email protected]5a606592014-01-31 10:32:311586#endif
[email protected]c4f51d22013-11-05 03:11:261587#if defined(TOOLKIT_VIEWS)
1588 {
[email protected]88b47ad72013-11-21 03:34:381589 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1590 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1591 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
[email protected]42f5fe542014-07-25 17:59:331592 kOsCrOS | kOsWin | kOsLinux,
[email protected]88b47ad72013-11-21 03:34:381593 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
[email protected]c4f51d22013-11-05 03:11:261594 },
1595#endif
[email protected]9f268072013-11-07 00:02:151596 {
1597 "enable-apps-show-on-first-paint",
1598 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1599 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1600 kOsDesktop,
[email protected]6fa202452014-08-19 05:34:071601 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint)
[email protected]9f268072013-11-07 00:02:151602 },
[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,
1607 kOsDesktop,
[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,
1616 kOsDesktop,
1617 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,
1623 kOsDesktop,
1624 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 {
[email protected]b785898a2014-02-05 06:54:431664 "disable-ignore-autocomplete-off",
1665 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1666 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
[email protected]58bc1c32013-12-16 22:52:071667 kOsAll,
[email protected]b785898a2014-02-05 06:54:431668 SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff)
[email protected]7cffac72013-12-20 20:21:501669 },
[email protected]7cffac72013-12-20 20:21:501670 {
[email protected]24ad58782014-01-23 23:43:451671 "enable-permissions-bubbles",
1672 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1673 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
[email protected]4e6d54a2014-06-27 14:32:121674 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]7d198222014-06-17 08:24:221675 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles,
1676 switches::kDisablePermissionsBubbles)
[email protected]24ad58782014-01-23 23:43:451677 },
[email protected]4d11b08b2014-01-27 22:19:071678 {
[email protected]546d8d32014-04-30 15:40:461679 "enable-session-crashed-bubble",
1680 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME,
1681 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION,
1682 kOsWin | kOsLinux,
[email protected]3d990b72014-05-27 21:16:131683 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble,
1684 switches::kDisableSessionCrashedBubble)
[email protected]546d8d32014-04-30 15:40:461685 },
1686 {
[email protected]1231adf2014-01-31 02:22:331687 "out-of-process-pdf",
1688 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1689 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1690 kOsDesktop,
1691 SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf)
1692 },
[email protected]181624c2014-02-04 17:03:341693#if defined(OS_ANDROID)
1694 {
[email protected]276bdfa52014-02-24 14:03:091695 "disable-cast",
1696 IDS_FLAGS_DISABLE_CAST_NAME,
1697 IDS_FLAGS_DISABLE_CAST_DESCRIPTION,
[email protected]30a8cec92014-02-24 10:09:091698 kOsAndroid,
[email protected]276bdfa52014-02-24 14:03:091699 SINGLE_VALUE_TYPE(switches::kDisableCast)
[email protected]30a8cec92014-02-24 10:09:091700 },
[email protected]99af9382014-02-12 09:02:551701 {
1702 "prefetch-search-results",
1703 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1704 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
[email protected]8ca7e09c2014-06-17 18:42:031705 kOsAndroid,
[email protected]99af9382014-02-12 09:02:551706 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
1707 },
[email protected]8ca7e09c2014-06-17 18:42:031708#endif
[email protected]9bd76572014-02-17 05:17:311709#if defined(ENABLE_APP_LIST)
1710 {
1711 "enable-experimental-app-list",
1712 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1713 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1714 kOsWin | kOsLinux | kOsCrOS,
1715 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList)
1716 },
[email protected]b18d51182014-03-13 10:38:271717 {
[email protected]61bce6992014-05-02 17:35:571718 "enable-centered-app-list",
1719 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME,
1720 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION,
[email protected]b18d51182014-03-13 10:38:271721 kOsWin | kOsLinux | kOsCrOS,
[email protected]61bce6992014-05-02 17:35:571722 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList)
[email protected]b18d51182014-03-13 10:38:271723 },
[email protected]9bd76572014-02-17 05:17:311724#endif
[email protected]f42cffb2014-03-08 18:03:251725 {
1726 "touch-scrolling-mode",
1727 IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME,
1728 IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION,
1729 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1730 MULTI_VALUE_TYPE(kTouchScrollingModeChoices)
1731 },
[email protected]67c5a212014-03-17 12:28:001732 {
1733 "bleeding-edge-renderer-mode",
1734 IDS_FLAGS_BLEEDING_RENDERER_NAME,
1735 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION,
[email protected]a8a97512014-03-24 18:28:201736 kOsAndroid,
[email protected]67c5a212014-03-17 12:28:001737 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths)
1738 },
[email protected]8a585cb2014-03-21 17:13:521739 {
1740 "enable-settings-window",
1741 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME,
1742 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION,
1743 kOsDesktop,
[email protected]aae79572014-06-13 00:42:581744 MULTI_VALUE_TYPE(kEnableSettingsWindowChoices)
[email protected]8a585cb2014-03-21 17:13:521745 },
[email protected]812b82a2014-05-15 19:01:381746#if defined(OS_ANDROID)
1747 {
1748 "enable-instant-search-clicks",
1749 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME,
1750 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION,
1751 kOsAndroid,
1752 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks)
1753 },
1754#endif
[email protected]4dffb662014-03-31 11:31:221755 {
1756 "enable-save-password-bubble",
1757 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME,
1758 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION,
dconnelly35f985b32014-08-29 10:40:551759 kOsWin | kOsLinux | kOsCrOS | kOsMac,
[email protected]ea61c082014-04-07 16:57:241760 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble,
1761 switches::kDisableSavePasswordBubble)
[email protected]9804dad9102014-04-01 09:34:181762 },
[email protected]6279f292014-04-16 16:59:561763#if defined(OS_CHROMEOS)
1764 {
1765 "enable-filemanager-mtp",
1766 IDS_FLAGS_ENABLE_FILE_MANAGER_MTP_NAME,
1767 IDS_FLAGS_ENABLE_FILE_MANAGER_MTP_DESCRIPTION,
1768 kOsCrOS,
[email protected]3ecc6a12014-06-06 10:26:191769 MULTI_VALUE_TYPE(kEnableFileManagerMTPChoices)
[email protected]6279f292014-04-16 16:59:561770 },
1771#endif
[email protected]7fe71f02014-04-26 00:47:561772 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1773 // crbug.com/366483 for the target milestone.
1774 {
1775 "allow-insecure-websocket-from-https-origin",
1776 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME,
1777 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION,
1778 kOsAll,
1779 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin)
1780 },
[email protected]64505f72014-04-29 11:07:521781 {
1782 "enable-apps-file-associations",
1783 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME,
1784 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION,
1785 kOsMac,
1786 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations)
1787 },
[email protected]0443e082014-04-30 04:52:501788#if defined(OS_ANDROID)
1789 {
1790 "enable-embeddedsearch-api",
1791 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME,
1792 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION,
1793 kOsAndroid,
1794 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI)
1795 },
[email protected]1d1349292014-05-02 05:22:331796 {
1797 "enable-app-install-alerts",
1798 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME,
1799 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION,
1800 kOsAndroid,
1801 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts)
1802 },
[email protected]0443e082014-04-30 04:52:501803#endif
[email protected]b242b142014-05-07 14:48:491804 {
1805 "distance-field-text",
1806 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME,
1807 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION,
1808 kOsAll,
1809 MULTI_VALUE_TYPE(kDistanceFieldTextChoices)
1810 },
[email protected]6f8ede32014-05-09 13:58:451811 {
1812 "extension-content-verification",
1813 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME,
1814 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION,
1815 kOsDesktop,
1816 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices)
1817 },
[email protected]8f374ce2014-05-08 23:51:521818#if defined(USE_AURA)
1819 {
1820 "text-input-focus-manager",
1821 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME,
1822 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION,
1823 kOsCrOS | kOsLinux | kOsWin,
1824 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager,
1825 switches::kDisableTextInputFocusManager)
1826 },
1827#endif
[email protected]98585412014-05-13 19:01:371828 {
1829 "extension-active-script-permission",
1830 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME,
1831 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION,
1832 kOsAll,
1833 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction)
1834 },
[email protected]52848022014-05-22 19:01:071835 {
[email protected]e79cec22014-07-26 16:20:291836 "harfbuzz-rendertext",
1837 IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME,
1838 IDS_FLAGS_HARFBUZZ_RENDERTEXT_DESCRIPTION,
[email protected]52848022014-05-22 19:01:071839 kOsDesktop,
[email protected]e79cec22014-07-26 16:20:291840 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText,
1841 switches::kDisableHarfBuzzRenderText)
[email protected]52848022014-05-22 19:01:071842 },
[email protected]1c790df2014-06-03 22:51:121843#if defined(OS_ANDROID)
1844 {
[email protected]85f710c2014-06-20 17:29:111845 "answers-in-suggest",
[email protected]1c790df2014-06-03 22:51:121846 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME,
1847 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION,
1848 kOsAndroid,
[email protected]85f710c2014-06-20 17:29:111849 MULTI_VALUE_TYPE(kAnswersInSuggestChoices)
[email protected]1c790df2014-06-03 22:51:121850 },
1851#endif
[email protected]3dfb4012014-06-11 07:33:381852#if defined(OS_ANDROID)
1853 {
1854 "enable-data-reduction-proxy-dev",
1855 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME,
1856 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION,
1857 kOsAndroid,
1858 ENABLE_DISABLE_VALUE_TYPE(
1859 data_reduction_proxy::switches::kEnableDataReductionProxyDev,
1860 data_reduction_proxy::switches::kDisableDataReductionProxyDev)
1861 },
1862#endif
[email protected]48e67ee72014-07-01 06:53:431863 {
[email protected]49b05f82014-08-11 09:16:521864 "enable-experimental-hotwording",
1865 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_NAME,
1866 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION,
1867 kOsDesktop,
1868 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording)
[email protected]48e67ee72014-07-01 06:53:431869 },
[email protected]409d9202014-07-08 01:32:411870 {
1871 "enable-embedded-extension-options",
1872 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME,
1873 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION,
1874 kOsDesktop,
1875 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions)
1876 },
[email protected]3ba3eb712014-07-16 07:47:191877 {
1878 "enable-website-settings-manager",
1879 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME,
1880 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION,
1881 kOsDesktop,
1882 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager)
1883 },
[email protected]c5bbe0e2014-08-01 23:23:301884 {
1885 "remember-cert-error-decisions",
1886 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME,
1887 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION,
1888 kOsAll,
1889 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices)
1890 },
[email protected]bdbf5cb2014-08-07 23:38:081891 {
1892 "enable-drop-sync-credential",
1893 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME,
1894 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION,
1895 kOsAll,
1896 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices)
[email protected]2f0b7e0f2014-08-15 02:18:231897 },
1898 {
1899 "enable-extension-action-redesign",
1900 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME,
1901 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION,
1902 kOsWin | kOsLinux | kOsCrOS,
1903 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign)
1904 },
[email protected]524dd702014-08-16 00:00:451905 {
1906 "autofill-sync-credential",
1907 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME,
1908 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION,
1909 kOsAll,
1910 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices)
1911 },
juyika7be5192014-08-26 23:01:041912#if !defined(OS_ANDROID)
1913 {
1914 "enable-message-center-always-scroll-up-upon-notification-removal",
1915 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME,
1916 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION,
1917 kOsDesktop,
1918 SINGLE_VALUE_TYPE(
1919 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)
1920 },
1921#endif
[email protected]4b66a7d2014-08-15 17:13:311922 // NOTE: Adding new command-line switches requires adding corresponding
1923 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
1924 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
[email protected]a0e4b072011-08-17 01:47:071925};
[email protected]ad2a3ded2010-08-27 13:19:051926
[email protected]a314ee5a2010-10-26 21:23:281927const Experiment* experiments = kExperiments;
1928size_t num_experiments = arraysize(kExperiments);
1929
[email protected]e2ddbc92010-10-15 20:02:071930// Stores and encapsulates the little state that about:flags has.
1931class FlagsState {
1932 public:
1933 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401934 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211935 CommandLine* command_line,
1936 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:071937 bool IsRestartNeededToCommitChanges();
1938 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401939 FlagsStorage* flags_storage,
1940 const std::string& internal_name,
1941 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071942 void RemoveFlagsSwitches(
1943 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401944 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071945 void reset();
1946
1947 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551948 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071949 return Singleton<FlagsState>::get();
1950 }
1951
1952 private:
1953 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531954 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071955
1956 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1957};
1958
[email protected]8a6ff28d2010-12-02 16:35:191959// Adds the internal names for the specified experiment to |names|.
1960void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1961 if (e.type == Experiment::SINGLE_VALUE) {
1962 names->insert(e.internal_name);
1963 } else {
[email protected]83e9fa702013-02-25 19:30:441964 DCHECK(e.type == Experiment::MULTI_VALUE ||
1965 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191966 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441967 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191968 }
1969}
1970
[email protected]28e35af2011-02-09 12:56:221971// Confirms that an experiment is valid, used in a DCHECK in
1972// SanitizeList below.
1973bool ValidateExperiment(const Experiment& e) {
1974 switch (e.type) {
1975 case Experiment::SINGLE_VALUE:
1976 DCHECK_EQ(0, e.num_choices);
1977 DCHECK(!e.choices);
1978 break;
1979 case Experiment::MULTI_VALUE:
1980 DCHECK_GT(e.num_choices, 0);
1981 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531982 DCHECK(e.choices[0].command_line_switch);
1983 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221984 break;
[email protected]83e9fa702013-02-25 19:30:441985 case Experiment::ENABLE_DISABLE_VALUE:
1986 DCHECK_EQ(3, e.num_choices);
1987 DCHECK(!e.choices);
1988 DCHECK(e.command_line_switch);
1989 DCHECK(e.command_line_value);
1990 DCHECK(e.disable_command_line_switch);
1991 DCHECK(e.disable_command_line_value);
1992 break;
[email protected]28e35af2011-02-09 12:56:221993 default:
1994 NOTREACHED();
1995 }
1996 return true;
1997}
1998
[email protected]ad2a3ded2010-08-27 13:19:051999// Removes all experiments from prefs::kEnabledLabsExperiments that are
2000// unknown, to prevent this list to become very long as experiments are added
2001// and removed.
[email protected]e6d1c4f2013-06-12 17:37:402002void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:052003 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:222004 for (size_t i = 0; i < num_experiments; ++i) {
2005 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:192006 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:222007 }
[email protected]ad2a3ded2010-08-27 13:19:052008
[email protected]07d666d2013-07-21 23:56:262009 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052010
[email protected]09f3fde82014-05-14 15:08:152011 std::set<std::string> new_enabled_experiments =
2012 base::STLSetIntersection<std::set<std::string> >(
2013 known_experiments, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052014
[email protected]07d666d2013-07-21 23:56:262015 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:402016 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052017}
2018
[email protected]1a47d7e2010-10-15 00:37:242019void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:402020 FlagsStorage* flags_storage, std::set<std::string>* result) {
2021 SanitizeList(flags_storage);
2022 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052023}
2024
[email protected]12271632013-11-26 03:06:392025bool SkipConditionalExperiment(const Experiment& experiment) {
[email protected]4d7552f2014-03-04 04:53:332026 if (experiment.internal_name ==
2027 std::string("enhanced-bookmarks-experiment")) {
2028 CommandLine* command_line = CommandLine::ForCurrentProcess();
2029 // Dont't skip experiment if it has non default value.
2030 // It means user selected it.
2031 if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment))
2032 return false;
2033
[email protected]11534552013-12-05 02:09:302034 return !IsEnhancedBookmarksExperimentEnabled();
[email protected]12271632013-11-26 03:06:392035 }
[email protected]cb13d462014-03-14 21:38:582036 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) ||
2037 (experiment.internal_name ==
2038 std::string("manual-enhanced-bookmarks-optout"))) {
2039 return true;
2040 }
[email protected]4d7552f2014-03-04 04:53:332041
[email protected]3dfb4012014-06-11 07:33:382042#if defined(OS_ANDROID)
2043 // enable-data-reduction-proxy-dev is only available for the Dev channel.
2044 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
2045 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2046 return true;
2047 }
2048#endif
2049
[email protected]12271632013-11-26 03:06:392050 return false;
2051}
2052
2053
[email protected]a314ee5a2010-10-26 21:23:282054// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2055// enabled on the current platform.
2056void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:402057 FlagsStorage* flags_storage, std::set<std::string>* result) {
2058 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:282059
2060 // Filter out any experiments that aren't enabled on the current platform. We
2061 // don't remove these from prefs else syncing to a platform with a different
2062 // set of experiments would be lossy.
2063 std::set<std::string> platform_experiments;
2064 int current_platform = GetCurrentPlatform();
2065 for (size_t i = 0; i < num_experiments; ++i) {
2066 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:192067 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:582068#if defined(OS_CHROMEOS)
2069 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2070 AddInternalName(experiments[i], &platform_experiments);
2071#endif
[email protected]a314ee5a2010-10-26 21:23:282072 }
2073
[email protected]09f3fde82014-05-14 15:08:152074 std::set<std::string> new_enabled_experiments =
2075 base::STLSetIntersection<std::set<std::string> >(
2076 platform_experiments, *result);
[email protected]a314ee5a2010-10-26 21:23:282077
2078 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052079}
2080
[email protected]8a6ff28d2010-12-02 16:35:192081// Returns the Value representing the choice data in the specified experiment.
[email protected]5bcdd99d2013-12-23 18:28:302082base::Value* CreateChoiceData(
2083 const Experiment& experiment,
2084 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:442085 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2086 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]5bcdd99d2013-12-23 18:28:302087 base::ListValue* result = new base::ListValue;
[email protected]8a6ff28d2010-12-02 16:35:192088 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]5bcdd99d2013-12-23 18:28:302089 base::DictionaryValue* value = new base::DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:442090 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192091 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:442092 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:222093 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192094 result->Append(value);
2095 }
2096 return result;
2097}
2098
[email protected]e2ddbc92010-10-15 20:02:072099} // namespace
2100
[email protected]83e9fa702013-02-25 19:30:442101std::string Experiment::NameForChoice(int index) const {
2102 DCHECK(type == Experiment::MULTI_VALUE ||
2103 type == Experiment::ENABLE_DISABLE_VALUE);
2104 DCHECK_LT(index, num_choices);
2105 return std::string(internal_name) + testing::kMultiSeparator +
2106 base::IntToString(index);
2107}
2108
[email protected]96920152013-12-04 21:00:162109base::string16 Experiment::DescriptionForChoice(int index) const {
[email protected]83e9fa702013-02-25 19:30:442110 DCHECK(type == Experiment::MULTI_VALUE ||
2111 type == Experiment::ENABLE_DISABLE_VALUE);
2112 DCHECK_LT(index, num_choices);
2113 int description_id;
2114 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2115 const int kEnableDisableDescriptionIds[] = {
2116 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2117 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2118 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2119 };
2120 description_id = kEnableDisableDescriptionIds[index];
2121 } else {
2122 description_id = choices[index].description_id;
2123 }
2124 return l10n_util::GetStringUTF16(description_id);
2125}
2126
[email protected]e6d1c4f2013-06-12 17:37:402127void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212128 CommandLine* command_line,
2129 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:402130 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:212131 command_line,
2132 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:052133}
2134
[email protected]6d98abf2013-06-17 23:35:512135bool AreSwitchesIdenticalToCurrentCommandLine(
[email protected]4b66a7d2014-08-15 17:13:312136 const CommandLine& new_cmdline,
2137 const CommandLine& active_cmdline,
2138 std::set<CommandLine::StringType>* out_difference) {
[email protected]6d98abf2013-06-17 23:35:512139 std::set<CommandLine::StringType> new_flags =
2140 ExtractFlagsFromCommandLine(new_cmdline);
2141 std::set<CommandLine::StringType> active_flags =
2142 ExtractFlagsFromCommandLine(active_cmdline);
2143
[email protected]4b66a7d2014-08-15 17:13:312144 bool result = false;
[email protected]6d98abf2013-06-17 23:35:512145 // Needed because std::equal doesn't check if the 2nd set is empty.
[email protected]4b66a7d2014-08-15 17:13:312146 if (new_flags.size() == active_flags.size()) {
2147 result =
2148 std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2149 }
[email protected]6d98abf2013-06-17 23:35:512150
[email protected]4b66a7d2014-08-15 17:13:312151 if (out_difference && !result) {
2152 std::set_symmetric_difference(
2153 new_flags.begin(),
2154 new_flags.end(),
2155 active_flags.begin(),
2156 active_flags.end(),
2157 std::inserter(*out_difference, out_difference->begin()));
2158 }
2159
2160 return result;
[email protected]6d98abf2013-06-17 23:35:512161}
2162
[email protected]e6d1c4f2013-06-12 17:37:402163void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:522164 FlagAccess access,
2165 base::ListValue* supported_experiments,
2166 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:052167 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402168 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052169
2170 int current_platform = GetCurrentPlatform();
2171
[email protected]a314ee5a2010-10-26 21:23:282172 for (size_t i = 0; i < num_experiments; ++i) {
2173 const Experiment& experiment = experiments[i];
[email protected]12271632013-11-26 03:06:392174 if (SkipConditionalExperiment(experiment))
2175 continue;
[email protected]ad2a3ded2010-08-27 13:19:052176
[email protected]5bcdd99d2013-12-23 18:28:302177 base::DictionaryValue* data = new base::DictionaryValue();
[email protected]ad2a3ded2010-08-27 13:19:052178 data->SetString("internal_name", experiment.internal_name);
2179 data->SetString("name",
2180 l10n_util::GetStringUTF16(experiment.visible_name_id));
2181 data->SetString("description",
2182 l10n_util::GetStringUTF16(
2183 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:402184
[email protected]5bcdd99d2013-12-23 18:28:302185 base::ListValue* supported_platforms = new base::ListValue();
[email protected]cc3e2052011-12-20 01:01:402186 AddOsStrings(experiment.supported_platforms, supported_platforms);
2187 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:052188
[email protected]28e35af2011-02-09 12:56:222189 switch (experiment.type) {
2190 case Experiment::SINGLE_VALUE:
2191 data->SetBoolean(
2192 "enabled",
2193 enabled_experiments.count(experiment.internal_name) > 0);
2194 break;
2195 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:442196 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:222197 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2198 break;
2199 default:
2200 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192201 }
2202
[email protected]ee28495a2013-05-20 04:10:522203 bool supported = (experiment.supported_platforms & current_platform) != 0;
2204#if defined(OS_CHROMEOS)
2205 if (access == kOwnerAccessToFlags &&
2206 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2207 supported = true;
2208 }
2209#endif
2210 if (supported)
2211 supported_experiments->Append(data);
2212 else
2213 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052214 }
[email protected]ad2a3ded2010-08-27 13:19:052215}
2216
[email protected]ad2a3ded2010-08-27 13:19:052217bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552218 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052219}
2220
[email protected]e6d1c4f2013-06-12 17:37:402221void SetExperimentEnabled(FlagsStorage* flags_storage,
2222 const std::string& internal_name,
2223 bool enable) {
2224 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2225 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072226}
2227
2228void RemoveFlagsSwitches(
2229 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552230 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072231}
2232
[email protected]e6d1c4f2013-06-12 17:37:402233void ResetAllFlags(FlagsStorage* flags_storage) {
2234 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002235}
2236
[email protected]a314ee5a2010-10-26 21:23:282237int GetCurrentPlatform() {
2238#if defined(OS_MACOSX)
2239 return kOsMac;
2240#elif defined(OS_WIN)
2241 return kOsWin;
2242#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2243 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212244#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282245 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402246#elif defined(OS_ANDROID)
2247 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282248#else
2249#error Unknown platform
2250#endif
2251}
2252
[email protected]e6d1c4f2013-06-12 17:37:402253void RecordUMAStatistics(FlagsStorage* flags_storage) {
2254 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:542255 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2256 ++it) {
2257 std::string action("AboutFlags_");
2258 action += *it;
[email protected]7f6f44c2011-12-14 13:23:382259 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542260 }
2261 // Since flag metrics are recorded every startup, add a tick so that the
2262 // stats can be made meaningful.
2263 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:382264 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2265 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542266}
2267
[email protected]4b66a7d2014-08-15 17:13:312268uint32_t GetSwitchUMAId(const std::string& switch_name) {
2269 return static_cast<uint32_t>(metrics::HashMetricName(switch_name));
2270}
2271
2272void ReportCustomFlags(const std::string& uma_histogram_hame,
2273 const std::set<std::string>& command_line_difference) {
2274 for (std::set<std::string>::const_iterator it =
2275 command_line_difference.begin();
2276 it != command_line_difference.end();
2277 ++it) {
2278 int uma_id = about_flags::kBadSwitchFormatHistogramId;
2279 if (StartsWithASCII(*it, "--", true /* case_sensitive */)) {
2280 // Skip '--' before switch name.
2281 std::string switch_name(it->substr(2));
2282
2283 // Kill value, if any.
2284 const size_t value_pos = switch_name.find('=');
2285 if (value_pos != std::string::npos)
2286 switch_name.resize(value_pos);
2287
2288 uma_id = GetSwitchUMAId(switch_name);
2289 } else {
2290 NOTREACHED() << "ReportCustomFlags(): flag '" << *it
2291 << "' has incorrect format.";
2292 }
2293 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2294 << "' '" << *it << "', uma_id=" << uma_id;
2295
2296 // Sparse histogram macro does not cache the histogram, so it's safe
2297 // to use macro with non-static histogram name here.
2298 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id);
2299 }
2300}
2301
[email protected]e2ddbc92010-10-15 20:02:072302//////////////////////////////////////////////////////////////////////////////
2303// FlagsState implementation.
2304
2305namespace {
2306
[email protected]83e9fa702013-02-25 19:30:442307typedef std::map<std::string, std::pair<std::string, std::string> >
2308 NameToSwitchAndValueMap;
2309
2310void SetFlagToSwitchMapping(const std::string& key,
2311 const std::string& switch_name,
2312 const std::string& switch_value,
2313 NameToSwitchAndValueMap* name_to_switch_map) {
2314 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2315 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2316}
2317
[email protected]578f2092013-09-16 17:16:212318void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2319 CommandLine* command_line,
2320 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072321 if (command_line->HasSwitch(switches::kNoExperiments))
2322 return;
2323
2324 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002325
[email protected]e6d1c4f2013-06-12 17:37:402326 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2327 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072328
[email protected]a82744532011-02-11 16:15:532329 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192330 for (size_t i = 0; i < num_experiments; ++i) {
2331 const Experiment& e = experiments[i];
2332 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442333 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2334 e.command_line_value, &name_to_switch_map);
2335 } else if (e.type == Experiment::MULTI_VALUE) {
2336 for (int j = 0; j < e.num_choices; ++j) {
2337 SetFlagToSwitchMapping(e.NameForChoice(j),
2338 e.choices[j].command_line_switch,
2339 e.choices[j].command_line_value,
2340 &name_to_switch_map);
2341 }
[email protected]8a6ff28d2010-12-02 16:35:192342 } else {
[email protected]83e9fa702013-02-25 19:30:442343 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2344 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2345 &name_to_switch_map);
2346 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2347 e.command_line_value, &name_to_switch_map);
2348 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2349 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192350 }
2351 }
[email protected]e2ddbc92010-10-15 20:02:072352
[email protected]578f2092013-09-16 17:16:212353 if (sentinels == kAddSentinels) {
2354 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2355 flags_switches_.insert(
2356 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2357 std::string()));
2358 }
[email protected]e2ddbc92010-10-15 20:02:072359 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2360 it != enabled_experiments.end();
2361 ++it) {
2362 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532363 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192364 name_to_switch_map.find(experiment_name);
2365 if (name_to_switch_it == name_to_switch_map.end()) {
2366 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072367 continue;
[email protected]8a6ff28d2010-12-02 16:35:192368 }
[email protected]e2ddbc92010-10-15 20:02:072369
[email protected]a82744532011-02-11 16:15:532370 const std::pair<std::string, std::string>&
2371 switch_and_value_pair = name_to_switch_it->second;
2372
[email protected]9737b3632013-08-26 09:23:232373 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532374 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2375 switch_and_value_pair.second);
2376 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072377 }
[email protected]578f2092013-09-16 17:16:212378 if (sentinels == kAddSentinels) {
2379 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2380 flags_switches_.insert(
2381 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2382 std::string()));
2383 }
[email protected]e2ddbc92010-10-15 20:02:072384}
2385
2386bool FlagsState::IsRestartNeededToCommitChanges() {
2387 return needs_restart_;
2388}
2389
[email protected]e6d1c4f2013-06-12 17:37:402390void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2391 const std::string& internal_name,
2392 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442393 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192394 if (at_index != std::string::npos) {
2395 DCHECK(enable);
2396 // We're being asked to enable a multi-choice experiment. Disable the
2397 // currently selected choice.
2398 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222399 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402400 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192401
[email protected]28e35af2011-02-09 12:56:222402 // And enable the new choice, if it is not the default first choice.
2403 if (internal_name != experiment_name + "@0") {
2404 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402405 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082406 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402407 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222408 }
[email protected]8a6ff28d2010-12-02 16:35:192409 return;
2410 }
2411
[email protected]ad2a3ded2010-08-27 13:19:052412 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402413 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052414
[email protected]8a6ff28d2010-12-02 16:35:192415 const Experiment* e = NULL;
2416 for (size_t i = 0; i < num_experiments; ++i) {
2417 if (experiments[i].internal_name == internal_name) {
2418 e = experiments + i;
2419 break;
2420 }
2421 }
2422 DCHECK(e);
2423
2424 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592425 if (enable)
[email protected]147492b2013-03-19 23:52:082426 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592427 else
[email protected]147492b2013-03-19 23:52:082428 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192429 } else {
2430 if (enable) {
2431 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082432 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192433 } else {
2434 // Find the currently enabled choice and disable it.
2435 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442436 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192437 if (enabled_experiments.find(choice_name) !=
2438 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082439 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192440 enabled_experiments.erase(choice_name);
2441 // Continue on just in case there's a bug and more than one
2442 // experiment for this choice was enabled.
2443 }
2444 }
2445 }
2446 }
[email protected]ad2a3ded2010-08-27 13:19:052447
[email protected]e6d1c4f2013-06-12 17:37:402448 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052449}
2450
[email protected]e2ddbc92010-10-15 20:02:072451void FlagsState::RemoveFlagsSwitches(
2452 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532453 for (std::map<std::string, std::string>::const_iterator
2454 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2455 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072456 }
2457}
2458
[email protected]e6d1c4f2013-06-12 17:37:402459void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002460 needs_restart_ = true;
2461
2462 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402463 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002464}
2465
[email protected]e2ddbc92010-10-15 20:02:072466void FlagsState::reset() {
2467 needs_restart_ = false;
2468 flags_switches_.clear();
2469}
2470
[email protected]38e46812011-05-09 20:49:222471} // namespace
[email protected]e2ddbc92010-10-15 20:02:072472
2473namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192474
2475// WARNING: '@' is also used in the html file. If you update this constant you
2476// also need to update the html file.
2477const char kMultiSeparator[] = "@";
2478
[email protected]e2ddbc92010-10-15 20:02:072479void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552480 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072481}
[email protected]a314ee5a2010-10-26 21:23:282482
2483void SetExperiments(const Experiment* e, size_t count) {
2484 if (!e) {
2485 experiments = kExperiments;
2486 num_experiments = arraysize(kExperiments);
2487 } else {
2488 experiments = e;
2489 num_experiments = count;
2490 }
2491}
2492
[email protected]8a6ff28d2010-12-02 16:35:192493const Experiment* GetExperiments(size_t* count) {
2494 *count = num_experiments;
2495 return experiments;
2496}
2497
[email protected]e2ddbc92010-10-15 20:02:072498} // namespace testing
2499
[email protected]1a47d7e2010-10-15 00:37:242500} // namespace about_flags