blob: 84a4250d20aae88f6fb8366dbec36f1be468c182 [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
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]265fd7b2013-08-13 02:32:1013#include "ash/ash_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0514#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1515#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2017#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]11534552013-12-05 02:09:3020#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
[email protected]e6d1c4f2013-06-12 17:37:4021#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0322#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0523#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1024#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3825#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2726#include "extensions/common/switches.h"
[email protected]d96aef22012-10-30 11:47:0227#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0528#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0229#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0230#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1731#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5932#include "ui/base/ui_base_switches.h"
[email protected]8b52c1b2013-09-23 07:28:2233#include "ui/compositor/compositor_switches.h"
[email protected]a6147a22013-09-26 06:55:0934#include "ui/events/event_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4835#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2736#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2437#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5638#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2439#include "ui/surface/surface_switches.h"
[email protected]c4f51d22013-11-05 03:11:2640#include "ui/views/views_switches.h"
[email protected]9a224572013-05-12 23:08:5641
[email protected]dc04be7c2012-03-15 23:57:4942#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3143#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4944#endif
45
[email protected]badba1ad2012-11-16 17:21:4646#if defined(OS_CHROMEOS)
47#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5148#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4649#endif
50
[email protected]fe2b77f62013-11-09 04:30:5151#if defined(ENABLE_APP_LIST)
52#include "ui/app_list/app_list_switches.h"
53#endif
54
[email protected]7f6f44c2011-12-14 13:23:3855using content::UserMetricsAction;
56
[email protected]1a47d7e2010-10-15 00:37:2457namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0558
[email protected]8a6ff28d2010-12-02 16:35:1959// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5360#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4461 Experiment::SINGLE_VALUE, \
62 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5363#define SINGLE_VALUE_TYPE(command_line_switch) \
64 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4465#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
66 disable_switch, disable_value) \
67 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
68 disable_switch, disable_value, NULL, 3
69#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
70 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5371#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4472 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1973
[email protected]e2ddbc92010-10-15 20:02:0774namespace {
75
[email protected]9c7453d2012-01-21 00:45:4076const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5677const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0578
[email protected]cc3e2052011-12-20 01:01:4079// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
80// whether the experiment is available on that platform.
81void AddOsStrings(unsigned bitmask, ListValue* list) {
82 struct {
83 unsigned bit;
84 const char* const name;
85 } kBitsToOs[] = {
86 {kOsMac, "Mac"},
87 {kOsWin, "Windows"},
88 {kOsLinux, "Linux"},
89 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0190 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5891 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4092 };
93 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
94 if (bitmask & kBitsToOs[i].bit)
95 list->Append(new StringValue(kBitsToOs[i].name));
96}
97
[email protected]6d98abf2013-06-17 23:35:5198// Convert switch constants to proper CommandLine::StringType strings.
99CommandLine::StringType GetSwitchString(const std::string& flag) {
100 CommandLine cmd_line(CommandLine::NO_PROGRAM);
101 cmd_line.AppendSwitch(flag);
102 DCHECK(cmd_line.argv().size() == 2);
103 return cmd_line.argv()[1];
104}
105
106// Scoops flags from a command line.
107std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
108 const CommandLine& cmdline) {
109 std::set<CommandLine::StringType> flags;
110 // First do the ones between --flag-switches-begin and --flag-switches-end.
111 CommandLine::StringVector::const_iterator first =
112 std::find(cmdline.argv().begin(), cmdline.argv().end(),
113 GetSwitchString(switches::kFlagSwitchesBegin));
114 CommandLine::StringVector::const_iterator last =
115 std::find(cmdline.argv().begin(), cmdline.argv().end(),
116 GetSwitchString(switches::kFlagSwitchesEnd));
117 if (first != cmdline.argv().end() && last != cmdline.argv().end())
118 flags.insert(first + 1, last);
119#if defined(OS_CHROMEOS)
120 // Then add those between --policy-switches-begin and --policy-switches-end.
121 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
122 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
123 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
124 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
125 if (first != cmdline.argv().end() && last != cmdline.argv().end())
126 flags.insert(first + 1, last);
127#endif
128 return flags;
129}
130
[email protected]fb854192013-02-06 01:30:04131const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
132 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
133 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
134 switches::kEnableCompositingForFixedPosition, ""},
135 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
136 switches::kDisableCompositingForFixedPosition, ""},
137 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
138 switches::kEnableHighDpiCompositingForFixedPosition, ""}
139};
140
[email protected]d8221b22013-05-23 05:35:43141const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
143 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
144 switches::kEnableCompositingForTransition, ""},
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
146 switches::kDisableCompositingForTransition, ""},
147};
148
[email protected]06fc4d3b2013-07-08 21:07:24149const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
150 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
151 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
152 switches::kEnableAcceleratedFixedRootBackground, ""},
153 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
154 switches::kDisableAcceleratedFixedRootBackground, ""},
155};
156
[email protected]8b1c3c72013-01-25 01:48:43157const Experiment::Choice kGDIPresentChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
159 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
160 switches::kDoFirstShowPresentWithGDI, ""},
161 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
162 switches::kDoAllShowPresentWithGDI, ""}
163};
164
[email protected]d7932532012-11-21 21:10:31165const Experiment::Choice kTouchEventsChoices[] = {
166 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
167 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
168 switches::kTouchEvents,
169 switches::kTouchEventsEnabled },
170 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
171 switches::kTouchEvents,
172 switches::kTouchEventsDisabled }
173};
174
[email protected]347a0c72012-05-14 20:28:06175const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31176 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20177 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06178 switches::kTouchOptimizedUI,
179 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20180 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06181 switches::kTouchOptimizedUI,
182 switches::kTouchOptimizedUIDisabled }
183};
184
[email protected]66f409c2012-10-04 20:59:04185const Experiment::Choice kNaClDebugMaskChoices[] = {
186 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
187 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
188 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
189 // an option to switch off its debugging.
190 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
191 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
192 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
193 switches::kNaClDebugMask, "*://*/*debug.nmf" }
194};
195
[email protected]9323fdd12013-02-23 00:31:36196const Experiment::Choice kImplSidePaintingChoices[] = {
197 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
198 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
199 cc::switches::kEnableImplSidePainting, ""},
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
201 cc::switches::kDisableImplSidePainting, ""}
202};
203
[email protected]8b52c1b2013-09-23 07:28:22204const Experiment::Choice kDeadlineSchedulingChoices[] = {
205 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
206 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
207 switches::kEnableDeadlineScheduling, ""},
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
209 switches::kDisableDeadlineScheduling, ""}
210};
211
212const Experiment::Choice kUIDeadlineSchedulingChoices[] = {
213 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
214 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
215 switches::kUIEnableDeadlineScheduling, ""},
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
217 switches::kUIDisableDeadlineScheduling, ""}
218};
219
[email protected]7621af22013-09-12 23:06:33220const Experiment::Choice kLCDTextChoices[] = {
221 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
222 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, cc::switches::kEnableLCDText, ""},
223 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, cc::switches::kDisableLCDText, ""}
224};
225
[email protected]0c04d1c2013-07-10 00:02:32226const Experiment::Choice kDelegatedRendererChoices[] = {
227 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
229 switches::kEnableDelegatedRenderer, ""},
230 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
231 switches::kDisableDelegatedRenderer, ""}
232};
233
[email protected]a42c85f2013-04-04 18:15:12234const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
235 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
236 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
237 cc::switches::kMaxTilesForInterestArea, "64"},
238 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
239 cc::switches::kMaxTilesForInterestArea, "128"},
240 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
241 cc::switches::kMaxTilesForInterestArea, "256"},
242 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
243 cc::switches::kMaxTilesForInterestArea, "512"}
244};
245
[email protected]a3618122013-04-26 21:15:34246const Experiment::Choice kDefaultTileWidthChoices[] = {
247 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
248 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
249 switches::kDefaultTileWidth, "128"},
250 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
251 switches::kDefaultTileWidth, "256"},
252 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
253 switches::kDefaultTileWidth, "512"},
254 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
255 switches::kDefaultTileWidth, "1024"}
256};
257
[email protected]0578bfb592013-10-24 05:57:52258#if defined(USE_ASH)
259const Experiment::Choice kAshOverviewDelayChoices[] = {
260 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
261 { IDS_FLAGS_OVERVIEW_DELAY_INSTANT,
262 ash::switches::kAshOverviewDelayOnAltTab, "0" },
263 { IDS_FLAGS_OVERVIEW_DELAY_SHORT,
264 ash::switches::kAshOverviewDelayOnAltTab, "100" },
265 { IDS_FLAGS_OVERVIEW_DELAY_LONG,
266 ash::switches::kAshOverviewDelayOnAltTab, "500" },
267 { IDS_FLAGS_OVERVIEW_DELAY_NEVER,
268 ash::switches::kAshOverviewDelayOnAltTab, "10000" },
269};
270#endif
271
[email protected]a3618122013-04-26 21:15:34272const Experiment::Choice kDefaultTileHeightChoices[] = {
273 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
274 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
275 switches::kDefaultTileHeight, "128"},
276 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
277 switches::kDefaultTileHeight, "256"},
278 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
279 switches::kDefaultTileHeight, "512"},
280 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
281 switches::kDefaultTileHeight, "1024"}
282};
283
[email protected]38484df12013-04-10 16:42:03284const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21285 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
286 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
287 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03288 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
289 switches::kUseSimpleCacheBackend, "on"}
290};
291
[email protected]9afc14e22013-09-25 22:34:14292#if defined(USE_AURA)
[email protected]910ecfe2013-06-03 23:38:14293const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
294 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
295 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
296 switches::kTabCaptureUpscaleQuality, "fast" },
297 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
298 switches::kTabCaptureUpscaleQuality, "good" },
299 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
300 switches::kTabCaptureUpscaleQuality, "best" },
301};
302
303const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
304 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
305 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
306 switches::kTabCaptureDownscaleQuality, "fast" },
307 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
308 switches::kTabCaptureDownscaleQuality, "good" },
309 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
310 switches::kTabCaptureDownscaleQuality, "best" },
311};
[email protected]9afc14e22013-09-25 22:34:14312#endif
[email protected]910ecfe2013-06-03 23:38:14313
[email protected]be2e40a2013-08-27 02:49:20314const Experiment::Choice kMapImageChoices[] = {
315 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
316 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
317 cc::switches::kEnableMapImage, ""},
318 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
319 cc::switches::kDisableMapImage, ""}
320};
321
[email protected]d5874f12013-12-05 04:30:00322#if defined(OS_ANDROID)
323const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
324 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
325 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
326 switches::kEnableZeroSuggestMostVisited, ""},
327 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
328 switches::kEnableZeroSuggestEtherSerp, ""},
329 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
330 switches::kEnableZeroSuggestEtherNoSerp, ""},
331 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
332 switches::kDisableZeroSuggest, ""}
333};
334#endif
335
[email protected]1a82f7372013-12-06 12:46:52336const Experiment::Choice kNumRasterThreadsChoices[] = {
337 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
338 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, cc::switches::kNumRasterThreads, "1" },
339 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, cc::switches::kNumRasterThreads, "2" },
340 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, cc::switches::kNumRasterThreads, "3" },
341 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, cc::switches::kNumRasterThreads, "4" }
342};
343
[email protected]4bc5050c2010-11-18 17:55:54344// RECORDING USER METRICS FOR FLAGS:
345// -----------------------------------------------------------------------------
346// The first line of the experiment is the internal name. If you'd like to
347// gather statistics about the usage of your flag, you should append a marker
348// comment to the end of the feature name, like so:
349// "my-special-feature", // FLAGS:RECORD_UMA
350//
[email protected]02c6ab4d2013-12-03 17:29:26351// After doing that, run //tools/metrics/actions/extract_actions.py (see
352// instructions at the top of that file for details) to update the
353// chromeactions.txt file, which will enable UMA to record your feature flag.
[email protected]4bc5050c2010-11-18 17:55:54354//
[email protected]783d5bb2012-10-24 03:47:14355// After your feature has shipped under a flag, you can locate the metrics under
356// the action name AboutFlags_internal-action-name. Actions are recorded once
357// per startup, so you should divide this number by AboutFlags_StartupTick to
358// get a sense of usage. Note that this will not be the same as number of users
359// with a given feature enabled because users can quit and relaunch the
360// application multiple times over a given time interval. The dashboard also
361// shows you how many (metrics reporting) users have enabled the flag over the
362// last seven days. However, note that this is not the same as the number of
363// users who have the flag enabled, since enabling the flag happens once,
364// whereas running with the flag enabled happens until the user flips the flag
365// again.
[email protected]4bc5050c2010-11-18 17:55:54366
[email protected]8a6ff28d2010-12-02 16:35:19367// To add a new experiment add to the end of kExperiments. There are two
368// distinct types of experiments:
369// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
370// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22371// . MULTI_VALUE: a list of choices, the first of which should correspond to a
372// deactivated state for this lab (i.e. no command line option). To specify
373// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
374// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19375// See the documentation of Experiment for details on the fields.
376//
377// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05378const Experiment kExperiments[] = {
379 {
[email protected]aac169d2011-03-18 19:53:03380 "expose-for-tabs", // FLAGS:RECORD_UMA
381 IDS_FLAGS_TABPOSE_NAME,
382 IDS_FLAGS_TABPOSE_DESCRIPTION,
383 kOsMac,
384#if defined(OS_MACOSX)
385 // The switch exists only on OS X.
386 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
387#else
388 SINGLE_VALUE_TYPE("")
389#endif
390 },
391 {
[email protected]4bc5050c2010-11-18 17:55:54392 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05393 IDS_FLAGS_CONFLICTS_CHECK_NAME,
394 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
395 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19396 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05397 },
398 {
[email protected]96c6f4c2011-05-18 19:36:22399 "ignore-gpu-blacklist",
400 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
401 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
402 kOsAll,
403 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
404 },
405 {
[email protected]0110cf112011-07-02 00:39:43406 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22407 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
408 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23409 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44410 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
411 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22412 },
413 {
[email protected]72787e392012-03-23 05:55:43414 "threaded-compositing-mode",
415 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
416 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58417 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44418 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
419 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59420 },
421 {
[email protected]17e27692013-02-06 17:02:09422 "force-accelerated-composited-scrolling",
423 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
424 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
425 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44426 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
427 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09428 },
429 {
[email protected]44de7492013-10-18 15:14:59430 "force-universal-accelerated-composited-scrolling",
431 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
432 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
433 kOsAll,
434 ENABLE_DISABLE_VALUE_TYPE(
435 switches::kEnableUniversalAcceleratedOverflowScroll,
436 switches::kDisableUniversalAcceleratedOverflowScroll)
437 },
438 {
[email protected]e9ca6dc52013-11-23 01:46:53439 "enable-layer-squashing",
440 IDS_FLAGS_LAYER_SQUASHING_NAME,
441 IDS_FLAGS_LAYER_SQUASHING_DESCRIPTION,
442 kOsAll,
443 ENABLE_DISABLE_VALUE_TYPE(
444 switches::kEnableLayerSquashing,
445 switches::kDisableLayerSquashing)
446 },
447 {
[email protected]8b1c3c72013-01-25 01:48:43448 "present-with-GDI",
449 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
450 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
451 kOsWin,
452 MULTI_VALUE_TYPE(kGDIPresentChoices)
453 },
454 {
[email protected]2b608752013-05-01 03:34:36455 "enable-experimental-canvas-features",
456 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
457 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
458 kOsAll,
459 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
460 },
461 {
[email protected]81c64af62012-06-06 20:15:52462 "disable-accelerated-2d-canvas",
463 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
464 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
465 kOsAll,
466 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
467 },
468 {
[email protected]efcde132012-05-30 01:05:18469 "disable-threaded-animation",
470 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
471 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59472 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37473 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59474 },
475 {
[email protected]5963b772011-02-09 22:55:38476 "composited-layer-borders",
477 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
478 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
479 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57480 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38481 },
482 {
[email protected]a8f1eaa2011-03-07 19:00:58483 "show-fps-counter",
484 IDS_FLAGS_SHOW_FPS_COUNTER,
485 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
486 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57487 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58488 },
[email protected]8ff7f342011-05-25 01:49:47489 {
[email protected]70c98a332011-12-21 20:51:52490 "accelerated-filters",
491 IDS_FLAGS_ACCELERATED_FILTERS,
492 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
493 kOsAll,
494 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
495 },
496 {
[email protected]deaba6d52011-09-23 14:47:12497 "disable-webgl",
498 IDS_FLAGS_DISABLE_WEBGL_NAME,
499 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28500 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12501 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
502 },
[email protected]09096e02012-05-24 11:12:04503 {
[email protected]e4e49272013-09-17 22:27:28504 "enable-d3d11",
505 IDS_FLAGS_ENABLE_D3D11_NAME,
506 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
507 kOsWin,
508 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
509 },
510 {
[email protected]ce585bf2013-03-14 16:25:16511 "disable-webrtc",
512 IDS_FLAGS_DISABLE_WEBRTC_NAME,
513 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05514 kOsAndroid,
515#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16516 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05517#else
518 SINGLE_VALUE_TYPE("")
519#endif
520 },
[email protected]5e2bc8c2013-05-28 22:59:57521#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30522 {
[email protected]f1045f02013-08-02 23:19:35523 "disable-device-enumeration",
524 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
525 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
[email protected]c1298742013-07-17 04:06:32526 kOsAll,
[email protected]f1045f02013-08-02 23:19:35527 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
[email protected]c1298742013-07-17 04:06:32528 },
[email protected]96cbf422013-09-11 12:42:22529 {
[email protected]fdf631e2013-09-13 09:06:07530 "disable-sctp-data-channels",
531 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_NAME,
532 IDS_FLAGS_DISABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
533 kOsAll,
534 SINGLE_VALUE_TYPE(switches::kDisableSCTPDataChannels)
535 },
536 {
537 "disable-webrtc-hw-decoding",
538 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
539 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
[email protected]6442b022013-12-05 11:09:05540 kOsAndroid | kOsCrOS,
[email protected]fdf631e2013-09-13 09:06:07541 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
542 },
543 {
[email protected]96cbf422013-09-11 12:42:22544 "disable-webrtc-hw-encoding",
545 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
546 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
[email protected]6998f01f22013-12-04 09:27:57547 kOsAndroid | kOsCrOS,
[email protected]96cbf422013-09-11 12:42:22548 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
549 },
[email protected]5e2bc8c2013-05-28 22:59:57550#endif
[email protected]34cb5292013-04-15 06:06:31551#if defined(OS_ANDROID)
552 {
[email protected]7b8a31632013-06-13 22:42:37553 "disable-webaudio",
554 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
555 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31556 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37557 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31558 },
559#endif
[email protected]d9da9582013-01-31 04:59:05560 {
[email protected]96bcdc102012-05-24 23:42:10561 "fixed-position-creates-stacking-context",
562 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
563 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
564 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44565 ENABLE_DISABLE_VALUE_TYPE(
566 switches::kEnableFixedPositionCreatesStackingContext,
567 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10568 },
[email protected]fb854192013-02-06 01:30:04569 {
570 "enable-compositing-for-fixed-position",
571 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
572 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
573 kOsAll,
574 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
575 },
[email protected]d8221b22013-05-23 05:35:43576 {
577 "enable-compositing-for-transition",
578 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
579 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
580 kOsAll,
581 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
582 },
[email protected]06fc4d3b2013-07-08 21:07:24583 {
584 "enable-accelerated-fixed-root-background",
585 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
586 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
587 kOsAll,
588 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
589 },
[email protected]a7640ef22012-10-06 00:52:08590 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53591 {
[email protected]e3791ce92011-08-09 01:03:32592 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40593 IDS_FLAGS_ENABLE_NACL_NAME,
594 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56595 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19596 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40597 },
598 {
[email protected]9addd1c2012-09-15 14:28:24599 "enable-nacl-debug", // FLAGS:RECORD_UMA
600 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
601 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56602 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24603 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13604 },
605 {
[email protected]7de24f52013-08-29 10:02:55606 "disable-pnacl", // FLAGS:RECORD_UMA
607 IDS_FLAGS_DISABLE_PNACL_NAME,
608 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
609 kOsDesktop,
610 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
611 },
612 {
[email protected]66f409c2012-10-04 20:59:04613 "nacl-debug-mask", // FLAGS:RECORD_UMA
614 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
615 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56616 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04617 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
618 },
619 {
[email protected]4bc5050c2010-11-18 17:55:54620 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32621 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
622 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56623 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51624 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32625 },
[email protected]3627b06d2010-11-12 16:36:16626 {
[email protected]ac2e2acd2013-03-21 12:57:29627 "extensions-on-chrome-urls",
628 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
629 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
630 kOsAll,
[email protected]49d9b142013-07-19 08:50:27631 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29632 },
633 {
[email protected]88c92012013-07-02 11:56:34634 "enable-fast-unload",
635 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
636 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
637 kOsAll,
638 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
639 },
640 {
[email protected]e9cddd52013-03-23 17:37:53641 "enable-adview",
642 IDS_FLAGS_ENABLE_ADVIEW_NAME,
643 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
644 kOsDesktop,
645 SINGLE_VALUE_TYPE(switches::kEnableAdview)
646 },
647 {
648 "enable-adview-src-attribute",
649 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
650 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
651 kOsDesktop,
652 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
653 },
654 {
[email protected]1f4da9e2013-06-27 05:23:44655 "enable-app-window-controls",
656 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
657 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
658 kOsDesktop,
659 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
660 },
661 {
[email protected]3a362432012-06-18 20:39:51662 "script-badges",
663 IDS_FLAGS_SCRIPT_BADGES_NAME,
664 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56665 kOsDesktop,
[email protected]5ef835a2013-11-08 20:42:57666 SINGLE_VALUE_TYPE(extensions::switches::kScriptBadges)
[email protected]544471a2012-10-13 05:27:09667 },
668 {
669 "script-bubble",
670 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
671 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56672 kOsDesktop,
[email protected]5ef835a2013-11-08 20:42:57673 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
674 extensions::switches::kScriptBubble, "1",
675 extensions::switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51676 },
677 {
[email protected]cbe224d2011-08-04 22:12:49678 "apps-new-install-bubble",
679 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
680 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56681 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49682 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
683 },
684 {
[email protected]80bd24e2010-11-30 09:34:38685 "disable-hyperlink-auditing",
686 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
687 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
688 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19689 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51690 },
691 {
[email protected]5aea1862011-03-23 23:55:39692 "tab-groups-context-menu",
693 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
694 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
695 kOsWin,
696 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
697 },
[email protected]333bdc52013-07-16 00:37:04698#if defined(OS_ANDROID)
699 {
700 "enable-new-ntp",
701 IDS_FLAGS_ENABLE_NEW_NTP,
702 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
703 kOsAndroid,
[email protected]6bab2e32013-09-11 00:09:03704 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
705 switches::kDisableNewNTP)
[email protected]333bdc52013-07-16 00:37:04706 },
707#endif
[email protected]8cc9e532013-05-06 21:01:47708 {
[email protected]3eb5728c2011-06-20 22:32:24709 "show-autofill-type-predictions",
710 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
711 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
712 kOsAll,
[email protected]e217c5632013-04-12 19:11:48713 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24714 },
[email protected]bff4d3e2011-06-21 23:58:52715 {
[email protected]e755a382012-09-13 17:16:35716 "enable-gesture-tap-highlight",
717 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
718 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
719 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47720 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
721 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35722 },
723 {
[email protected]a22ebd812011-06-23 00:05:39724 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
725 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
726 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
727 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40728 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25729 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39730 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
731 },
[email protected]81a6b0b2011-06-24 17:55:40732 {
[email protected]23eecbd02013-09-19 18:13:37733 "enable-overlay-scrollbars",
734 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
735 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
736 // Uses the system preference on Mac (a different implementation).
737 // On Android, this is always enabled.
[email protected]bc1b6bc2013-09-24 17:04:16738 kOsCrOS,
[email protected]23eecbd02013-09-19 18:13:37739 SINGLE_VALUE_TYPE(switches::kEnableOverlayScrollbars)
740 },
741 {
[email protected]7e7a28092011-12-09 22:24:55742 "enable-panels",
743 IDS_FLAGS_ENABLE_PANELS_NAME,
744 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56745 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55746 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54747 },
[email protected]e3749d12011-07-25 22:22:12748 {
[email protected]27c14f02012-06-22 17:29:58749 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27750 "save-page-as-mhtml", // FLAGS:RECORD_UMA
751 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
752 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
753 kOsMac | kOsWin | kOsLinux,
754 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
755 },
756 {
[email protected]b7bb44f2011-09-01 05:17:03757 "enable-autologin",
758 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
759 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
760 kOsMac | kOsWin | kOsLinux,
761 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
762 },
[email protected]b9841172011-09-26 23:36:09763 {
[email protected]903e63382013-06-01 00:40:58764 "enable-quic",
765 IDS_FLAGS_ENABLE_QUIC_NAME,
766 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
767 kOsAll,
768 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
769 switches::kDisableQuic)
770 },
771 {
[email protected]eb8f88e2013-07-15 09:52:17772 "enable-quic-https",
773 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
774 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
775 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00776 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
777 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17778 },
779 {
[email protected]bca09b9982013-06-27 22:30:46780 "enable-spdy4a2",
781 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
782 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
783 kOsAll,
784 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
785 },
786 {
[email protected]88a332622013-07-30 07:13:32787 "enable-http2-draft-04",
788 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
789 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
790 kOsAll,
791 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
792 },
793 {
[email protected]27b3fe92012-03-21 05:35:06794 "enable-async-dns",
795 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
796 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46797 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44798 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
799 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06800 },
801 {
[email protected]bc9235c22013-09-24 07:32:44802 "disable-webkit-media-source",
[email protected]5bf1223a52013-05-14 21:42:31803 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
804 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32805 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31806 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44807 },
[email protected]e4e68dbb2011-11-18 01:50:22808 {
[email protected]722b4d484f2013-10-08 20:33:59809 "disable-unprefixed-media-source",
810 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_NAME,
811 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_DESCRIPTION,
812 kOsAll,
813 SINGLE_VALUE_TYPE(switches::kDisableUnprefixedMediaSource)
814 },
815 {
[email protected]16c242d2013-05-31 23:56:47816 "enable-encrypted-media",
817 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
818 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50819 kOsAll,
[email protected]16c242d2013-05-31 23:56:47820 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
821 },
822 {
[email protected]e76d92f2013-09-26 20:03:35823 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47824 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
825 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50826 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35827 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03828 },
[email protected]ce3934bb2013-09-10 02:02:56829#if defined(OS_ANDROID)
830 {
[email protected]3c56ec12013-09-25 02:03:42831 "disable-infobar-for-protected-media-identifier",
832 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
833 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
834 kOsAndroid,
835 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
836 },
837 {
[email protected]ce3934bb2013-09-10 02:02:56838 "mediadrm-enable-non-compositing",
839 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
840 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
841 kOsAndroid,
842 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
843 },
844#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06845 {
[email protected]173a67472013-11-15 21:42:30846 "disable-opus-playback",
847 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_NAME,
848 IDS_FLAGS_DISABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56849 kOsDesktop,
[email protected]173a67472013-11-15 21:42:30850 SINGLE_VALUE_TYPE(switches::kDisableOpusPlayback)
[email protected]f88628792012-12-18 07:07:50851 },
[email protected]b150b5532013-06-15 00:50:54852 {
[email protected]fb53f262013-09-03 20:52:42853 "disable-vp8-alpha-playback",
854 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_NAME,
855 IDS_FLAGS_DISABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
[email protected]6ac955b2013-04-19 23:43:32856 kOsDesktop,
[email protected]fb53f262013-09-03 20:52:42857 SINGLE_VALUE_TYPE(switches::kDisableVp8AlphaPlayback)
[email protected]6ac955b2013-04-19 23:43:32858 },
859 {
[email protected]ca6eaa5a2013-01-24 16:16:04860 "enable-managed-users",
861 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
862 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08863 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04864 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
865 },
[email protected]eaae8b462012-01-20 22:20:39866 {
[email protected]db543d322011-12-15 20:40:15867 "per-tile-painting",
868 IDS_FLAGS_PER_TILE_PAINTING_NAME,
869 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37870 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37871 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15872 },
[email protected]bf88c032011-12-22 19:05:47873 {
874 "enable-javascript-harmony",
875 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
876 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
877 kOsAll,
878 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
879 },
[email protected]7e7f378a2012-01-05 14:35:37880 {
[email protected]85646172012-01-09 22:45:54881 "enable-tab-browser-dragging",
882 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
883 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
884 kOsWin,
885 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
886 },
887 {
[email protected]068b7b52012-02-27 12:41:44888 "disable-restore-session-state",
889 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
890 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37891 kOsAll,
[email protected]068b7b52012-02-27 12:41:44892 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37893 },
[email protected]88864db2012-01-18 20:56:35894 {
895 "disable-software-rasterizer",
896 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
897 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
898#if defined(ENABLE_SWIFTSHADER)
899 kOsAll,
900#else
901 0,
902#endif
903 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
904 },
[email protected]15a5d722012-01-23 09:11:14905 {
[email protected]c1b18ea2013-07-10 13:01:16906 "enable-experimental-web-platform-features",
907 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
908 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16909 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16910 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49911 },
912 {
[email protected]3e8befc2012-03-13 01:17:03913 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16914 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
915 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56916 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03917 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16918 },
[email protected]dc04be7c2012-03-15 23:57:49919#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01920 {
[email protected]3cd198a22012-03-12 20:38:01921 "enable-ash-oak",
922 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
923 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
924 kOsAll,
925 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
926 },
[email protected]31cf1c52012-02-29 20:55:01927#endif
[email protected]184ec592012-03-01 11:54:28928 {
929 "enable-devtools-experiments",
930 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
931 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56932 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28933 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
934 },
[email protected]76d1854e2012-03-02 23:57:44935 {
[email protected]2fefdb32013-02-26 14:28:10936 "silent-debugger-extension-api",
937 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
938 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
939 kOsDesktop,
940 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
941 },
942 {
[email protected]76d1854e2012-03-02 23:57:44943 "enable-suggestions-ntp",
944 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
945 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56946 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44947 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
948 },
[email protected]a3d54252012-04-05 20:04:13949 {
[email protected]1dbaf5e2012-11-30 05:51:32950 "spellcheck-autocorrect",
951 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
952 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
953 kOsWin | kOsLinux | kOsCrOS,
954 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
955 },
956 {
[email protected]e27137282013-06-20 02:38:35957 "enable-scroll-prediction",
958 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
959 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
960 kOsDesktop,
961 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
962 },
963 {
[email protected]d7932532012-11-21 21:10:31964 "touch-events",
965 IDS_TOUCH_EVENTS_NAME,
966 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56967 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31968 MULTI_VALUE_TYPE(kTouchEventsChoices)
969 },
970 {
[email protected]c9c73ad42012-04-18 03:35:59971 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06972 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
973 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55974 kOsWin,
[email protected]347a0c72012-05-14 20:28:06975 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59976 },
[email protected]8a6aaa72012-04-20 20:53:58977 {
[email protected]b9c96ff2012-11-26 22:24:40978 "disable-touch-adjustment",
979 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
980 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
981 kOsWin | kOsLinux | kOsCrOS,
982 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
983 },
[email protected]0b60afa2012-04-19 17:36:39984#if defined(OS_CHROMEOS)
985 {
[email protected]690de0f2013-06-26 00:51:16986 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31987 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
988 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
989 kOsCrOS,
[email protected]f54effe2013-09-05 01:09:02990 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
991 ash::switches::kAshDisableAlternateShelfLayout)
[email protected]1dd46bd2013-06-14 07:08:31992 },
993 {
[email protected]58fb96a2013-09-04 23:43:06994 "ash-disable-drag-off-shelf",
[email protected]28fb77a62013-08-24 14:37:57995 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
996 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
997 kOsCrOS,
[email protected]58fb96a2013-09-04 23:43:06998 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
[email protected]28fb77a62013-08-24 14:37:57999 },
1000 {
[email protected]7c4a9bc2012-09-11 22:10:051001 "enable-background-loader",
1002 IDS_ENABLE_BACKLOADER_NAME,
1003 IDS_ENABLE_BACKLOADER_DESCRIPTION,
1004 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241005 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:051006 },
1007 {
[email protected]f0ad54c2013-11-08 01:04:241008 "ash-disable-docked-windows",
[email protected]ba7df7e2013-07-18 21:49:591009 IDS_FLAGS_DOCKED_WINDOWS_NAME,
1010 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
1011 kOsCrOS,
[email protected]f0ad54c2013-11-08 01:04:241012 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDockedWindows)
[email protected]ba7df7e2013-07-18 21:49:591013 },
[email protected]63458432013-11-20 17:28:531014 {
1015 "ash-enable-immersive-fullscreen-all-windows",
1016 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_NAME,
1017 IDS_FLAGS_IMMERSIVE_FULLSCREEN_FOR_ALL_WINDOWS_DESCRIPTION,
1018 kOsCrOS,
1019 SINGLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreenForAllWindows)
1020 },
[email protected]0b60afa2012-04-19 17:36:391021#endif
[email protected]79be6d32012-04-24 20:47:441022 {
[email protected]8d68a3e02013-01-12 15:57:101023 "enable-download-resumption",
1024 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
1025 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561026 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:101027 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1028 },
1029 {
[email protected]9a5940d2012-04-27 19:16:231030 "allow-nacl-socket-api",
1031 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1032 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561033 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:231034 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1035 },
[email protected]85333732012-05-01 19:02:241036 {
[email protected]60673ad72012-05-02 06:16:331037 "stacked-tab-strip",
1038 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1039 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1040 kOsWin,
1041 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1042 },
1043 {
[email protected]4bd20202012-06-14 17:35:011044 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241045 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1046 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1047 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011048 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241049 },
[email protected]190349fd2012-05-02 00:10:471050#if defined(OS_CHROMEOS)
1051 {
1052 "allow-touchpad-three-finger-click",
1053 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1054 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1055 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241056 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471057 },
1058#endif
[email protected]53520b1b2012-05-07 21:43:371059#if defined(USE_ASH)
1060 {
[email protected]8257d382013-03-26 13:08:421061 "show-launcher-alignment-menu",
[email protected]81dd43d2013-08-06 05:58:271062 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
1063 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421064 kOsAll,
[email protected]265fd7b2013-08-13 02:32:101065 ENABLE_DISABLE_VALUE_TYPE(
1066 ash::switches::kShowShelfAlignmentMenu,
1067 ash::switches::kHideShelfAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421068 },
1069 {
[email protected]2ddf37b2013-04-20 01:15:581070 "disable-minimize-on-second-launcher-item-click",
1071 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1072 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1073 kOsAll,
1074 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1075 },
1076 {
[email protected]6684c802013-11-20 04:26:471077 "multiple-snap-window-widths",
1078 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_NAME,
1079 IDS_MULTIPLE_SNAP_WINDOW_WIDTHS_DESCRIPTION,
1080 kOsAll,
1081 SINGLE_VALUE_TYPE(ash::switches::kAshMultipleSnapWindowWidths)
1082 },
1083 {
[email protected]cf21af62013-09-27 19:36:031084 "disable-overview-mode",
1085 IDS_FLAGS_DISABLE_OVERVIEW_MODE_NAME,
1086 IDS_FLAGS_DISABLE_OVERVIEW_MODE_DESCRIPTION,
[email protected]d24ce2c2013-08-01 15:14:191087 kOsCrOS,
[email protected]cf21af62013-09-27 19:36:031088 SINGLE_VALUE_TYPE(ash::switches::kAshDisableOverviewMode)
[email protected]d24ce2c2013-08-01 15:14:191089 },
1090 {
[email protected]0578bfb592013-10-24 05:57:521091 "overview-delay-on-alt-tab",
1092 IDS_FLAGS_OVERVIEW_DELAY_NAME,
1093 IDS_FLAGS_OVERVIEW_DELAY_DESCRIPTION,
1094 kOsCrOS,
1095 MULTI_VALUE_TYPE(kAshOverviewDelayChoices)
1096 },
1097 {
[email protected]73074742012-05-17 01:44:411098 "show-touch-hud",
1099 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1100 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1101 kOsAll,
1102 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1103 },
1104 {
[email protected]9f0940b62012-05-23 22:56:351105 "enable-pinch",
1106 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1107 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061108 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381109 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1110 },
1111 {
[email protected]de0aaed2013-05-27 18:16:431112 "enable-pinch-virtual-viewport",
1113 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1114 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1115 kOsLinux | kOsWin | kOsCrOS,
1116 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1117 },
[email protected]73074742012-05-17 01:44:411118#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281119#if defined(OS_CHROMEOS)
1120 {
[email protected]8b04a1652012-08-04 02:59:491121 "disable-boot-animation",
1122 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1123 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581124 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241125 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491126 },
[email protected]95058572012-08-20 14:57:291127 {
[email protected]53bc4352013-06-24 10:22:371128 "file-manager-show-checkboxes",
1129 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1130 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491131 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371132 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491133 },
1134 {
[email protected]f6ded872013-07-23 09:41:361135 "file-manager-enable-webstore-integration",
1136 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1137 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1138 kOsCrOS,
1139 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1140 },
1141 {
[email protected]099b890c2013-04-25 19:16:261142 "disable-quickoffice-component-app",
1143 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1144 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1145 kOsCrOS,
1146 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1147 },
[email protected]31cf1472013-09-13 00:36:421148 {
1149 "enable-saml-signin",
1150 IDS_FLAGS_ENABLE_SAML_SIGNIN_NAME,
1151 IDS_FLAGS_ENABLE_SAML_SIGNIN_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(chromeos::switches::kEnableSamlSignin),
1154 },
[email protected]d81240b2013-09-20 21:05:281155 {
1156 "enable-multi-profiles",
1157 IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME,
1158 IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(switches::kMultiProfiles),
1161 },
[email protected]62018dc2012-12-13 00:37:351162#endif // defined(OS_CHROMEOS)
[email protected]7db8893a2012-07-26 00:49:401163 { "disable-accelerated-video-decode",
1164 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1165 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191166 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401167 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151168 },
[email protected]37fee0942012-08-07 21:07:451169 {
[email protected]ad3f6d22012-08-29 02:34:191170 "enable-contacts",
1171 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1172 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1173 kOsCrOS,
1174 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1175 },
[email protected]1d9bb9cd2012-08-28 22:02:501176#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:381177 {
1178 "ash-debug-shortcuts",
1179 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1180 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1181 kOsAll,
1182 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1183 },
[email protected]1d9bb9cd2012-08-28 22:02:501184 { "ash-enable-advanced-gestures",
1185 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1186 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1187 kOsCrOS,
1188 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1189 },
[email protected]35c9a4e2013-09-14 01:32:381190 { "ash-alternate-caption-button",
1191 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_NAME,
1192 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_DESCRIPTION,
1193 kOsCrOS,
1194 ENABLE_DISABLE_VALUE_TYPE(
1195 ash::switches::kAshEnableAlternateFrameCaptionButtonStyle,
1196 ash::switches::kAshDisableAlternateFrameCaptionButtonStyle),
1197 },
[email protected]35c9a4e2013-09-14 01:32:381198 {
1199 "ash-disable-auto-maximizing",
1200 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
1201 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
1202 kOsWin | kOsLinux | kOsCrOS,
1203 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
1204 },
[email protected]ad6fcc32013-05-30 03:46:481205 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081206 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1207 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1208 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481209 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081210 },
[email protected]316708a2012-11-05 22:57:021211#if defined(OS_LINUX)
1212 { "ash-enable-memory-monitor",
1213 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1214 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1215 kOsCrOS,
1216 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1217 },
1218#endif
[email protected]91731532013-09-21 16:01:401219#if defined(OS_CHROMEOS)
[email protected]a5c01be2013-10-08 18:40:461220 { "ash-enable-full-multi-profile-mode",
1221 IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE,
1222 IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE_DESCRIPTION,
1223 kOsCrOS,
1224 SINGLE_VALUE_TYPE(ash::switches::kAshEnableFullMultiProfileMode),
1225 },
[email protected]6a120bf22013-11-17 15:53:481226 { "ash-enable-multi-user-tray",
1227 IDS_FLAGS_ENABLE_MULTI_USER_TRAY,
1228 IDS_FLAGS_ENABLE_MULTI_USER_TRAY_DESCRIPTION,
1229 kOsCrOS,
1230 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMultiUserTray),
1231 },
[email protected]91731532013-09-21 16:01:401232#endif
[email protected]1d9bb9cd2012-08-28 22:02:501233#endif
[email protected]9b7ab882012-09-10 23:46:361234#if defined(OS_CHROMEOS)
1235 {
[email protected]354ff2d2013-05-01 17:06:311236 "ash-audio-device-menu",
1237 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1238 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1239 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431240 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1241 ash::switches::kAshDisableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121242 },
1243 {
[email protected]205f07892012-10-16 20:26:221244 "enable-carrier-switching",
1245 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1246 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1247 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241248 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221249 },
1250 {
[email protected]9b7ab882012-09-10 23:46:361251 "enable-request-tablet-site",
1252 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1253 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1254 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241255 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361256 },
1257#endif
[email protected]dab49c0b2012-10-04 05:55:351258 {
1259 "debug-packed-apps",
1260 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1261 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561262 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351263 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1264 },
[email protected]d1459ed2012-10-10 01:29:331265 {
1266 "enable-password-generation",
1267 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1268 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561269 kOsDesktop,
[email protected]c3cc0632013-10-03 21:54:431270 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1271 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331272 },
[email protected]26d045f2012-10-18 21:18:431273 {
[email protected]f2a394b2013-11-28 20:08:041274 "password-manager-reauthentication",
[email protected]429a6e02013-10-23 18:40:481275 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1276 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
[email protected]48293fb2013-12-04 04:02:031277 kOsMac | kOsWin,
[email protected]f2a394b2013-11-28 20:08:041278 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
[email protected]429a6e02013-10-23 18:40:481279 },
1280 {
[email protected]283cc562013-07-18 08:25:431281 "password-autofill-public-suffix-domain-matching",
1282 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1283 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
[email protected]17b9c742013-06-22 13:48:421284 kOsAndroid,
[email protected]283cc562013-07-18 08:25:431285 ENABLE_DISABLE_VALUE_TYPE(
1286 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1287 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
[email protected]17b9c742013-06-22 13:48:421288 },
1289 {
[email protected]76f7d4882012-10-26 21:09:221290 "enable-deferred-image-decoding",
1291 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1292 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221293 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221294 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1295 },
1296 {
[email protected]075543d2012-10-24 01:29:141297 "performance-monitor-gathering",
1298 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1299 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1300 kOsAll,
1301 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1302 },
[email protected]783d5bb2012-10-24 03:47:141303 {
[email protected]45476982013-10-01 03:22:291304 "wallet-service-use-sandbox",
1305 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1306 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
1307 kOsCrOS | kOsWin | kOsMac,
1308 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1309 autofill::switches::kWalletServiceUseSandbox, "1",
1310 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541311 },
1312 {
[email protected]6e6efe42013-01-30 00:04:501313 "enable-interactive-autocomplete",
1314 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1315 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]2a9b0c12013-08-15 02:38:391316 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171317 ENABLE_DISABLE_VALUE_TYPE(
1318 autofill::switches::kEnableInteractiveAutocomplete,
1319 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501320 },
[email protected]177260c2013-04-24 01:47:381321#if defined(USE_AURA)
1322 {
1323 "overscroll-history-navigation",
1324 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1325 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1326 kOsAll,
1327 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1328 switches::kOverscrollHistoryNavigation, "1",
1329 switches::kOverscrollHistoryNavigation, "0")
1330 },
1331#endif
[email protected]edbea622012-11-28 20:39:381332 {
[email protected]888878e82013-07-24 22:49:401333 "scroll-end-effect",
1334 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1335 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1336 kOsCrOS,
1337 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1338 switches::kScrollEndEffect, "1",
1339 switches::kScrollEndEffect, "0")
1340 },
1341 {
[email protected]0222b1b42013-07-26 09:57:001342 "enable-touch-side-bezels",
1343 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1344 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1345 kOsCrOS,
1346 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1347 switches::kTouchSideBezels, "1",
1348 switches::kTouchSideBezels, "0")
1349 },
1350 {
[email protected]edbea622012-11-28 20:39:381351 "enable-touch-drag-drop",
1352 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1353 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1354 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271355 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1356 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381357 },
[email protected]0e2f43b62013-02-21 00:47:151358 {
1359 "enable-touch-editing",
1360 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1361 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1362 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271363 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1364 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151365 },
[email protected]92e12dd92012-12-11 03:33:201366 {
1367 "enable-rich-notifications",
1368 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1369 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361370 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231371 ENABLE_DISABLE_VALUE_TYPE(
1372 message_center::switches::kEnableRichNotifications,
1373 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201374 },
[email protected]4d51c682012-12-11 11:34:551375 {
[email protected]74dae792013-11-13 01:11:261376 "enable-experimental-notification-ui",
1377 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_NAME,
1378 IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_DESCRIPTION,
1379 kOsDesktop,
1380 SINGLE_VALUE_TYPE(
1381 message_center::switches::kEnableExperimentalNotificationUI)
1382 },
1383 {
[email protected]ddec1aa2013-04-28 23:22:451384 "enable-sync-synced-notifications",
1385 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1386 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181387 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451388 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1389 switches::kDisableSyncSyncedNotifications)
1390 },
1391 {
[email protected]a50e16a2013-04-25 14:07:171392 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551393 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1394 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1395 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171396 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551397 },
[email protected]628a69a92012-12-23 04:09:341398 {
[email protected]fd030142013-02-08 02:04:381399 "enable-usermedia-screen-capture",
1400 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1401 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1402 kOsDesktop,
1403 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1404 },
[email protected]5b93e162013-02-19 06:33:091405 {
1406 "enable-apps-devtool-app",
1407 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1408 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1409 kOsDesktop,
1410 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1411 },
[email protected]9323fdd12013-02-23 00:31:361412 {
1413 "impl-side-painting",
1414 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1415 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521416 kOsAll,
[email protected]9323fdd12013-02-23 00:31:361417 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1418 },
[email protected]a42c85f2013-04-04 18:15:121419 {
[email protected]8b52c1b2013-09-23 07:28:221420 "deadline-scheduling",
1421 IDS_FLAGS_DEADLINE_SCHEDULING_NAME,
1422 IDS_FLAGS_DEADLINE_SCHEDULING_DESCRIPTION,
1423 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1424 MULTI_VALUE_TYPE(kDeadlineSchedulingChoices)
1425 },
1426 {
1427 "ui-deadline-scheduling",
1428 IDS_FLAGS_UI_DEADLINE_SCHEDULING_NAME,
1429 IDS_FLAGS_UI_DEADLINE_SCHEDULING_DESCRIPTION,
1430#ifdef USE_AURA
1431 kOsWin | kOsLinux |
1432#endif
1433 kOsCrOS,
1434 MULTI_VALUE_TYPE(kUIDeadlineSchedulingChoices)
1435 },
1436 {
[email protected]7621af22013-09-12 23:06:331437 "lcd-text-aa",
1438 IDS_FLAGS_LCD_TEXT_NAME,
1439 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1440 kOsDesktop,
1441 MULTI_VALUE_TYPE(kLCDTextChoices)
1442 },
1443 {
[email protected]0c04d1c2013-07-10 00:02:321444 "delegated-renderer",
1445 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1446 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1447#ifdef USE_AURA
1448 kOsWin | kOsLinux |
1449#endif
1450 kOsAndroid | kOsCrOS,
1451 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1452 },
1453 {
[email protected]1c92d3e2013-04-18 05:31:391454 "enable-websocket-experimental-implementation",
1455 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1456 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1457 kOsAll,
1458 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1459 },
1460 {
[email protected]a42c85f2013-04-04 18:15:121461 "max-tiles-for-interest-area",
1462 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1463 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521464 kOsAll,
[email protected]a42c85f2013-04-04 18:15:121465 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1466 },
[email protected]7cf7ccb2013-04-20 02:53:081467 {
1468 "enable-offline-mode",
1469 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1470 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1471 kOsAll,
1472 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1473 },
[email protected]a3618122013-04-26 21:15:341474 {
1475 "default-tile-width",
1476 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1477 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1478 kOsAll,
1479 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1480 },
1481 {
1482 "default-tile-height",
1483 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1484 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1485 kOsAll,
1486 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1487 },
[email protected]2f2f72b2013-03-08 22:37:311488 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1489#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371490 {
1491 "track-active-visit-time",
1492 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1493 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1494 kOsWin,
1495 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1496 },
[email protected]2f2f72b2013-03-08 22:37:311497#endif
[email protected]8cc71d42013-03-02 17:26:081498#if defined(OS_ANDROID)
1499 {
1500 "disable-gesture-requirement-for-media-playback",
1501 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1502 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1503 kOsAndroid,
1504 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1505 },
1506#endif
[email protected]6077cab2013-03-11 19:36:141507#if defined(ENABLE_GOOGLE_NOW)
1508 {
1509 "enable-google-now",
1510 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1511 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361512 kOsWin | kOsCrOS | kOsMac,
[email protected]6be0c2a2013-10-22 01:45:061513 ENABLE_DISABLE_VALUE_TYPE(
1514 switches::kEnableGoogleNowIntegration,
1515 switches::kDisableGoogleNowIntegration)
[email protected]6077cab2013-03-11 19:36:141516 },
1517#endif
[email protected]86459e2c2013-04-10 13:39:241518#if defined(OS_CHROMEOS)
1519 {
1520 "enable-virtual-keyboard",
1521 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1522 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1523 kOsCrOS,
1524 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1525 },
[email protected]8b4321e2013-10-25 01:16:181526 {
1527 "enable-swipe-selection",
1528 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1529 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1530 kOsCrOS,
1531 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1532 },
[email protected]86459e2c2013-04-10 13:39:241533#endif
[email protected]38484df12013-04-10 16:42:031534 {
1535 "enable-simple-cache-backend",
1536 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1537 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251538 kOsAll,
[email protected]38484df12013-04-10 16:42:031539 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1540 },
[email protected]717e4e22013-04-10 20:52:231541 {
1542 "enable-tcp-fast-open",
1543 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1544 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111545 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231546 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1547 },
[email protected]8027acd2013-04-18 08:35:151548 {
[email protected]58c740f2013-05-06 05:25:441549 "apps-use-native-frame",
1550 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1551 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
[email protected]bc677462013-11-14 02:41:561552 kOsMac | kOsWin | kOsLinux,
[email protected]58c740f2013-05-06 05:25:441553 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1554 },
[email protected]896d86b32013-05-09 19:36:441555 {
1556 "enable-syncfs-directory-operation",
1557 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1558 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1559 kOsAll,
1560 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1561 },
[email protected]94868922013-09-19 18:00:551562#if defined(ENABLE_MDNS)
[email protected]a4ed7e12013-05-24 01:00:281563 {
[email protected]2f7992ba2013-09-08 23:44:571564 "disable-device-discovery",
1565 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1566 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1567 kOsWin | kOsLinux | kOsCrOS,
1568 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
[email protected]9f94a6c42013-07-11 18:49:151569 },
[email protected]94868922013-09-19 18:00:551570 {
[email protected]d394d9762013-09-22 06:00:251571 "device-discovery-notifications",
1572 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1573 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]94868922013-09-19 18:00:551574 kOsWin | kOsLinux | kOsCrOS,
[email protected]d394d9762013-09-22 06:00:251575 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1576 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551577 },
[email protected]53ffe0d2013-10-30 01:20:401578 {
[email protected]780a2f132013-12-03 11:30:161579 "disable-privet-local-printing",
1580 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_NAME,
1581 IDS_FLAGS_DISABLE_PRIVET_LOCAL_PRINTING_DESCRIPTION,
[email protected]53ffe0d2013-10-30 01:20:401582 kOsWin | kOsLinux | kOsCrOS,
[email protected]780a2f132013-12-03 11:30:161583 SINGLE_VALUE_TYPE(switches::kDisablePrivetLocalPrinting)
[email protected]53ffe0d2013-10-30 01:20:401584 },
[email protected]94868922013-09-19 18:00:551585#endif // ENABLE_MDNS
[email protected]56d3c6e42013-05-29 11:28:011586#if defined(OS_MACOSX)
1587 {
[email protected]cb29e162013-05-31 07:47:021588 "enable-app-shims",
1589 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1590 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1591 kOsMac,
1592 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1593 },
[email protected]67604442013-06-15 00:04:331594 {
1595 "enable-simplified-fullscreen",
1596 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1597 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1598 kOsMac,
1599 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1600 },
[email protected]56d3c6e42013-05-29 11:28:011601#endif
[email protected]5fa9f742013-11-14 06:33:081602#if defined(TOOLKIT_VIEWS)
[email protected]13177832013-05-31 07:46:051603 {
[email protected]6d9087b2013-07-30 08:25:461604 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051605 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1606 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]445f4fb62013-11-12 11:46:521607 kOsCrOS | kOsWin | kOsLinux,
[email protected]6d9087b2013-07-30 08:25:461608 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1609 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051610 },
1611#endif
[email protected]910ecfe2013-06-03 23:38:141612#if defined(USE_AURA)
1613 {
1614 "tab-capture-upscale-quality",
1615 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1616 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1617 kOsAll,
1618 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1619 },
1620 {
1621 "tab-capture-downscale-quality",
1622 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1623 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1624 kOsAll,
1625 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1626 },
1627#endif
[email protected]71d4f602013-06-04 23:21:101628 {
[email protected]ba7993d2013-11-26 23:44:561629 "enable-spelling-feedback-field-trial",
1630 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1631 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
[email protected]5e099c62013-06-08 05:46:231632 kOsAll,
[email protected]ba7993d2013-11-26 23:44:561633 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
[email protected]5e099c62013-06-08 05:46:231634 },
1635 {
[email protected]71d4f602013-06-04 23:21:101636 "enable-webgl-draft-extensions",
1637 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1638 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1639 kOsAll,
1640 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1641 },
[email protected]deadc492013-06-07 21:39:281642 {
[email protected]962dd6d92013-08-08 22:20:491643 "enable-html-imports",
1644 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1645 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1646 kOsAll,
1647 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1648 },
1649 {
[email protected]deadc492013-06-07 21:39:281650 "high-dpi-support",
1651 IDS_FLAGS_HIDPI_NAME,
1652 IDS_FLAGS_HIDPI_DESCRIPTION,
1653 kOsWin,
[email protected]bde885b2013-09-12 20:55:531654 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
1655 switches::kHighDPISupport, "0")
[email protected]deadc492013-06-07 21:39:281656 },
[email protected]77e69a512013-06-08 05:56:451657#if defined(OS_CHROMEOS)
1658 {
[email protected]0a5dd632013-08-06 23:10:451659 "enable-quickoffice-viewing",
1660 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_NAME,
1661 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_DESCRIPTION,
[email protected]77e69a512013-06-08 05:56:451662 kOsCrOS,
[email protected]0a5dd632013-08-06 23:10:451663 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeViewing),
[email protected]77e69a512013-06-08 05:56:451664 },
[email protected]4b8e2502013-07-23 18:34:361665 {
1666 "enable-sticky-keys",
1667 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1668 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1669 kOsCrOS,
[email protected]f311449d2013-08-01 19:51:241670 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableStickyKeys,
1671 switches::kDisableStickyKeys)
[email protected]4b8e2502013-07-23 18:34:361672 },
[email protected]77e69a512013-06-08 05:56:451673#endif
[email protected]82ca4212013-06-11 12:09:171674 {
[email protected]bc1697a82013-06-27 15:48:311675 "enable-web-midi",
1676 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1677 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
[email protected]33265302013-12-05 02:19:001678 kOsMac | kOsWin,
[email protected]bc1697a82013-06-27 15:48:311679 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1680 },
[email protected]020df792013-06-29 14:26:211681 {
1682 "enable-new-profile-management",
1683 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1684 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
[email protected]9d25e8702013-11-29 20:20:081685 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211686 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1687 },
1688 {
[email protected]2d279f72013-10-21 23:10:161689 "enable-inline-signin",
1690 IDS_FLAGS_ENABLE_INLINE_SIGNIN_NAME,
1691 IDS_FLAGS_ENABLE_INLINE_SIGNIN_DESCRIPTION,
1692 kOsMac | kOsWin | kOsLinux,
1693 SINGLE_VALUE_TYPE(switches::kEnableInlineSignin)
1694 },
1695 {
[email protected]115d5728c2013-10-23 18:06:141696 "enable-google-profile-info",
1697 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1698 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221699 kOsMac | kOsWin | kOsLinux,
[email protected]115d5728c2013-10-23 18:06:141700 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
[email protected]020df792013-06-29 14:26:211701 },
[email protected]dcf6cf32013-07-03 10:53:281702 {
1703 "disable-app-launcher",
[email protected]a85aa332013-10-22 11:09:591704 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1705 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
[email protected]3be26972013-08-22 08:43:021706 kOsMac | kOsWin,
[email protected]a85aa332013-10-22 11:09:591707 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
[email protected]dcf6cf32013-07-03 10:53:281708 },
[email protected]919b2f82013-10-04 03:11:261709#if defined(ENABLE_APP_LIST)
1710 {
1711 "enable-app-launcher-start-page",
1712 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_NAME,
1713 IDS_FLAGS_ENABLE_APP_LIST_START_PAGE_DESCRIPTION,
1714 kOsWin | kOsCrOS,
1715 SINGLE_VALUE_TYPE(switches::kShowAppListStartPage)
1716 },
[email protected]fe2b77f62013-11-09 04:30:511717 {
1718 "enable-app-list-folder",
1719 IDS_FLAGS_ENABLE_APP_LIST_FOLDER,
1720 IDS_FLAGS_ENABLE_APP_LIST_FOLDER_DESCRIPTION,
1721 kOsWin | kOsCrOS,
1722 SINGLE_VALUE_TYPE(app_list::switches::kEnableFolderUI)
1723 },
[email protected]919b2f82013-10-04 03:11:261724#endif
[email protected]d4839992013-08-13 05:41:091725#if defined(OS_CHROMEOS)
1726 {
1727 "disable-user-image-sync",
1728 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1729 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1730 kOsCrOS,
1731 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1732 },
1733#endif
[email protected]0e38c3252013-08-14 22:18:511734#if defined(OS_ANDROID)
1735 {
1736 "enable-accessibility-tab-switcher",
1737 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1738 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1739 kOsAndroid,
1740 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561741 },
[email protected]738384172013-12-05 01:59:561742 {
1743 "disable-accessibility-script-injection",
1744 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1745 IDS_FLAGS_DISABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
1746 kOsAndroid,
1747 // Java-only switch: ContentSwitches.DISABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1748 SINGLE_VALUE_TYPE("disable-accessibility-script-injection")
1749 },
[email protected]0e38c3252013-08-14 22:18:511750#endif
[email protected]2e9d79f2013-08-16 05:45:561751 {
[email protected]be2e40a2013-08-27 02:49:201752 "map-image",
1753 IDS_FLAGS_MAP_IMAGE_NAME,
1754 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1755 kOsAll,
1756 MULTI_VALUE_TYPE(kMapImageChoices)
[email protected]4fdc518f2013-08-28 21:37:271757 },
1758 {
[email protected]9af61ee92013-09-06 20:31:371759 "enable-add-to-homescreen",
1760 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_NAME,
1761 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_DESCRIPTION,
1762 kOsAndroid,
1763#if defined(OS_ANDROID)
[email protected]dccb6c7a2013-09-13 00:15:281764 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAddToHomescreen,
1765 switches::kDisableAddToHomescreen),
[email protected]9af61ee92013-09-06 20:31:371766#else
1767 SINGLE_VALUE_TYPE("")
1768#endif
1769 },
[email protected]bbb4beae2013-09-27 17:20:311770#if defined(OS_CHROMEOS)
1771 {
[email protected]e384a9f2013-11-25 11:23:371772 "disable-first-run-ui",
1773 IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME,
1774 IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION,
[email protected]bbb4beae2013-09-27 17:20:311775 kOsCrOS,
[email protected]e384a9f2013-11-25 11:23:371776 SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI)
[email protected]bbb4beae2013-09-27 17:20:311777 },
1778#endif
[email protected]ed1aab12013-10-08 14:27:071779 {
1780 "disable-compositor-touch-hit-testing",
1781 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME,
1782 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION,
1783 kOsAll,
1784 SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting),
1785 },
[email protected]6dd2053b2013-10-09 16:29:541786 {
[email protected]e3415902013-10-17 15:00:461787 "enable-accelerated-scrollable-frames",
1788 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_NAME,
1789 IDS_FLAGS_ENABLE_ACCELERATED_SCROLLABLE_FRAMES_DESCRIPTION,
1790 kOsAll,
1791 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedScrollableFrames,
1792 switches::kDisableAcceleratedScrollableFrames)
1793 },
1794 {
1795 "enable-composited-scrolling-for-frames",
1796 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_NAME,
1797 IDS_FLAGS_ENABLE_COMPOSITED_SCROLLING_FOR_FRAMES_DESCRIPTION,
1798 kOsAll,
1799 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableCompositedScrollingForFrames,
1800 switches::kDisableCompositedScrollingForFrames)
1801 },
1802 {
[email protected]f95e6df2013-10-11 13:05:171803 "enable-streamlined-hosted-apps",
1804 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1805 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
1806 kOsWin | kOsCrOS,
1807 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1808 },
[email protected]a0ef5212013-10-15 18:08:261809 {
[email protected]912576e2013-10-21 10:33:131810 "enable-ephemeral-apps",
1811 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1812 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]b10049952013-11-28 07:06:261813 kOsWin | kOsLinux | kOsCrOS,
[email protected]912576e2013-10-21 10:33:131814 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1815 },
1816 {
[email protected]a0ef5212013-10-15 18:08:261817 "enable-service-worker",
1818 IDS_FLAGS_ENABLE_SERVICE_WORKER_NAME,
1819 IDS_FLAGS_ENABLE_SERVICE_WORKER_DESCRIPTION,
1820 kOsAll,
1821 SINGLE_VALUE_TYPE(switches::kEnableServiceWorker)
1822 },
[email protected]dfb66c522013-10-22 19:46:321823#if defined(OS_ANDROID)
1824 {
1825 "disable-click-delay",
1826 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1827 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1828 kOsAndroid,
1829 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1830 SINGLE_VALUE_TYPE("disable-click-delay")
1831 },
[email protected]705872b2013-11-27 16:40:531832 {
1833 "low-end-device-mode",
1834 IDS_FLAGS_LOW_END_DEVICE_MODE_NAME,
1835 IDS_FLAGS_LOW_END_DEVICE_MODE_DESCRIPTION,
1836 kOsAndroid,
1837 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLowEndDeviceMode,
1838 switches::kDisableLowEndDeviceMode)
1839 },
[email protected]dfb66c522013-10-22 19:46:321840#endif
[email protected]4113a652013-10-28 08:27:361841#if defined(OS_CHROMEOS)
1842 {
[email protected]a4accac2013-11-20 09:50:191843 "disable-ime-mode-indicator",
1844 IDS_FLAGS_DISABLE_IME_MODE_INDICATOR,
1845 IDS_FLAGS_DISABLE_IME_MODE_INDICATOR_DESCRIPTION,
[email protected]4113a652013-10-28 08:27:361846 kOsCrOS,
[email protected]a4accac2013-11-20 09:50:191847 SINGLE_VALUE_TYPE(chromeos::switches::kDisableIMEModeIndicator)
[email protected]4113a652013-10-28 08:27:361848 },
1849#endif
[email protected]c2c84ab2013-11-18 03:05:091850 {
1851 "enable-translate-new-ux",
1852 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1853 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
1854 kOsDesktop,
1855 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1856 },
[email protected]c4f51d22013-11-05 03:11:261857#if defined(TOOLKIT_VIEWS)
1858 {
[email protected]88b47ad72013-11-21 03:34:381859 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1860 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1861 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
[email protected]c4f51d22013-11-05 03:11:261862 kOsCrOS | kOsWin,
[email protected]88b47ad72013-11-21 03:34:381863 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
[email protected]c4f51d22013-11-05 03:11:261864 },
1865#endif
[email protected]9f268072013-11-07 00:02:151866 {
1867 "enable-apps-show-on-first-paint",
1868 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1869 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1870 kOsDesktop,
1871 SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
1872 },
[email protected]12271632013-11-26 03:06:391873 {
1874 "enable-enhanced-bookmarks",
1875 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1876 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1877 kOsDesktop,
1878 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kEnableEnhancedBookmarks, "1",
1879 switches::kEnableEnhancedBookmarks, "0")
1880 },
[email protected]d5874f12013-12-05 04:30:001881#if defined(OS_ANDROID)
1882 {
1883 "enable-zero-suggest-experiment",
1884 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1885 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1886 kOsAndroid,
1887 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
[email protected]1a82f7372013-12-06 12:46:521888 },
[email protected]d5874f12013-12-05 04:30:001889#endif
[email protected]1a82f7372013-12-06 12:46:521890 {
1891 "num-raster-threads",
1892 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1893 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1894 kOsAll,
1895 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
1896 }
[email protected]a0e4b072011-08-17 01:47:071897};
[email protected]ad2a3ded2010-08-27 13:19:051898
[email protected]a314ee5a2010-10-26 21:23:281899const Experiment* experiments = kExperiments;
1900size_t num_experiments = arraysize(kExperiments);
1901
[email protected]e2ddbc92010-10-15 20:02:071902// Stores and encapsulates the little state that about:flags has.
1903class FlagsState {
1904 public:
1905 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401906 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211907 CommandLine* command_line,
1908 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:071909 bool IsRestartNeededToCommitChanges();
1910 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401911 FlagsStorage* flags_storage,
1912 const std::string& internal_name,
1913 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071914 void RemoveFlagsSwitches(
1915 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401916 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071917 void reset();
1918
1919 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551920 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071921 return Singleton<FlagsState>::get();
1922 }
1923
1924 private:
1925 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531926 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071927
1928 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1929};
1930
[email protected]8a6ff28d2010-12-02 16:35:191931// Adds the internal names for the specified experiment to |names|.
1932void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1933 if (e.type == Experiment::SINGLE_VALUE) {
1934 names->insert(e.internal_name);
1935 } else {
[email protected]83e9fa702013-02-25 19:30:441936 DCHECK(e.type == Experiment::MULTI_VALUE ||
1937 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191938 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441939 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191940 }
1941}
1942
[email protected]28e35af2011-02-09 12:56:221943// Confirms that an experiment is valid, used in a DCHECK in
1944// SanitizeList below.
1945bool ValidateExperiment(const Experiment& e) {
1946 switch (e.type) {
1947 case Experiment::SINGLE_VALUE:
1948 DCHECK_EQ(0, e.num_choices);
1949 DCHECK(!e.choices);
1950 break;
1951 case Experiment::MULTI_VALUE:
1952 DCHECK_GT(e.num_choices, 0);
1953 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531954 DCHECK(e.choices[0].command_line_switch);
1955 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221956 break;
[email protected]83e9fa702013-02-25 19:30:441957 case Experiment::ENABLE_DISABLE_VALUE:
1958 DCHECK_EQ(3, e.num_choices);
1959 DCHECK(!e.choices);
1960 DCHECK(e.command_line_switch);
1961 DCHECK(e.command_line_value);
1962 DCHECK(e.disable_command_line_switch);
1963 DCHECK(e.disable_command_line_value);
1964 break;
[email protected]28e35af2011-02-09 12:56:221965 default:
1966 NOTREACHED();
1967 }
1968 return true;
1969}
1970
[email protected]ad2a3ded2010-08-27 13:19:051971// Removes all experiments from prefs::kEnabledLabsExperiments that are
1972// unknown, to prevent this list to become very long as experiments are added
1973// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401974void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051975 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221976 for (size_t i = 0; i < num_experiments; ++i) {
1977 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191978 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221979 }
[email protected]ad2a3ded2010-08-27 13:19:051980
[email protected]07d666d2013-07-21 23:56:261981 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051982
1983 std::set<std::string> new_enabled_experiments;
1984 std::set_intersection(
1985 known_experiments.begin(), known_experiments.end(),
1986 enabled_experiments.begin(), enabled_experiments.end(),
1987 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1988
[email protected]07d666d2013-07-21 23:56:261989 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401990 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051991}
1992
[email protected]1a47d7e2010-10-15 00:37:241993void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401994 FlagsStorage* flags_storage, std::set<std::string>* result) {
1995 SanitizeList(flags_storage);
1996 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051997}
1998
[email protected]12271632013-11-26 03:06:391999bool SkipConditionalExperiment(const Experiment& experiment) {
2000 if (experiment.internal_name == std::string("enable-enhanced-bookmarks")) {
[email protected]11534552013-12-05 02:09:302001 return !IsEnhancedBookmarksExperimentEnabled();
[email protected]12271632013-11-26 03:06:392002 }
2003 return false;
2004}
2005
2006
[email protected]a314ee5a2010-10-26 21:23:282007// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2008// enabled on the current platform.
2009void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:402010 FlagsStorage* flags_storage, std::set<std::string>* result) {
2011 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:282012
2013 // Filter out any experiments that aren't enabled on the current platform. We
2014 // don't remove these from prefs else syncing to a platform with a different
2015 // set of experiments would be lossy.
2016 std::set<std::string> platform_experiments;
2017 int current_platform = GetCurrentPlatform();
2018 for (size_t i = 0; i < num_experiments; ++i) {
2019 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:192020 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:582021#if defined(OS_CHROMEOS)
2022 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
2023 AddInternalName(experiments[i], &platform_experiments);
2024#endif
[email protected]a314ee5a2010-10-26 21:23:282025 }
2026
2027 std::set<std::string> new_enabled_experiments;
2028 std::set_intersection(
2029 platform_experiments.begin(), platform_experiments.end(),
2030 result->begin(), result->end(),
2031 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2032
2033 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052034}
2035
[email protected]8a6ff28d2010-12-02 16:35:192036// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:192037Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:222038 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:442039 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2040 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:192041 ListValue* result = new ListValue;
2042 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:192043 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:442044 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192045 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:442046 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:222047 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192048 result->Append(value);
2049 }
2050 return result;
2051}
2052
[email protected]e2ddbc92010-10-15 20:02:072053} // namespace
2054
[email protected]83e9fa702013-02-25 19:30:442055std::string Experiment::NameForChoice(int index) const {
2056 DCHECK(type == Experiment::MULTI_VALUE ||
2057 type == Experiment::ENABLE_DISABLE_VALUE);
2058 DCHECK_LT(index, num_choices);
2059 return std::string(internal_name) + testing::kMultiSeparator +
2060 base::IntToString(index);
2061}
2062
[email protected]96920152013-12-04 21:00:162063base::string16 Experiment::DescriptionForChoice(int index) const {
[email protected]83e9fa702013-02-25 19:30:442064 DCHECK(type == Experiment::MULTI_VALUE ||
2065 type == Experiment::ENABLE_DISABLE_VALUE);
2066 DCHECK_LT(index, num_choices);
2067 int description_id;
2068 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2069 const int kEnableDisableDescriptionIds[] = {
2070 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2071 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2072 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2073 };
2074 description_id = kEnableDisableDescriptionIds[index];
2075 } else {
2076 description_id = choices[index].description_id;
2077 }
2078 return l10n_util::GetStringUTF16(description_id);
2079}
2080
[email protected]e6d1c4f2013-06-12 17:37:402081void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212082 CommandLine* command_line,
2083 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:402084 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:212085 command_line,
2086 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:052087}
2088
[email protected]6d98abf2013-06-17 23:35:512089bool AreSwitchesIdenticalToCurrentCommandLine(
2090 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
2091 std::set<CommandLine::StringType> new_flags =
2092 ExtractFlagsFromCommandLine(new_cmdline);
2093 std::set<CommandLine::StringType> active_flags =
2094 ExtractFlagsFromCommandLine(active_cmdline);
2095
2096 // Needed because std::equal doesn't check if the 2nd set is empty.
2097 if (new_flags.size() != active_flags.size())
2098 return false;
2099
2100 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2101}
2102
[email protected]e6d1c4f2013-06-12 17:37:402103void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:522104 FlagAccess access,
2105 base::ListValue* supported_experiments,
2106 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:052107 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402108 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052109
2110 int current_platform = GetCurrentPlatform();
2111
[email protected]a314ee5a2010-10-26 21:23:282112 for (size_t i = 0; i < num_experiments; ++i) {
2113 const Experiment& experiment = experiments[i];
[email protected]12271632013-11-26 03:06:392114 if (SkipConditionalExperiment(experiment))
2115 continue;
[email protected]ad2a3ded2010-08-27 13:19:052116
2117 DictionaryValue* data = new DictionaryValue();
2118 data->SetString("internal_name", experiment.internal_name);
2119 data->SetString("name",
2120 l10n_util::GetStringUTF16(experiment.visible_name_id));
2121 data->SetString("description",
2122 l10n_util::GetStringUTF16(
2123 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:402124
2125 ListValue* supported_platforms = new ListValue();
2126 AddOsStrings(experiment.supported_platforms, supported_platforms);
2127 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:052128
[email protected]28e35af2011-02-09 12:56:222129 switch (experiment.type) {
2130 case Experiment::SINGLE_VALUE:
2131 data->SetBoolean(
2132 "enabled",
2133 enabled_experiments.count(experiment.internal_name) > 0);
2134 break;
2135 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:442136 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:222137 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2138 break;
2139 default:
2140 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192141 }
2142
[email protected]ee28495a2013-05-20 04:10:522143 bool supported = (experiment.supported_platforms & current_platform) != 0;
2144#if defined(OS_CHROMEOS)
2145 if (access == kOwnerAccessToFlags &&
2146 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2147 supported = true;
2148 }
2149#endif
2150 if (supported)
2151 supported_experiments->Append(data);
2152 else
2153 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052154 }
[email protected]ad2a3ded2010-08-27 13:19:052155}
2156
[email protected]ad2a3ded2010-08-27 13:19:052157bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552158 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052159}
2160
[email protected]e6d1c4f2013-06-12 17:37:402161void SetExperimentEnabled(FlagsStorage* flags_storage,
2162 const std::string& internal_name,
2163 bool enable) {
2164 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2165 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072166}
2167
2168void RemoveFlagsSwitches(
2169 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552170 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072171}
2172
[email protected]e6d1c4f2013-06-12 17:37:402173void ResetAllFlags(FlagsStorage* flags_storage) {
2174 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002175}
2176
[email protected]a314ee5a2010-10-26 21:23:282177int GetCurrentPlatform() {
2178#if defined(OS_MACOSX)
2179 return kOsMac;
2180#elif defined(OS_WIN)
2181 return kOsWin;
2182#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2183 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212184#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282185 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402186#elif defined(OS_ANDROID)
2187 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282188#else
2189#error Unknown platform
2190#endif
2191}
2192
[email protected]e6d1c4f2013-06-12 17:37:402193void RecordUMAStatistics(FlagsStorage* flags_storage) {
2194 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:542195 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2196 ++it) {
2197 std::string action("AboutFlags_");
2198 action += *it;
[email protected]7f6f44c2011-12-14 13:23:382199 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542200 }
2201 // Since flag metrics are recorded every startup, add a tick so that the
2202 // stats can be made meaningful.
2203 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:382204 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2205 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542206}
2207
[email protected]e2ddbc92010-10-15 20:02:072208//////////////////////////////////////////////////////////////////////////////
2209// FlagsState implementation.
2210
2211namespace {
2212
[email protected]83e9fa702013-02-25 19:30:442213typedef std::map<std::string, std::pair<std::string, std::string> >
2214 NameToSwitchAndValueMap;
2215
2216void SetFlagToSwitchMapping(const std::string& key,
2217 const std::string& switch_name,
2218 const std::string& switch_value,
2219 NameToSwitchAndValueMap* name_to_switch_map) {
2220 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2221 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2222}
2223
[email protected]578f2092013-09-16 17:16:212224void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2225 CommandLine* command_line,
2226 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072227 if (command_line->HasSwitch(switches::kNoExperiments))
2228 return;
2229
2230 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002231
[email protected]e6d1c4f2013-06-12 17:37:402232 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2233 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072234
[email protected]a82744532011-02-11 16:15:532235 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192236 for (size_t i = 0; i < num_experiments; ++i) {
2237 const Experiment& e = experiments[i];
2238 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442239 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2240 e.command_line_value, &name_to_switch_map);
2241 } else if (e.type == Experiment::MULTI_VALUE) {
2242 for (int j = 0; j < e.num_choices; ++j) {
2243 SetFlagToSwitchMapping(e.NameForChoice(j),
2244 e.choices[j].command_line_switch,
2245 e.choices[j].command_line_value,
2246 &name_to_switch_map);
2247 }
[email protected]8a6ff28d2010-12-02 16:35:192248 } else {
[email protected]83e9fa702013-02-25 19:30:442249 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2250 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2251 &name_to_switch_map);
2252 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2253 e.command_line_value, &name_to_switch_map);
2254 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2255 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192256 }
2257 }
[email protected]e2ddbc92010-10-15 20:02:072258
[email protected]578f2092013-09-16 17:16:212259 if (sentinels == kAddSentinels) {
2260 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2261 flags_switches_.insert(
2262 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2263 std::string()));
2264 }
[email protected]e2ddbc92010-10-15 20:02:072265 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2266 it != enabled_experiments.end();
2267 ++it) {
2268 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532269 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192270 name_to_switch_map.find(experiment_name);
2271 if (name_to_switch_it == name_to_switch_map.end()) {
2272 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072273 continue;
[email protected]8a6ff28d2010-12-02 16:35:192274 }
[email protected]e2ddbc92010-10-15 20:02:072275
[email protected]a82744532011-02-11 16:15:532276 const std::pair<std::string, std::string>&
2277 switch_and_value_pair = name_to_switch_it->second;
2278
[email protected]9737b3632013-08-26 09:23:232279 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532280 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2281 switch_and_value_pair.second);
2282 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072283 }
[email protected]578f2092013-09-16 17:16:212284 if (sentinels == kAddSentinels) {
2285 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2286 flags_switches_.insert(
2287 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2288 std::string()));
2289 }
[email protected]e2ddbc92010-10-15 20:02:072290}
2291
2292bool FlagsState::IsRestartNeededToCommitChanges() {
2293 return needs_restart_;
2294}
2295
[email protected]e6d1c4f2013-06-12 17:37:402296void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2297 const std::string& internal_name,
2298 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442299 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192300 if (at_index != std::string::npos) {
2301 DCHECK(enable);
2302 // We're being asked to enable a multi-choice experiment. Disable the
2303 // currently selected choice.
2304 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222305 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402306 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192307
[email protected]28e35af2011-02-09 12:56:222308 // And enable the new choice, if it is not the default first choice.
2309 if (internal_name != experiment_name + "@0") {
2310 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402311 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082312 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402313 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222314 }
[email protected]8a6ff28d2010-12-02 16:35:192315 return;
2316 }
2317
[email protected]ad2a3ded2010-08-27 13:19:052318 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402319 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052320
[email protected]8a6ff28d2010-12-02 16:35:192321 const Experiment* e = NULL;
2322 for (size_t i = 0; i < num_experiments; ++i) {
2323 if (experiments[i].internal_name == internal_name) {
2324 e = experiments + i;
2325 break;
2326 }
2327 }
2328 DCHECK(e);
2329
2330 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592331 if (enable)
[email protected]147492b2013-03-19 23:52:082332 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592333 else
[email protected]147492b2013-03-19 23:52:082334 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192335 } else {
2336 if (enable) {
2337 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082338 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192339 } else {
2340 // Find the currently enabled choice and disable it.
2341 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442342 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192343 if (enabled_experiments.find(choice_name) !=
2344 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082345 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192346 enabled_experiments.erase(choice_name);
2347 // Continue on just in case there's a bug and more than one
2348 // experiment for this choice was enabled.
2349 }
2350 }
2351 }
2352 }
[email protected]ad2a3ded2010-08-27 13:19:052353
[email protected]e6d1c4f2013-06-12 17:37:402354 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052355}
2356
[email protected]e2ddbc92010-10-15 20:02:072357void FlagsState::RemoveFlagsSwitches(
2358 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532359 for (std::map<std::string, std::string>::const_iterator
2360 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2361 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072362 }
2363}
2364
[email protected]e6d1c4f2013-06-12 17:37:402365void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002366 needs_restart_ = true;
2367
2368 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402369 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002370}
2371
[email protected]e2ddbc92010-10-15 20:02:072372void FlagsState::reset() {
2373 needs_restart_ = false;
2374 flags_switches_.clear();
2375}
2376
[email protected]38e46812011-05-09 20:49:222377} // namespace
[email protected]e2ddbc92010-10-15 20:02:072378
2379namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192380
2381// WARNING: '@' is also used in the html file. If you update this constant you
2382// also need to update the html file.
2383const char kMultiSeparator[] = "@";
2384
[email protected]e2ddbc92010-10-15 20:02:072385void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552386 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072387}
[email protected]a314ee5a2010-10-26 21:23:282388
2389void SetExperiments(const Experiment* e, size_t count) {
2390 if (!e) {
2391 experiments = kExperiments;
2392 num_experiments = arraysize(kExperiments);
2393 } else {
2394 experiments = e;
2395 num_experiments = count;
2396 }
2397}
2398
[email protected]8a6ff28d2010-12-02 16:35:192399const Experiment* GetExperiments(size_t* count) {
2400 *count = num_experiments;
2401 return experiments;
2402}
2403
[email protected]e2ddbc92010-10-15 20:02:072404} // namespace testing
2405
[email protected]1a47d7e2010-10-15 00:37:242406} // namespace about_flags