blob: fa08f1d2cd3663591f6bf4c2a6da9cb340c7e496 [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]58bc1c32013-12-16 22:52:0726#include "components/autofill/core/common/autofill_switches.h"
[email protected]4e6c96e2014-05-17 18:41:1927#include "components/cloud_devices/common/cloud_devices_switches.h"
[email protected]4b66a7d2014-08-15 17:13:3128#include "components/metrics/metrics_hashes.h"
[email protected]cbb22eb2013-06-24 23:53:1029#include "components/nacl/common/nacl_switches.h"
[email protected]720b10492014-07-23 08:48:4030#include "components/search/search_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3831#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2732#include "extensions/common/switches.h"
[email protected]d96aef22012-10-30 11:47:0233#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0534#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0235#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0236#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1737#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5938#include "ui/base/ui_base_switches.h"
[email protected]bf3f4592014-03-31 19:50:4439#include "ui/display/display_switches.h"
[email protected]a6147a22013-09-26 06:55:0940#include "ui/events/event_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4841#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2742#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2443#include "ui/keyboard/keyboard_switches.h"
[email protected]e3d512a72014-03-18 20:50:4744#include "ui/native_theme/native_theme_switches.h"
[email protected]c4f51d22013-11-05 03:11:2645#include "ui/views/views_switches.h"
[email protected]9a224572013-05-12 23:08:5646
[email protected]3dfb4012014-06-11 07:33:3847#if defined(OS_ANDROID)
48#include "chrome/common/chrome_version_info.h"
49#include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h"
[email protected]4c583b62014-08-08 10:37:2350#include "components/omnibox/omnibox_switches.h"
[email protected]3dfb4012014-06-11 07:33:3851#endif
52
[email protected]dc04be7c2012-03-15 23:57:4953#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3154#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4955#endif
56
[email protected]badba1ad2012-11-16 17:21:4657#if defined(OS_CHROMEOS)
58#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5159#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4660#endif
61
[email protected]fe2b77f62013-11-09 04:30:5162#if defined(ENABLE_APP_LIST)
63#include "ui/app_list/app_list_switches.h"
64#endif
65
[email protected]e6e30ac2014-01-13 21:24:3966using base::UserMetricsAction;
[email protected]7f6f44c2011-12-14 13:23:3867
[email protected]1a47d7e2010-10-15 00:37:2468namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0569
[email protected]4b66a7d2014-08-15 17:13:3170const uint32_t kBadSwitchFormatHistogramId = 0;
71
[email protected]8a6ff28d2010-12-02 16:35:1972// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5373#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4474 Experiment::SINGLE_VALUE, \
75 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5376#define SINGLE_VALUE_TYPE(command_line_switch) \
77 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4478#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
79 disable_switch, disable_value) \
80 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
81 disable_switch, disable_value, NULL, 3
82#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
83 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5384#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4485 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1986
[email protected]e2ddbc92010-10-15 20:02:0787namespace {
88
[email protected]9c7453d2012-01-21 00:45:4089const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5690const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0591
[email protected]cc3e2052011-12-20 01:01:4092// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
93// whether the experiment is available on that platform.
[email protected]5bcdd99d2013-12-23 18:28:3094void AddOsStrings(unsigned bitmask, base::ListValue* list) {
[email protected]cc3e2052011-12-20 01:01:4095 struct {
96 unsigned bit;
97 const char* const name;
98 } kBitsToOs[] = {
99 {kOsMac, "Mac"},
100 {kOsWin, "Windows"},
101 {kOsLinux, "Linux"},
102 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:01103 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:58104 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:40105 };
106 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
107 if (bitmask & kBitsToOs[i].bit)
[email protected]5bcdd99d2013-12-23 18:28:30108 list->Append(new base::StringValue(kBitsToOs[i].name));
[email protected]cc3e2052011-12-20 01:01:40109}
110
[email protected]6d98abf2013-06-17 23:35:51111// Convert switch constants to proper CommandLine::StringType strings.
112CommandLine::StringType GetSwitchString(const std::string& flag) {
113 CommandLine cmd_line(CommandLine::NO_PROGRAM);
114 cmd_line.AppendSwitch(flag);
[email protected]4ac579b2014-05-20 06:43:23115 DCHECK_EQ(2U, cmd_line.argv().size());
[email protected]6d98abf2013-06-17 23:35:51116 return cmd_line.argv()[1];
117}
118
119// Scoops flags from a command line.
120std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
121 const CommandLine& cmdline) {
122 std::set<CommandLine::StringType> flags;
123 // First do the ones between --flag-switches-begin and --flag-switches-end.
124 CommandLine::StringVector::const_iterator first =
125 std::find(cmdline.argv().begin(), cmdline.argv().end(),
126 GetSwitchString(switches::kFlagSwitchesBegin));
127 CommandLine::StringVector::const_iterator last =
128 std::find(cmdline.argv().begin(), cmdline.argv().end(),
129 GetSwitchString(switches::kFlagSwitchesEnd));
130 if (first != cmdline.argv().end() && last != cmdline.argv().end())
131 flags.insert(first + 1, last);
132#if defined(OS_CHROMEOS)
133 // Then add those between --policy-switches-begin and --policy-switches-end.
134 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
135 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
136 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
137 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
138 if (first != cmdline.argv().end() && last != cmdline.argv().end())
139 flags.insert(first + 1, last);
140#endif
141 return flags;
142}
143
[email protected]fb854192013-02-06 01:30:04144const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
146 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
147 switches::kEnableCompositingForFixedPosition, ""},
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
149 switches::kDisableCompositingForFixedPosition, ""},
150 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
151 switches::kEnableHighDpiCompositingForFixedPosition, ""}
152};
153
[email protected]d8221b22013-05-23 05:35:43154const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
155 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
157 switches::kEnableCompositingForTransition, ""},
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
159 switches::kDisableCompositingForTransition, ""},
160};
161
[email protected]06fc4d3b2013-07-08 21:07:24162const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
163 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
164 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
165 switches::kEnableAcceleratedFixedRootBackground, ""},
166 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
167 switches::kDisableAcceleratedFixedRootBackground, ""},
168};
169
[email protected]d7932532012-11-21 21:10:31170const Experiment::Choice kTouchEventsChoices[] = {
171 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
172 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
173 switches::kTouchEvents,
174 switches::kTouchEventsEnabled },
175 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
176 switches::kTouchEvents,
177 switches::kTouchEventsDisabled }
178};
179
[email protected]c38e9802014-02-18 21:32:12180#if defined(USE_AURA)
181const Experiment::Choice kOverscrollHistoryNavigationChoices[] = {
182 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" },
183 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
184 switches::kOverscrollHistoryNavigation,
185 "0" },
186 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI,
187 switches::kOverscrollHistoryNavigation,
188 "2" }
189};
190#endif
[email protected]34633be2014-06-26 09:05:59191#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
192const Experiment::Choice kDeviceScaleFactorChoices[] = {
193 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
194 { IDS_DEVICE_SCALE_FACTOR_1_1, switches::kForceDeviceScaleFactor, "1.1"},
195 { IDS_DEVICE_SCALE_FACTOR_1_2, switches::kForceDeviceScaleFactor, "1.2"},
196 { IDS_DEVICE_SCALE_FACTOR_1_25, switches::kForceDeviceScaleFactor, "1.25"},
197 { IDS_DEVICE_SCALE_FACTOR_1_3, switches::kForceDeviceScaleFactor, "1.3"},
198 { IDS_DEVICE_SCALE_FACTOR_1_4, switches::kForceDeviceScaleFactor, "1.4"},
199 { IDS_DEVICE_SCALE_FACTOR_2, switches::kForceDeviceScaleFactor, "2"},
200};
201#endif
[email protected]c38e9802014-02-18 21:32:12202
[email protected]d33d2222014-06-04 15:39:58203#if !defined(DISABLE_NACL)
[email protected]66f409c2012-10-04 20:59:04204const Experiment::Choice kNaClDebugMaskChoices[] = {
[email protected]66f409c2012-10-04 20:59:04205 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
[email protected]402bed6e2014-03-07 08:33:09206 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
207 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
208 // so by default we want to avoid debugging that.
209 // NOTE: As the default value must be the empty string, the mask excluding
210 // the PNaCl translator and secure shell is substituted elsewhere.
211 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" },
212 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" },
[email protected]66f409c2012-10-04 20:59:04213 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
214 switches::kNaClDebugMask, "*://*/*debug.nmf" }
215};
[email protected]d33d2222014-06-04 15:39:58216#endif
[email protected]66f409c2012-10-04 20:59:04217
[email protected]9323fdd12013-02-23 00:31:36218const Experiment::Choice kImplSidePaintingChoices[] = {
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
220 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]a23530d2014-03-11 06:04:14221 switches::kEnableImplSidePainting, ""},
[email protected]9323fdd12013-02-23 00:31:36222 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]a23530d2014-03-11 06:04:14223 switches::kDisableImplSidePainting, ""}
[email protected]9323fdd12013-02-23 00:31:36224};
225
[email protected]7621af22013-09-12 23:06:33226const Experiment::Choice kLCDTextChoices[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]a23530d2014-03-11 06:04:14228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""},
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""}
[email protected]7621af22013-09-12 23:06:33230};
231
[email protected]b242b142014-05-07 14:48:49232const Experiment::Choice kDistanceFieldTextChoices[] = {
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
234 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
235 switches::kEnableDistanceFieldText, "" },
236 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
237 switches::kDisableDistanceFieldText, "" }
238};
239
[email protected]758efb02014-04-05 07:53:45240#ifndef USE_AURA
[email protected]0c04d1c2013-07-10 00:02:32241const Experiment::Choice kDelegatedRendererChoices[] = {
242 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
243 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
244 switches::kEnableDelegatedRenderer, ""},
245 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
246 switches::kDisableDelegatedRenderer, ""}
247};
[email protected]758efb02014-04-05 07:53:45248#endif
[email protected]0c04d1c2013-07-10 00:02:32249
[email protected]a42c85f2013-04-04 18:15:12250const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
251 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
252 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
253 cc::switches::kMaxTilesForInterestArea, "64"},
254 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
255 cc::switches::kMaxTilesForInterestArea, "128"},
256 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
257 cc::switches::kMaxTilesForInterestArea, "256"},
258 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
259 cc::switches::kMaxTilesForInterestArea, "512"}
260};
261
[email protected]a3618122013-04-26 21:15:34262const Experiment::Choice kDefaultTileWidthChoices[] = {
263 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
264 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
265 switches::kDefaultTileWidth, "128"},
266 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
267 switches::kDefaultTileWidth, "256"},
268 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
269 switches::kDefaultTileWidth, "512"},
270 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
271 switches::kDefaultTileWidth, "1024"}
272};
273
274const Experiment::Choice kDefaultTileHeightChoices[] = {
275 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
276 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
277 switches::kDefaultTileHeight, "128"},
278 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
279 switches::kDefaultTileHeight, "256"},
280 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
281 switches::kDefaultTileHeight, "512"},
282 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
283 switches::kDefaultTileHeight, "1024"}
284};
285
[email protected]38484df12013-04-10 16:42:03286const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21287 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
288 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
289 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03290 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
291 switches::kUseSimpleCacheBackend, "on"}
292};
293
[email protected]9afc14e22013-09-25 22:34:14294#if defined(USE_AURA)
[email protected]910ecfe2013-06-03 23:38:14295const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
296 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
297 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
298 switches::kTabCaptureUpscaleQuality, "fast" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
300 switches::kTabCaptureUpscaleQuality, "good" },
301 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
302 switches::kTabCaptureUpscaleQuality, "best" },
303};
304
305const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
306 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
307 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
308 switches::kTabCaptureDownscaleQuality, "fast" },
309 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
310 switches::kTabCaptureDownscaleQuality, "good" },
311 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
312 switches::kTabCaptureDownscaleQuality, "best" },
313};
[email protected]9afc14e22013-09-25 22:34:14314#endif
[email protected]910ecfe2013-06-03 23:38:14315
[email protected]54c8d282014-01-24 17:31:08316#if defined(USE_AURA) || defined(OS_LINUX)
317const Experiment::Choice kOverlayScrollbarChoices[] = {
318 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
319 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
320 switches::kEnableOverlayScrollbar, ""},
321 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
322 switches::kDisableOverlayScrollbar, ""}
323};
324#endif
325
[email protected]2cccfef2014-05-01 06:05:16326const Experiment::Choice kZeroCopyChoices[] = {
[email protected]be2e40a2013-08-27 02:49:20327 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
328 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]2cccfef2014-05-01 06:05:16329 switches::kEnableZeroCopy, ""},
[email protected]be2e40a2013-08-27 02:49:20330 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]2cccfef2014-05-01 06:05:16331 switches::kDisableZeroCopy, ""}
[email protected]be2e40a2013-08-27 02:49:20332};
333
[email protected]d5874f12013-12-05 04:30:00334#if defined(OS_ANDROID)
335const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
336 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
337 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
338 switches::kEnableZeroSuggestMostVisited, ""},
339 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
340 switches::kEnableZeroSuggestEtherSerp, ""},
341 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
342 switches::kEnableZeroSuggestEtherNoSerp, ""},
[email protected]162c8d9fa2014-03-18 20:25:41343 { IDS_FLAGS_ZERO_SUGGEST_PERSONALIZED,
344 switches::kEnableZeroSuggestPersonalized, ""},
[email protected]d5874f12013-12-05 04:30:00345 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
346 switches::kDisableZeroSuggest, ""}
347};
348#endif
349
[email protected]1a82f7372013-12-06 12:46:52350const Experiment::Choice kNumRasterThreadsChoices[] = {
351 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]00d92d32014-01-23 09:46:50352 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
353 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
354 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
355 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
[email protected]1a82f7372013-12-06 12:46:52356};
357
[email protected]a23530d2014-03-11 06:04:14358const Experiment::Choice kEnableGpuRasterizationChoices[] = {
359 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
360 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
361 switches::kEnableGpuRasterization, "" },
362 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
363 switches::kDisableGpuRasterization, "" },
364 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
365 switches::kForceGpuRasterization, "" },
366};
367
[email protected]dc920d62013-12-13 22:12:47368// We're using independent flags here (as opposed to a common flag with
369// different values) to be able to enable/disable the entire experience
370// associated with this feature server-side from the FieldTrial (the complete
371// experience includes other flag changes as well). It is not currently possible
372// to do that with "flag=value" flags.
373const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
374 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
375 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
376 switches::kDisableSearchButtonInOmnibox, ""},
377 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
378 switches::kEnableSearchButtonInOmniboxForStr, ""},
379 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
380 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
381 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
382 switches::kEnableSearchButtonInOmniboxAlways, ""}
383};
384
[email protected]78dd09e2014-01-12 02:41:46385// See comment above for kSearchButtonInOmniboxChoices. The same reasoning
386// applies here.
387const Experiment::Choice kOriginChipChoices[] = {
388 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
389 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
[email protected]5d58f952014-05-20 21:12:47390 { IDS_FLAGS_ORIGIN_CHIP_ALWAYS, switches::kEnableOriginChipAlways, ""},
391 { IDS_FLAGS_ORIGIN_CHIP_ON_SRP, switches::kEnableOriginChipOnSrp, ""}
[email protected]7a54bf4b2014-02-06 19:21:54392};
[email protected]78dd09e2014-01-12 02:41:46393
[email protected]f42cffb2014-03-08 18:03:25394const Experiment::Choice kTouchScrollingModeChoices[] = {
395 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
396 { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL,
397 switches::kTouchScrollingMode,
398 switches::kTouchScrollingModeTouchcancel },
[email protected]372f52e2014-04-28 16:15:49399 { IDS_FLAGS_TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE,
[email protected]f42cffb2014-03-08 18:03:25400 switches::kTouchScrollingMode,
[email protected]372f52e2014-04-28 16:15:49401 switches::kTouchScrollingModeAsyncTouchmove },
[email protected]f42cffb2014-03-08 18:03:25402 { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE,
403 switches::kTouchScrollingMode,
404 switches::kTouchScrollingModeSyncTouchmove },
405};
406
[email protected]4734b902014-04-03 16:42:10407#if defined(ENABLE_APP_LIST)
408const Experiment::Choice kEnableSyncAppListChoices[] = {
409 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
410 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
411 app_list::switches::kEnableSyncAppList, "" },
412 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
413 app_list::switches::kDisableSyncAppList, "" },
414};
415#endif
416
[email protected]6f8ede32014-05-09 13:58:45417const Experiment::Choice kExtensionContentVerificationChoices[] = {
418 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
419 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_BOOTSTRAP,
[email protected]8bb62162014-06-23 09:45:50420 switches::kExtensionContentVerification,
421 switches::kExtensionContentVerificationBootstrap },
[email protected]6f8ede32014-05-09 13:58:45422 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE,
[email protected]8bb62162014-06-23 09:45:50423 switches::kExtensionContentVerification,
424 switches::kExtensionContentVerificationEnforce },
[email protected]6f8ede32014-05-09 13:58:45425 { IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_ENFORCE_STRICT,
[email protected]8bb62162014-06-23 09:45:50426 switches::kExtensionContentVerification,
427 switches::kExtensionContentVerificationEnforceStrict },
[email protected]6f8ede32014-05-09 13:58:45428};
429
[email protected]85f710c2014-06-20 17:29:11430#if defined(OS_ANDROID)
431const Experiment::Choice kAnswersInSuggestChoices[] = {
432 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
433 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
434 switches::kEnableAnswersInSuggest, ""},
435 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
436 switches::kDisableAnswersInSuggest, ""}
437};
438#endif
439
[email protected]3ecc6a12014-06-06 10:26:19440#if defined(OS_CHROMEOS)
441const Experiment::Choice kEnableFileManagerMTPChoices[] = {
442 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
443 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
444 chromeos::switches::kEnableFileManagerMTP, "true" },
445 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
446 chromeos::switches::kEnableFileManagerMTP, "false" }
447};
[email protected]e28c65842014-06-10 08:14:09448
449const Experiment::Choice kEnableFileManagerNewGalleryChoices[] = {
450 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
451 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
452 chromeos::switches::kFileManagerEnableNewGallery, "true"},
453 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
454 chromeos::switches::kFileManagerEnableNewGallery, "false"}
455};
[email protected]3ecc6a12014-06-06 10:26:19456#endif
457
[email protected]aae79572014-06-13 00:42:58458const Experiment::Choice kEnableSettingsWindowChoices[] = {
459 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
460 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
461 ::switches::kEnableSettingsWindow, "" },
462 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
463 ::switches::kDisableSettingsWindow, "" },
464};
465
[email protected]c5bbe0e2014-08-01 23:23:30466// Note that the value is specified in seconds (where 0 is equivalent to
467// disabled).
468const Experiment::Choice kRememberCertificateErrorDecisionsChoices[] = {
469 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
470 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
471 switches::kRememberCertErrorDecisions,
472 "-1" },
473 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_DAY,
474 switches::kRememberCertErrorDecisions,
475 "86400" },
476 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_DAYS,
477 switches::kRememberCertErrorDecisions,
478 "259200" },
479 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_WEEK,
480 switches::kRememberCertErrorDecisions,
481 "604800" },
482 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_ONE_MONTH,
483 switches::kRememberCertErrorDecisions,
484 "2592000" },
485 { IDS_REMEMBER_CERTIFICATE_ERROR_DECISION_CHOICE_THREE_MONTHS,
486 switches::kRememberCertErrorDecisions,
487 "7776000" },
488};
489
[email protected]bdbf5cb2014-08-07 23:38:08490const Experiment::Choice kEnableDropSyncCredentialChoices[] = {
491 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
492 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
493 password_manager::switches::kEnableDropSyncCredential, "" },
494 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
495 password_manager::switches::kDisableDropSyncCredential, "" },
496};
497
[email protected]469ea5c2014-08-12 20:00:56498#if defined(OS_MACOSX)
499const Experiment::Choice kEnableAVFoundationChoices[] = {
500 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
501 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableAVFoundation, ""},
502 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kForceQTKit, ""}
503};
504#endif
505
[email protected]4bc5050c2010-11-18 17:55:54506// RECORDING USER METRICS FOR FLAGS:
507// -----------------------------------------------------------------------------
508// The first line of the experiment is the internal name. If you'd like to
509// gather statistics about the usage of your flag, you should append a marker
510// comment to the end of the feature name, like so:
511// "my-special-feature", // FLAGS:RECORD_UMA
512//
[email protected]d8320fb62014-03-22 03:16:37513// After doing that, run
514// tools/metrics/actions/extract_actions.py
515// to add the metric to actions.xml (which will enable UMA to record your
516// feature flag), then update the <owner>s and <description> sections. Make sure
517// to include the actions.xml file when you upload your code for review!
[email protected]4bc5050c2010-11-18 17:55:54518//
[email protected]783d5bb2012-10-24 03:47:14519// After your feature has shipped under a flag, you can locate the metrics under
520// the action name AboutFlags_internal-action-name. Actions are recorded once
521// per startup, so you should divide this number by AboutFlags_StartupTick to
522// get a sense of usage. Note that this will not be the same as number of users
523// with a given feature enabled because users can quit and relaunch the
524// application multiple times over a given time interval. The dashboard also
525// shows you how many (metrics reporting) users have enabled the flag over the
526// last seven days. However, note that this is not the same as the number of
527// users who have the flag enabled, since enabling the flag happens once,
528// whereas running with the flag enabled happens until the user flips the flag
529// again.
[email protected]4bc5050c2010-11-18 17:55:54530
[email protected]8a6ff28d2010-12-02 16:35:19531// To add a new experiment add to the end of kExperiments. There are two
532// distinct types of experiments:
533// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
534// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22535// . MULTI_VALUE: a list of choices, the first of which should correspond to a
536// deactivated state for this lab (i.e. no command line option). To specify
537// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
538// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19539// See the documentation of Experiment for details on the fields.
540//
[email protected]4b66a7d2014-08-15 17:13:31541// Command-line switches must have entries in enum "LoginCustomFlags" in
542// histograms.xml. See note in histograms.xml and don't forget to run
543// AboutFlagsHistogramTest unit test to calculate and verify checksum.
544//
[email protected]8a6ff28d2010-12-02 16:35:19545// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05546const Experiment kExperiments[] = {
547 {
[email protected]96c6f4c2011-05-18 19:36:22548 "ignore-gpu-blacklist",
549 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
550 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
551 kOsAll,
552 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
553 },
554 {
[email protected]17e27692013-02-06 17:02:09555 "force-accelerated-composited-scrolling",
556 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
557 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
558 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44559 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
560 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09561 },
562 {
[email protected]85603362014-04-21 16:18:14563 "disable_layer_squashing",
564 IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME,
565 IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION,
566 kOsAll,
567 SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing)
568 },
[email protected]5b7033fc2013-12-07 22:32:07569#if defined(OS_WIN)
570 {
[email protected]5b263b6a2014-06-09 21:47:34571 "disable-direct-write",
572 IDS_FLAGS_DISABLE_DIRECT_WRITE_NAME,
573 IDS_FLAGS_DISABLE_DIRECT_WRITE_DESCRIPTION,
[email protected]5b7033fc2013-12-07 22:32:07574 kOsWin,
[email protected]5b263b6a2014-06-09 21:47:34575 SINGLE_VALUE_TYPE(switches::kDisableDirectWrite)
[email protected]5b7033fc2013-12-07 22:32:07576 },
577#endif
[email protected]8b1c3c72013-01-25 01:48:43578 {
[email protected]2b608752013-05-01 03:34:36579 "enable-experimental-canvas-features",
580 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
581 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
582 kOsAll,
583 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
584 },
585 {
[email protected]81c64af62012-06-06 20:15:52586 "disable-accelerated-2d-canvas",
587 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
588 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
589 kOsAll,
590 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
591 },
592 {
[email protected]72d37352014-07-24 02:34:41593 "enable-display-list-2d-canvas",
594 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_NAME,
595 IDS_FLAGS_ENABLE_DISPLAY_LIST_2D_CANVAS_DESCRIPTION,
596 kOsAll,
597 SINGLE_VALUE_TYPE(switches::kEnableDisplayList2dCanvas)
598 },
599 {
[email protected]5963b772011-02-09 22:55:38600 "composited-layer-borders",
601 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
602 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
603 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57604 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38605 },
606 {
[email protected]a8f1eaa2011-03-07 19:00:58607 "show-fps-counter",
608 IDS_FLAGS_SHOW_FPS_COUNTER,
609 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
610 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57611 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58612 },
[email protected]8ff7f342011-05-25 01:49:47613 {
[email protected]deaba6d52011-09-23 14:47:12614 "disable-webgl",
615 IDS_FLAGS_DISABLE_WEBGL_NAME,
616 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28617 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12618 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
619 },
[email protected]09096e02012-05-24 11:12:04620 {
[email protected]ce585bf2013-03-14 16:25:16621 "disable-webrtc",
622 IDS_FLAGS_DISABLE_WEBRTC_NAME,
623 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05624 kOsAndroid,
625#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16626 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05627#else
628 SINGLE_VALUE_TYPE("")
629#endif
630 },
[email protected]5e2bc8c2013-05-28 22:59:57631#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30632 {
[email protected]fdf631e2013-09-13 09:06:07633 "disable-webrtc-hw-decoding",
634 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
635 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
[email protected]6442b022013-12-05 11:09:05636 kOsAndroid | kOsCrOS,
[email protected]fdf631e2013-09-13 09:06:07637 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
638 },
639 {
[email protected]96cbf422013-09-11 12:42:22640 "disable-webrtc-hw-encoding",
641 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
642 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
[email protected]6998f01f22013-12-04 09:27:57643 kOsAndroid | kOsCrOS,
[email protected]96cbf422013-09-11 12:42:22644 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
645 },
[email protected]5e2bc8c2013-05-28 22:59:57646#endif
[email protected]34cb5292013-04-15 06:06:31647#if defined(OS_ANDROID)
648 {
[email protected]7b8a31632013-06-13 22:42:37649 "disable-webaudio",
650 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
651 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31652 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37653 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31654 },
655#endif
[email protected]d9da9582013-01-31 04:59:05656 {
[email protected]fb854192013-02-06 01:30:04657 "enable-compositing-for-fixed-position",
658 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
659 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
660 kOsAll,
661 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
662 },
[email protected]d8221b22013-05-23 05:35:43663 {
664 "enable-compositing-for-transition",
665 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
666 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
667 kOsAll,
668 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
669 },
[email protected]06fc4d3b2013-07-08 21:07:24670 {
671 "enable-accelerated-fixed-root-background",
672 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
673 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
674 kOsAll,
675 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
676 },
[email protected]d33d2222014-06-04 15:39:58677 // Native client is compiled out when DISABLE_NACL is defined.
678#if !defined(DISABLE_NACL)
[email protected]2fe15fcb2010-10-21 20:39:53679 {
[email protected]e3791ce92011-08-09 01:03:32680 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40681 IDS_FLAGS_ENABLE_NACL_NAME,
682 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]d33d2222014-06-04 15:39:58683 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19684 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40685 },
686 {
[email protected]9addd1c2012-09-15 14:28:24687 "enable-nacl-debug", // FLAGS:RECORD_UMA
688 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
689 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56690 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24691 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13692 },
693 {
[email protected]66f409c2012-10-04 20:59:04694 "nacl-debug-mask", // FLAGS:RECORD_UMA
695 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
696 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56697 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04698 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
699 },
[email protected]d33d2222014-06-04 15:39:58700#endif
[email protected]66f409c2012-10-04 20:59:04701 {
[email protected]4bc5050c2010-11-18 17:55:54702 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32703 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
704 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56705 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51706 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32707 },
[email protected]3627b06d2010-11-12 16:36:16708 {
[email protected]ac2e2acd2013-03-21 12:57:29709 "extensions-on-chrome-urls",
710 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
711 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
712 kOsAll,
[email protected]49d9b142013-07-19 08:50:27713 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29714 },
715 {
[email protected]88c92012013-07-02 11:56:34716 "enable-fast-unload",
717 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
718 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
719 kOsAll,
720 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
721 },
722 {
[email protected]1f4da9e2013-06-27 05:23:44723 "enable-app-window-controls",
724 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
725 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
726 kOsDesktop,
727 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
728 },
729 {
[email protected]80bd24e2010-11-30 09:34:38730 "disable-hyperlink-auditing",
731 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
732 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
733 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19734 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51735 },
[email protected]333bdc52013-07-16 00:37:04736#if defined(OS_ANDROID)
737 {
[email protected]26d1b4d2014-02-08 02:42:17738 "contextual-search",
739 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
740 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
741 kOsAndroid,
[email protected]41d32bb2014-05-30 08:26:05742 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableContextualSearch,
743 switches::kDisableContextualSearch)
[email protected]26d1b4d2014-02-08 02:42:17744 },
[email protected]333bdc52013-07-16 00:37:04745#endif
[email protected]8cc9e532013-05-06 21:01:47746 {
[email protected]3eb5728c2011-06-20 22:32:24747 "show-autofill-type-predictions",
748 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
749 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
750 kOsAll,
[email protected]e217c5632013-04-12 19:11:48751 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24752 },
[email protected]bff4d3e2011-06-21 23:58:52753 {
[email protected]a22ebd812011-06-23 00:05:39754 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
755 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
756 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
757 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40758 // On by default for the Mac (different implementation in WebKit).
[email protected]a5a5aaf2013-12-19 02:10:10759 kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39760 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
761 },
[email protected]54c8d282014-01-24 17:31:08762#if defined(USE_AURA) || defined(OS_LINUX)
[email protected]81a6b0b2011-06-24 17:55:40763 {
[email protected]54c8d282014-01-24 17:31:08764 "overlay-scrollbars",
[email protected]23eecbd02013-09-19 18:13:37765 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
766 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
767 // Uses the system preference on Mac (a different implementation).
768 // On Android, this is always enabled.
[email protected]54c8d282014-01-24 17:31:08769 kOsLinux | kOsCrOS | kOsWin,
770 MULTI_VALUE_TYPE(kOverlayScrollbarChoices)
[email protected]23eecbd02013-09-19 18:13:37771 },
[email protected]54c8d282014-01-24 17:31:08772#endif
[email protected]23eecbd02013-09-19 18:13:37773 {
[email protected]7e7a28092011-12-09 22:24:55774 "enable-panels",
775 IDS_FLAGS_ENABLE_PANELS_NAME,
776 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56777 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55778 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54779 },
[email protected]e3749d12011-07-25 22:22:12780 {
[email protected]27c14f02012-06-22 17:29:58781 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27782 "save-page-as-mhtml", // FLAGS:RECORD_UMA
783 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
784 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
785 kOsMac | kOsWin | kOsLinux,
786 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
787 },
788 {
[email protected]903e63382013-06-01 00:40:58789 "enable-quic",
790 IDS_FLAGS_ENABLE_QUIC_NAME,
791 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
792 kOsAll,
793 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
794 switches::kDisableQuic)
795 },
796 {
[email protected]d10833bc2014-04-14 17:50:46797 "enable-spdy4",
798 IDS_FLAGS_ENABLE_SPDY4_NAME,
799 IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION,
[email protected]bca09b9982013-06-27 22:30:46800 kOsAll,
[email protected]d10833bc2014-04-14 17:50:46801 SINGLE_VALUE_TYPE(switches::kEnableSpdy4)
[email protected]88a332622013-07-30 07:13:32802 },
803 {
[email protected]27b3fe92012-03-21 05:35:06804 "enable-async-dns",
805 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
806 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46807 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44808 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
809 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06810 },
811 {
[email protected]c3a47f8d2014-04-15 14:39:28812 "disable-media-source",
813 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
814 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32815 kOsAll,
[email protected]c3a47f8d2014-04-15 14:39:28816 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]722b4d484f2013-10-08 20:33:59817 },
818 {
[email protected]16c242d2013-05-31 23:56:47819 "enable-encrypted-media",
820 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
821 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50822 kOsAll,
[email protected]16c242d2013-05-31 23:56:47823 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
824 },
825 {
[email protected]e76d92f2013-09-26 20:03:35826 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47827 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
828 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50829 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35830 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03831 },
[email protected]ce3934bb2013-09-10 02:02:56832#if defined(OS_ANDROID)
833 {
[email protected]3c56ec12013-09-25 02:03:42834 "disable-infobar-for-protected-media-identifier",
835 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
836 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
837 kOsAndroid,
838 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
839 },
840 {
[email protected]ce3934bb2013-09-10 02:02:56841 "mediadrm-enable-non-compositing",
842 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
843 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
844 kOsAndroid,
845 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
846 },
847#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06848 {
[email protected]bf88c032011-12-22 19:05:47849 "enable-javascript-harmony",
850 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
851 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
852 kOsAll,
853 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
854 },
[email protected]7e7f378a2012-01-05 14:35:37855 {
[email protected]88864db2012-01-18 20:56:35856 "disable-software-rasterizer",
857 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
858 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
859#if defined(ENABLE_SWIFTSHADER)
860 kOsAll,
861#else
862 0,
863#endif
864 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
865 },
[email protected]15a5d722012-01-23 09:11:14866 {
[email protected]d1ddf8c52014-02-06 22:09:31867 "enable-gpu-rasterization",
868 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
869 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
[email protected]96d25e22014-03-04 05:56:18870 kOsAndroid,
[email protected]a23530d2014-03-11 06:04:14871 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)
[email protected]d1ddf8c52014-02-06 22:09:31872 },
873 {
[email protected]c1b18ea2013-07-10 13:01:16874 "enable-experimental-web-platform-features",
875 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
876 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16877 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16878 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49879 },
880 {
[email protected]3e8befc2012-03-13 01:17:03881 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16882 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
883 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56884 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03885 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16886 },
[email protected]184ec592012-03-01 11:54:28887 {
[email protected]2b8290d2014-08-02 00:29:36888 "enable-material-design-ntp",
889 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_NAME,
890 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_NTP_DESCRIPTION,
891 kOsDesktop,
892 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableMaterialDesignNTP,
893 switches::kDisableMaterialDesignNTP)
894 },
895 {
[email protected]184ec592012-03-01 11:54:28896 "enable-devtools-experiments",
897 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
898 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56899 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28900 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
901 },
[email protected]76d1854e2012-03-02 23:57:44902 {
[email protected]2fefdb32013-02-26 14:28:10903 "silent-debugger-extension-api",
904 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
905 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
906 kOsDesktop,
907 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
908 },
909 {
[email protected]1dbaf5e2012-11-30 05:51:32910 "spellcheck-autocorrect",
911 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
912 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
913 kOsWin | kOsLinux | kOsCrOS,
914 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
915 },
916 {
[email protected]e27137282013-06-20 02:38:35917 "enable-scroll-prediction",
918 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
919 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
920 kOsDesktop,
921 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
922 },
923 {
[email protected]d7932532012-11-21 21:10:31924 "touch-events",
925 IDS_TOUCH_EVENTS_NAME,
926 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56927 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31928 MULTI_VALUE_TYPE(kTouchEventsChoices)
929 },
930 {
[email protected]b9c96ff2012-11-26 22:24:40931 "disable-touch-adjustment",
932 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
933 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
934 kOsWin | kOsLinux | kOsCrOS,
935 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
936 },
[email protected]0b60afa2012-04-19 17:36:39937#if defined(OS_CHROMEOS)
938 {
[email protected]81f89e92014-02-21 14:27:35939 "network-portal-notification",
940 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME,
941 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION,
942 kOsCrOS,
943 ENABLE_DISABLE_VALUE_TYPE(
944 chromeos::switches::kEnableNetworkPortalNotification,
945 chromeos::switches::kDisableNetworkPortalNotification)
946 },
[email protected]0b60afa2012-04-19 17:36:39947#endif
[email protected]79be6d32012-04-24 20:47:44948 {
[email protected]8d68a3e02013-01-12 15:57:10949 "enable-download-resumption",
950 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
951 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56952 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10953 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
954 },
[email protected]67fe3642014-08-05 00:00:42955#if defined(ENABLE_PLUGINS)
[email protected]8d68a3e02013-01-12 15:57:10956 {
[email protected]9a5940d2012-04-27 19:16:23957 "allow-nacl-socket-api",
958 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
959 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56960 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23961 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
962 },
[email protected]d33d2222014-06-04 15:39:58963#endif
[email protected]34633be2014-06-26 09:05:59964#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
[email protected]85333732012-05-01 19:02:24965 {
[email protected]4bd20202012-06-14 17:35:01966 "force-device-scale-factor",
[email protected]34633be2014-06-26 09:05:59967 IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_NAME,
968 IDS_FLAGS_FORCE_DEVICE_SCALE_FACTOR_DESCRIPTION,
969 kOsLinux | kOsWin | kOsCrOS,
970 MULTI_VALUE_TYPE(kDeviceScaleFactorChoices)
[email protected]85333732012-05-01 19:02:24971 },
[email protected]34633be2014-06-26 09:05:59972#endif
[email protected]190349fd2012-05-02 00:10:47973#if defined(OS_CHROMEOS)
974 {
975 "allow-touchpad-three-finger-click",
976 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
977 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
978 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24979 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47980 },
981#endif
[email protected]53520b1b2012-05-07 21:43:37982#if defined(USE_ASH)
983 {
[email protected]2ddf37b2013-04-20 01:15:58984 "disable-minimize-on-second-launcher-item-click",
985 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
986 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
987 kOsAll,
988 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
989 },
990 {
[email protected]73074742012-05-17 01:44:41991 "show-touch-hud",
992 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
993 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
994 kOsAll,
995 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
996 },
997 {
[email protected]9f0940b62012-05-23 22:56:35998 "enable-pinch",
999 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1000 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061001 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381002 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1003 },
[email protected]adcdcdd02014-04-25 03:30:241004#endif // defined(USE_ASH)
[email protected]e4cd82e2013-04-10 15:20:381005 {
[email protected]de0aaed2013-05-27 18:16:431006 "enable-pinch-virtual-viewport",
1007 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1008 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
[email protected]fe89d822014-04-28 10:29:001009 kOsLinux | kOsWin | kOsCrOS | kOsAndroid,
1010 ENABLE_DISABLE_VALUE_TYPE(
1011 cc::switches::kEnablePinchVirtualViewport,
1012 cc::switches::kDisablePinchVirtualViewport),
[email protected]de0aaed2013-05-27 18:16:431013 },
[email protected]68bc37c2014-01-07 15:56:481014 {
1015 "enable-viewport-meta",
1016 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
1017 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
1018 kOsLinux | kOsWin | kOsCrOS | kOsMac,
1019 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
1020 },
[email protected]ed7b67f32012-05-28 10:12:281021#if defined(OS_CHROMEOS)
1022 {
[email protected]8b04a1652012-08-04 02:59:491023 "disable-boot-animation",
1024 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1025 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581026 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241027 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491028 },
[email protected]95058572012-08-20 14:57:291029 {
[email protected]e28c65842014-06-10 08:14:091030 "enable-new-gallery",
1031 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_GALLERY_NAME,
1032 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_GALLERY_DESCRIPTION,
1033 kOsCrOS,
1034 MULTI_VALUE_TYPE(kEnableFileManagerNewGalleryChoices)
1035 },
1036 {
[email protected]d739c1db2014-07-08 07:19:591037 "enable-video-player-chromecast-support",
1038 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_NAME,
1039 IDS_FLAGS_ENABLE_VIDEO_PLAYER_CHROMECAST_SUPPORT_DESCRIPTION,
1040 kOsCrOS,
1041 SINGLE_VALUE_TYPE(chromeos::switches::kEnableVideoPlayerChromecastSupport)
1042 },
1043 {
[email protected]f2ad22e2014-07-10 17:52:081044 "disable-office-editing-component-app",
1045 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_NAME,
1046 IDS_FLAGS_DISABLE_OFFICE_EDITING_COMPONENT_APP_DESCRIPTION,
[email protected]099b890c2013-04-25 19:16:261047 kOsCrOS,
[email protected]f2ad22e2014-07-10 17:52:081048 SINGLE_VALUE_TYPE(chromeos::switches::kDisableOfficeEditingComponentApp),
[email protected]099b890c2013-04-25 19:16:261049 },
[email protected]31cf1472013-09-13 00:36:421050 {
[email protected]bf3f4592014-03-31 19:50:441051 "disable-display-color-calibration",
1052 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME,
1053 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION,
1054 kOsCrOS,
1055 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration),
1056 },
[email protected]62018dc2012-12-13 00:37:351057#endif // defined(OS_CHROMEOS)
[email protected]7db8893a2012-07-26 00:49:401058 { "disable-accelerated-video-decode",
1059 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1060 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191061 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401062 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151063 },
[email protected]1d9bb9cd2012-08-28 22:02:501064#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:381065 {
1066 "ash-debug-shortcuts",
1067 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1068 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1069 kOsAll,
1070 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1071 },
[email protected]b19b09a2014-02-26 05:34:341072 { "ash-enable-touch-view-testing",
1073 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME,
1074 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION,
1075 kOsCrOS,
1076 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting),
1077 },
[email protected]88474872014-07-04 22:51:061078 { "ash-disable-text-filtering-in-overview-mode",
1079 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_NAME,
1080 IDS_FLAGS_ASH_DISABLE_TEXT_FILTERING_IN_OVERVIEW_MODE_DESCRIPTION,
1081 kOsCrOS,
1082 SINGLE_VALUE_TYPE(ash::switches::kAshDisableTextFilteringInOverviewMode),
1083 },
[email protected]1d9bb9cd2012-08-28 22:02:501084#endif
[email protected]9b7ab882012-09-10 23:46:361085#if defined(OS_CHROMEOS)
1086 {
[email protected]205f07892012-10-16 20:26:221087 "enable-carrier-switching",
1088 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1089 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1090 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241091 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221092 },
1093 {
[email protected]9b7ab882012-09-10 23:46:361094 "enable-request-tablet-site",
1095 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1096 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1097 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241098 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361099 },
1100#endif
[email protected]dab49c0b2012-10-04 05:55:351101 {
1102 "debug-packed-apps",
1103 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1104 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561105 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351106 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1107 },
[email protected]d1459ed2012-10-10 01:29:331108 {
1109 "enable-password-generation",
1110 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1111 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]3df4a8562014-07-16 21:37:281112 kOsWin | kOsLinux | kOsCrOS,
[email protected]c3cc0632013-10-03 21:54:431113 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1114 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331115 },
[email protected]26d045f2012-10-18 21:18:431116 {
[email protected]0477c062014-04-30 15:02:181117 "enable-automatic-password-saving",
1118 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME,
1119 IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION,
1120 kOsDesktop,
1121 SINGLE_VALUE_TYPE(
1122 password_manager::switches::kEnableAutomaticPasswordSaving)
1123 },
1124 {
[email protected]f2a394b2013-11-28 20:08:041125 "password-manager-reauthentication",
[email protected]429a6e02013-10-23 18:40:481126 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1127 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
[email protected]48293fb2013-12-04 04:02:031128 kOsMac | kOsWin,
[email protected]f2a394b2013-11-28 20:08:041129 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
[email protected]429a6e02013-10-23 18:40:481130 },
1131 {
[email protected]0f1f70852014-08-09 05:56:011132 "enable-android-password-link",
1133 IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_NAME,
1134 IDS_FLAGS_PASSWORD_MANAGER_ANDROID_LINK_DESCRIPTION,
1135 kOsAndroid,
1136 ENABLE_DISABLE_VALUE_TYPE(
1137 password_manager::switches::kEnableAndroidPasswordLink,
1138 password_manager::switches::kDisableAndroidPasswordLink)
1139 },
1140 {
[email protected]76f7d4882012-10-26 21:09:221141 "enable-deferred-image-decoding",
1142 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1143 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221144 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221145 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1146 },
1147 {
[email protected]075543d2012-10-24 01:29:141148 "performance-monitor-gathering",
1149 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1150 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1151 kOsAll,
1152 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1153 },
[email protected]783d5bb2012-10-24 03:47:141154 {
[email protected]45476982013-10-01 03:22:291155 "wallet-service-use-sandbox",
1156 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1157 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
[email protected]d4d59992014-06-04 23:48:071158 kOsAndroid | kOsDesktop,
[email protected]45476982013-10-01 03:22:291159 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1160 autofill::switches::kWalletServiceUseSandbox, "1",
1161 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541162 },
[email protected]177260c2013-04-24 01:47:381163#if defined(USE_AURA)
1164 {
1165 "overscroll-history-navigation",
1166 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1167 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1168 kOsAll,
[email protected]c38e9802014-02-18 21:32:121169 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices)
[email protected]177260c2013-04-24 01:47:381170 },
1171#endif
[email protected]edbea622012-11-28 20:39:381172 {
[email protected]888878e82013-07-24 22:49:401173 "scroll-end-effect",
1174 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1175 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1176 kOsCrOS,
1177 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1178 switches::kScrollEndEffect, "1",
1179 switches::kScrollEndEffect, "0")
1180 },
1181 {
[email protected]cc7c069d2014-08-07 20:42:051182 "enable-renderer-mojo-channel",
1183 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_NAME,
1184 IDS_FLAGS_ENABLE_RENDERER_MOJO_CHANNEL_DESCRIPTION,
1185 kOsAll,
1186 SINGLE_VALUE_TYPE(switches::kEnableRendererMojoChannel)
1187 },
1188 {
[email protected]edbea622012-11-28 20:39:381189 "enable-touch-drag-drop",
1190 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1191 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1192 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271193 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1194 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381195 },
[email protected]0e2f43b62013-02-21 00:47:151196 {
1197 "enable-touch-editing",
1198 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1199 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
[email protected]877dd942014-06-06 16:02:011200 kOsCrOS | kOsWin | kOsLinux,
[email protected]1400e6dc2013-04-27 02:36:271201 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1202 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151203 },
[email protected]92e12dd92012-12-11 03:33:201204 {
[email protected]06a82ff2014-04-25 02:24:461205 "enable-suggestions-service",
1206 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME,
1207 IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION,
1208 kOsAndroid | kOsCrOS,
1209 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService,
1210 switches::kDisableSuggestionsService)
1211 },
1212 {
[email protected]ddec1aa2013-04-28 23:22:451213 "enable-sync-synced-notifications",
1214 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1215 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181216 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451217 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1218 switches::kDisableSyncSyncedNotifications)
1219 },
[email protected]630a27a2014-01-15 08:24:091220#if defined(ENABLE_APP_LIST)
1221 {
[email protected]4734b902014-04-03 16:42:101222 "enable-sync-app-list",
1223 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1224 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
[email protected]630a27a2014-01-15 08:24:091225 kOsDesktop,
[email protected]4734b902014-04-03 16:42:101226 MULTI_VALUE_TYPE(kEnableSyncAppListChoices)
[email protected]630a27a2014-01-15 08:24:091227 },
1228#endif
[email protected]d41cf1b2014-02-21 01:24:351229#if defined(OS_MACOSX)
1230 {
[email protected]0039b0be2014-03-12 20:24:111231 "enable-avfoundation",
1232 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME,
1233 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION,
[email protected]d41cf1b2014-02-21 01:24:351234 kOsMac,
[email protected]469ea5c2014-08-12 20:00:561235 MULTI_VALUE_TYPE(kEnableAVFoundationChoices)
[email protected]d41cf1b2014-02-21 01:24:351236 },
1237#endif
[email protected]5b93e162013-02-19 06:33:091238 {
[email protected]9323fdd12013-02-23 00:31:361239 "impl-side-painting",
1240 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1241 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521242 kOsAll,
[email protected]9323fdd12013-02-23 00:31:361243 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1244 },
[email protected]a42c85f2013-04-04 18:15:121245 {
[email protected]7621af22013-09-12 23:06:331246 "lcd-text-aa",
1247 IDS_FLAGS_LCD_TEXT_NAME,
1248 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1249 kOsDesktop,
1250 MULTI_VALUE_TYPE(kLCDTextChoices)
1251 },
[email protected]4ac579b2014-05-20 06:43:231252#if defined(OS_ANDROID) || defined(OS_MACOSX)
[email protected]7621af22013-09-12 23:06:331253 {
[email protected]0c04d1c2013-07-10 00:02:321254 "delegated-renderer",
1255 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1256 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
[email protected]4ac579b2014-05-20 06:43:231257 kOsAndroid, // TODO(ccameron) Add mac support soon.
[email protected]0c04d1c2013-07-10 00:02:321258 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1259 },
[email protected]758efb02014-04-05 07:53:451260#endif
[email protected]0c04d1c2013-07-10 00:02:321261 {
[email protected]a42c85f2013-04-04 18:15:121262 "max-tiles-for-interest-area",
1263 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1264 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521265 kOsAll,
[email protected]a42c85f2013-04-04 18:15:121266 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1267 },
[email protected]7cf7ccb2013-04-20 02:53:081268 {
[email protected]5676e7482013-12-17 08:05:371269 "enable-offline-auto-reload",
1270 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1271 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1272 kOsAll,
[email protected]bd519e32014-05-09 01:33:171273 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReload,
1274 switches::kDisableOfflineAutoReload)
[email protected]5676e7482013-12-17 08:05:371275 },
1276 {
[email protected]d2e1a0a2014-06-16 15:49:371277 "enable-offline-auto-reload-visible-only",
1278 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_NAME,
1279 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_VISIBLE_ONLY_DESCRIPTION,
1280 kOsAll,
1281 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineAutoReloadVisibleOnly,
1282 switches::kDisableOfflineAutoReloadVisibleOnly)
1283 },
1284 {
[email protected]d8bc9132014-05-02 15:56:371285 "enable-offline-load-stale-cache",
1286 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME,
1287 IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION,
1288 kOsLinux | kOsMac | kOsWin | kOsAndroid,
[email protected]e83140a02014-05-07 14:04:581289 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache,
1290 switches::kDisableOfflineLoadStaleCache)
[email protected]d8bc9132014-05-02 15:56:371291 },
1292 {
[email protected]a3618122013-04-26 21:15:341293 "default-tile-width",
1294 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1295 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1296 kOsAll,
1297 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1298 },
1299 {
1300 "default-tile-height",
1301 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1302 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1303 kOsAll,
1304 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1305 },
[email protected]2289b432014-08-08 17:52:111306#if defined(OS_ANDROID)
1307 {
1308 "disable-gesture-requirement-for-media-playback",
1309 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1310 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1311 kOsAndroid,
1312 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1313 },
1314#endif
[email protected]86459e2c2013-04-10 13:39:241315#if defined(OS_CHROMEOS)
1316 {
1317 "enable-virtual-keyboard",
1318 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1319 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1320 kOsCrOS,
1321 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1322 },
[email protected]8b4321e2013-10-25 01:16:181323 {
[email protected]bb6378fe2014-04-28 21:19:441324 "enable-virtual-keyboard-overscroll",
1325 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME,
1326 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION,
1327 kOsCrOS,
1328 ENABLE_DISABLE_VALUE_TYPE(
1329 keyboard::switches::kEnableVirtualKeyboardOverscroll,
1330 keyboard::switches::kDisableVirtualKeyboardOverscroll)
1331 },
1332 {
[email protected]8b4321e2013-10-25 01:16:181333 "enable-swipe-selection",
1334 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1335 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1336 kOsCrOS,
1337 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1338 },
[email protected]0e627fb12014-03-25 18:18:531339 {
1340 "enable-input-view",
1341 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME,
1342 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION,
1343 kOsCrOS,
1344 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView,
1345 keyboard::switches::kDisableInputView)
1346 },
[email protected]90933412014-06-05 21:11:021347 {
1348 "enable-experimental-input-view-features",
1349 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_NAME,
1350 IDS_FLAGS_ENABLE_EXPERIMENTAL_INPUT_VIEW_FEATURES_DESCRIPTION,
1351 kOsCrOS,
1352 SINGLE_VALUE_TYPE(keyboard::switches::kEnableExperimentalInputViewFeatures)
1353 },
[email protected]86459e2c2013-04-10 13:39:241354#endif
[email protected]38484df12013-04-10 16:42:031355 {
1356 "enable-simple-cache-backend",
1357 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1358 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]957cd5a2014-03-27 19:54:171359 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]38484df12013-04-10 16:42:031360 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1361 },
[email protected]717e4e22013-04-10 20:52:231362 {
1363 "enable-tcp-fast-open",
1364 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1365 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111366 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231367 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1368 },
[email protected]2188c8d2014-03-21 00:58:561369#if defined(ENABLE_SERVICE_DISCOVERY)
[email protected]a4ed7e12013-05-24 01:00:281370 {
[email protected]d394d9762013-09-22 06:00:251371 "device-discovery-notifications",
1372 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1373 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191374 kOsDesktop,
[email protected]d394d9762013-09-22 06:00:251375 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1376 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551377 },
[email protected]53ffe0d2013-10-30 01:20:401378 {
[email protected]4e6c96e2014-05-17 18:41:191379 "enable-cloud-devices",
1380 IDS_FLAGS_ENABLE_CLOUD_DEVICES_NAME,
1381 IDS_FLAGS_ENABLE_CLOUD_DEVICES_DESCRIPTION,
1382 kOsDesktop,
1383 SINGLE_VALUE_TYPE(switches::kEnableCloudDevices)
1384 },
1385 {
[email protected]f0392392014-03-10 20:07:521386 "enable-print-preview-register-promos",
1387 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME,
1388 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION,
[email protected]4e6c96e2014-05-17 18:41:191389 kOsDesktop,
[email protected]f0392392014-03-10 20:07:521390 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos)
1391 },
[email protected]2188c8d2014-03-21 00:58:561392#endif // ENABLE_SERVICE_DISCOVERY
[email protected]ca53b142014-02-25 22:42:231393#if defined(OS_WIN)
1394 {
1395 "enable-cloud-print-xps",
1396 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME,
1397 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION,
1398 kOsWin,
1399 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)
1400 },
1401#endif
[email protected]56d3c6e42013-05-29 11:28:011402#if defined(OS_MACOSX)
1403 {
[email protected]67604442013-06-15 00:04:331404 "enable-simplified-fullscreen",
1405 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1406 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1407 kOsMac,
1408 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1409 },
[email protected]56d3c6e42013-05-29 11:28:011410#endif
[email protected]910ecfe2013-06-03 23:38:141411#if defined(USE_AURA)
1412 {
1413 "tab-capture-upscale-quality",
1414 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1415 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1416 kOsAll,
1417 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1418 },
1419 {
1420 "tab-capture-downscale-quality",
1421 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1422 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1423 kOsAll,
1424 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1425 },
1426#endif
[email protected]71d4f602013-06-04 23:21:101427 {
[email protected]ba7993d2013-11-26 23:44:561428 "enable-spelling-feedback-field-trial",
1429 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1430 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
[email protected]5e099c62013-06-08 05:46:231431 kOsAll,
[email protected]ba7993d2013-11-26 23:44:561432 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
[email protected]5e099c62013-06-08 05:46:231433 },
1434 {
[email protected]71d4f602013-06-04 23:21:101435 "enable-webgl-draft-extensions",
1436 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1437 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1438 kOsAll,
1439 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1440 },
[email protected]deadc492013-06-07 21:39:281441 {
[email protected]bc1697a82013-06-27 15:48:311442 "enable-web-midi",
1443 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1444 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
[email protected]28e56e92014-01-03 07:52:391445 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
[email protected]bc1697a82013-06-27 15:48:311446 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1447 },
[email protected]020df792013-06-29 14:26:211448 {
1449 "enable-new-profile-management",
1450 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1451 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
[email protected]a3b75bd2014-05-28 17:49:421452 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531453 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewProfileManagement,
1454 switches::kDisableNewProfileManagement)
[email protected]020df792013-06-29 14:26:211455 },
1456 {
[email protected]1017a3212014-05-30 10:34:591457 "enable-account-consistency",
1458 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_NAME,
1459 IDS_FLAGS_ENABLE_ACCOUNT_CONSISTENCY_DESCRIPTION,
1460 kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
[email protected]29896ee2014-06-17 17:20:531461 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAccountConsistency,
1462 switches::kDisableAccountConsistency)
[email protected]1017a3212014-05-30 10:34:591463 },
1464 {
[email protected]8f569882014-03-25 21:12:121465 "enable-fast-user-switching",
1466 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME,
1467 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION,
1468 kOsMac | kOsWin | kOsLinux,
1469 SINGLE_VALUE_TYPE(switches::kFastUserSwitching)
1470 },
1471 {
[email protected]274171e2014-04-11 23:10:081472 "enable-new-avatar-menu",
1473 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME,
1474 IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION,
1475 kOsMac | kOsWin | kOsLinux,
[email protected]9152a542014-08-06 05:37:451476 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewAvatarMenu,
1477 switches::kDisableNewAvatarMenu)
[email protected]274171e2014-04-11 23:10:081478 },
1479 {
[email protected]85777bc2013-12-23 00:07:061480 "enable-web-based-signin",
1481 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1482 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
[email protected]2d279f72013-10-21 23:10:161483 kOsMac | kOsWin | kOsLinux,
[email protected]85777bc2013-12-23 00:07:061484 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
[email protected]2d279f72013-10-21 23:10:161485 },
1486 {
[email protected]115d5728c2013-10-23 18:06:141487 "enable-google-profile-info",
1488 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1489 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221490 kOsMac | kOsWin | kOsLinux,
[email protected]115d5728c2013-10-23 18:06:141491 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
[email protected]020df792013-06-29 14:26:211492 },
[email protected]dcf6cf32013-07-03 10:53:281493 {
[email protected]056ed7092014-01-09 12:57:211494 "reset-app-list-install-state",
[email protected]a85aa332013-10-22 11:09:591495 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1496 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
[email protected]7199367d2014-01-20 04:06:211497 kOsMac | kOsWin | kOsLinux,
[email protected]a85aa332013-10-22 11:09:591498 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
[email protected]dcf6cf32013-07-03 10:53:281499 },
[email protected]919b2f82013-10-04 03:11:261500#if defined(ENABLE_APP_LIST)
[email protected]7199367d2014-01-20 04:06:211501#if defined(OS_LINUX)
1502 {
1503 // This is compiled out on non-Linux platforms because otherwise it would be
1504 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1505 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1506 "enable-app-list",
1507 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1508 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1509 kOsLinux,
1510 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1511 },
1512#endif
[email protected]fe2b77f62013-11-09 04:30:511513 {
[email protected]97df3be2014-07-03 07:49:101514 "enable-app-view",
1515 IDS_FLAGS_ENABLE_APP_VIEW_NAME,
1516 IDS_FLAGS_ENABLE_APP_VIEW_DESCRIPTION,
1517 kOsAll,
1518 SINGLE_VALUE_TYPE(switches::kEnableAppView)
1519 },
1520 {
[email protected]9e0a44c2014-06-07 14:26:211521 "disable-app-list-app-info",
1522 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST,
1523 IDS_FLAGS_DISABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1524 kOsLinux | kOsWin | kOsCrOS,
1525 SINGLE_VALUE_TYPE(app_list::switches::kDisableAppInfo)
1526 },
1527 {
[email protected]c30bda262014-06-19 04:10:131528 "enable-drive-apps-in-app-list",
1529 IDS_FLAGS_ENABLE_DRIVE_APPS_IN_APP_LIST_NAME,
1530 IDS_FLAGS_ENABLE_DRIVE_APPS_IN_APP_LIST_DESCRIPTION,
1531 kOsDesktop,
1532 SINGLE_VALUE_TYPE(app_list::switches::kEnableDriveAppsInAppList)
1533 },
[email protected]919b2f82013-10-04 03:11:261534#endif
[email protected]0e38c3252013-08-14 22:18:511535#if defined(OS_ANDROID)
1536 {
1537 "enable-accessibility-tab-switcher",
1538 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1539 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1540 kOsAndroid,
1541 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561542 },
[email protected]738384172013-12-05 01:59:561543 {
[email protected]0e174722014-03-31 21:23:271544 // TODO(dmazzoni): remove this flag when native android accessibility
1545 // ships in the stable channel. http://crbug.com/356775
1546 "enable-accessibility-script-injection",
1547 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1548 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
[email protected]738384172013-12-05 01:59:561549 kOsAndroid,
[email protected]0e174722014-03-31 21:23:271550 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1551 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
[email protected]738384172013-12-05 01:59:561552 },
[email protected]0e38c3252013-08-14 22:18:511553#endif
[email protected]2e9d79f2013-08-16 05:45:561554 {
[email protected]2cccfef2014-05-01 06:05:161555 "enable-one-copy",
1556 IDS_FLAGS_ONE_COPY_NAME,
1557 IDS_FLAGS_ONE_COPY_DESCRIPTION,
[email protected]be2e40a2013-08-27 02:49:201558 kOsAll,
[email protected]2cccfef2014-05-01 06:05:161559 SINGLE_VALUE_TYPE(switches::kEnableOneCopy)
1560 },
1561 {
1562 "enable-zero-copy",
1563 IDS_FLAGS_ZERO_COPY_NAME,
1564 IDS_FLAGS_ZERO_COPY_DESCRIPTION,
1565 kOsAll,
1566 MULTI_VALUE_TYPE(kZeroCopyChoices)
[email protected]4fdc518f2013-08-28 21:37:271567 },
[email protected]bbb4beae2013-09-27 17:20:311568#if defined(OS_CHROMEOS)
1569 {
[email protected]407d82b2013-12-13 11:50:591570 "enable-first-run-ui-transitions",
1571 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1572 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1573 kOsCrOS,
1574 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1575 },
[email protected]bbb4beae2013-09-27 17:20:311576#endif
[email protected]ed1aab12013-10-08 14:27:071577 {
[email protected]f95e6df2013-10-11 13:05:171578 "enable-streamlined-hosted-apps",
1579 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1580 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
[email protected]abe7f8722013-12-13 11:38:061581 kOsWin | kOsCrOS | kOsLinux,
[email protected]f95e6df2013-10-11 13:05:171582 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1583 },
[email protected]a0ef5212013-10-15 18:08:261584 {
[email protected]5ed68882014-05-29 20:32:371585 "enable-prominent-url-app-flow",
1586 IDS_FLAGS_ENABLE_PROMINENT_URL_APP_FLOW_NAME,
1587 IDS_FLAGS_ENABLE_PROMINENT_URL_APP_FLOW_DESCRIPTION,
1588 kOsWin | kOsCrOS | kOsLinux,
1589 SINGLE_VALUE_TYPE(switches::kEnableProminentURLAppFlow)
1590 },
1591 {
[email protected]912576e2013-10-21 10:33:131592 "enable-ephemeral-apps",
1593 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1594 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201595 kOsAll,
[email protected]912576e2013-10-21 10:33:131596 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1597 },
1598 {
[email protected]5ec67052013-12-19 05:40:211599 "enable-linkable-ephemeral-apps",
1600 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1601 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]c04b3332014-05-30 10:43:201602 kOsAll,
[email protected]5ec67052013-12-19 05:40:211603 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1604 },
1605 {
[email protected]7d8056d2014-04-14 15:55:211606 "enable-service-worker-sync",
1607 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME,
1608 IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION,
1609 kOsAll,
1610 SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync)
1611 },
[email protected]dfb66c522013-10-22 19:46:321612#if defined(OS_ANDROID)
1613 {
1614 "disable-click-delay",
1615 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1616 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1617 kOsAndroid,
1618 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1619 SINGLE_VALUE_TYPE("disable-click-delay")
1620 },
1621#endif
[email protected]5a606592014-01-31 10:32:311622#if defined(OS_MACOSX)
[email protected]c2c84ab2013-11-18 03:05:091623 {
1624 "enable-translate-new-ux",
1625 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1626 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
[email protected]5a606592014-01-31 10:32:311627 kOsMac,
[email protected]c2c84ab2013-11-18 03:05:091628 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1629 },
[email protected]5a606592014-01-31 10:32:311630#endif
[email protected]c4f51d22013-11-05 03:11:261631#if defined(TOOLKIT_VIEWS)
1632 {
[email protected]88b47ad72013-11-21 03:34:381633 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1634 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1635 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
[email protected]42f5fe542014-07-25 17:59:331636 kOsCrOS | kOsWin | kOsLinux,
[email protected]88b47ad72013-11-21 03:34:381637 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
[email protected]c4f51d22013-11-05 03:11:261638 },
1639#endif
[email protected]9f268072013-11-07 00:02:151640 {
1641 "enable-apps-show-on-first-paint",
1642 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1643 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1644 kOsDesktop,
1645 SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
1646 },
[email protected]12271632013-11-26 03:06:391647 {
[email protected]4d7552f2014-03-04 04:53:331648 "enhanced-bookmarks-experiment",
[email protected]12271632013-11-26 03:06:391649 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1650 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1651 kOsDesktop,
[email protected]4d7552f2014-03-04 04:53:331652 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1653 switches::kEnhancedBookmarksExperiment, "1",
1654 switches::kEnhancedBookmarksExperiment, "0")
[email protected]12271632013-11-26 03:06:391655 },
[email protected]cb13d462014-03-14 21:38:581656 {
1657 "manual-enhanced-bookmarks",
1658 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1659 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1660 kOsDesktop,
1661 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks)
1662 },
1663 {
1664 "manual-enhanced-bookmarks-optout",
1665 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1666 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1667 kOsDesktop,
1668 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout)
1669 },
[email protected]d5874f12013-12-05 04:30:001670#if defined(OS_ANDROID)
1671 {
1672 "enable-zero-suggest-experiment",
1673 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1674 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1675 kOsAndroid,
1676 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
[email protected]1a82f7372013-12-06 12:46:521677 },
[email protected]d5874f12013-12-05 04:30:001678#endif
[email protected]1a82f7372013-12-06 12:46:521679 {
1680 "num-raster-threads",
1681 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1682 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1683 kOsAll,
1684 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
[email protected]dc920d62013-12-13 22:12:471685 },
1686 {
[email protected]5d58f952014-05-20 21:12:471687 "origin-chip-in-omnibox",
[email protected]dc920d62013-12-13 22:12:471688 IDS_FLAGS_ORIGIN_CHIP_NAME,
1689 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
[email protected]393a6462014-04-28 15:28:271690 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]5d58f952014-05-20 21:12:471691 MULTI_VALUE_TYPE(kOriginChipChoices)
[email protected]7a54bf4b2014-02-06 19:21:541692 },
1693 {
[email protected]dc920d62013-12-13 22:12:471694 "search-button-in-omnibox",
1695 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1696 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
[email protected]266cd0a2014-05-07 19:55:051697 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]dc920d62013-12-13 22:12:471698 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
[email protected]58bc1c32013-12-16 22:52:071699 },
1700 {
[email protected]b785898a2014-02-05 06:54:431701 "disable-ignore-autocomplete-off",
1702 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1703 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
[email protected]58bc1c32013-12-16 22:52:071704 kOsAll,
[email protected]b785898a2014-02-05 06:54:431705 SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff)
[email protected]7cffac72013-12-20 20:21:501706 },
[email protected]7cffac72013-12-20 20:21:501707 {
[email protected]24ad58782014-01-23 23:43:451708 "enable-permissions-bubbles",
1709 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1710 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
[email protected]4e6d54a2014-06-27 14:32:121711 kOsCrOS | kOsMac | kOsWin | kOsLinux,
[email protected]7d198222014-06-17 08:24:221712 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePermissionsBubbles,
1713 switches::kDisablePermissionsBubbles)
[email protected]24ad58782014-01-23 23:43:451714 },
[email protected]4d11b08b2014-01-27 22:19:071715 {
[email protected]546d8d32014-04-30 15:40:461716 "enable-session-crashed-bubble",
1717 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME,
1718 IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION,
1719 kOsWin | kOsLinux,
[email protected]3d990b72014-05-27 21:16:131720 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble,
1721 switches::kDisableSessionCrashedBubble)
[email protected]546d8d32014-04-30 15:40:461722 },
1723 {
[email protected]1231adf2014-01-31 02:22:331724 "out-of-process-pdf",
1725 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1726 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1727 kOsDesktop,
1728 SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf)
1729 },
[email protected]181624c2014-02-04 17:03:341730#if defined(OS_ANDROID)
1731 {
[email protected]276bdfa52014-02-24 14:03:091732 "disable-cast",
1733 IDS_FLAGS_DISABLE_CAST_NAME,
1734 IDS_FLAGS_DISABLE_CAST_DESCRIPTION,
[email protected]30a8cec92014-02-24 10:09:091735 kOsAndroid,
[email protected]276bdfa52014-02-24 14:03:091736 SINGLE_VALUE_TYPE(switches::kDisableCast)
[email protected]30a8cec92014-02-24 10:09:091737 },
[email protected]99af9382014-02-12 09:02:551738 {
1739 "prefetch-search-results",
1740 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1741 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
[email protected]8ca7e09c2014-06-17 18:42:031742 kOsAndroid,
[email protected]99af9382014-02-12 09:02:551743 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
1744 },
[email protected]8ca7e09c2014-06-17 18:42:031745#endif
[email protected]9bd76572014-02-17 05:17:311746#if defined(ENABLE_APP_LIST)
1747 {
1748 "enable-experimental-app-list",
1749 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1750 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1751 kOsWin | kOsLinux | kOsCrOS,
1752 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList)
1753 },
[email protected]b18d51182014-03-13 10:38:271754 {
[email protected]61bce6992014-05-02 17:35:571755 "enable-centered-app-list",
1756 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME,
1757 IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION,
[email protected]b18d51182014-03-13 10:38:271758 kOsWin | kOsLinux | kOsCrOS,
[email protected]61bce6992014-05-02 17:35:571759 SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList)
[email protected]b18d51182014-03-13 10:38:271760 },
[email protected]9bd76572014-02-17 05:17:311761#endif
[email protected]f42cffb2014-03-08 18:03:251762 {
1763 "touch-scrolling-mode",
1764 IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME,
1765 IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION,
1766 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1767 MULTI_VALUE_TYPE(kTouchScrollingModeChoices)
1768 },
[email protected]67c5a212014-03-17 12:28:001769 {
1770 "bleeding-edge-renderer-mode",
1771 IDS_FLAGS_BLEEDING_RENDERER_NAME,
1772 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION,
[email protected]a8a97512014-03-24 18:28:201773 kOsAndroid,
[email protected]67c5a212014-03-17 12:28:001774 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths)
1775 },
[email protected]8a585cb2014-03-21 17:13:521776 {
1777 "enable-settings-window",
1778 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME,
1779 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION,
1780 kOsDesktop,
[email protected]aae79572014-06-13 00:42:581781 MULTI_VALUE_TYPE(kEnableSettingsWindowChoices)
[email protected]8a585cb2014-03-21 17:13:521782 },
[email protected]812b82a2014-05-15 19:01:381783#if defined(OS_ANDROID)
1784 {
1785 "enable-instant-search-clicks",
1786 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME,
1787 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION,
1788 kOsAndroid,
1789 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks)
1790 },
1791#endif
[email protected]4dffb662014-03-31 11:31:221792 {
1793 "enable-save-password-bubble",
1794 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME,
1795 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION,
1796 kOsWin | kOsLinux | kOsCrOS,
[email protected]ea61c082014-04-07 16:57:241797 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble,
1798 switches::kDisableSavePasswordBubble)
[email protected]9804dad9102014-04-01 09:34:181799 },
[email protected]6279f292014-04-16 16:59:561800#if defined(OS_CHROMEOS)
1801 {
1802 "enable-filemanager-mtp",
1803 IDS_FLAGS_ENABLE_FILE_MANAGER_MTP_NAME,
1804 IDS_FLAGS_ENABLE_FILE_MANAGER_MTP_DESCRIPTION,
1805 kOsCrOS,
[email protected]3ecc6a12014-06-06 10:26:191806 MULTI_VALUE_TYPE(kEnableFileManagerMTPChoices)
[email protected]6279f292014-04-16 16:59:561807 },
1808#endif
[email protected]7fe71f02014-04-26 00:47:561809 // TODO(tyoshino): Remove this temporary flag and command line switch. See
1810 // crbug.com/366483 for the target milestone.
1811 {
1812 "allow-insecure-websocket-from-https-origin",
1813 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME,
1814 IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION,
1815 kOsAll,
1816 SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin)
1817 },
[email protected]64505f72014-04-29 11:07:521818 {
1819 "enable-apps-file-associations",
1820 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME,
1821 IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION,
1822 kOsMac,
1823 SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations)
1824 },
[email protected]0443e082014-04-30 04:52:501825#if defined(OS_ANDROID)
1826 {
1827 "enable-embeddedsearch-api",
1828 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME,
1829 IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION,
1830 kOsAndroid,
1831 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI)
1832 },
[email protected]1d1349292014-05-02 05:22:331833 {
1834 "enable-app-install-alerts",
1835 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME,
1836 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION,
1837 kOsAndroid,
1838 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts)
1839 },
[email protected]0443e082014-04-30 04:52:501840#endif
[email protected]b242b142014-05-07 14:48:491841 {
1842 "distance-field-text",
1843 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME,
1844 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION,
1845 kOsAll,
1846 MULTI_VALUE_TYPE(kDistanceFieldTextChoices)
1847 },
[email protected]6f8ede32014-05-09 13:58:451848 {
1849 "extension-content-verification",
1850 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_NAME,
1851 IDS_FLAGS_EXTENSION_CONTENT_VERIFICATION_DESCRIPTION,
1852 kOsDesktop,
1853 MULTI_VALUE_TYPE(kExtensionContentVerificationChoices)
1854 },
[email protected]8f374ce2014-05-08 23:51:521855#if defined(USE_AURA)
1856 {
1857 "text-input-focus-manager",
1858 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME,
1859 IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION,
1860 kOsCrOS | kOsLinux | kOsWin,
1861 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager,
1862 switches::kDisableTextInputFocusManager)
1863 },
1864#endif
[email protected]98585412014-05-13 19:01:371865 {
1866 "extension-active-script-permission",
1867 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_NAME,
1868 IDS_FLAGS_USER_CONSENT_FOR_EXTENSION_SCRIPTS_DESCRIPTION,
1869 kOsAll,
1870 SINGLE_VALUE_TYPE(extensions::switches::kEnableScriptsRequireAction)
1871 },
[email protected]52848022014-05-22 19:01:071872 {
[email protected]e79cec22014-07-26 16:20:291873 "harfbuzz-rendertext",
1874 IDS_FLAGS_HARFBUZZ_RENDERTEXT_NAME,
1875 IDS_FLAGS_HARFBUZZ_RENDERTEXT_DESCRIPTION,
[email protected]52848022014-05-22 19:01:071876 kOsDesktop,
[email protected]e79cec22014-07-26 16:20:291877 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText,
1878 switches::kDisableHarfBuzzRenderText)
[email protected]52848022014-05-22 19:01:071879 },
[email protected]1c790df2014-06-03 22:51:121880#if defined(OS_ANDROID)
1881 {
[email protected]85f710c2014-06-20 17:29:111882 "answers-in-suggest",
[email protected]1c790df2014-06-03 22:51:121883 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_NAME,
1884 IDS_FLAGS_ENABLE_ANSWERS_IN_SUGGEST_DESCRIPTION,
1885 kOsAndroid,
[email protected]85f710c2014-06-20 17:29:111886 MULTI_VALUE_TYPE(kAnswersInSuggestChoices)
[email protected]1c790df2014-06-03 22:51:121887 },
1888#endif
[email protected]3dfb4012014-06-11 07:33:381889#if defined(OS_ANDROID)
1890 {
1891 "enable-data-reduction-proxy-dev",
1892 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_NAME,
1893 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_DEV_DESCRIPTION,
1894 kOsAndroid,
1895 ENABLE_DISABLE_VALUE_TYPE(
1896 data_reduction_proxy::switches::kEnableDataReductionProxyDev,
1897 data_reduction_proxy::switches::kDisableDataReductionProxyDev)
1898 },
1899#endif
[email protected]48e67ee72014-07-01 06:53:431900 {
[email protected]49b05f82014-08-11 09:16:521901 "enable-experimental-hotwording",
1902 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_NAME,
1903 IDS_FLAGS_ENABLE_EXPERIMENTAL_HOTWORDING_DESCRIPTION,
1904 kOsDesktop,
1905 SINGLE_VALUE_TYPE(switches::kEnableExperimentalHotwording)
[email protected]48e67ee72014-07-01 06:53:431906 },
[email protected]409d9202014-07-08 01:32:411907 {
1908 "enable-embedded-extension-options",
1909 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_NAME,
1910 IDS_FLAGS_ENABLE_EMBEDDED_EXTENSION_OPTIONS_DESCRIPTION,
1911 kOsDesktop,
1912 SINGLE_VALUE_TYPE(extensions::switches::kEnableEmbeddedExtensionOptions)
1913 },
[email protected]3ba3eb712014-07-16 07:47:191914 {
1915 "enable-website-settings-manager",
1916 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_NAME,
1917 IDS_FLAGS_ENABLE_WEBSITE_SETTINGS_DESCRIPTION,
1918 kOsDesktop,
1919 SINGLE_VALUE_TYPE(switches::kEnableWebsiteSettingsManager)
1920 },
[email protected]c5bbe0e2014-08-01 23:23:301921 {
1922 "remember-cert-error-decisions",
1923 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_NAME,
1924 IDS_FLAGS_REMEMBER_CERTIFICATE_ERROR_DECISIONS_DESCRIPTION,
1925 kOsAll,
1926 MULTI_VALUE_TYPE(kRememberCertificateErrorDecisionsChoices)
1927 },
[email protected]bdbf5cb2014-08-07 23:38:081928 {
1929 "enable-drop-sync-credential",
1930 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_NAME,
1931 IDS_FLAGS_ENABLE_DROP_SYNC_CREDENTIAL_DESCRIPTION,
1932 kOsAll,
1933 MULTI_VALUE_TYPE(kEnableDropSyncCredentialChoices)
[email protected]2f0b7e0f2014-08-15 02:18:231934 },
1935 {
1936 "enable-extension-action-redesign",
1937 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_NAME,
1938 IDS_FLAGS_ENABLE_EXTENSION_ACTION_REDESIGN_DESCRIPTION,
1939 kOsWin | kOsLinux | kOsCrOS,
1940 SINGLE_VALUE_TYPE(extensions::switches::kEnableExtensionActionRedesign)
1941 },
[email protected]4b66a7d2014-08-15 17:13:311942 // NOTE: Adding new command-line switches requires adding corresponding
1943 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
1944 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
[email protected]a0e4b072011-08-17 01:47:071945};
[email protected]ad2a3ded2010-08-27 13:19:051946
[email protected]a314ee5a2010-10-26 21:23:281947const Experiment* experiments = kExperiments;
1948size_t num_experiments = arraysize(kExperiments);
1949
[email protected]e2ddbc92010-10-15 20:02:071950// Stores and encapsulates the little state that about:flags has.
1951class FlagsState {
1952 public:
1953 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401954 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211955 CommandLine* command_line,
1956 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:071957 bool IsRestartNeededToCommitChanges();
1958 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401959 FlagsStorage* flags_storage,
1960 const std::string& internal_name,
1961 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071962 void RemoveFlagsSwitches(
1963 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401964 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071965 void reset();
1966
1967 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551968 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071969 return Singleton<FlagsState>::get();
1970 }
1971
1972 private:
1973 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531974 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071975
1976 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1977};
1978
[email protected]8a6ff28d2010-12-02 16:35:191979// Adds the internal names for the specified experiment to |names|.
1980void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1981 if (e.type == Experiment::SINGLE_VALUE) {
1982 names->insert(e.internal_name);
1983 } else {
[email protected]83e9fa702013-02-25 19:30:441984 DCHECK(e.type == Experiment::MULTI_VALUE ||
1985 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191986 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441987 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191988 }
1989}
1990
[email protected]28e35af2011-02-09 12:56:221991// Confirms that an experiment is valid, used in a DCHECK in
1992// SanitizeList below.
1993bool ValidateExperiment(const Experiment& e) {
1994 switch (e.type) {
1995 case Experiment::SINGLE_VALUE:
1996 DCHECK_EQ(0, e.num_choices);
1997 DCHECK(!e.choices);
1998 break;
1999 case Experiment::MULTI_VALUE:
2000 DCHECK_GT(e.num_choices, 0);
2001 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:532002 DCHECK(e.choices[0].command_line_switch);
2003 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:222004 break;
[email protected]83e9fa702013-02-25 19:30:442005 case Experiment::ENABLE_DISABLE_VALUE:
2006 DCHECK_EQ(3, e.num_choices);
2007 DCHECK(!e.choices);
2008 DCHECK(e.command_line_switch);
2009 DCHECK(e.command_line_value);
2010 DCHECK(e.disable_command_line_switch);
2011 DCHECK(e.disable_command_line_value);
2012 break;
[email protected]28e35af2011-02-09 12:56:222013 default:
2014 NOTREACHED();
2015 }
2016 return true;
2017}
2018
[email protected]ad2a3ded2010-08-27 13:19:052019// Removes all experiments from prefs::kEnabledLabsExperiments that are
2020// unknown, to prevent this list to become very long as experiments are added
2021// and removed.
[email protected]e6d1c4f2013-06-12 17:37:402022void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:052023 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:222024 for (size_t i = 0; i < num_experiments; ++i) {
2025 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:192026 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:222027 }
[email protected]ad2a3ded2010-08-27 13:19:052028
[email protected]07d666d2013-07-21 23:56:262029 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052030
[email protected]09f3fde82014-05-14 15:08:152031 std::set<std::string> new_enabled_experiments =
2032 base::STLSetIntersection<std::set<std::string> >(
2033 known_experiments, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052034
[email protected]07d666d2013-07-21 23:56:262035 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:402036 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052037}
2038
[email protected]1a47d7e2010-10-15 00:37:242039void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:402040 FlagsStorage* flags_storage, std::set<std::string>* result) {
2041 SanitizeList(flags_storage);
2042 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:052043}
2044
[email protected]12271632013-11-26 03:06:392045bool SkipConditionalExperiment(const Experiment& experiment) {
[email protected]4d7552f2014-03-04 04:53:332046 if (experiment.internal_name ==
2047 std::string("enhanced-bookmarks-experiment")) {
2048 CommandLine* command_line = CommandLine::ForCurrentProcess();
2049 // Dont't skip experiment if it has non default value.
2050 // It means user selected it.
2051 if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment))
2052 return false;
2053
[email protected]11534552013-12-05 02:09:302054 return !IsEnhancedBookmarksExperimentEnabled();
[email protected]12271632013-11-26 03:06:392055 }
[email protected]cb13d462014-03-14 21:38:582056 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) ||
2057 (experiment.internal_name ==
2058 std::string("manual-enhanced-bookmarks-optout"))) {
2059 return true;
2060 }
[email protected]4d7552f2014-03-04 04:53:332061
[email protected]3dfb4012014-06-11 07:33:382062#if defined(OS_ANDROID)
2063 // enable-data-reduction-proxy-dev is only available for the Dev channel.
2064 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
2065 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2066 return true;
2067 }
2068#endif
2069
[email protected]12271632013-11-26 03:06:392070 return false;
2071}
2072
2073
[email protected]a314ee5a2010-10-26 21:23:282074// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2075// enabled on the current platform.
2076void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:402077 FlagsStorage* flags_storage, std::set<std::string>* result) {
2078 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:282079
2080 // Filter out any experiments that aren't enabled on the current platform. We
2081 // don't remove these from prefs else syncing to a platform with a different
2082 // set of experiments would be lossy.
2083 std::set<std::string> platform_experiments;
2084 int current_platform = GetCurrentPlatform();
2085 for (size_t i = 0; i < num_experiments; ++i) {
2086 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:192087 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:582088#if defined(OS_CHROMEOS)
2089 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2090 AddInternalName(experiments[i], &platform_experiments);
2091#endif
[email protected]a314ee5a2010-10-26 21:23:282092 }
2093
[email protected]09f3fde82014-05-14 15:08:152094 std::set<std::string> new_enabled_experiments =
2095 base::STLSetIntersection<std::set<std::string> >(
2096 platform_experiments, *result);
[email protected]a314ee5a2010-10-26 21:23:282097
2098 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052099}
2100
[email protected]8a6ff28d2010-12-02 16:35:192101// Returns the Value representing the choice data in the specified experiment.
[email protected]5bcdd99d2013-12-23 18:28:302102base::Value* CreateChoiceData(
2103 const Experiment& experiment,
2104 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:442105 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2106 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]5bcdd99d2013-12-23 18:28:302107 base::ListValue* result = new base::ListValue;
[email protected]8a6ff28d2010-12-02 16:35:192108 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]5bcdd99d2013-12-23 18:28:302109 base::DictionaryValue* value = new base::DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:442110 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192111 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:442112 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:222113 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192114 result->Append(value);
2115 }
2116 return result;
2117}
2118
[email protected]e2ddbc92010-10-15 20:02:072119} // namespace
2120
[email protected]83e9fa702013-02-25 19:30:442121std::string Experiment::NameForChoice(int index) const {
2122 DCHECK(type == Experiment::MULTI_VALUE ||
2123 type == Experiment::ENABLE_DISABLE_VALUE);
2124 DCHECK_LT(index, num_choices);
2125 return std::string(internal_name) + testing::kMultiSeparator +
2126 base::IntToString(index);
2127}
2128
[email protected]96920152013-12-04 21:00:162129base::string16 Experiment::DescriptionForChoice(int index) const {
[email protected]83e9fa702013-02-25 19:30:442130 DCHECK(type == Experiment::MULTI_VALUE ||
2131 type == Experiment::ENABLE_DISABLE_VALUE);
2132 DCHECK_LT(index, num_choices);
2133 int description_id;
2134 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2135 const int kEnableDisableDescriptionIds[] = {
2136 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2137 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2138 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2139 };
2140 description_id = kEnableDisableDescriptionIds[index];
2141 } else {
2142 description_id = choices[index].description_id;
2143 }
2144 return l10n_util::GetStringUTF16(description_id);
2145}
2146
[email protected]e6d1c4f2013-06-12 17:37:402147void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212148 CommandLine* command_line,
2149 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:402150 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:212151 command_line,
2152 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:052153}
2154
[email protected]6d98abf2013-06-17 23:35:512155bool AreSwitchesIdenticalToCurrentCommandLine(
[email protected]4b66a7d2014-08-15 17:13:312156 const CommandLine& new_cmdline,
2157 const CommandLine& active_cmdline,
2158 std::set<CommandLine::StringType>* out_difference) {
[email protected]6d98abf2013-06-17 23:35:512159 std::set<CommandLine::StringType> new_flags =
2160 ExtractFlagsFromCommandLine(new_cmdline);
2161 std::set<CommandLine::StringType> active_flags =
2162 ExtractFlagsFromCommandLine(active_cmdline);
2163
[email protected]4b66a7d2014-08-15 17:13:312164 bool result = false;
[email protected]6d98abf2013-06-17 23:35:512165 // Needed because std::equal doesn't check if the 2nd set is empty.
[email protected]4b66a7d2014-08-15 17:13:312166 if (new_flags.size() == active_flags.size()) {
2167 result =
2168 std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2169 }
[email protected]6d98abf2013-06-17 23:35:512170
[email protected]4b66a7d2014-08-15 17:13:312171 if (out_difference && !result) {
2172 std::set_symmetric_difference(
2173 new_flags.begin(),
2174 new_flags.end(),
2175 active_flags.begin(),
2176 active_flags.end(),
2177 std::inserter(*out_difference, out_difference->begin()));
2178 }
2179
2180 return result;
[email protected]6d98abf2013-06-17 23:35:512181}
2182
[email protected]e6d1c4f2013-06-12 17:37:402183void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:522184 FlagAccess access,
2185 base::ListValue* supported_experiments,
2186 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:052187 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402188 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052189
2190 int current_platform = GetCurrentPlatform();
2191
[email protected]a314ee5a2010-10-26 21:23:282192 for (size_t i = 0; i < num_experiments; ++i) {
2193 const Experiment& experiment = experiments[i];
[email protected]12271632013-11-26 03:06:392194 if (SkipConditionalExperiment(experiment))
2195 continue;
[email protected]ad2a3ded2010-08-27 13:19:052196
[email protected]5bcdd99d2013-12-23 18:28:302197 base::DictionaryValue* data = new base::DictionaryValue();
[email protected]ad2a3ded2010-08-27 13:19:052198 data->SetString("internal_name", experiment.internal_name);
2199 data->SetString("name",
2200 l10n_util::GetStringUTF16(experiment.visible_name_id));
2201 data->SetString("description",
2202 l10n_util::GetStringUTF16(
2203 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:402204
[email protected]5bcdd99d2013-12-23 18:28:302205 base::ListValue* supported_platforms = new base::ListValue();
[email protected]cc3e2052011-12-20 01:01:402206 AddOsStrings(experiment.supported_platforms, supported_platforms);
2207 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:052208
[email protected]28e35af2011-02-09 12:56:222209 switch (experiment.type) {
2210 case Experiment::SINGLE_VALUE:
2211 data->SetBoolean(
2212 "enabled",
2213 enabled_experiments.count(experiment.internal_name) > 0);
2214 break;
2215 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:442216 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:222217 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2218 break;
2219 default:
2220 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192221 }
2222
[email protected]ee28495a2013-05-20 04:10:522223 bool supported = (experiment.supported_platforms & current_platform) != 0;
2224#if defined(OS_CHROMEOS)
2225 if (access == kOwnerAccessToFlags &&
2226 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2227 supported = true;
2228 }
2229#endif
2230 if (supported)
2231 supported_experiments->Append(data);
2232 else
2233 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052234 }
[email protected]ad2a3ded2010-08-27 13:19:052235}
2236
[email protected]ad2a3ded2010-08-27 13:19:052237bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552238 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052239}
2240
[email protected]e6d1c4f2013-06-12 17:37:402241void SetExperimentEnabled(FlagsStorage* flags_storage,
2242 const std::string& internal_name,
2243 bool enable) {
2244 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2245 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072246}
2247
2248void RemoveFlagsSwitches(
2249 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552250 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072251}
2252
[email protected]e6d1c4f2013-06-12 17:37:402253void ResetAllFlags(FlagsStorage* flags_storage) {
2254 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002255}
2256
[email protected]a314ee5a2010-10-26 21:23:282257int GetCurrentPlatform() {
2258#if defined(OS_MACOSX)
2259 return kOsMac;
2260#elif defined(OS_WIN)
2261 return kOsWin;
2262#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2263 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212264#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282265 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402266#elif defined(OS_ANDROID)
2267 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282268#else
2269#error Unknown platform
2270#endif
2271}
2272
[email protected]e6d1c4f2013-06-12 17:37:402273void RecordUMAStatistics(FlagsStorage* flags_storage) {
2274 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:542275 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2276 ++it) {
2277 std::string action("AboutFlags_");
2278 action += *it;
[email protected]7f6f44c2011-12-14 13:23:382279 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542280 }
2281 // Since flag metrics are recorded every startup, add a tick so that the
2282 // stats can be made meaningful.
2283 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:382284 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2285 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542286}
2287
[email protected]4b66a7d2014-08-15 17:13:312288uint32_t GetSwitchUMAId(const std::string& switch_name) {
2289 return static_cast<uint32_t>(metrics::HashMetricName(switch_name));
2290}
2291
2292void ReportCustomFlags(const std::string& uma_histogram_hame,
2293 const std::set<std::string>& command_line_difference) {
2294 for (std::set<std::string>::const_iterator it =
2295 command_line_difference.begin();
2296 it != command_line_difference.end();
2297 ++it) {
2298 int uma_id = about_flags::kBadSwitchFormatHistogramId;
2299 if (StartsWithASCII(*it, "--", true /* case_sensitive */)) {
2300 // Skip '--' before switch name.
2301 std::string switch_name(it->substr(2));
2302
2303 // Kill value, if any.
2304 const size_t value_pos = switch_name.find('=');
2305 if (value_pos != std::string::npos)
2306 switch_name.resize(value_pos);
2307
2308 uma_id = GetSwitchUMAId(switch_name);
2309 } else {
2310 NOTREACHED() << "ReportCustomFlags(): flag '" << *it
2311 << "' has incorrect format.";
2312 }
2313 DVLOG(1) << "ReportCustomFlags(): histogram='" << uma_histogram_hame
2314 << "' '" << *it << "', uma_id=" << uma_id;
2315
2316 // Sparse histogram macro does not cache the histogram, so it's safe
2317 // to use macro with non-static histogram name here.
2318 UMA_HISTOGRAM_SPARSE_SLOWLY(uma_histogram_hame, uma_id);
2319 }
2320}
2321
[email protected]e2ddbc92010-10-15 20:02:072322//////////////////////////////////////////////////////////////////////////////
2323// FlagsState implementation.
2324
2325namespace {
2326
[email protected]83e9fa702013-02-25 19:30:442327typedef std::map<std::string, std::pair<std::string, std::string> >
2328 NameToSwitchAndValueMap;
2329
2330void SetFlagToSwitchMapping(const std::string& key,
2331 const std::string& switch_name,
2332 const std::string& switch_value,
2333 NameToSwitchAndValueMap* name_to_switch_map) {
2334 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2335 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2336}
2337
[email protected]578f2092013-09-16 17:16:212338void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2339 CommandLine* command_line,
2340 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072341 if (command_line->HasSwitch(switches::kNoExperiments))
2342 return;
2343
2344 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002345
[email protected]e6d1c4f2013-06-12 17:37:402346 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2347 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072348
[email protected]a82744532011-02-11 16:15:532349 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192350 for (size_t i = 0; i < num_experiments; ++i) {
2351 const Experiment& e = experiments[i];
2352 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442353 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2354 e.command_line_value, &name_to_switch_map);
2355 } else if (e.type == Experiment::MULTI_VALUE) {
2356 for (int j = 0; j < e.num_choices; ++j) {
2357 SetFlagToSwitchMapping(e.NameForChoice(j),
2358 e.choices[j].command_line_switch,
2359 e.choices[j].command_line_value,
2360 &name_to_switch_map);
2361 }
[email protected]8a6ff28d2010-12-02 16:35:192362 } else {
[email protected]83e9fa702013-02-25 19:30:442363 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2364 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2365 &name_to_switch_map);
2366 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2367 e.command_line_value, &name_to_switch_map);
2368 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2369 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192370 }
2371 }
[email protected]e2ddbc92010-10-15 20:02:072372
[email protected]578f2092013-09-16 17:16:212373 if (sentinels == kAddSentinels) {
2374 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2375 flags_switches_.insert(
2376 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2377 std::string()));
2378 }
[email protected]e2ddbc92010-10-15 20:02:072379 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2380 it != enabled_experiments.end();
2381 ++it) {
2382 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532383 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192384 name_to_switch_map.find(experiment_name);
2385 if (name_to_switch_it == name_to_switch_map.end()) {
2386 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072387 continue;
[email protected]8a6ff28d2010-12-02 16:35:192388 }
[email protected]e2ddbc92010-10-15 20:02:072389
[email protected]a82744532011-02-11 16:15:532390 const std::pair<std::string, std::string>&
2391 switch_and_value_pair = name_to_switch_it->second;
2392
[email protected]9737b3632013-08-26 09:23:232393 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532394 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2395 switch_and_value_pair.second);
2396 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072397 }
[email protected]578f2092013-09-16 17:16:212398 if (sentinels == kAddSentinels) {
2399 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2400 flags_switches_.insert(
2401 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2402 std::string()));
2403 }
[email protected]e2ddbc92010-10-15 20:02:072404}
2405
2406bool FlagsState::IsRestartNeededToCommitChanges() {
2407 return needs_restart_;
2408}
2409
[email protected]e6d1c4f2013-06-12 17:37:402410void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2411 const std::string& internal_name,
2412 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442413 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192414 if (at_index != std::string::npos) {
2415 DCHECK(enable);
2416 // We're being asked to enable a multi-choice experiment. Disable the
2417 // currently selected choice.
2418 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222419 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402420 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192421
[email protected]28e35af2011-02-09 12:56:222422 // And enable the new choice, if it is not the default first choice.
2423 if (internal_name != experiment_name + "@0") {
2424 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402425 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082426 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402427 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222428 }
[email protected]8a6ff28d2010-12-02 16:35:192429 return;
2430 }
2431
[email protected]ad2a3ded2010-08-27 13:19:052432 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402433 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052434
[email protected]8a6ff28d2010-12-02 16:35:192435 const Experiment* e = NULL;
2436 for (size_t i = 0; i < num_experiments; ++i) {
2437 if (experiments[i].internal_name == internal_name) {
2438 e = experiments + i;
2439 break;
2440 }
2441 }
2442 DCHECK(e);
2443
2444 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592445 if (enable)
[email protected]147492b2013-03-19 23:52:082446 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592447 else
[email protected]147492b2013-03-19 23:52:082448 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192449 } else {
2450 if (enable) {
2451 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082452 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192453 } else {
2454 // Find the currently enabled choice and disable it.
2455 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442456 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192457 if (enabled_experiments.find(choice_name) !=
2458 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082459 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192460 enabled_experiments.erase(choice_name);
2461 // Continue on just in case there's a bug and more than one
2462 // experiment for this choice was enabled.
2463 }
2464 }
2465 }
2466 }
[email protected]ad2a3ded2010-08-27 13:19:052467
[email protected]e6d1c4f2013-06-12 17:37:402468 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052469}
2470
[email protected]e2ddbc92010-10-15 20:02:072471void FlagsState::RemoveFlagsSwitches(
2472 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532473 for (std::map<std::string, std::string>::const_iterator
2474 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2475 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072476 }
2477}
2478
[email protected]e6d1c4f2013-06-12 17:37:402479void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002480 needs_restart_ = true;
2481
2482 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402483 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002484}
2485
[email protected]e2ddbc92010-10-15 20:02:072486void FlagsState::reset() {
2487 needs_restart_ = false;
2488 flags_switches_.clear();
2489}
2490
[email protected]38e46812011-05-09 20:49:222491} // namespace
[email protected]e2ddbc92010-10-15 20:02:072492
2493namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192494
2495// WARNING: '@' is also used in the html file. If you update this constant you
2496// also need to update the html file.
2497const char kMultiSeparator[] = "@";
2498
[email protected]e2ddbc92010-10-15 20:02:072499void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552500 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072501}
[email protected]a314ee5a2010-10-26 21:23:282502
2503void SetExperiments(const Experiment* e, size_t count) {
2504 if (!e) {
2505 experiments = kExperiments;
2506 num_experiments = arraysize(kExperiments);
2507 } else {
2508 experiments = e;
2509 num_experiments = count;
2510 }
2511}
2512
[email protected]8a6ff28d2010-12-02 16:35:192513const Experiment* GetExperiments(size_t* count) {
2514 *count = num_experiments;
2515 return experiments;
2516}
2517
[email protected]e2ddbc92010-10-15 20:02:072518} // namespace testing
2519
[email protected]1a47d7e2010-10-15 00:37:242520} // namespace about_flags