blob: 1c9c99617985ea76745a5e9bba61febbd67e297f [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
alemate0107c3272014-09-03 04:30:0470const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
[email protected]4b66a7d2014-08-15 17:13:3171
[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]aae79572014-06-13 00:42:58430const Experiment::Choice kEnableSettingsWindowChoices[] = {
431 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
432 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
433 ::switches::kEnableSettingsWindow, "" },
434 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
435 ::switches::kDisableSettingsWindow, "" },
436};
437
[email protected]c5bbe0e2014-08-01 23:23:30438// Note that the value is specified in seconds (where 0 is equivalent to
439// disabled).
440const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = {
441 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
442 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
443 switches::kRememberCertErrorDecisions,
444 "-1" },
445 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY,
446 switches::kRememberCertErrorDecisions,
447 "86400" },
448 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS,
449 switches::kRememberCertErrorDecisions,
450 "259200" },
451 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK,
452 switches::kRememberCertErrorDecisions,
453 "604800" },
454 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH,
455 switches::kRememberCertErrorDecisions,
456 "2592000" },
457 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS,
458 switches::kRememberCertErrorDecisions,
459 "7776000" },
460};
461
[email protected]bdbf5cb2014-08-07 23:38:08462const Experiment::Choice kEnableDropSyncCredentialChoices[] = {
463 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
464 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
465 password_manager::switches::kEnableDropSyncCredential, "" },
466 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
467 password_manager::switches::kDisableDropSyncCredential, "" },
468};
469
[email protected]469ea5c2014-08-12 20:00:56470#if defined(OS_MACOSX)
471const Experiment::Choice kEnableAVFoundationChoices[] = {
472 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
473 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""},
474 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""}
475};
476#endif
477
[email protected]524dd702014-08-16 00:00:45478const Experiment::Choice kAutofillSyncCredentialChoices[] = {
479 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
480 { IDS_ALLOW_AUTOFILL_SYNC_CREDENTIAL,
481 password_manager::switches::kAllowAutofillSyncCredential, ""},
482 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL_FOR_REAUTH,
483 password_manager::switches::kDisallowAutofillSyncCredentialForReauth, ""},
484 { IDS_DISALLOW_AUTOFILL_SYNC_CREDENTIAL,
485 password_manager::switches::kDisallowAutofillSyncCredential, ""},
486};
487
[email protected]4bc5050c2010-11-18 17:55:54488// RECORDING USER METRICS FOR FLAGS:
489// -----------------------------------------------------------------------------
490// The first line of the experiment is the internal name. If you'd like to
491// gather statistics about the usage of your flag, you should append a marker
492// comment to the end of the feature name, like so:
493// "my-special-feature", // FLAGS:RECORD_UMA
494//
[email protected]d8320fb62014-03-22 03:16:37495// After doing that, run
496// tools/metrics/actions/extract_actions.py
497// to add the metric to actions.xml (which will enable UMA to record your
498// feature flag), then update the <owner>s and <description> sections. Make sure
499// to include the actions.xml file when you upload your code for review!
[email protected]4bc5050c2010-11-18 17:55:54500//
[email protected]783d5bb2012-10-24 03:47:14501// After your feature has shipped under a flag, you can locate the metrics under
502// the action name AboutFlags_internal-action-name. Actions are recorded once
503// per startup, so you should divide this number by AboutFlags_StartupTick to
504// get a sense of usage. Note that this will not be the same as number of users
505// with a given feature enabled because users can quit and relaunch the
506// application multiple times over a given time interval. The dashboard also
507// shows you how many (metrics reporting) users have enabled the flag over the
508// last seven days. However, note that this is not the same as the number of
509// users who have the flag enabled, since enabling the flag happens once,
510// whereas running with the flag enabled happens until the user flips the flag
511// again.
[email protected]4bc5050c2010-11-18 17:55:54512
[email protected]8a6ff28d2010-12-02 16:35:19513// To add a new experiment add to the end of kExperiments. There are two
514// distinct types of experiments:
515// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
516// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22517// . MULTI_VALUE: a list of choices, the first of which should correspond to a
518// deactivated state for this lab (i.e. no command line option). To specify
519// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
520// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19521// See the documentation of Experiment for details on the fields.
522//
[email protected]4b66a7d2014-08-15 17:13:31523// Command-line switches must have entries in enum "LoginCustomFlags" in
524// histograms.xml. See note in histograms.xml and don't forget to run
525// AboutFlagsHistogramTest unit test to calculate and verify checksum.
526//
[email protected]8a6ff28d2010-12-02 16:35:19527// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05528const Experiment kExperiments[] = {
529 {
[email protected]96c6f4c2011-05-18 19:36:22530 "ignore-gpu-blacklist",
531 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
532 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
533 kOsAll,
534 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
535 },
536 {
[email protected]85603362014-04-21 16:18:14537 "disable_layer_squashing",
538 IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME,
539 IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION,
540 kOsAll,
541 SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing)
542 },
[email protected]5b7033fc2013-12-07 22:32:07543#if defined(OS_WIN)
544 {
[email protected]5b263b6a2014-06-09 21:47:34545 "disable-direct-write",
546 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME,
547 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION,
[email protected]5b7033fc2013-12-07 22:32:07548 kOsWin,
[email protected]5b263b6a2014-06-09 21:47:34549 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite)
[email protected]5b7033fc2013-12-07 22:32:07550 },
551#endif
[email protected]8b1c3c72013-01-25 01:48:43552 {
[email protected]2b608752013-05-01 03:34:36553 "enable-experimental-canvas-features",
554 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
555 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
556 kOsAll,
557 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
558 },
559 {
[email protected]81c64af62012-06-06 20:15:52560 "disable-accelerated-2d-canvas",
561 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
562 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
563 kOsAll,
564 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
565 },
566 {
[email protected]72d37352014-07-24 02:34:41567 "enable-display-list-2d-canvas",
568 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME,
569 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION,
570 kOsAll,
piotaixrbc9cd5f2014-08-26 22:24:14571 MULTI_VALUE_TYPE(kEnableDisplayList2DcanvasChoices)
[email protected]72d37352014-07-24 02:34:41572 },
573 {
[email protected]5963b772011-02-09 22:55:38574 "composited-layer-borders",
575 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
576 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
577 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57578 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38579 },
580 {
[email protected]a8f1eaa2011-03-07 19:00:58581 "show-fps-counter",
582 IDS_FLAGS_SHOW_FPS_COUNTER,
583 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
584 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57585 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58586 },
[email protected]8ff7f342011-05-25 01:49:47587 {
[email protected]deaba6d52011-09-23 14:47:12588 "disable-webgl",
589 IDS_FLAGS_DISABLE_WEBGL_NAME,
590 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28591 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12592 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
593 },
[email protected]09096e02012-05-24 11:12:04594 {
[email protected]ce585bf2013-03-14 16:25:16595 "disable-webrtc",
596 IDS_FLAGS_DISABLE_WEBRTC_NAME,
597 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05598 kOsAndroid,
599#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16600 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05601#else
602 SINGLE_VALUE_TYPE("")
603#endif
604 },
[email protected]5e2bc8c2013-05-28 22:59:57605#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30606 {
[email protected]fdf631e2013-09-13 09:06:07607 "disable-webrtc-hw-decoding",
608 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
609 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
[email protected]6442b022013-12-05 11:09:05610 kOsAndroid | kOsCrOS,
[email protected]fdf631e2013-09-13 09:06:07611 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
612 },
613 {
[email protected]96cbf422013-09-11 12:42:22614 "disable-webrtc-hw-encoding",
615 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
616 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
[email protected]6998f01f22013-12-04 09:27:57617 kOsAndroid | kOsCrOS,
[email protected]96cbf422013-09-11 12:42:22618 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
619 },
[email protected]5e2bc8c2013-05-28 22:59:57620#endif
[email protected]34cb5292013-04-15 06:06:31621#if defined(OS_ANDROID)
622 {
[email protected]7b8a31632013-06-13 22:42:37623 "disable-webaudio",
624 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
625 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31626 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37627 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31628 },
629#endif
[email protected]d9da9582013-01-31 04:59:05630 {
[email protected]d8221b22013-05-23 05:35:43631 "enable-compositing-for-transition",
632 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
633 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
634 kOsAll,
635 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
636 },
[email protected]d33d2222014-06-04 15:39:58637 // Native client is compiled out when DISABLE_NACL is defined.
638#if !defined(DISABLE_NACL)
[email protected]2fe15fcb2010-10-21 20:39:53639 {
[email protected]e3791ce92011-08-09 01:03:32640 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40641 IDS_FLAGS_ENABLE_NACL_NAME,
642 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]d33d2222014-06-04 15:39:58643 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19644 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40645 },
646 {
[email protected]9addd1c2012-09-15 14:28:24647 "enable-nacl-debug", // FLAGS:RECORD_UMA
648 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
649 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56650 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24651 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13652 },
653 {
[email protected]66f409c2012-10-04 20:59:04654 "nacl-debug-mask", // FLAGS:RECORD_UMA
655 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
656 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56657 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04658 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
659 },
[email protected]d33d2222014-06-04 15:39:58660#endif
[email protected]66f409c2012-10-04 20:59:04661 {
[email protected]4bc5050c2010-11-18 17:55:54662 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32663 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
664 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56665 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51666 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32667 },
[email protected]3627b06d2010-11-12 16:36:16668 {
[email protected]ac2e2acd2013-03-21 12:57:29669 "extensions-on-chrome-urls",
670 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
671 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
672 kOsAll,
[email protected]49d9b142013-07-19 08:50:27673 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29674 },
675 {
[email protected]88c92012013-07-02 11:56:34676 "enable-fast-unload",
677 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
678 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
679 kOsAll,
680 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
681 },
682 {
[email protected]1f4da9e2013-06-27 05:23:44683 "enable-app-window-controls",
684 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
685 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
686 kOsDesktop,
hashimotof784afd2014-09-05 02:38:31687 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppWindowControls)
[email protected]1f4da9e2013-06-27 05:23:44688 },
689 {
[email protected]80bd24e2010-11-30 09:34:38690 "disable-hyperlink-auditing",
691 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
692 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
693 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19694 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51695 },
[email protected]333bdc52013-07-16 00:37:04696#if defined(OS_ANDROID)
697 {
[email protected]26d1b4d2014-02-08 02:42:17698 "contextual-search",
699 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
700 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
701 kOsAndroid,
[email protected]41d32bb2014-05-30 08:26:05702 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch,
703 switches::kDisableContextualSearch)
[email protected]26d1b4d2014-02-08 02:42:17704 },
[email protected]333bdc52013-07-16 00:37:04705#endif
[email protected]8cc9e532013-05-06 21:01:47706 {
[email protected]3eb5728c2011-06-20 22:32:24707 "show-autofill-type-predictions",
708 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
709 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
710 kOsAll,
[email protected]e217c5632013-04-12 19:11:48711 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24712 },
[email protected]bff4d3e2011-06-21 23:58:52713 {
[email protected]a22ebd812011-06-23 00:05:39714 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
715 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
716 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
717 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40718 // On by default for the Mac (different implementation in WebKit).
[email protected]a5a5aaf2013-12-19 02:10:10719 kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39720 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
721 },
[email protected]54c8d282014-01-24 17:31:08722#if defined(USE_AURA) || defined(OS_LINUX)
[email protected]81a6b0b2011-06-24 17:55:40723 {
[email protected]54c8d282014-01-24 17:31:08724 "overlay-scrollbars",
[email protected]23eecbd02013-09-19 18:13:37725 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
726 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
727 // Uses the system preference on Mac (a different implementation).
728 // On Android, this is always enabled.
[email protected]54c8d282014-01-24 17:31:08729 kOsLinux | kOsCrOS | kOsWin,
730 MULTI_VALUE_TYPE(kOverlayScrollbarChoices)
[email protected]23eecbd02013-09-19 18:13:37731 },
[email protected]54c8d282014-01-24 17:31:08732#endif
[email protected]23eecbd02013-09-19 18:13:37733 {
[email protected]7e7a28092011-12-09 22:24:55734 "enable-panels",
735 IDS_FLAGS_ENABLE_PANELS_NAME,
736 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56737 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55738 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54739 },
[email protected]e3749d12011-07-25 22:22:12740 {
[email protected]27c14f02012-06-22 17:29:58741 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27742 "save-page-as-mhtml", // FLAGS:RECORD_UMA
743 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
744 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
745 kOsMac | kOsWin | kOsLinux,
746 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
747 },
748 {
[email protected]903e63382013-06-01 00:40:58749 "enable-quic",
750 IDS_FLAGS_ENABLE_QUIC_NAME,
751 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
752 kOsAll,
753 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
754 switches::kDisableQuic)
755 },
756 {
[email protected]d10833bc2014-04-14 17:50:46757 "enable-spdy4",
758 IDS_FLAGS_ENABLE_SPDY4_NAME,
759 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION,
[email protected]bca09b9982013-06-27 22:30:46760 kOsAll,
[email protected]d10833bc2014-04-14 17:50:46761 SINGLE_VALUE_TYPE(switches::kEnableSpdy4)
[email protected]88a332622013-07-30 07:13:32762 },
763 {
[email protected]27b3fe92012-03-21 05:35:06764 "enable-async-dns",
765 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
766 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46767 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44768 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
769 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06770 },
771 {
[email protected]c3a47f8d2014-04-15 14:39:28772 "disable-media-source",
773 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
774 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32775 kOsAll,
[email protected]c3a47f8d2014-04-15 14:39:28776 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]722b4d484f2013-10-08 20:33:59777 },
778 {
[email protected]16c242d2013-05-31 23:56:47779 "enable-encrypted-media",
780 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
781 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50782 kOsAll,
[email protected]16c242d2013-05-31 23:56:47783 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
784 },
785 {
[email protected]e76d92f2013-09-26 20:03:35786 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47787 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
788 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50789 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35790 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03791 },
[email protected]ce3934bb2013-09-10 02:02:56792#if defined(OS_ANDROID)
793 {
[email protected]3c56ec12013-09-25 02:03:42794 "disable-infobar-for-protected-media-identifier",
795 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
796 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
797 kOsAndroid,
798 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
799 },
800 {
[email protected]ce3934bb2013-09-10 02:02:56801 "mediadrm-enable-non-compositing",
802 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
803 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
804 kOsAndroid,
805 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
806 },
807#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06808 {
[email protected]bf88c032011-12-22 19:05:47809 "enable-javascript-harmony",
810 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
811 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
812 kOsAll,
813 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
814 },
[email protected]7e7f378a2012-01-05 14:35:37815 {
[email protected]88864db2012-01-18 20:56:35816 "disable-software-rasterizer",
817 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
818 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
819#if defined(ENABLE_SWIFTSHADER)
820 kOsAll,
821#else
822 0,
823#endif
824 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
825 },
[email protected]15a5d722012-01-23 09:11:14826 {
[email protected]d1ddf8c52014-02-06 22:09:31827 "enable-gpu-rasterization",
828 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
829 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
[email protected]96d25e22014-03-04 05:56:18830 kOsAndroid,
[email protected]a23530d2014-03-11 06:04:14831 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)
[email protected]d1ddf8c52014-02-06 22:09:31832 },
833 {
[email protected]c1b18ea2013-07-10 13:01:16834 "enable-experimental-web-platform-features",
835 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
836 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16837 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16838 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49839 },
840 {
[email protected]3e8befc2012-03-13 01:17:03841 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16842 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
843 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56844 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03845 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16846 },
[email protected]184ec592012-03-01 11:54:28847 {
[email protected]2b8290d2014-08-02 00:29:36848 "enable-material-design-ntp",
849 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_NAME,
850 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_DESCRIPTION,
851 kOsDesktop,
852 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignNTP,
853 switches::kDisableMaterialDesignNTP)
854 },
855 {
[email protected]184ec592012-03-01 11:54:28856 "enable-devtools-experiments",
857 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
858 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56859 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28860 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
861 },
[email protected]76d1854e2012-03-02 23:57:44862 {
[email protected]2fefdb32013-02-26 14:28:10863 "silent-debugger-extension-api",
864 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
865 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
866 kOsDesktop,
867 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
868 },
869 {
[email protected]1dbaf5e2012-11-30 05:51:32870 "spellcheck-autocorrect",
871 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
872 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
873 kOsWin | kOsLinux | kOsCrOS,
874 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
875 },
876 {
[email protected]e27137282013-06-20 02:38:35877 "enable-scroll-prediction",
878 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
879 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
880 kOsDesktop,
881 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
882 },
883 {
[email protected]d7932532012-11-21 21:10:31884 "touch-events",
885 IDS_TOUCH_EVENTS_NAME,
886 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56887 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31888 MULTI_VALUE_TYPE(kTouchEventsChoices)
889 },
890 {
[email protected]b9c96ff2012-11-26 22:24:40891 "disable-touch-adjustment",
892 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
893 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
894 kOsWin | kOsLinux | kOsCrOS,
895 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
896 },
[email protected]0b60afa2012-04-19 17:36:39897#if defined(OS_CHROMEOS)
898 {
[email protected]81f89e92014-02-21 14:27:35899 "network-portal-notification",
900 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME,
901 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION,
902 kOsCrOS,
903 ENABLE_DISABLE_VALUE_TYPE(
904 chromeos::switches::kEnableNetworkPortalNotification,
905 chromeos::switches::kDisableNetworkPortalNotification)
906 },
[email protected]0b60afa2012-04-19 17:36:39907#endif
[email protected]79be6d32012-04-24 20:47:44908 {
[email protected]8d68a3e02013-01-12 15:57:10909 "enable-download-resumption",
910 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
911 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56912 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10913 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
914 },
[email protected]67fe3642014-08-05 00:00:42915#if defined(ENABLE_PLUGINS)
[email protected]8d68a3e02013-01-12 15:57:10916 {
[email protected]9a5940d2012-04-27 19:16:23917 "allow-nacl-socket-api",
918 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
919 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56920 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23921 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
922 },
[email protected]d33d2222014-06-04 15:39:58923#endif
[email protected]34633be2014-06-26 09:05:59924#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
[email protected]85333732012-05-01 19:02:24925 {
[email protected]4bd20202012-06-14 17:35:01926 "force-device-scale-factor",
[email protected]34633be2014-06-26 09:05:59927 IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_NAME,
928 IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_DESCRIPTION,
929 kOsLinux | kOsWin | kOsCrOS,
930 MULTI_VALUE_TYPE(kDeviceScaleFactorChoices)
[email protected]85333732012-05-01 19:02:24931 },
[email protected]34633be2014-06-26 09:05:59932#endif
[email protected]190349fd2012-05-02 00:10:47933#if defined(OS_CHROMEOS)
934 {
935 "allow-touchpad-three-finger-click",
936 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
937 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
938 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24939 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47940 },
941#endif
[email protected]53520b1b2012-05-07 21:43:37942#if defined(USE_ASH)
943 {
[email protected]2ddf37b2013-04-20 01:15:58944 "disable-minimize-on-second-launcher-item-click",
945 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
946 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
947 kOsAll,
948 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
949 },
950 {
[email protected]73074742012-05-17 01:44:41951 "show-touch-hud",
952 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
953 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
954 kOsAll,
955 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
956 },
957 {
[email protected]9f0940b62012-05-23 22:56:35958 "enable-pinch",
959 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
960 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:06961 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:38962 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
963 },
[email protected]adcdcdd02014-04-25 03:30:24964#endif // defined(USE_ASH)
[email protected]e4cd82e2013-04-10 15:20:38965 {
[email protected]de0aaed2013-05-27 18:16:43966 "enable-pinch-virtual-viewport",
967 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
968 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
[email protected]fe89d822014-04-28 10:29:00969 kOsLinux | kOsWin | kOsCrOS | kOsAndroid,
970 ENABLE_DISABLE_VALUE_TYPE(
971 cc::switches::kEnablePinchVirtualViewport,
972 cc::switches::kDisablePinchVirtualViewport),
[email protected]de0aaed2013-05-27 18:16:43973 },
[email protected]68bc37c2014-01-07 15:56:48974 {
975 "enable-viewport-meta",
976 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
977 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
978 kOsLinux | kOsWin | kOsCrOS | kOsMac,
979 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
980 },
[email protected]ed7b67f32012-05-28 10:12:28981#if defined(OS_CHROMEOS)
982 {
[email protected]8b04a1652012-08-04 02:59:49983 "disable-boot-animation",
984 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
985 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58986 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:24987 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:49988 },
[email protected]95058572012-08-20 14:57:29989 {
[email protected]d739c1db2014-07-08 07:19:59990 "enable-video-player-chromecast-support",
991 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME,
992 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION,
993 kOsCrOS,
994 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport)
995 },
996 {
[email protected]f2ad22e2014-07-10 17:52:08997 "disable-office-editing-component-app",
998 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME,
999 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION,
[email protected]099b890c2013-04-25 19:16:261000 kOsCrOS,
[email protected]f2ad22e2014-07-10 17:52:081001 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp),
[email protected]099b890c2013-04-25 19:16:261002 },
[email protected]31cf1472013-09-13 00:36:421003 {
[email protected]bf3f4592014-03-31 19:50:441004 "disable-display-color-calibration",
1005 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME,
1006 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION,
1007 kOsCrOS,
1008 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration),
1009 },
[email protected]62018dc2012-12-13 00:37:351010#endif // defined(OS_CHROMEOS)
[email protected]7db8893a2012-07-26 00:49:401011 { "disable-accelerated-video-decode",
1012 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1013 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191014 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401015 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151016 },
[email protected]1d9bb9cd2012-08-28 22:02:501017#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:381018 {
1019 "ash-debug-shortcuts",
1020 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1021 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1022 kOsAll,
1023 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1024 },
[email protected]b19b09a2014-02-26 05:34:341025 { "ash-enable-touch-view-testing",
1026 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME,
1027 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION,
1028 kOsCrOS,
1029 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting),
1030 },
jonross367a1bee2014-09-06 12:37:081031 {
1032 "ash-enable-touch-view-touch-feedback",
1033 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TOUCH_FEEDBACK_NAME,
1034 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TOUCH_FEEDBACK_DESCRIPTION,
1035 kOsCrOS,
1036 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTouchFeedback),
1037 },
[email protected]88474872014-07-04 22:51:061038 { "ash-disable-text-filtering-in-overview-mode",
1039 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_NAME,
1040 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_DESCRIPTION,
1041 kOsCrOS,
1042 SINGLE_VALUE_TYPE(ash::switches::kAshDisableTextFilteringInOverviewMode),
1043 },
jonross367a1bee2014-09-06 12:37:081044#endif // defined(USE_ASH)
[email protected]9b7ab882012-09-10 23:46:361045#if defined(OS_CHROMEOS)
1046 {
[email protected]205f07892012-10-16 20:26:221047 "enable-carrier-switching",
1048 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1049 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1050 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241051 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221052 },
1053 {
[email protected]9b7ab882012-09-10 23:46:361054 "enable-request-tablet-site",
1055 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1056 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1057 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241058 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361059 },
1060#endif
[email protected]dab49c0b2012-10-04 05:55:351061 {
1062 "debug-packed-apps",
1063 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1064 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561065 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351066 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1067 },
[email protected]d1459ed2012-10-10 01:29:331068 {
1069 "enable-password-generation",
1070 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1071 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]d4855d32014-08-22 18:34:531072 kOsWin | kOsLinux | kOsCrOS | kOsMac,
[email protected]c3cc0632013-10-03 21:54:431073 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1074 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331075 },
[email protected]26d045f2012-10-18 21:18:431076 {
[email protected]0477c062014-04-30 15:02:181077 "enable-automatic-password-saving",
1078 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME,
1079 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION,
1080 kOsDesktop,
1081 SINGLE_VALUE_TYPE(
1082 password_manager::switches::kEnableAutomaticPasswordSaving)
1083 },
1084 {
[email protected]f2a394b2013-11-28 20:08:041085 "password-manager-reauthentication",
[email protected]429a6e02013-10-23 18:40:481086 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1087 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
[email protected]48293fb2013-12-04 04:02:031088 kOsMac | kOsWin,
[email protected]f2a394b2013-11-28 20:08:041089 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
[email protected]429a6e02013-10-23 18:40:481090 },
1091 {
[email protected]0f1f70852014-08-09 05:56:011092 "enable-android-password-link",
1093 IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_NAME,
1094 IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_DESCRIPTION,
1095 kOsAndroid,
1096 ENABLE_DISABLE_VALUE_TYPE(
1097 password_manager::switches::kEnableAndroidPasswordLink,
1098 password_manager::switches::kDisableAndroidPasswordLink)
1099 },
1100 {
[email protected]76f7d4882012-10-26 21:09:221101 "enable-deferred-image-decoding",
1102 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1103 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221104 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221105 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1106 },
1107 {
[email protected]075543d2012-10-24 01:29:141108 "performance-monitor-gathering",
1109 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1110 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1111 kOsAll,
1112 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1113 },
[email protected]783d5bb2012-10-24 03:47:141114 {
[email protected]45476982013-10-01 03:22:291115 "wallet-service-use-sandbox",
1116 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1117 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
[email protected]d4d59992014-06-04 23:48:071118 kOsAndroid | kOsDesktop,
[email protected]45476982013-10-01 03:22:291119 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1120 autofill::switches::kWalletServiceUseSandbox, "1",
1121 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541122 },
[email protected]177260c2013-04-24 01:47:381123#if defined(USE_AURA)
1124 {
1125 "overscroll-history-navigation",
1126 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1127 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1128 kOsAll,
[email protected]c38e9802014-02-18 21:32:121129 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices)
[email protected]177260c2013-04-24 01:47:381130 },
1131#endif
[email protected]edbea622012-11-28 20:39:381132 {
[email protected]888878e82013-07-24 22:49:401133 "scroll-end-effect",
1134 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1135 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1136 kOsCrOS,
1137 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1138 switches::kScrollEndEffect, "1",
1139 switches::kScrollEndEffect, "0")
1140 },
1141 {
[email protected]cc7c069d2014-08-07 20:42:051142 "enable-renderer-mojo-channel",
1143 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_NAME,
1144 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_DESCRIPTION,
1145 kOsAll,
1146 SINGLE_VALUE_TYPE(switches::kEnableRendererMojoChannel)
1147 },
1148 {
[email protected]edbea622012-11-28 20:39:381149 "enable-touch-drag-drop",
1150 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1151 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1152 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271153 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1154 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381155 },
[email protected]0e2f43b62013-02-21 00:47:151156 {
1157 "enable-touch-editing",
1158 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1159 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
[email protected]877dd942014-06-06 16:02:011160 kOsCrOS | kOsWin | kOsLinux,
[email protected]1400e6dc2013-04-27 02:36:271161 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1162 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151163 },
[email protected]92e12dd92012-12-11 03:33:201164 {
[email protected]06a82ff2014-04-25 02:24:461165 "enable-suggestions-service",
1166 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME,
1167 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION,
1168 kOsAndroid | kOsCrOS,
1169 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService,
1170 switches::kDisableSuggestionsService)
1171 },
1172 {
[email protected]ddec1aa2013-04-28 23:22:451173 "enable-sync-synced-notifications",
1174 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1175 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181176 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451177 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1178 switches::kDisableSyncSyncedNotifications)
1179 },
[email protected]630a27a2014-01-15 08:24:091180#if defined(ENABLE_APP_LIST)
1181 {
[email protected]4734b902014-04-03 16:42:101182 "enable-sync-app-list",
1183 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1184 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
[email protected]630a27a2014-01-15 08:24:091185 kOsDesktop,
[email protected]4734b902014-04-03 16:42:101186 MULTI_VALUE_TYPE(kEnableSyncAppListChoices)
[email protected]630a27a2014-01-15 08:24:091187 },
1188#endif
[email protected]d41cf1b2014-02-21 01:24:351189#if defined(OS_MACOSX)
1190 {
[email protected]0039b0be2014-03-12 20:24:111191 "enable-avfoundation",
1192 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME,
1193 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION,
[email protected]d41cf1b2014-02-21 01:24:351194 kOsMac,
[email protected]469ea5c2014-08-12 20:00:561195 MULTI_VALUE_TYPE(kEnableAVFoundationChoices)
[email protected]d41cf1b2014-02-21 01:24:351196 },
1197#endif
[email protected]5b93e162013-02-19 06:33:091198 {
[email protected]9323fdd12013-02-23 00:31:361199 "impl-side-painting",
1200 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1201 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521202 kOsAll,
[email protected]9323fdd12013-02-23 00:31:361203 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1204 },
[email protected]a42c85f2013-04-04 18:15:121205 {
[email protected]7621af22013-09-12 23:06:331206 "lcd-text-aa",
1207 IDS_FLAGS_LCD_TEXT_NAME,
1208 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1209 kOsDesktop,
1210 MULTI_VALUE_TYPE(kLCDTextChoices)
1211 },
[email protected]4ac579b2014-05-20 06:43:231212#if defined(OS_ANDROID) || defined(OS_MACOSX)
[email protected]7621af22013-09-12 23:06:331213 {
[email protected]0c04d1c2013-07-10 00:02:321214 "delegated-renderer",
1215 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1216 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
[email protected]4ac579b2014-05-20 06:43:231217 kOsAndroid, // TODO(ccameron) Add mac support soon.
[email protected]0c04d1c2013-07-10 00:02:321218 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1219 },
[email protected]758efb02014-04-05 07:53:451220#endif
[email protected]0c04d1c2013-07-10 00:02:321221 {
[email protected]a42c85f2013-04-04 18:15:121222 "max-tiles-for-interest-area",
1223 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1224 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521225 kOsAll,
[email protected]a42c85f2013-04-04 18:15:121226 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1227 },
[email protected]7cf7ccb2013-04-20 02:53:081228 {
[email protected]5676e7482013-12-17 08:05:371229 "enable-offline-auto-reload",
1230 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1231 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1232 kOsAll,
[email protected]bd519e32014-05-09 01:33:171233 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload,
1234 switches::kDisableOfflineAutoReload)
[email protected]5676e7482013-12-17 08:05:371235 },
1236 {
[email protected]d2e1a0a2014-06-16 15:49:371237 "enable-offline-auto-reload-visible-only",
1238 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME,
1239 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION,
1240 kOsAll,
1241 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly,
1242 switches::kDisableOfflineAutoReloadVisibleOnly)
1243 },
1244 {
[email protected]d8bc9132014-05-02 15:56:371245 "enable-offline-load-stale-cache",
1246 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME,
1247 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION,
1248 kOsLinux | kOsMac | kOsWin | kOsAndroid,
[email protected]e83140a02014-05-07 14:04:581249 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache,
1250 switches::kDisableOfflineLoadStaleCache)
[email protected]d8bc9132014-05-02 15:56:371251 },
1252 {
[email protected]a3618122013-04-26 21:15:341253 "default-tile-width",
1254 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1255 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1256 kOsAll,
1257 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1258 },
1259 {
1260 "default-tile-height",
1261 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1262 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1263 kOsAll,
1264 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1265 },
[email protected]2289b432014-08-08 17:52:111266#if defined(OS_ANDROID)
1267 {
1268 "disable-gesture-requirement-for-media-playback",
1269 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1270 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1271 kOsAndroid,
1272 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1273 },
1274#endif
[email protected]86459e2c2013-04-10 13:39:241275#if defined(OS_CHROMEOS)
1276 {
1277 "enable-virtual-keyboard",
1278 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1279 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1280 kOsCrOS,
1281 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1282 },
[email protected]8b4321e2013-10-25 01:16:181283 {
[email protected]bb6378fe2014-04-28 21:19:441284 "enable-virtual-keyboard-overscroll",
1285 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME,
1286 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION,
1287 kOsCrOS,
1288 ENABLE_DISABLE_VALUE_TYPE(
1289 keyboard::switches::kEnableVirtualKeyboardOverscroll,
1290 keyboard::switches::kDisableVirtualKeyboardOverscroll)
1291 },
1292 {
[email protected]8b4321e2013-10-25 01:16:181293 "enable-swipe-selection",
1294 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1295 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1296 kOsCrOS,
1297 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1298 },
[email protected]0e627fb12014-03-25 18:18:531299 {
1300 "enable-input-view",
1301 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME,
1302 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION,
1303 kOsCrOS,
1304 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView,
1305 keyboard::switches::kDisableInputView)
1306 },
[email protected]90933412014-06-05 21:11:021307 {
1308 "enable-experimental-input-view-features",
1309 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME,
1310 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION,
1311 kOsCrOS,
1312 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures)
1313 },
[email protected]86459e2c2013-04-10 13:39:241314#endif
[email protected]38484df12013-04-10 16:42:031315 {
1316 "enable-simple-cache-backend",
1317 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1318 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]957cd5a2014-03-27 19:54:171319 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]38484df12013-04-10 16:42:031320 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1321 },
[email protected]717e4e22013-04-10 20:52:231322 {
1323 "enable-tcp-fast-open",
1324 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1325 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111326 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231327 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1328 },
[email protected]2188c8d2014-03-21 00:58:561329#if defined(ENABLE_SERVICE_DISCOVERY)
[email protected]a4ed7e12013-05-24 01:00:281330 {
[email protected]d394d9762013-09-22 06:00:251331 "device-discovery-notifications",
1332 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1333 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191334 kOsDesktop,
[email protected]d394d9762013-09-22 06:00:251335 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1336 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551337 },
[email protected]53ffe0d2013-10-30 01:20:401338 {
[email protected]4e6c96e2014-05-17 18:41:191339 "enable-cloud-devices",
1340 IDS_FLAGS_ENABLE_CLOUD_DEVICES_NAME,
1341 IDS_FLAGS_ENABLE_CLOUD_DEVICES_DESCRIPTION,
1342 kOsDesktop,
1343 SINGLE_VALUE_TYPE(switches::kEnableCloudDevices)
1344 },
1345 {
[email protected]f0392392014-03-10 20:07:521346 "enable-print-preview-register-promos",
1347 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME,
1348 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191349 kOsDesktop,
[email protected]f0392392014-03-10 20:07:521350 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos)
1351 },
[email protected]2188c8d2014-03-21 00:58:561352#endif // ENABLE_SERVICE_DISCOVERY
[email protected]ca53b142014-02-25 22:42:231353#if defined(OS_WIN)
1354 {
1355 "enable-cloud-print-xps",
1356 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME,
1357 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION,
1358 kOsWin,
1359 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)
1360 },
1361#endif
[email protected]56d3c6e42013-05-29 11:28:011362#if defined(OS_MACOSX)
1363 {
[email protected]67604442013-06-15 00:04:331364 "enable-simplified-fullscreen",
1365 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1366 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1367 kOsMac,
1368 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1369 },
[email protected]56d3c6e42013-05-29 11:28:011370#endif
[email protected]910ecfe2013-06-03 23:38:141371#if defined(USE_AURA)
1372 {
1373 "tab-capture-upscale-quality",
1374 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1375 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1376 kOsAll,
1377 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1378 },
1379 {
1380 "tab-capture-downscale-quality",
1381 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1382 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1383 kOsAll,
1384 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1385 },
1386#endif
[email protected]71d4f602013-06-04 23:21:101387 {
[email protected]ba7993d2013-11-26 23:44:561388 "enable-spelling-feedback-field-trial",
1389 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1390 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
[email protected]5e099c62013-06-08 05:46:231391 kOsAll,
[email protected]ba7993d2013-11-26 23:44:561392 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
[email protected]5e099c62013-06-08 05:46:231393 },
1394 {
[email protected]71d4f602013-06-04 23:21:101395 "enable-webgl-draft-extensions",
1396 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1397 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1398 kOsAll,
1399 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1400 },
[email protected]deadc492013-06-07 21:39:281401 {
[email protected]bc1697a82013-06-27 15:48:311402 "enable-web-midi",
1403 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1404 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
[email protected]28e56e92014-01-03 07:52:391405 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
[email protected]bc1697a82013-06-27 15:48:311406 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1407 },
[email protected]020df792013-06-29 14:26:211408 {
1409 "enable-new-profile-management",
1410 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1411 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
[email protected]a3b75bd2014-05-28 17:49:421412 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531413 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement,
1414 switches::kDisableNewProfileManagement)
[email protected]020df792013-06-29 14:26:211415 },
1416 {
[email protected]1017a3212014-05-30 10:34:591417 "enable-account-consistency",
1418 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME,
1419 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION,
1420 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531421 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency,
1422 switches::kDisableAccountConsistency)
[email protected]1017a3212014-05-30 10:34:591423 },
1424 {
[email protected]8f569882014-03-25 21:12:121425 "enable-fast-user-switching",
1426 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME,
1427 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION,
1428 kOsMac | kOsWin | kOsLinux,
1429 SINGLE_VALUE_TYPE(switches::kFastUserSwitching)
1430 },
1431 {
[email protected]274171e2014-04-11 23:10:081432 "enable-new-avatar-menu",
1433 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME,
1434 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION,
1435 kOsMac | kOsWin | kOsLinux,
[email protected]9152a542014-08-06 05:37:451436 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu,
1437 switches::kDisableNewAvatarMenu)
[email protected]274171e2014-04-11 23:10:081438 },
1439 {
[email protected]85777bc2013-12-23 00:07:061440 "enable-web-based-signin",
1441 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1442 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
[email protected]2d279f72013-10-21 23:10:161443 kOsMac | kOsWin | kOsLinux,
[email protected]85777bc2013-12-23 00:07:061444 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
[email protected]2d279f72013-10-21 23:10:161445 },
1446 {
[email protected]115d5728c2013-10-23 18:06:141447 "enable-google-profile-info",
1448 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1449 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221450 kOsMac | kOsWin | kOsLinux,
[email protected]115d5728c2013-10-23 18:06:141451 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
[email protected]020df792013-06-29 14:26:211452 },
[email protected]dcf6cf32013-07-03 10:53:281453 {
[email protected]056ed7092014-01-09 12:57:211454 "reset-app-list-install-state",
[email protected]a85aa332013-10-22 11:09:591455 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1456 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
[email protected]7199367d2014-01-20 04:06:211457 kOsMac | kOsWin | kOsLinux,
[email protected]a85aa332013-10-22 11:09:591458 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
[email protected]dcf6cf32013-07-03 10:53:281459 },
[email protected]919b2f82013-10-04 03:11:261460#if defined(ENABLE_APP_LIST)
[email protected]7199367d2014-01-20 04:06:211461#if defined(OS_LINUX)
1462 {
1463 // This is compiled out on non-Linux platforms because otherwise it would be
1464 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1465 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1466 "enable-app-list",
1467 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1468 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1469 kOsLinux,
1470 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1471 },
1472#endif
[email protected]fe2b77f62013-11-09 04:30:511473 {
[email protected]97df3be2014-07-03 07:49:101474 "enable-app-view",
1475 IDS_FLAGS_ENABLE_APP_VIEW_NAME,
1476 IDS_FLAGS_ENABLE_APP_VIEW_DESCRIPTION,
fsamuelbb30da92014-08-27 21:20:291477 kOsDesktop,
[email protected]b4ef1212014-08-21 18:31:261478 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppView)
[email protected]97df3be2014-07-03 07:49:101479 },
1480 {
[email protected]9e0a44c2014-06-07 14:26:211481 "disable-app-list-app-info",
1482 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST,
1483 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1484 kOsLinux | kOsWin | kOsCrOS,
1485 SINGLE_VALUE_TYPE(app_list::switches::kDisableAppInfo)
1486 },
1487 {
[email protected]c30bda262014-06-19 04:10:131488 "enable-drive-apps-in-app-list",
1489 IDS_FLAGS_ENABLE_DRIVE_APPS_IN_APP_LIST_NAME,
1490 IDS_FLAGS_ENABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION,
1491 kOsDesktop,
1492 SINGLE_VALUE_TYPE(app_list::switches::kEnableDriveAppsInAppList)
1493 },
[email protected]919b2f82013-10-04 03:11:261494#endif
[email protected]0e38c3252013-08-14 22:18:511495#if defined(OS_ANDROID)
1496 {
1497 "enable-accessibility-tab-switcher",
1498 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1499 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1500 kOsAndroid,
1501 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561502 },
[email protected]738384172013-12-05 01:59:561503 {
[email protected]0e174722014-03-31 21:23:271504 // TODO(dmazzoni): remove this flag when native android accessibility
1505 // ships in the stable channel. http://crbug.com/356775
1506 "enable-accessibility-script-injection",
1507 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1508 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
[email protected]738384172013-12-05 01:59:561509 kOsAndroid,
[email protected]0e174722014-03-31 21:23:271510 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1511 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
[email protected]738384172013-12-05 01:59:561512 },
[email protected]0e38c3252013-08-14 22:18:511513#endif
[email protected]2e9d79f2013-08-16 05:45:561514 {
[email protected]2cccfef2014-05-01 06:05:161515 "enable-one-copy",
1516 IDS_FLAGS_ONE_COPY_NAME,
1517 IDS_FLAGS_ONE_COPY_DESCRIPTION,
[email protected]be2e40a2013-08-27 02:49:201518 kOsAll,
[email protected]2cccfef2014-05-01 06:05:161519 SINGLE_VALUE_TYPE(switches::kEnableOneCopy)
1520 },
1521 {
1522 "enable-zero-copy",
1523 IDS_FLAGS_ZERO_COPY_NAME,
1524 IDS_FLAGS_ZERO_COPY_DESCRIPTION,
1525 kOsAll,
1526 MULTI_VALUE_TYPE(kZeroCopyChoices)
[email protected]4fdc518f2013-08-28 21:37:271527 },
[email protected]bbb4beae2013-09-27 17:20:311528#if defined(OS_CHROMEOS)
1529 {
[email protected]407d82b2013-12-13 11:50:591530 "enable-first-run-ui-transitions",
1531 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1532 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1533 kOsCrOS,
1534 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1535 },
[email protected]bbb4beae2013-09-27 17:20:311536#endif
[email protected]ed1aab12013-10-08 14:27:071537 {
[email protected]f95e6df2013-10-11 13:05:171538 "enable-streamlined-hosted-apps",
1539 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1540 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
[email protected]abe7f8722013-12-13 11:38:061541 kOsWin | kOsCrOS | kOsLinux,
[email protected]f95e6df2013-10-11 13:05:171542 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1543 },
[email protected]a0ef5212013-10-15 18:08:261544 {
[email protected]912576e2013-10-21 10:33:131545 "enable-ephemeral-apps",
1546 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1547 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201548 kOsAll,
[email protected]912576e2013-10-21 10:33:131549 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1550 },
1551 {
[email protected]5ec67052013-12-19 05:40:211552 "enable-linkable-ephemeral-apps",
1553 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1554 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201555 kOsAll,
[email protected]5ec67052013-12-19 05:40:211556 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1557 },
1558 {
[email protected]7d8056d2014-04-14 15:55:211559 "enable-service-worker-sync",
1560 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME,
1561 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION,
1562 kOsAll,
1563 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync)
1564 },
[email protected]dfb66c522013-10-22 19:46:321565#if defined(OS_ANDROID)
1566 {
1567 "disable-click-delay",
1568 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1569 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1570 kOsAndroid,
1571 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1572 SINGLE_VALUE_TYPE("disable-click-delay")
1573 },
1574#endif
[email protected]5a606592014-01-31 10:32:311575#if defined(OS_MACOSX)
[email protected]c2c84ab2013-11-18 03:05:091576 {
1577 "enable-translate-new-ux",
1578 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1579 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
[email protected]5a606592014-01-31 10:32:311580 kOsMac,
[email protected]c2c84ab2013-11-18 03:05:091581 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1582 },
[email protected]5a606592014-01-31 10:32:311583#endif
[email protected]c4f51d22013-11-05 03:11:261584#if defined(TOOLKIT_VIEWS)
1585 {
[email protected]88b47ad72013-11-21 03:34:381586 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1587 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1588 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
[email protected]42f5fe542014-07-25 17:59:331589 kOsCrOS | kOsWin | kOsLinux,
[email protected]88b47ad72013-11-21 03:34:381590 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
[email protected]c4f51d22013-11-05 03:11:261591 },
1592#endif
[email protected]9f268072013-11-07 00:02:151593 {
1594 "enable-apps-show-on-first-paint",
1595 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1596 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1597 kOsDesktop,
[email protected]6fa202452014-08-19 05:34:071598 SINGLE_VALUE_TYPE(extensions::switches::kEnableAppsShowOnFirstPaint)
[email protected]9f268072013-11-07 00:02:151599 },
[email protected]12271632013-11-26 03:06:391600 {
[email protected]4d7552f2014-03-04 04:53:331601 "enhanced-bookmarks-experiment",
[email protected]12271632013-11-26 03:06:391602 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1603 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
kkimlabseedd8b82014-09-05 13:01:091604 kOsDesktop | kOsAndroid,
[email protected]4d7552f2014-03-04 04:53:331605 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1606 switches::kEnhancedBookmarksExperiment, "1",
1607 switches::kEnhancedBookmarksExperiment, "0")
[email protected]12271632013-11-26 03:06:391608 },
[email protected]cb13d462014-03-14 21:38:581609 {
1610 "manual-enhanced-bookmarks",
1611 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1612 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
kkimlabseedd8b82014-09-05 13:01:091613 kOsDesktop | kOsAndroid,
[email protected]cb13d462014-03-14 21:38:581614 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks)
1615 },
1616 {
1617 "manual-enhanced-bookmarks-optout",
1618 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1619 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
kkimlabseedd8b82014-09-05 13:01:091620 kOsDesktop | kOsAndroid,
[email protected]cb13d462014-03-14 21:38:581621 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout)
1622 },
[email protected]d5874f12013-12-05 04:30:001623#if defined(OS_ANDROID)
1624 {
1625 "enable-zero-suggest-experiment",
1626 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1627 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1628 kOsAndroid,
1629 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
[email protected]1a82f7372013-12-06 12:46:521630 },
Yaron Friedman7f37900b2014-08-26 16:37:261631 {
1632 "enable-reader-mode-toolbar-icon",
1633 IDS_FLAGS_READER_MODE_EXPERIMENT_NAME,
1634 IDS_FLAGS_READER_MODE_EXPERIMENT_DESCRIPTION,
1635 kOsAndroid,
1636 SINGLE_VALUE_TYPE(switches::kEnableReaderModeToolbarIcon)
1637 },
[email protected]d5874f12013-12-05 04:30:001638#endif
[email protected]1a82f7372013-12-06 12:46:521639 {
1640 "num-raster-threads",
1641 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1642 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1643 kOsAll,
1644 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
[email protected]dc920d62013-12-13 22:12:471645 },
1646 {
[email protected]5d58f952014-05-20 21:12:471647 "origin-chip-in-omnibox",
[email protected]dc920d62013-12-13 22:12:471648 IDS_FLAGS_ORIGIN_CHIP_NAME,
1649 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
[email protected]393a6462014-04-28 15:28:271650 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]5d58f952014-05-20 21:12:471651 MULTI_VALUE_TYPE(kOriginChipChoices)
[email protected]7a54bf4b2014-02-06 19:21:541652 },
1653 {
[email protected]dc920d62013-12-13 22:12:471654 "search-button-in-omnibox",
1655 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1656 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
[email protected]266cd0a2014-05-07 19:55:051657 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]dc920d62013-12-13 22:12:471658 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
[email protected]58bc1c32013-12-16 22:52:071659 },
1660 {
[email protected]b785898a2014-02-05 06:54:431661 "disable-ignore-autocomplete-off",
1662 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1663 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
[email protected]58bc1c32013-12-16 22:52:071664 kOsAll,
[email protected]b785898a2014-02-05 06:54:431665 SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff)
[email protected]7cffac72013-12-20 20:21:501666 },
[email protected]7cffac72013-12-20 20:21:501667 {
[email protected]24ad58782014-01-23 23:43:451668 "enable-permissions-bubbles",
1669 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1670 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
[email protected]4e6d54a2014-06-27 14:32:121671 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]7d198222014-06-17 08:24:221672 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles,
1673 switches::kDisablePermissionsBubbles)
[email protected]24ad58782014-01-23 23:43:451674 },
[email protected]4d11b08b2014-01-27 22:19:071675 {
[email protected]546d8d32014-04-30 15:40:461676 "enable-session-crashed-bubble",
1677 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME,
1678 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION,
1679 kOsWin | kOsLinux,
[email protected]3d990b72014-05-27 21:16:131680 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble,
1681 switches::kDisableSessionCrashedBubble)
[email protected]546d8d32014-04-30 15:40:461682 },
1683 {
[email protected]1231adf2014-01-31 02:22:331684 "out-of-process-pdf",
1685 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1686 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1687 kOsDesktop,
1688 SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf)
1689 },
[email protected]181624c2014-02-04 17:03:341690#if defined(OS_ANDROID)
1691 {
[email protected]276bdfa52014-02-24 14:03:091692 "disable-cast",
1693 IDS_FLAGS_DISABLE_CAST_NAME,
1694 IDS_FLAGS_DISABLE_CAST_DESCRIPTION,
[email protected]30a8cec92014-02-24 10:09:091695 kOsAndroid,
[email protected]276bdfa52014-02-24 14:03:091696 SINGLE_VALUE_TYPE(switches::kDisableCast)
[email protected]30a8cec92014-02-24 10:09:091697 },
[email protected]99af9382014-02-12 09:02:551698 {
1699 "prefetch-search-results",
1700 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1701 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
[email protected]8ca7e09c2014-06-17 18:42:031702 kOsAndroid,
[email protected]99af9382014-02-12 09:02:551703 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
1704 },
[email protected]8ca7e09c2014-06-17 18:42:031705#endif
[email protected]9bd76572014-02-17 05:17:311706#if defined(ENABLE_APP_LIST)
1707 {
1708 "enable-experimental-app-list",
1709 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1710 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1711 kOsWin | kOsLinux | kOsCrOS,
1712 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList)
1713 },
[email protected]b18d51182014-03-13 10:38:271714 {
[email protected]61bce6992014-05-02 17:35:571715 "enable-centered-app-list",
1716 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME,
1717 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION,
[email protected]b18d51182014-03-13 10:38:271718 kOsWin | kOsLinux | kOsCrOS,
[email protected]61bce6992014-05-02 17:35:571719 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList)
[email protected]b18d51182014-03-13 10:38:271720 },
[email protected]9bd76572014-02-17 05:17:311721#endif
[email protected]f42cffb2014-03-08 18:03:251722 {
1723 "touch-scrolling-mode",
1724 IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME,
1725 IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION,
1726 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1727 MULTI_VALUE_TYPE(kTouchScrollingModeChoices)
1728 },
[email protected]67c5a212014-03-17 12:28:001729 {
1730 "bleeding-edge-renderer-mode",
1731 IDS_FLAGS_BLEEDING_RENDERER_NAME,
1732 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION,
[email protected]a8a97512014-03-24 18:28:201733 kOsAndroid,
[email protected]67c5a212014-03-17 12:28:001734 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths)
1735 },
[email protected]8a585cb2014-03-21 17:13:521736 {
1737 "enable-settings-window",
1738 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME,
1739 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION,
1740 kOsDesktop,
[email protected]aae79572014-06-13 00:42:581741 MULTI_VALUE_TYPE(kEnableSettingsWindowChoices)
[email protected]8a585cb2014-03-21 17:13:521742 },
[email protected]812b82a2014-05-15 19:01:381743#if defined(OS_ANDROID)
1744 {
1745 "enable-instant-search-clicks",
1746 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME,
1747 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION,
1748 kOsAndroid,
1749 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks)
1750 },
1751#endif
[email protected]4dffb662014-03-31 11:31:221752 {
1753 "enable-save-password-bubble",
1754 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME,
1755 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION,
dconnelly35f985b32014-08-29 10:40:551756 kOsWin | kOsLinux | kOsCrOS | kOsMac,
[email protected]ea61c082014-04-07 16:57:241757 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble,
1758 switches::kDisableSavePasswordBubble)
[email protected]9804dad9102014-04-01 09:34:181759 },
[email protected]7fe71f02014-04-26 00:47:561760 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1761 // crbug.com/366483 for the target milestone.
1762 {
1763 "allow-insecure-websocket-from-https-origin",
1764 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME,
1765 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION,
1766 kOsAll,
1767 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin)
1768 },
[email protected]64505f72014-04-29 11:07:521769 {
1770 "enable-apps-file-associations",
1771 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME,
1772 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION,
1773 kOsMac,
1774 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations)
1775 },
[email protected]0443e082014-04-30 04:52:501776#if defined(OS_ANDROID)
1777 {
1778 "enable-embeddedsearch-api",
1779 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME,
1780 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION,
1781 kOsAndroid,
1782 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI)
1783 },
[email protected]1d1349292014-05-02 05:22:331784 {
1785 "enable-app-install-alerts",
1786 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME,
1787 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION,
1788 kOsAndroid,
1789 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts)
1790 },
[email protected]0443e082014-04-30 04:52:501791#endif
[email protected]b242b142014-05-07 14:48:491792 {
1793 "distance-field-text",
1794 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME,
1795 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION,
1796 kOsAll,
1797 MULTI_VALUE_TYPE(kDistanceFieldTextChoices)
1798 },
[email protected]6f8ede32014-05-09 13:58:451799 {
1800 "extension-content-verification",
1801 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME,
1802 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION,
1803 kOsDesktop,
1804 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices)
1805 },
[email protected]8f374ce2014-05-08 23:51:521806#if defined(USE_AURA)
1807 {
1808 "text-input-focus-manager",
1809 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME,
1810 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION,
1811 kOsCrOS | kOsLinux | kOsWin,
1812 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager,
1813 switches::kDisableTextInputFocusManager)
1814 },
1815#endif
[email protected]98585412014-05-13 19:01:371816 {
1817 "extension-active-script-permission",
1818 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME,
1819 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION,
1820 kOsAll,
1821 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction)
1822 },
[email protected]52848022014-05-22 19:01:071823 {
[email protected]e79cec22014-07-26 16:20:291824 "harfbuzz-rendertext",
1825 IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME,
1826 IDS_FLAGS_HARFBUZZ_RENDERTEXT_DESCRIPTION,
[email protected]52848022014-05-22 19:01:071827 kOsDesktop,
[email protected]e79cec22014-07-26 16:20:291828 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText,
1829 switches::kDisableHarfBuzzRenderText)
[email protected]52848022014-05-22 19:01:071830 },
[email protected]1c790df2014-06-03 22:51:121831#if defined(OS_ANDROID)
1832 {
[email protected]85f710c2014-06-20 17:29:111833 "answers-in-suggest",
[email protected]1c790df2014-06-03 22:51:121834 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME,
1835 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION,
1836 kOsAndroid,
[email protected]85f710c2014-06-20 17:29:111837 MULTI_VALUE_TYPE(kAnswersInSuggestChoices)
[email protected]1c790df2014-06-03 22:51:121838 },
1839#endif
[email protected]3dfb4012014-06-11 07:33:381840#if defined(OS_ANDROID)
1841 {
1842 "enable-data-reduction-proxy-dev",
1843 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME,
1844 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION,
1845 kOsAndroid,
1846 ENABLE_DISABLE_VALUE_TYPE(
1847 data_reduction_proxy::switches::kEnableDataReductionProxyDev,
1848 data_reduction_proxy::switches::kDisableDataReductionProxyDev)
1849 },
1850#endif
[email protected]48e67ee72014-07-01 06:53:431851 {
[email protected]49b05f82014-08-11 09:16:521852 "enable-experimental-hotwording",
1853 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_NAME,
1854 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION,
1855 kOsDesktop,
1856 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording)
[email protected]48e67ee72014-07-01 06:53:431857 },
[email protected]409d9202014-07-08 01:32:411858 {
1859 "enable-embedded-extension-options",
1860 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME,
1861 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION,
1862 kOsDesktop,
1863 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions)
1864 },
[email protected]3ba3eb712014-07-16 07:47:191865 {
1866 "enable-website-settings-manager",
1867 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME,
1868 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION,
1869 kOsDesktop,
1870 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager)
1871 },
[email protected]c5bbe0e2014-08-01 23:23:301872 {
1873 "remember-cert-error-decisions",
1874 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME,
1875 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION,
1876 kOsAll,
1877 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices)
1878 },
[email protected]bdbf5cb2014-08-07 23:38:081879 {
1880 "enable-drop-sync-credential",
1881 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME,
1882 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION,
1883 kOsAll,
1884 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices)
[email protected]2f0b7e0f2014-08-15 02:18:231885 },
1886 {
1887 "enable-extension-action-redesign",
1888 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME,
1889 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION,
1890 kOsWin | kOsLinux | kOsCrOS,
1891 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign)
1892 },
[email protected]524dd702014-08-16 00:00:451893 {
1894 "autofill-sync-credential",
1895 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_NAME,
1896 IDS_FLAGS_AUTOFILL_SYNC_CREDENTIAL_DESCRIPTION,
1897 kOsAll,
1898 MULTI_VALUE_TYPE(kAutofillSyncCredentialChoices)
1899 },
juyika7be5192014-08-26 23:01:041900#if !defined(OS_ANDROID)
1901 {
1902 "enable-message-center-always-scroll-up-upon-notification-removal",
1903 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_NAME,
1904 IDS_FLAGS_ENABLE_MESSAGE_CENTER_ALWAYS_SCROLL_UP_UPON_REMOVAL_DESCRIPTION,
1905 kOsDesktop,
1906 SINGLE_VALUE_TYPE(
1907 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)
1908 },
1909#endif
[email protected]4b66a7d2014-08-15 17:13:311910 // NOTE: Adding new command-line switches requires adding corresponding
1911 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
1912 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
[email protected]a0e4b072011-08-17 01:47:071913};
[email protected]ad2a3ded2010-08-27 13:19:051914
[email protected]a314ee5a2010-10-26 21:23:281915const Experiment* experiments = kExperiments;
1916size_t num_experiments = arraysize(kExperiments);
1917
[email protected]e2ddbc92010-10-15 20:02:071918// Stores and encapsulates the little state that about:flags has.
1919class FlagsState {
1920 public:
1921 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401922 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211923 CommandLine* command_line,
1924 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:071925 bool IsRestartNeededToCommitChanges();
1926 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401927 FlagsStorage* flags_storage,
1928 const std::string& internal_name,
1929 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071930 void RemoveFlagsSwitches(
1931 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401932 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071933 void reset();
1934
1935 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551936 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071937 return Singleton<FlagsState>::get();
1938 }
1939
1940 private:
1941 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531942 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071943
1944 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1945};
1946
[email protected]8a6ff28d2010-12-02 16:35:191947// Adds the internal names for the specified experiment to |names|.
1948void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1949 if (e.type == Experiment::SINGLE_VALUE) {
1950 names->insert(e.internal_name);
1951 } else {
[email protected]83e9fa702013-02-25 19:30:441952 DCHECK(e.type == Experiment::MULTI_VALUE ||
1953 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191954 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441955 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191956 }
1957}
1958
[email protected]28e35af2011-02-09 12:56:221959// Confirms that an experiment is valid, used in a DCHECK in
1960// SanitizeList below.
1961bool ValidateExperiment(const Experiment& e) {
1962 switch (e.type) {
1963 case Experiment::SINGLE_VALUE:
1964 DCHECK_EQ(0, e.num_choices);
1965 DCHECK(!e.choices);
1966 break;
1967 case Experiment::MULTI_VALUE:
1968 DCHECK_GT(e.num_choices, 0);
1969 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531970 DCHECK(e.choices[0].command_line_switch);
1971 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221972 break;
[email protected]83e9fa702013-02-25 19:30:441973 case Experiment::ENABLE_DISABLE_VALUE:
1974 DCHECK_EQ(3, e.num_choices);
1975 DCHECK(!e.choices);
1976 DCHECK(e.command_line_switch);
1977 DCHECK(e.command_line_value);
1978 DCHECK(e.disable_command_line_switch);
1979 DCHECK(e.disable_command_line_value);
1980 break;
[email protected]28e35af2011-02-09 12:56:221981 default:
1982 NOTREACHED();
1983 }
1984 return true;
1985}
1986
[email protected]ad2a3ded2010-08-27 13:19:051987// Removes all experiments from prefs::kEnabledLabsExperiments that are
1988// unknown, to prevent this list to become very long as experiments are added
1989// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401990void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051991 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221992 for (size_t i = 0; i < num_experiments; ++i) {
1993 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191994 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221995 }
[email protected]ad2a3ded2010-08-27 13:19:051996
[email protected]07d666d2013-07-21 23:56:261997 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051998
[email protected]09f3fde82014-05-14 15:08:151999 std::set<std::string> new_enabled_experiments =
2000 base::STLSetIntersection<std::set<std::string> >(
2001 known_experiments, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052002
[email protected]07d666d2013-07-21 23:56:262003 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:402004 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052005}
2006
[email protected]1a47d7e2010-10-15 00:37:242007void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:402008 FlagsStorage* flags_storage, std::set<std::string>* result) {
2009 SanitizeList(flags_storage);
2010 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052011}
2012
[email protected]12271632013-11-26 03:06:392013bool SkipConditionalExperiment(const Experiment& experiment) {
[email protected]4d7552f2014-03-04 04:53:332014 if (experiment.internal_name ==
2015 std::string("enhanced-bookmarks-experiment")) {
2016 CommandLine* command_line = CommandLine::ForCurrentProcess();
2017 // Dont't skip experiment if it has non default value.
2018 // It means user selected it.
2019 if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment))
2020 return false;
2021
[email protected]11534552013-12-05 02:09:302022 return !IsEnhancedBookmarksExperimentEnabled();
[email protected]12271632013-11-26 03:06:392023 }
[email protected]cb13d462014-03-14 21:38:582024 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) ||
2025 (experiment.internal_name ==
2026 std::string("manual-enhanced-bookmarks-optout"))) {
2027 return true;
2028 }
[email protected]4d7552f2014-03-04 04:53:332029
[email protected]3dfb4012014-06-11 07:33:382030#if defined(OS_ANDROID)
2031 // enable-data-reduction-proxy-dev is only available for the Dev channel.
2032 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
2033 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2034 return true;
2035 }
2036#endif
2037
[email protected]12271632013-11-26 03:06:392038 return false;
2039}
2040
2041
[email protected]a314ee5a2010-10-26 21:23:282042// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2043// enabled on the current platform.
2044void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:402045 FlagsStorage* flags_storage, std::set<std::string>* result) {
2046 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:282047
2048 // Filter out any experiments that aren't enabled on the current platform. We
2049 // don't remove these from prefs else syncing to a platform with a different
2050 // set of experiments would be lossy.
2051 std::set<std::string> platform_experiments;
2052 int current_platform = GetCurrentPlatform();
2053 for (size_t i = 0; i < num_experiments; ++i) {
2054 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:192055 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:582056#if defined(OS_CHROMEOS)
2057 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2058 AddInternalName(experiments[i], &platform_experiments);
2059#endif
[email protected]a314ee5a2010-10-26 21:23:282060 }
2061
[email protected]09f3fde82014-05-14 15:08:152062 std::set<std::string> new_enabled_experiments =
2063 base::STLSetIntersection<std::set<std::string> >(
2064 platform_experiments, *result);
[email protected]a314ee5a2010-10-26 21:23:282065
2066 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052067}
2068
[email protected]8a6ff28d2010-12-02 16:35:192069// Returns the Value representing the choice data in the specified experiment.
[email protected]5bcdd99d2013-12-23 18:28:302070base::Value* CreateChoiceData(
2071 const Experiment& experiment,
2072 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:442073 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2074 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]5bcdd99d2013-12-23 18:28:302075 base::ListValue* result = new base::ListValue;
[email protected]8a6ff28d2010-12-02 16:35:192076 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]5bcdd99d2013-12-23 18:28:302077 base::DictionaryValue* value = new base::DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:442078 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192079 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:442080 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:222081 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192082 result->Append(value);
2083 }
2084 return result;
2085}
2086
[email protected]e2ddbc92010-10-15 20:02:072087} // namespace
2088
[email protected]83e9fa702013-02-25 19:30:442089std::string Experiment::NameForChoice(int index) const {
2090 DCHECK(type == Experiment::MULTI_VALUE ||
2091 type == Experiment::ENABLE_DISABLE_VALUE);
2092 DCHECK_LT(index, num_choices);
2093 return std::string(internal_name) + testing::kMultiSeparator +
2094 base::IntToString(index);
2095}
2096
[email protected]96920152013-12-04 21:00:162097base::string16 Experiment::DescriptionForChoice(int index) const {
[email protected]83e9fa702013-02-25 19:30:442098 DCHECK(type == Experiment::MULTI_VALUE ||
2099 type == Experiment::ENABLE_DISABLE_VALUE);
2100 DCHECK_LT(index, num_choices);
2101 int description_id;
2102 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2103 const int kEnableDisableDescriptionIds[] = {
2104 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2105 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2106 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2107 };
2108 description_id = kEnableDisableDescriptionIds[index];
2109 } else {
2110 description_id = choices[index].description_id;
2111 }
2112 return l10n_util::GetStringUTF16(description_id);
2113}
2114
[email protected]e6d1c4f2013-06-12 17:37:402115void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212116 CommandLine* command_line,
2117 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:402118 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:212119 command_line,
2120 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:052121}
2122
[email protected]6d98abf2013-06-17 23:35:512123bool AreSwitchesIdenticalToCurrentCommandLine(
[email protected]4b66a7d2014-08-15 17:13:312124 const CommandLine& new_cmdline,
2125 const CommandLine& active_cmdline,
2126 std::set<CommandLine::StringType>* out_difference) {
[email protected]6d98abf2013-06-17 23:35:512127 std::set<CommandLine::StringType> new_flags =
2128 ExtractFlagsFromCommandLine(new_cmdline);
2129 std::set<CommandLine::StringType> active_flags =
2130 ExtractFlagsFromCommandLine(active_cmdline);
2131
[email protected]4b66a7d2014-08-15 17:13:312132 bool result = false;
[email protected]6d98abf2013-06-17 23:35:512133 // Needed because std::equal doesn't check if the 2nd set is empty.
[email protected]4b66a7d2014-08-15 17:13:312134 if (new_flags.size() == active_flags.size()) {
2135 result =
2136 std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2137 }
[email protected]6d98abf2013-06-17 23:35:512138
[email protected]4b66a7d2014-08-15 17:13:312139 if (out_difference && !result) {
2140 std::set_symmetric_difference(
2141 new_flags.begin(),
2142 new_flags.end(),
2143 active_flags.begin(),
2144 active_flags.end(),
2145 std::inserter(*out_difference, out_difference->begin()));
2146 }
2147
2148 return result;
[email protected]6d98abf2013-06-17 23:35:512149}
2150
[email protected]e6d1c4f2013-06-12 17:37:402151void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:522152 FlagAccess access,
2153 base::ListValue* supported_experiments,
2154 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:052155 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402156 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052157
2158 int current_platform = GetCurrentPlatform();
2159
[email protected]a314ee5a2010-10-26 21:23:282160 for (size_t i = 0; i < num_experiments; ++i) {
2161 const Experiment& experiment = experiments[i];
[email protected]12271632013-11-26 03:06:392162 if (SkipConditionalExperiment(experiment))
2163 continue;
[email protected]ad2a3ded2010-08-27 13:19:052164
[email protected]5bcdd99d2013-12-23 18:28:302165 base::DictionaryValue* data = new base::DictionaryValue();
[email protected]ad2a3ded2010-08-27 13:19:052166 data->SetString("internal_name", experiment.internal_name);
2167 data->SetString("name",
2168 l10n_util::GetStringUTF16(experiment.visible_name_id));
2169 data->SetString("description",
2170 l10n_util::GetStringUTF16(
2171 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:402172
[email protected]5bcdd99d2013-12-23 18:28:302173 base::ListValue* supported_platforms = new base::ListValue();
[email protected]cc3e2052011-12-20 01:01:402174 AddOsStrings(experiment.supported_platforms, supported_platforms);
2175 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:052176
[email protected]28e35af2011-02-09 12:56:222177 switch (experiment.type) {
2178 case Experiment::SINGLE_VALUE:
2179 data->SetBoolean(
2180 "enabled",
2181 enabled_experiments.count(experiment.internal_name) > 0);
2182 break;
2183 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:442184 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:222185 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2186 break;
2187 default:
2188 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192189 }
2190
[email protected]ee28495a2013-05-20 04:10:522191 bool supported = (experiment.supported_platforms & current_platform) != 0;
2192#if defined(OS_CHROMEOS)
2193 if (access == kOwnerAccessToFlags &&
2194 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2195 supported = true;
2196 }
2197#endif
2198 if (supported)
2199 supported_experiments->Append(data);
2200 else
2201 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052202 }
[email protected]ad2a3ded2010-08-27 13:19:052203}
2204
[email protected]ad2a3ded2010-08-27 13:19:052205bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552206 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052207}
2208
[email protected]e6d1c4f2013-06-12 17:37:402209void SetExperimentEnabled(FlagsStorage* flags_storage,
2210 const std::string& internal_name,
2211 bool enable) {
2212 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2213 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072214}
2215
2216void RemoveFlagsSwitches(
2217 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552218 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072219}
2220
[email protected]e6d1c4f2013-06-12 17:37:402221void ResetAllFlags(FlagsStorage* flags_storage) {
2222 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002223}
2224
[email protected]a314ee5a2010-10-26 21:23:282225int GetCurrentPlatform() {
2226#if defined(OS_MACOSX)
2227 return kOsMac;
2228#elif defined(OS_WIN)
2229 return kOsWin;
2230#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2231 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212232#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282233 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402234#elif defined(OS_ANDROID)
2235 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282236#else
2237#error Unknown platform
2238#endif
2239}
2240
[email protected]e6d1c4f2013-06-12 17:37:402241void RecordUMAStatistics(FlagsStorage* flags_storage) {
2242 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:542243 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2244 ++it) {
2245 std::string action("AboutFlags_");
2246 action += *it;
[email protected]7f6f44c2011-12-14 13:23:382247 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542248 }
2249 // Since flag metrics are recorded every startup, add a tick so that the
2250 // stats can be made meaningful.
2251 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:382252 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2253 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542254}
2255
alemate0107c3272014-09-03 04:30:042256base::HistogramBase::Sample GetSwitchUMAId(const std::string& switch_name) {
2257 return static_cast<base::HistogramBase::Sample>(
2258 metrics::HashMetricName(switch_name));
[email protected]4b66a7d2014-08-15 17:13:312259}
2260
2261void ReportCustomFlags(const std::string& uma_histogram_hame,
2262 const std::set<std::string>& command_line_difference) {
2263 for (std::set<std::string>::const_iterator it =
2264 command_line_difference.begin();
2265 it != command_line_difference.end();
2266 ++it) {
2267 int uma_id = about_flags::kBadSwitchFormatHistogramId;
2268 if (StartsWithASCII(*it, "--", true /* case_sensitive */)) {
2269 // Skip '--' before switch name.
2270 std::string switch_name(it->substr(2));
2271
2272 // Kill value, if any.
2273 const size_t value_pos = switch_name.find('=');
2274 if (value_pos != std::string::npos)
2275 switch_name.resize(value_pos);
2276
2277 uma_id = GetSwitchUMAId(switch_name);
2278 } else {
2279 NOTREACHED() << "ReportCustomFlags(): flag '" << *it
2280 << "' has incorrect format.";
2281 }
2282 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2283 << "' '" << *it << "', uma_id=" << uma_id;
2284
2285 // Sparse histogram macro does not cache the histogram, so it's safe
2286 // to use macro with non-static histogram name here.
2287 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id);
2288 }
2289}
2290
[email protected]e2ddbc92010-10-15 20:02:072291//////////////////////////////////////////////////////////////////////////////
2292// FlagsState implementation.
2293
2294namespace {
2295
[email protected]83e9fa702013-02-25 19:30:442296typedef std::map<std::string, std::pair<std::string, std::string> >
2297 NameToSwitchAndValueMap;
2298
2299void SetFlagToSwitchMapping(const std::string& key,
2300 const std::string& switch_name,
2301 const std::string& switch_value,
2302 NameToSwitchAndValueMap* name_to_switch_map) {
2303 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2304 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2305}
2306
[email protected]578f2092013-09-16 17:16:212307void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2308 CommandLine* command_line,
2309 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072310 if (command_line->HasSwitch(switches::kNoExperiments))
2311 return;
2312
2313 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002314
[email protected]e6d1c4f2013-06-12 17:37:402315 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2316 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072317
[email protected]a82744532011-02-11 16:15:532318 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192319 for (size_t i = 0; i < num_experiments; ++i) {
2320 const Experiment& e = experiments[i];
2321 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442322 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2323 e.command_line_value, &name_to_switch_map);
2324 } else if (e.type == Experiment::MULTI_VALUE) {
2325 for (int j = 0; j < e.num_choices; ++j) {
2326 SetFlagToSwitchMapping(e.NameForChoice(j),
2327 e.choices[j].command_line_switch,
2328 e.choices[j].command_line_value,
2329 &name_to_switch_map);
2330 }
[email protected]8a6ff28d2010-12-02 16:35:192331 } else {
[email protected]83e9fa702013-02-25 19:30:442332 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2333 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2334 &name_to_switch_map);
2335 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2336 e.command_line_value, &name_to_switch_map);
2337 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2338 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192339 }
2340 }
[email protected]e2ddbc92010-10-15 20:02:072341
[email protected]578f2092013-09-16 17:16:212342 if (sentinels == kAddSentinels) {
2343 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2344 flags_switches_.insert(
2345 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2346 std::string()));
2347 }
[email protected]e2ddbc92010-10-15 20:02:072348 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2349 it != enabled_experiments.end();
2350 ++it) {
2351 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532352 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192353 name_to_switch_map.find(experiment_name);
2354 if (name_to_switch_it == name_to_switch_map.end()) {
2355 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072356 continue;
[email protected]8a6ff28d2010-12-02 16:35:192357 }
[email protected]e2ddbc92010-10-15 20:02:072358
[email protected]a82744532011-02-11 16:15:532359 const std::pair<std::string, std::string>&
2360 switch_and_value_pair = name_to_switch_it->second;
2361
[email protected]9737b3632013-08-26 09:23:232362 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532363 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2364 switch_and_value_pair.second);
2365 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072366 }
[email protected]578f2092013-09-16 17:16:212367 if (sentinels == kAddSentinels) {
2368 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2369 flags_switches_.insert(
2370 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2371 std::string()));
2372 }
[email protected]e2ddbc92010-10-15 20:02:072373}
2374
2375bool FlagsState::IsRestartNeededToCommitChanges() {
2376 return needs_restart_;
2377}
2378
[email protected]e6d1c4f2013-06-12 17:37:402379void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2380 const std::string& internal_name,
2381 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442382 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192383 if (at_index != std::string::npos) {
2384 DCHECK(enable);
2385 // We're being asked to enable a multi-choice experiment. Disable the
2386 // currently selected choice.
2387 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222388 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402389 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192390
[email protected]28e35af2011-02-09 12:56:222391 // And enable the new choice, if it is not the default first choice.
2392 if (internal_name != experiment_name + "@0") {
2393 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402394 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082395 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402396 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222397 }
[email protected]8a6ff28d2010-12-02 16:35:192398 return;
2399 }
2400
[email protected]ad2a3ded2010-08-27 13:19:052401 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402402 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052403
[email protected]8a6ff28d2010-12-02 16:35:192404 const Experiment* e = NULL;
2405 for (size_t i = 0; i < num_experiments; ++i) {
2406 if (experiments[i].internal_name == internal_name) {
2407 e = experiments + i;
2408 break;
2409 }
2410 }
2411 DCHECK(e);
2412
2413 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592414 if (enable)
[email protected]147492b2013-03-19 23:52:082415 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592416 else
[email protected]147492b2013-03-19 23:52:082417 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192418 } else {
2419 if (enable) {
2420 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082421 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192422 } else {
2423 // Find the currently enabled choice and disable it.
2424 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442425 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192426 if (enabled_experiments.find(choice_name) !=
2427 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082428 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192429 enabled_experiments.erase(choice_name);
2430 // Continue on just in case there's a bug and more than one
2431 // experiment for this choice was enabled.
2432 }
2433 }
2434 }
2435 }
[email protected]ad2a3ded2010-08-27 13:19:052436
[email protected]e6d1c4f2013-06-12 17:37:402437 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052438}
2439
[email protected]e2ddbc92010-10-15 20:02:072440void FlagsState::RemoveFlagsSwitches(
2441 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532442 for (std::map<std::string, std::string>::const_iterator
2443 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2444 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072445 }
2446}
2447
[email protected]e6d1c4f2013-06-12 17:37:402448void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002449 needs_restart_ = true;
2450
2451 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402452 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002453}
2454
[email protected]e2ddbc92010-10-15 20:02:072455void FlagsState::reset() {
2456 needs_restart_ = false;
2457 flags_switches_.clear();
2458}
2459
[email protected]38e46812011-05-09 20:49:222460} // namespace
[email protected]e2ddbc92010-10-15 20:02:072461
2462namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192463
2464// WARNING: '@' is also used in the html file. If you update this constant you
2465// also need to update the html file.
2466const char kMultiSeparator[] = "@";
2467
[email protected]e2ddbc92010-10-15 20:02:072468void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552469 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072470}
[email protected]a314ee5a2010-10-26 21:23:282471
2472void SetExperiments(const Experiment* e, size_t count) {
2473 if (!e) {
2474 experiments = kExperiments;
2475 num_experiments = arraysize(kExperiments);
2476 } else {
2477 experiments = e;
2478 num_experiments = count;
2479 }
2480}
2481
[email protected]8a6ff28d2010-12-02 16:35:192482const Experiment* GetExperiments(size_t* count) {
2483 *count = num_experiments;
2484 return experiments;
2485}
2486
[email protected]e2ddbc92010-10-15 20:02:072487} // namespace testing
2488
[email protected]1a47d7e2010-10-15 00:37:242489} // namespace about_flags