blob: 684743d383900775135623bcd85c9305faa72b04 [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]e6d1c4f2013-06-12 17:37:4020#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1023#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2725#include "extensions/common/switches.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0527#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0228#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0229#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1730#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5931#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4832#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2733#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2434#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5635#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2436#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5637
[email protected]dc04be7c2012-03-15 23:57:4938#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3139#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4940#endif
41
[email protected]badba1ad2012-11-16 17:21:4642#if defined(OS_CHROMEOS)
43#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5144#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4645#endif
46
[email protected]7f6f44c2011-12-14 13:23:3847using content::UserMetricsAction;
48
[email protected]1a47d7e2010-10-15 00:37:2449namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0550
[email protected]8a6ff28d2010-12-02 16:35:1951// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5352#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4453 Experiment::SINGLE_VALUE, \
54 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5355#define SINGLE_VALUE_TYPE(command_line_switch) \
56 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4457#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
58 disable_switch, disable_value) \
59 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
60 disable_switch, disable_value, NULL, 3
61#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
62 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5363#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4464 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1965
[email protected]e2ddbc92010-10-15 20:02:0766namespace {
67
[email protected]9c7453d2012-01-21 00:45:4068const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5669const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0570
[email protected]cc3e2052011-12-20 01:01:4071// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
72// whether the experiment is available on that platform.
73void AddOsStrings(unsigned bitmask, ListValue* list) {
74 struct {
75 unsigned bit;
76 const char* const name;
77 } kBitsToOs[] = {
78 {kOsMac, "Mac"},
79 {kOsWin, "Windows"},
80 {kOsLinux, "Linux"},
81 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0182 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5883 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4084 };
85 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
86 if (bitmask & kBitsToOs[i].bit)
87 list->Append(new StringValue(kBitsToOs[i].name));
88}
89
[email protected]6d98abf2013-06-17 23:35:5190// Convert switch constants to proper CommandLine::StringType strings.
91CommandLine::StringType GetSwitchString(const std::string& flag) {
92 CommandLine cmd_line(CommandLine::NO_PROGRAM);
93 cmd_line.AppendSwitch(flag);
94 DCHECK(cmd_line.argv().size() == 2);
95 return cmd_line.argv()[1];
96}
97
98// Scoops flags from a command line.
99std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
100 const CommandLine& cmdline) {
101 std::set<CommandLine::StringType> flags;
102 // First do the ones between --flag-switches-begin and --flag-switches-end.
103 CommandLine::StringVector::const_iterator first =
104 std::find(cmdline.argv().begin(), cmdline.argv().end(),
105 GetSwitchString(switches::kFlagSwitchesBegin));
106 CommandLine::StringVector::const_iterator last =
107 std::find(cmdline.argv().begin(), cmdline.argv().end(),
108 GetSwitchString(switches::kFlagSwitchesEnd));
109 if (first != cmdline.argv().end() && last != cmdline.argv().end())
110 flags.insert(first + 1, last);
111#if defined(OS_CHROMEOS)
112 // Then add those between --policy-switches-begin and --policy-switches-end.
113 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
115 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
116 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
117 if (first != cmdline.argv().end() && last != cmdline.argv().end())
118 flags.insert(first + 1, last);
119#endif
120 return flags;
121}
122
[email protected]fb854192013-02-06 01:30:04123const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
124 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
125 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
126 switches::kEnableCompositingForFixedPosition, ""},
127 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
128 switches::kDisableCompositingForFixedPosition, ""},
129 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
130 switches::kEnableHighDpiCompositingForFixedPosition, ""}
131};
132
[email protected]d8221b22013-05-23 05:35:43133const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
134 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
135 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
136 switches::kEnableCompositingForTransition, ""},
137 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
138 switches::kDisableCompositingForTransition, ""},
139};
140
[email protected]06fc4d3b2013-07-08 21:07:24141const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
143 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
144 switches::kEnableAcceleratedFixedRootBackground, ""},
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
146 switches::kDisableAcceleratedFixedRootBackground, ""},
147};
148
[email protected]8b1c3c72013-01-25 01:48:43149const Experiment::Choice kGDIPresentChoices[] = {
150 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
151 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
152 switches::kDoFirstShowPresentWithGDI, ""},
153 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
154 switches::kDoAllShowPresentWithGDI, ""}
155};
156
[email protected]d7932532012-11-21 21:10:31157const Experiment::Choice kTouchEventsChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
159 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
160 switches::kTouchEvents,
161 switches::kTouchEventsEnabled },
162 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
163 switches::kTouchEvents,
164 switches::kTouchEventsDisabled }
165};
166
[email protected]347a0c72012-05-14 20:28:06167const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31168 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20169 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06170 switches::kTouchOptimizedUI,
171 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20172 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06173 switches::kTouchOptimizedUI,
174 switches::kTouchOptimizedUIDisabled }
175};
176
[email protected]66f409c2012-10-04 20:59:04177const Experiment::Choice kNaClDebugMaskChoices[] = {
178 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
179 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
180 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
181 // an option to switch off its debugging.
182 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
183 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
184 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
185 switches::kNaClDebugMask, "*://*/*debug.nmf" }
186};
187
[email protected]ea2f3342012-09-21 21:13:36188#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02189
190const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24191 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02192 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24193 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19194 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24195 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02196};
[email protected]a78c7432013-03-13 06:22:43197
[email protected]ea2f3342012-09-21 21:13:36198#endif
199
[email protected]9323fdd12013-02-23 00:31:36200const Experiment::Choice kImplSidePaintingChoices[] = {
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
202 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
203 cc::switches::kEnableImplSidePainting, ""},
204 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
205 cc::switches::kDisableImplSidePainting, ""}
206};
207
[email protected]0c04d1c2013-07-10 00:02:32208const Experiment::Choice kDelegatedRendererChoices[] = {
209 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
210 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
211 switches::kEnableDelegatedRenderer, ""},
212 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
213 switches::kDisableDelegatedRenderer, ""}
214};
215
[email protected]a42c85f2013-04-04 18:15:12216const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
218 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
219 cc::switches::kMaxTilesForInterestArea, "64"},
220 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
221 cc::switches::kMaxTilesForInterestArea, "128"},
222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
223 cc::switches::kMaxTilesForInterestArea, "256"},
224 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
225 cc::switches::kMaxTilesForInterestArea, "512"}
226};
227
[email protected]a3618122013-04-26 21:15:34228const Experiment::Choice kDefaultTileWidthChoices[] = {
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
230 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
231 switches::kDefaultTileWidth, "128"},
232 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
233 switches::kDefaultTileWidth, "256"},
234 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
235 switches::kDefaultTileWidth, "512"},
236 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
237 switches::kDefaultTileWidth, "1024"}
238};
239
240const Experiment::Choice kDefaultTileHeightChoices[] = {
241 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
242 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
243 switches::kDefaultTileHeight, "128"},
244 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
245 switches::kDefaultTileHeight, "256"},
246 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
247 switches::kDefaultTileHeight, "512"},
248 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
249 switches::kDefaultTileHeight, "1024"}
250};
251
[email protected]38484df12013-04-10 16:42:03252const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21253 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
254 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
255 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03256 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
257 switches::kUseSimpleCacheBackend, "on"}
258};
259
[email protected]910ecfe2013-06-03 23:38:14260const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
261 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
262 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
263 switches::kTabCaptureUpscaleQuality, "fast" },
264 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
265 switches::kTabCaptureUpscaleQuality, "good" },
266 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
267 switches::kTabCaptureUpscaleQuality, "best" },
268};
269
270const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
271 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
272 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
273 switches::kTabCaptureDownscaleQuality, "fast" },
274 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
275 switches::kTabCaptureDownscaleQuality, "good" },
276 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
277 switches::kTabCaptureDownscaleQuality, "best" },
278};
279
[email protected]4bc5050c2010-11-18 17:55:54280// RECORDING USER METRICS FOR FLAGS:
281// -----------------------------------------------------------------------------
282// The first line of the experiment is the internal name. If you'd like to
283// gather statistics about the usage of your flag, you should append a marker
284// comment to the end of the feature name, like so:
285// "my-special-feature", // FLAGS:RECORD_UMA
286//
287// After doing that, run //chrome/tools/extract_actions.py (see instructions at
288// the top of that file for details) to update the chromeactions.txt file, which
289// will enable UMA to record your feature flag.
290//
[email protected]783d5bb2012-10-24 03:47:14291// After your feature has shipped under a flag, you can locate the metrics under
292// the action name AboutFlags_internal-action-name. Actions are recorded once
293// per startup, so you should divide this number by AboutFlags_StartupTick to
294// get a sense of usage. Note that this will not be the same as number of users
295// with a given feature enabled because users can quit and relaunch the
296// application multiple times over a given time interval. The dashboard also
297// shows you how many (metrics reporting) users have enabled the flag over the
298// last seven days. However, note that this is not the same as the number of
299// users who have the flag enabled, since enabling the flag happens once,
300// whereas running with the flag enabled happens until the user flips the flag
301// again.
[email protected]4bc5050c2010-11-18 17:55:54302
[email protected]8a6ff28d2010-12-02 16:35:19303// To add a new experiment add to the end of kExperiments. There are two
304// distinct types of experiments:
305// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
306// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22307// . MULTI_VALUE: a list of choices, the first of which should correspond to a
308// deactivated state for this lab (i.e. no command line option). To specify
309// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
310// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19311// See the documentation of Experiment for details on the fields.
312//
313// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05314const Experiment kExperiments[] = {
315 {
[email protected]aac169d2011-03-18 19:53:03316 "expose-for-tabs", // FLAGS:RECORD_UMA
317 IDS_FLAGS_TABPOSE_NAME,
318 IDS_FLAGS_TABPOSE_DESCRIPTION,
319 kOsMac,
320#if defined(OS_MACOSX)
321 // The switch exists only on OS X.
322 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
323#else
324 SINGLE_VALUE_TYPE("")
325#endif
326 },
327 {
[email protected]4bc5050c2010-11-18 17:55:54328 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05329 IDS_FLAGS_CONFLICTS_CHECK_NAME,
330 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
331 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19332 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05333 },
334 {
[email protected]96c6f4c2011-05-18 19:36:22335 "ignore-gpu-blacklist",
336 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
337 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
338 kOsAll,
339 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
340 },
341 {
[email protected]0110cf112011-07-02 00:39:43342 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22343 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
344 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23345 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44346 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
347 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22348 },
349 {
[email protected]72787e392012-03-23 05:55:43350 "threaded-compositing-mode",
351 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
352 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58353 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44354 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
355 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59356 },
357 {
[email protected]17e27692013-02-06 17:02:09358 "force-accelerated-composited-scrolling",
359 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
360 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
361 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44362 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
363 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09364 },
365 {
[email protected]8b1c3c72013-01-25 01:48:43366 "present-with-GDI",
367 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
368 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
369 kOsWin,
370 MULTI_VALUE_TYPE(kGDIPresentChoices)
371 },
372 {
[email protected]2b608752013-05-01 03:34:36373 "enable-experimental-canvas-features",
374 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
375 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
376 kOsAll,
377 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
378 },
379 {
[email protected]81c64af62012-06-06 20:15:52380 "disable-accelerated-2d-canvas",
381 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
382 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
383 kOsAll,
384 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
385 },
386 {
[email protected]efcde132012-05-30 01:05:18387 "disable-threaded-animation",
388 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
389 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59390 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37391 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59392 },
393 {
[email protected]5963b772011-02-09 22:55:38394 "composited-layer-borders",
395 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
396 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
397 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57398 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38399 },
400 {
[email protected]a8f1eaa2011-03-07 19:00:58401 "show-fps-counter",
402 IDS_FLAGS_SHOW_FPS_COUNTER,
403 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
404 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57405 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58406 },
[email protected]8ff7f342011-05-25 01:49:47407 {
[email protected]70c98a332011-12-21 20:51:52408 "accelerated-filters",
409 IDS_FLAGS_ACCELERATED_FILTERS,
410 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
411 kOsAll,
412 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
413 },
414 {
[email protected]8ff7f342011-05-25 01:49:47415 "disable-gpu-vsync",
416 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
417 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56418 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47419 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
420 },
[email protected]deaba6d52011-09-23 14:47:12421 {
422 "disable-webgl",
423 IDS_FLAGS_DISABLE_WEBGL_NAME,
424 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28425 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12426 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
427 },
[email protected]09096e02012-05-24 11:12:04428 {
[email protected]ce585bf2013-03-14 16:25:16429 "disable-webrtc",
430 IDS_FLAGS_DISABLE_WEBRTC_NAME,
431 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05432 kOsAndroid,
433#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16434 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05435#else
436 SINGLE_VALUE_TYPE("")
437#endif
438 },
[email protected]5e2bc8c2013-05-28 22:59:57439#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30440 {
441 "enable-sctp-data-channels",
442 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
443 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
444 kOsAll,
445 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
446 },
[email protected]c1298742013-07-17 04:06:32447 {
[email protected]f1045f02013-08-02 23:19:35448 "disable-device-enumeration",
449 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
450 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
[email protected]c1298742013-07-17 04:06:32451 kOsAll,
[email protected]f1045f02013-08-02 23:19:35452 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
[email protected]c1298742013-07-17 04:06:32453 },
[email protected]5e2bc8c2013-05-28 22:59:57454#endif
[email protected]34cb5292013-04-15 06:06:31455#if defined(OS_ANDROID)
456 {
[email protected]7b8a31632013-06-13 22:42:37457 "disable-webaudio",
458 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
459 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31460 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37461 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31462 },
463#endif
[email protected]d9da9582013-01-31 04:59:05464 {
[email protected]96bcdc102012-05-24 23:42:10465 "fixed-position-creates-stacking-context",
466 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
467 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
468 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44469 ENABLE_DISABLE_VALUE_TYPE(
470 switches::kEnableFixedPositionCreatesStackingContext,
471 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10472 },
[email protected]fb854192013-02-06 01:30:04473 {
474 "enable-compositing-for-fixed-position",
475 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
476 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
477 kOsAll,
478 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
479 },
[email protected]d8221b22013-05-23 05:35:43480 {
481 "enable-compositing-for-transition",
482 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
483 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
484 kOsAll,
485 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
486 },
[email protected]06fc4d3b2013-07-08 21:07:24487 {
488 "enable-accelerated-fixed-root-background",
489 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
490 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
491 kOsAll,
492 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
493 },
[email protected]a7640ef22012-10-06 00:52:08494 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53495 {
[email protected]e3791ce92011-08-09 01:03:32496 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40497 IDS_FLAGS_ENABLE_NACL_NAME,
498 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56499 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19500 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40501 },
502 {
[email protected]9addd1c2012-09-15 14:28:24503 "enable-nacl-debug", // FLAGS:RECORD_UMA
504 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
505 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56506 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24507 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13508 },
509 {
[email protected]66f409c2012-10-04 20:59:04510 "nacl-debug-mask", // FLAGS:RECORD_UMA
511 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
512 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56513 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04514 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
515 },
516 {
[email protected]83c85262013-08-22 21:13:46517 "disable-pnacl", // FLAGS:RECORD_UMA
518 IDS_FLAGS_PNACL_NAME,
519 IDS_FLAGS_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56520 kOsDesktop,
[email protected]83c85262013-08-22 21:13:46521 ENABLE_DISABLE_VALUE_TYPE("", switches::kDisablePnacl)
[email protected]7babd1c2012-08-08 20:35:29522 },
523 {
[email protected]4bc5050c2010-11-18 17:55:54524 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32525 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
526 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56527 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51528 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32529 },
[email protected]3627b06d2010-11-12 16:36:16530 {
[email protected]ac2e2acd2013-03-21 12:57:29531 "extensions-on-chrome-urls",
532 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
533 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
534 kOsAll,
[email protected]49d9b142013-07-19 08:50:27535 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29536 },
537 {
[email protected]88c92012013-07-02 11:56:34538 "enable-fast-unload",
539 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
540 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
541 kOsAll,
542 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
543 },
544 {
[email protected]e9cddd52013-03-23 17:37:53545 "enable-adview",
546 IDS_FLAGS_ENABLE_ADVIEW_NAME,
547 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
548 kOsDesktop,
549 SINGLE_VALUE_TYPE(switches::kEnableAdview)
550 },
551 {
552 "enable-adview-src-attribute",
553 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
554 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
555 kOsDesktop,
556 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
557 },
558 {
[email protected]1f4da9e2013-06-27 05:23:44559 "enable-app-window-controls",
560 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
561 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
562 kOsDesktop,
563 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
564 },
565 {
[email protected]3a362432012-06-18 20:39:51566 "script-badges",
567 IDS_FLAGS_SCRIPT_BADGES_NAME,
568 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56569 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09570 SINGLE_VALUE_TYPE(switches::kScriptBadges)
571 },
572 {
573 "script-bubble",
574 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
575 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56576 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44577 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
578 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51579 },
580 {
[email protected]cbe224d2011-08-04 22:12:49581 "apps-new-install-bubble",
582 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
583 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56584 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49585 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
586 },
587 {
[email protected]80bd24e2010-11-30 09:34:38588 "disable-hyperlink-auditing",
589 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
590 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
591 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19592 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51593 },
594 {
[email protected]5aea1862011-03-23 23:55:39595 "tab-groups-context-menu",
596 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
597 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
598 kOsWin,
599 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
600 },
[email protected]c94cebd2012-06-21 00:55:28601 {
602 "enable-instant-extended-api",
603 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
604 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46605 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51606 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
607 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28608 },
[email protected]e9bf9d92011-03-31 20:57:15609 {
[email protected]8cc9e532013-05-06 21:01:47610 "enable-local-first-load-ntp",
611 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
612 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46613 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47614 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
615 switches::kDisableLocalFirstLoadNTP)
616 },
[email protected]333bdc52013-07-16 00:37:04617#if defined(OS_ANDROID)
618 {
619 "enable-new-ntp",
620 IDS_FLAGS_ENABLE_NEW_NTP,
621 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
622 kOsAndroid,
623 SINGLE_VALUE_TYPE(switches::kEnableNewNTP)
624 },
625#endif
[email protected]8cc9e532013-05-06 21:01:47626 {
[email protected]354e33b2011-06-15 00:29:10627 "static-ip-config",
628 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
629 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
630 kOsCrOS,
631#if defined(OS_CHROMEOS)
632 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24633 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10634#else
635 SINGLE_VALUE_TYPE("")
636#endif
637 },
[email protected]3eb5728c2011-06-20 22:32:24638 {
639 "show-autofill-type-predictions",
640 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
641 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
642 kOsAll,
[email protected]e217c5632013-04-12 19:11:48643 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24644 },
[email protected]bff4d3e2011-06-21 23:58:52645 {
[email protected]e755a382012-09-13 17:16:35646 "enable-gesture-tap-highlight",
647 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
648 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
649 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47650 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
651 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35652 },
653 {
[email protected]a22ebd812011-06-23 00:05:39654 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
655 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
656 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
657 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40658 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25659 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39660 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
661 },
[email protected]81a6b0b2011-06-24 17:55:40662 {
[email protected]7e7a28092011-12-09 22:24:55663 "enable-panels",
664 IDS_FLAGS_ENABLE_PANELS_NAME,
665 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56666 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55667 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54668 },
[email protected]e3749d12011-07-25 22:22:12669 {
[email protected]27c14f02012-06-22 17:29:58670 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27671 "save-page-as-mhtml", // FLAGS:RECORD_UMA
672 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
673 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
674 kOsMac | kOsWin | kOsLinux,
675 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
676 },
677 {
[email protected]b7bb44f2011-09-01 05:17:03678 "enable-autologin",
679 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
680 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
681 kOsMac | kOsWin | kOsLinux,
682 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
683 },
[email protected]b9841172011-09-26 23:36:09684 {
[email protected]903e63382013-06-01 00:40:58685 "enable-quic",
686 IDS_FLAGS_ENABLE_QUIC_NAME,
687 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
688 kOsAll,
689 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
690 switches::kDisableQuic)
691 },
692 {
[email protected]eb8f88e2013-07-15 09:52:17693 "enable-quic-https",
694 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
695 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
696 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00697 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
698 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17699 },
700 {
[email protected]bca09b9982013-06-27 22:30:46701 "enable-spdy4a2",
702 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
703 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
704 kOsAll,
705 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
706 },
707 {
[email protected]88a332622013-07-30 07:13:32708 "enable-http2-draft-04",
709 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
710 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
711 kOsAll,
712 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
713 },
714 {
[email protected]27b3fe92012-03-21 05:35:06715 "enable-async-dns",
716 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
717 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46718 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44719 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
720 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06721 },
722 {
[email protected]1eb93802012-09-11 18:57:56723 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31724 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
725 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32726 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31727 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44728 },
[email protected]e4e68dbb2011-11-18 01:50:22729 {
[email protected]16c242d2013-05-31 23:56:47730 "enable-encrypted-media",
731 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
732 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50733 kOsAll,
[email protected]16c242d2013-05-31 23:56:47734 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
735 },
736 {
737 "disable-encrypted-media",
738 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
739 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50740 kOsAll,
[email protected]16c242d2013-05-31 23:56:47741 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03742 },
[email protected]f88628792012-12-18 07:07:50743 {
[email protected]d21ead42013-06-24 06:35:06744 "override-encrypted-media-canplaytype",
745 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
746 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
747 kOsMac | kOsWin,
748 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
749 },
750 {
[email protected]f88628792012-12-18 07:07:50751 "enable-opus-playback",
752 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
753 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56754 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50755 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
756 },
[email protected]b150b5532013-06-15 00:50:54757 {
[email protected]6ac955b2013-04-19 23:43:32758 "enable-vp8-alpha-playback",
759 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
760 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
761 kOsDesktop,
762 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
763 },
764 {
[email protected]ca6eaa5a2013-01-24 16:16:04765 "enable-managed-users",
766 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
767 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08768 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04769 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
770 },
[email protected]dc04be7c2012-03-15 23:57:49771#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50772 {
[email protected]2a13a9a2013-04-19 04:00:21773 "ash-disable-auto-maximizing",
774 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
775 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
776 kOsWin | kOsLinux | kOsCrOS,
777 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
778 },
[email protected]dc04be7c2012-03-15 23:57:49779#endif
[email protected]eaae8b462012-01-20 22:20:39780 {
[email protected]db543d322011-12-15 20:40:15781 "per-tile-painting",
782 IDS_FLAGS_PER_TILE_PAINTING_NAME,
783 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37784 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37785 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15786 },
[email protected]bf88c032011-12-22 19:05:47787 {
788 "enable-javascript-harmony",
789 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
790 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
791 kOsAll,
792 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
793 },
[email protected]7e7f378a2012-01-05 14:35:37794 {
[email protected]85646172012-01-09 22:45:54795 "enable-tab-browser-dragging",
796 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
797 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
798 kOsWin,
799 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
800 },
801 {
[email protected]068b7b52012-02-27 12:41:44802 "disable-restore-session-state",
803 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
804 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37805 kOsAll,
[email protected]068b7b52012-02-27 12:41:44806 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37807 },
[email protected]88864db2012-01-18 20:56:35808 {
809 "disable-software-rasterizer",
810 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
811 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
812#if defined(ENABLE_SWIFTSHADER)
813 kOsAll,
814#else
815 0,
816#endif
817 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
818 },
[email protected]15a5d722012-01-23 09:11:14819 {
[email protected]c1b18ea2013-07-10 13:01:16820 "enable-experimental-web-platform-features",
821 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
822 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16823 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16824 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49825 },
826 {
[email protected]0f95a252012-09-13 22:30:04827 "enable-css-shaders",
828 IDS_FLAGS_CSS_SHADERS_NAME,
829 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
830 kOsAll,
831 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
832 },
833 {
[email protected]3e8befc2012-03-13 01:17:03834 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16835 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
836 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56837 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03838 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16839 },
[email protected]dc04be7c2012-03-15 23:57:49840#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01841 {
[email protected]3cd198a22012-03-12 20:38:01842 "enable-ash-oak",
843 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
844 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
845 kOsAll,
846 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
847 },
[email protected]31cf1c52012-02-29 20:55:01848#endif
[email protected]184ec592012-03-01 11:54:28849 {
850 "enable-devtools-experiments",
851 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
852 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56853 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28854 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
855 },
[email protected]76d1854e2012-03-02 23:57:44856 {
[email protected]3db81f242013-07-12 08:56:17857 "remote-debugging-raw-usb",
858 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
859 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
[email protected]be99de42013-07-12 13:51:16860 kOsDesktop,
[email protected]3db81f242013-07-12 08:56:17861 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
862 },
863 {
[email protected]2fefdb32013-02-26 14:28:10864 "silent-debugger-extension-api",
865 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
866 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
867 kOsDesktop,
868 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
869 },
870 {
[email protected]76d1854e2012-03-02 23:57:44871 "enable-suggestions-ntp",
872 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
873 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56874 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44875 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
876 },
[email protected]a3d54252012-04-05 20:04:13877 {
[email protected]1dbaf5e2012-11-30 05:51:32878 "spellcheck-autocorrect",
879 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
880 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
881 kOsWin | kOsLinux | kOsCrOS,
882 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
883 },
884 {
[email protected]e27137282013-06-20 02:38:35885 "enable-scroll-prediction",
886 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
887 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
888 kOsDesktop,
889 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
890 },
891 {
[email protected]d7932532012-11-21 21:10:31892 "touch-events",
893 IDS_TOUCH_EVENTS_NAME,
894 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56895 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31896 MULTI_VALUE_TYPE(kTouchEventsChoices)
897 },
898 {
[email protected]c9c73ad42012-04-18 03:35:59899 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06900 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
901 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55902 kOsWin,
[email protected]347a0c72012-05-14 20:28:06903 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59904 },
[email protected]8a6aaa72012-04-20 20:53:58905 {
[email protected]b9c96ff2012-11-26 22:24:40906 "disable-touch-adjustment",
907 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
908 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
909 kOsWin | kOsLinux | kOsCrOS,
910 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
911 },
[email protected]0b60afa2012-04-19 17:36:39912#if defined(OS_CHROMEOS)
913 {
[email protected]690de0f2013-06-26 00:51:16914 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31915 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
916 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
917 kOsCrOS,
918 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
919 },
920 {
[email protected]28fb77a62013-08-24 14:37:57921 "ash-enable-drag-off-shelf",
922 IDS_FLAGS_DRAG_OFF_SHELF_NAME,
923 IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
924 kOsCrOS,
925 SINGLE_VALUE_TYPE(ash::switches::kAshEnableDragOffShelf)
926 },
927 {
[email protected]7c4a9bc2012-09-11 22:10:05928 "enable-background-loader",
929 IDS_ENABLE_BACKLOADER_NAME,
930 IDS_ENABLE_BACKLOADER_DESCRIPTION,
931 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24932 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05933 },
934 {
[email protected]3f4181a2013-02-01 21:31:07935 "enable-screensaver-extension",
936 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
937 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
938 kOsCrOS,
939 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
940 },
941 {
[email protected]0b60afa2012-04-19 17:36:39942 "no-discard-tabs",
943 IDS_FLAGS_NO_DISCARD_TABS_NAME,
944 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
945 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24946 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39947 },
[email protected]ba7df7e2013-07-18 21:49:59948 {
949 "ash-enable-docked-windows",
950 IDS_FLAGS_DOCKED_WINDOWS_NAME,
951 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
952 kOsCrOS,
953 SINGLE_VALUE_TYPE(ash::switches::kAshEnableDockedWindows)
954 },
[email protected]0b60afa2012-04-19 17:36:39955#endif
[email protected]79be6d32012-04-24 20:47:44956 {
[email protected]8d68a3e02013-01-12 15:57:10957 "enable-download-resumption",
958 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
959 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56960 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10961 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
962 },
963 {
[email protected]9a5940d2012-04-27 19:16:23964 "allow-nacl-socket-api",
965 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
966 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56967 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23968 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
969 },
[email protected]85333732012-05-01 19:02:24970 {
[email protected]60673ad72012-05-02 06:16:33971 "stacked-tab-strip",
972 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
973 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
974 kOsWin,
975 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
976 },
977 {
[email protected]4bd20202012-06-14 17:35:01978 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24979 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
980 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
981 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01982 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24983 },
[email protected]190349fd2012-05-02 00:10:47984#if defined(OS_CHROMEOS)
985 {
986 "allow-touchpad-three-finger-click",
987 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
988 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
989 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24990 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47991 },
992#endif
[email protected]53520b1b2012-05-07 21:43:37993#if defined(USE_ASH)
994 {
[email protected]8257d382013-03-26 13:08:42995 "show-launcher-alignment-menu",
[email protected]81dd43d2013-08-06 05:58:27996 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_NAME,
997 IDS_FLAGS_SHOW_SHELF_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42998 kOsAll,
[email protected]265fd7b2013-08-13 02:32:10999 ENABLE_DISABLE_VALUE_TYPE(
1000 ash::switches::kShowShelfAlignmentMenu,
1001 ash::switches::kHideShelfAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421002 },
1003 {
[email protected]2ddf37b2013-04-20 01:15:581004 "disable-minimize-on-second-launcher-item-click",
1005 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1006 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1007 kOsAll,
1008 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1009 },
1010 {
[email protected]d24ce2c2013-08-01 15:14:191011 "enable-overview-mode",
1012 IDS_FLAGS_OVERVIEW_MODE_NAME,
1013 IDS_FLAGS_OVERVIEW_MODE_DESCRIPTION,
1014 kOsCrOS,
1015 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOverviewMode)
1016 },
1017 {
[email protected]73074742012-05-17 01:44:411018 "show-touch-hud",
1019 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1020 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1021 kOsAll,
1022 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1023 },
1024 {
[email protected]9f0940b62012-05-23 22:56:351025 "enable-pinch",
1026 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1027 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061028 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381029 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1030 },
1031 {
[email protected]de0aaed2013-05-27 18:16:431032 "enable-pinch-virtual-viewport",
1033 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1034 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1035 kOsLinux | kOsWin | kOsCrOS,
1036 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1037 },
1038 {
[email protected]a4016f12013-05-02 07:53:471039 "forced-maximize-mode",
1040 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1041 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1042 kOsLinux | kOsWin | kOsCrOS,
1043 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1044 },
[email protected]73074742012-05-17 01:44:411045#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281046#if defined(OS_CHROMEOS)
1047 {
[email protected]8b04a1652012-08-04 02:59:491048 "disable-boot-animation",
1049 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1050 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581051 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241052 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491053 },
[email protected]95058572012-08-20 14:57:291054 {
[email protected]d96aef22012-10-30 11:47:021055 "captive-portal-detector",
1056 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1057 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581058 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021059 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1060 },
1061 {
[email protected]c11aa8f12012-12-18 18:43:141062 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571063 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1064 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1065 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141066 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571067 },
[email protected]f0280952012-11-06 20:30:501068 {
[email protected]53bc4352013-06-24 10:22:371069 "file-manager-show-checkboxes",
1070 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1071 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491072 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371073 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491074 },
1075 {
[email protected]f6ded872013-07-23 09:41:361076 "file-manager-enable-webstore-integration",
1077 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION,
1078 IDS_FLAGS_FILE_MANAGER_ENABLE_WEBSTORE_INTEGRATION_DESCRIPTION,
1079 kOsCrOS,
1080 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableWebstoreIntegration)
1081 },
1082 {
[email protected]099b890c2013-04-25 19:16:261083 "disable-quickoffice-component-app",
1084 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1085 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1086 kOsCrOS,
1087 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1088 },
[email protected]62018dc2012-12-13 00:37:351089#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391090 {
[email protected]6247aba2013-03-04 22:57:181091 "views-textfield",
1092 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1093 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391094 kOsWin,
[email protected]6247aba2013-03-04 22:57:181095 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1096 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391097 },
[email protected]bd0cd3bb2012-06-14 03:03:381098 {
[email protected]ffbe5782013-05-09 23:22:081099 "new-dialog-style",
1100 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1101 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321102 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081103 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1104 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321105 },
[email protected]7db8893a2012-07-26 00:49:401106 { "disable-accelerated-video-decode",
1107 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1108 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191109 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401110 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151111 },
[email protected]66ae9fc2012-06-19 21:33:521112#if defined(USE_ASH)
1113 {
1114 "ash-debug-shortcuts",
1115 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1116 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1117 kOsAll,
1118 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1119 },
1120#endif
[email protected]37fee0942012-08-07 21:07:451121 {
[email protected]ad3f6d22012-08-29 02:34:191122 "enable-contacts",
1123 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1124 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1125 kOsCrOS,
1126 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1127 },
[email protected]1d9bb9cd2012-08-28 22:02:501128#if defined(USE_ASH)
1129 { "ash-enable-advanced-gestures",
1130 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1131 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1132 kOsCrOS,
1133 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1134 },
[email protected]cfa24e62013-02-13 21:19:111135 { "ash-disable-tab-scrubbing",
1136 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1137 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161138 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111139 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161140 },
[email protected]ad6fcc32013-05-30 03:46:481141 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081142 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1143 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1144 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481145 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081146 },
[email protected]cf2b1a82013-04-20 01:05:431147 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111148 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1149 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241150 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431151 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1152 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241153 },
[email protected]316708a2012-11-05 22:57:021154#if defined(OS_LINUX)
1155 { "ash-enable-memory-monitor",
1156 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1157 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1158 kOsCrOS,
1159 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1160 },
1161#endif
[email protected]1d9bb9cd2012-08-28 22:02:501162#endif
[email protected]9b7ab882012-09-10 23:46:361163#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131164 { "use-new-network-configuration-handlers",
1165 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1166 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1167 kOsCrOS,
1168 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1169 },
[email protected]9b7ab882012-09-10 23:46:361170 {
[email protected]354ff2d2013-05-01 17:06:311171 "ash-audio-device-menu",
1172 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1173 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1174 kOsCrOS,
[email protected]bddb2fb2013-07-25 22:40:431175 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu,
1176 ash::switches::kAshDisableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121177 },
1178 {
[email protected]205f07892012-10-16 20:26:221179 "enable-carrier-switching",
1180 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1181 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1182 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241183 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221184 },
1185 {
[email protected]9b7ab882012-09-10 23:46:361186 "enable-request-tablet-site",
1187 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1188 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1189 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241190 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361191 },
1192#endif
[email protected]dab49c0b2012-10-04 05:55:351193 {
1194 "debug-packed-apps",
1195 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1196 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561197 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351198 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1199 },
[email protected]d1459ed2012-10-10 01:29:331200 {
1201 "enable-password-generation",
1202 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1203 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561204 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331205 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1206 },
[email protected]26d045f2012-10-18 21:18:431207 {
[email protected]283cc562013-07-18 08:25:431208 "password-autofill-public-suffix-domain-matching",
1209 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1210 IDS_FLAGS_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
[email protected]17b9c742013-06-22 13:48:421211 kOsAndroid,
[email protected]283cc562013-07-18 08:25:431212 ENABLE_DISABLE_VALUE_TYPE(
1213 switches::kEnablePasswordAutofillPublicSuffixDomainMatching,
1214 switches::kDisablePasswordAutofillPublicSuffixDomainMatching)
[email protected]17b9c742013-06-22 13:48:421215 },
1216 {
[email protected]76f7d4882012-10-26 21:09:221217 "enable-deferred-image-decoding",
1218 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1219 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221220 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221221 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1222 },
1223 {
[email protected]075543d2012-10-24 01:29:141224 "performance-monitor-gathering",
1225 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1226 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1227 kOsAll,
1228 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1229 },
[email protected]783d5bb2012-10-24 03:47:141230 {
[email protected]a7259fb2012-11-08 06:22:231231 "enable-experimental-form-filling",
1232 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1233 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1234 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481235 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231236 },
[email protected]6e6efe42013-01-30 00:04:501237 {
[email protected]db3178c2013-03-21 14:54:541238 "wallet-service-use-prod",
1239 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1240 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1241 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481242 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541243 },
1244 {
[email protected]6e6efe42013-01-30 00:04:501245 "enable-interactive-autocomplete",
1246 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1247 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]2a9b0c12013-08-15 02:38:391248 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171249 ENABLE_DISABLE_VALUE_TYPE(
1250 autofill::switches::kEnableInteractiveAutocomplete,
1251 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501252 },
[email protected]177260c2013-04-24 01:47:381253#if defined(USE_AURA)
1254 {
1255 "overscroll-history-navigation",
1256 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1257 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1258 kOsAll,
1259 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1260 switches::kOverscrollHistoryNavigation, "1",
1261 switches::kOverscrollHistoryNavigation, "0")
1262 },
1263#endif
[email protected]edbea622012-11-28 20:39:381264 {
[email protected]888878e82013-07-24 22:49:401265 "scroll-end-effect",
1266 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1267 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1268 kOsCrOS,
1269 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1270 switches::kScrollEndEffect, "1",
1271 switches::kScrollEndEffect, "0")
1272 },
1273 {
[email protected]0222b1b42013-07-26 09:57:001274 "enable-touch-side-bezels",
1275 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME,
1276 IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION,
1277 kOsCrOS,
1278 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1279 switches::kTouchSideBezels, "1",
1280 switches::kTouchSideBezels, "0")
1281 },
1282 {
[email protected]06582ecb2013-08-14 02:37:161283 "enable-no-touch-to-renderer-while-scrolling",
1284 IDS_FLAGS_ENABLE_NO_TOUCH_TO_RENDERER_WHILE_SCROLLING_NAME,
1285 IDS_FLAGS_ENABLE_NO_TOUCH_TO_RENDERER_WHILE_SCROLLING_DESCRIPTION,
1286 kOsDesktop,
1287 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1288 switches::kNoTouchToRendererWhileScrolling, "1",
1289 switches::kNoTouchToRendererWhileScrolling, "0")
1290 },
1291 {
[email protected]edbea622012-11-28 20:39:381292 "enable-touch-drag-drop",
1293 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1294 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1295 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271296 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1297 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381298 },
[email protected]0e2f43b62013-02-21 00:47:151299 {
1300 "enable-touch-editing",
1301 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1302 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1303 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271304 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1305 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151306 },
[email protected]92e12dd92012-12-11 03:33:201307 {
1308 "enable-rich-notifications",
1309 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1310 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361311 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231312 ENABLE_DISABLE_VALUE_TYPE(
1313 message_center::switches::kEnableRichNotifications,
1314 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201315 },
[email protected]4d51c682012-12-11 11:34:551316 {
[email protected]ddec1aa2013-04-28 23:22:451317 "enable-sync-synced-notifications",
1318 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1319 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181320 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451321 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1322 switches::kDisableSyncSyncedNotifications)
1323 },
1324 {
[email protected]a50e16a2013-04-25 14:07:171325 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551326 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1327 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1328 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171329 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551330 },
[email protected]628a69a92012-12-23 04:09:341331 {
[email protected]fd030142013-02-08 02:04:381332 "enable-usermedia-screen-capture",
1333 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1334 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1335 kOsDesktop,
1336 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1337 },
[email protected]5b93e162013-02-19 06:33:091338 {
1339 "enable-apps-devtool-app",
1340 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1341 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1342 kOsDesktop,
1343 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1344 },
[email protected]9323fdd12013-02-23 00:31:361345 {
1346 "impl-side-painting",
1347 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1348 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041349 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361350 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1351 },
[email protected]a42c85f2013-04-04 18:15:121352 {
[email protected]0c04d1c2013-07-10 00:02:321353 "delegated-renderer",
1354 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1355 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1356#ifdef USE_AURA
1357 kOsWin | kOsLinux |
1358#endif
1359 kOsAndroid | kOsCrOS,
1360 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1361 },
1362 {
[email protected]1c92d3e2013-04-18 05:31:391363 "enable-websocket-experimental-implementation",
1364 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1365 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1366 kOsAll,
1367 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1368 },
1369 {
[email protected]a42c85f2013-04-04 18:15:121370 "max-tiles-for-interest-area",
1371 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1372 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1373 kOsAndroid | kOsLinux | kOsCrOS,
1374 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1375 },
[email protected]7cf7ccb2013-04-20 02:53:081376 {
1377 "enable-offline-mode",
1378 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1379 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1380 kOsAll,
1381 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1382 },
[email protected]a3618122013-04-26 21:15:341383 {
1384 "default-tile-width",
1385 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1386 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1387 kOsAll,
1388 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1389 },
1390 {
1391 "default-tile-height",
1392 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1393 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1394 kOsAll,
1395 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1396 },
[email protected]2f2f72b2013-03-08 22:37:311397 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1398#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371399 {
1400 "track-active-visit-time",
1401 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1402 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1403 kOsWin,
1404 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1405 },
[email protected]2f2f72b2013-03-08 22:37:311406#endif
[email protected]8cc71d42013-03-02 17:26:081407#if defined(OS_ANDROID)
1408 {
1409 "disable-gesture-requirement-for-media-playback",
1410 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1411 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1412 kOsAndroid,
1413 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1414 },
1415#endif
[email protected]6077cab2013-03-11 19:36:141416#if defined(ENABLE_GOOGLE_NOW)
1417 {
1418 "enable-google-now",
1419 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1420 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361421 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141422 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1423 },
1424#endif
[email protected]86459e2c2013-04-10 13:39:241425#if defined(OS_CHROMEOS)
1426 {
1427 "enable-virtual-keyboard",
1428 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1429 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1430 kOsCrOS,
1431 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1432 },
1433#endif
[email protected]38484df12013-04-10 16:42:031434 {
1435 "enable-simple-cache-backend",
1436 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1437 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251438 kOsAll,
[email protected]38484df12013-04-10 16:42:031439 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1440 },
[email protected]717e4e22013-04-10 20:52:231441 {
1442 "enable-tcp-fast-open",
1443 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1444 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111445 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231446 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1447 },
[email protected]8027acd2013-04-18 08:35:151448 {
[email protected]58c740f2013-05-06 05:25:441449 "apps-use-native-frame",
1450 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1451 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
[email protected]fa39ebda2013-08-06 08:42:581452 kOsMac | kOsWin,
[email protected]58c740f2013-05-06 05:25:441453 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1454 },
[email protected]896d86b32013-05-09 19:36:441455 {
1456 "enable-syncfs-directory-operation",
1457 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1458 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1459 kOsAll,
1460 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1461 },
[email protected]a4ed7e12013-05-24 01:00:281462 {
[email protected]380532aa2013-05-24 11:59:351463 "enable-reset-profile-settings",
1464 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1465 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1466 kOsAll,
1467 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1468 },
[email protected]9f94a6c42013-07-11 18:49:151469 {
1470 "enable-device-discovery",
1471 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1472 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1473 kOsDesktop,
1474 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1475 },
[email protected]56d3c6e42013-05-29 11:28:011476#if defined(OS_MACOSX)
1477 {
1478 "enable-app-list-shim",
1479 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1480 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1481 kOsMac,
1482 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1483 },
[email protected]cb29e162013-05-31 07:47:021484 {
1485 "enable-app-shims",
1486 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1487 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1488 kOsMac,
1489 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1490 },
[email protected]67604442013-06-15 00:04:331491 {
1492 "enable-simplified-fullscreen",
1493 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1494 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1495 kOsMac,
1496 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1497 },
[email protected]56d3c6e42013-05-29 11:28:011498#endif
[email protected]13177832013-05-31 07:46:051499#if defined(OS_CHROMEOS) || defined(OS_WIN)
1500 {
[email protected]6d9087b2013-07-30 08:25:461501 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051502 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1503 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]6d9087b2013-07-30 08:25:461504 kOsCrOS | kOsWin,
1505 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1506 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051507 },
1508#endif
[email protected]910ecfe2013-06-03 23:38:141509#if defined(USE_AURA)
1510 {
1511 "tab-capture-upscale-quality",
1512 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1513 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1514 kOsAll,
1515 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1516 },
1517 {
1518 "tab-capture-downscale-quality",
1519 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1520 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1521 kOsAll,
1522 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1523 },
1524#endif
[email protected]71d4f602013-06-04 23:21:101525 {
[email protected]5e099c62013-06-08 05:46:231526 "enable-spelling-service-feedback",
1527 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1528 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1529 kOsAll,
1530 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1531 },
1532 {
[email protected]71d4f602013-06-04 23:21:101533 "enable-webgl-draft-extensions",
1534 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1535 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1536 kOsAll,
1537 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1538 },
[email protected]deadc492013-06-07 21:39:281539 {
[email protected]962dd6d92013-08-08 22:20:491540 "enable-html-imports",
1541 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1542 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1543 kOsAll,
1544 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1545 },
1546 {
[email protected]deadc492013-06-07 21:39:281547 "high-dpi-support",
1548 IDS_FLAGS_HIDPI_NAME,
1549 IDS_FLAGS_HIDPI_DESCRIPTION,
1550 kOsWin,
1551 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1552 switches::kHighDPISupport,"0")
1553 },
[email protected]77e69a512013-06-08 05:56:451554#if defined(OS_CHROMEOS)
1555 {
[email protected]0a5dd632013-08-06 23:10:451556 "enable-quickoffice-viewing",
1557 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_NAME,
1558 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_VIEWING_DESCRIPTION,
[email protected]77e69a512013-06-08 05:56:451559 kOsCrOS,
[email protected]0a5dd632013-08-06 23:10:451560 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeViewing),
[email protected]77e69a512013-06-08 05:56:451561 },
[email protected]4b8e2502013-07-23 18:34:361562 {
1563 "enable-sticky-keys",
1564 IDS_FLAGS_ENABLE_STICKY_KEYS_NAME,
1565 IDS_FLAGS_ENABLE_STICKY_KEYS_DESCRIPTION,
1566 kOsCrOS,
[email protected]f311449d2013-08-01 19:51:241567 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableStickyKeys,
1568 switches::kDisableStickyKeys)
[email protected]4b8e2502013-07-23 18:34:361569 },
[email protected]77e69a512013-06-08 05:56:451570#endif
[email protected]82ca4212013-06-11 12:09:171571 {
1572 "enable-translate-settings",
1573 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1574 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1575 kOsAll,
1576 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1577 },
[email protected]bc1697a82013-06-27 15:48:311578 {
1579 "enable-web-midi",
1580 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1581 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1582 kOsMac,
1583 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1584 },
[email protected]020df792013-06-29 14:26:211585 {
1586 "enable-new-profile-management",
1587 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1588 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1589 kOsWin,
1590 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1591 },
1592 {
1593 "enable-gaia-profile-info",
1594 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1595 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221596 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211597 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1598 },
[email protected]dcf6cf32013-07-03 10:53:281599 {
1600 "disable-app-launcher",
1601 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1602 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
[email protected]3be26972013-08-22 08:43:021603 kOsMac | kOsWin,
[email protected]dcf6cf32013-07-03 10:53:281604 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1605 },
[email protected]d4839992013-08-13 05:41:091606#if defined(OS_CHROMEOS)
1607 {
1608 "disable-user-image-sync",
1609 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1610 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1611 kOsCrOS,
1612 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1613 },
1614#endif
[email protected]0e38c3252013-08-14 22:18:511615#if defined(OS_ANDROID)
1616 {
1617 "enable-accessibility-tab-switcher",
1618 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1619 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1620 kOsAndroid,
1621 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561622 },
[email protected]0e38c3252013-08-14 22:18:511623#endif
[email protected]2e9d79f2013-08-16 05:45:561624 {
1625 "enable-batched-shutdown",
1626 IDS_FLAGS_ENABLE_BATCHED_SHUTDOWN_NAME,
1627 IDS_FLAGS_ENABLE_BATCHED_SHUTDOWN_DESCRIPTION,
1628 kOsDesktop,
1629 SINGLE_VALUE_TYPE(switches::kEnableBatchedShutdown)
1630 },
[email protected]a0e4b072011-08-17 01:47:071631};
[email protected]ad2a3ded2010-08-27 13:19:051632
[email protected]a314ee5a2010-10-26 21:23:281633const Experiment* experiments = kExperiments;
1634size_t num_experiments = arraysize(kExperiments);
1635
[email protected]e2ddbc92010-10-15 20:02:071636// Stores and encapsulates the little state that about:flags has.
1637class FlagsState {
1638 public:
1639 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401640 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1641 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071642 bool IsRestartNeededToCommitChanges();
1643 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401644 FlagsStorage* flags_storage,
1645 const std::string& internal_name,
1646 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071647 void RemoveFlagsSwitches(
1648 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401649 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071650 void reset();
1651
1652 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551653 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071654 return Singleton<FlagsState>::get();
1655 }
1656
1657 private:
1658 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531659 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071660
1661 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1662};
1663
[email protected]8a6ff28d2010-12-02 16:35:191664// Adds the internal names for the specified experiment to |names|.
1665void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1666 if (e.type == Experiment::SINGLE_VALUE) {
1667 names->insert(e.internal_name);
1668 } else {
[email protected]83e9fa702013-02-25 19:30:441669 DCHECK(e.type == Experiment::MULTI_VALUE ||
1670 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191671 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441672 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191673 }
1674}
1675
[email protected]28e35af2011-02-09 12:56:221676// Confirms that an experiment is valid, used in a DCHECK in
1677// SanitizeList below.
1678bool ValidateExperiment(const Experiment& e) {
1679 switch (e.type) {
1680 case Experiment::SINGLE_VALUE:
1681 DCHECK_EQ(0, e.num_choices);
1682 DCHECK(!e.choices);
1683 break;
1684 case Experiment::MULTI_VALUE:
1685 DCHECK_GT(e.num_choices, 0);
1686 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531687 DCHECK(e.choices[0].command_line_switch);
1688 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221689 break;
[email protected]83e9fa702013-02-25 19:30:441690 case Experiment::ENABLE_DISABLE_VALUE:
1691 DCHECK_EQ(3, e.num_choices);
1692 DCHECK(!e.choices);
1693 DCHECK(e.command_line_switch);
1694 DCHECK(e.command_line_value);
1695 DCHECK(e.disable_command_line_switch);
1696 DCHECK(e.disable_command_line_value);
1697 break;
[email protected]28e35af2011-02-09 12:56:221698 default:
1699 NOTREACHED();
1700 }
1701 return true;
1702}
1703
[email protected]ad2a3ded2010-08-27 13:19:051704// Removes all experiments from prefs::kEnabledLabsExperiments that are
1705// unknown, to prevent this list to become very long as experiments are added
1706// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401707void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051708 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221709 for (size_t i = 0; i < num_experiments; ++i) {
1710 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191711 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221712 }
[email protected]ad2a3ded2010-08-27 13:19:051713
[email protected]07d666d2013-07-21 23:56:261714 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051715
1716 std::set<std::string> new_enabled_experiments;
1717 std::set_intersection(
1718 known_experiments.begin(), known_experiments.end(),
1719 enabled_experiments.begin(), enabled_experiments.end(),
1720 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1721
[email protected]07d666d2013-07-21 23:56:261722 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401723 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051724}
1725
[email protected]1a47d7e2010-10-15 00:37:241726void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401727 FlagsStorage* flags_storage, std::set<std::string>* result) {
1728 SanitizeList(flags_storage);
1729 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051730}
1731
[email protected]a314ee5a2010-10-26 21:23:281732// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1733// enabled on the current platform.
1734void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401735 FlagsStorage* flags_storage, std::set<std::string>* result) {
1736 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281737
1738 // Filter out any experiments that aren't enabled on the current platform. We
1739 // don't remove these from prefs else syncing to a platform with a different
1740 // set of experiments would be lossy.
1741 std::set<std::string> platform_experiments;
1742 int current_platform = GetCurrentPlatform();
1743 for (size_t i = 0; i < num_experiments; ++i) {
1744 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191745 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581746#if defined(OS_CHROMEOS)
1747 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1748 AddInternalName(experiments[i], &platform_experiments);
1749#endif
[email protected]a314ee5a2010-10-26 21:23:281750 }
1751
1752 std::set<std::string> new_enabled_experiments;
1753 std::set_intersection(
1754 platform_experiments.begin(), platform_experiments.end(),
1755 result->begin(), result->end(),
1756 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1757
1758 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051759}
1760
[email protected]8a6ff28d2010-12-02 16:35:191761// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191762Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221763 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441764 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1765 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191766 ListValue* result = new ListValue;
1767 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191768 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441769 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191770 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441771 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221772 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191773 result->Append(value);
1774 }
1775 return result;
1776}
1777
[email protected]e2ddbc92010-10-15 20:02:071778} // namespace
1779
[email protected]83e9fa702013-02-25 19:30:441780std::string Experiment::NameForChoice(int index) const {
1781 DCHECK(type == Experiment::MULTI_VALUE ||
1782 type == Experiment::ENABLE_DISABLE_VALUE);
1783 DCHECK_LT(index, num_choices);
1784 return std::string(internal_name) + testing::kMultiSeparator +
1785 base::IntToString(index);
1786}
1787
1788string16 Experiment::DescriptionForChoice(int index) const {
1789 DCHECK(type == Experiment::MULTI_VALUE ||
1790 type == Experiment::ENABLE_DISABLE_VALUE);
1791 DCHECK_LT(index, num_choices);
1792 int description_id;
1793 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1794 const int kEnableDisableDescriptionIds[] = {
1795 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1796 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1797 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1798 };
1799 description_id = kEnableDisableDescriptionIds[index];
1800 } else {
1801 description_id = choices[index].description_id;
1802 }
1803 return l10n_util::GetStringUTF16(description_id);
1804}
1805
[email protected]e6d1c4f2013-06-12 17:37:401806void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1807 CommandLine* command_line) {
1808 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1809 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051810}
1811
[email protected]6d98abf2013-06-17 23:35:511812bool AreSwitchesIdenticalToCurrentCommandLine(
1813 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1814 std::set<CommandLine::StringType> new_flags =
1815 ExtractFlagsFromCommandLine(new_cmdline);
1816 std::set<CommandLine::StringType> active_flags =
1817 ExtractFlagsFromCommandLine(active_cmdline);
1818
1819 // Needed because std::equal doesn't check if the 2nd set is empty.
1820 if (new_flags.size() != active_flags.size())
1821 return false;
1822
1823 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1824}
1825
[email protected]e6d1c4f2013-06-12 17:37:401826void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521827 FlagAccess access,
1828 base::ListValue* supported_experiments,
1829 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051830 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401831 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051832
1833 int current_platform = GetCurrentPlatform();
1834
[email protected]a314ee5a2010-10-26 21:23:281835 for (size_t i = 0; i < num_experiments; ++i) {
1836 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051837
1838 DictionaryValue* data = new DictionaryValue();
1839 data->SetString("internal_name", experiment.internal_name);
1840 data->SetString("name",
1841 l10n_util::GetStringUTF16(experiment.visible_name_id));
1842 data->SetString("description",
1843 l10n_util::GetStringUTF16(
1844 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401845
1846 ListValue* supported_platforms = new ListValue();
1847 AddOsStrings(experiment.supported_platforms, supported_platforms);
1848 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051849
[email protected]28e35af2011-02-09 12:56:221850 switch (experiment.type) {
1851 case Experiment::SINGLE_VALUE:
1852 data->SetBoolean(
1853 "enabled",
1854 enabled_experiments.count(experiment.internal_name) > 0);
1855 break;
1856 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441857 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221858 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1859 break;
1860 default:
1861 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191862 }
1863
[email protected]ee28495a2013-05-20 04:10:521864 bool supported = (experiment.supported_platforms & current_platform) != 0;
1865#if defined(OS_CHROMEOS)
1866 if (access == kOwnerAccessToFlags &&
1867 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1868 supported = true;
1869 }
1870#endif
1871 if (supported)
1872 supported_experiments->Append(data);
1873 else
1874 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051875 }
[email protected]ad2a3ded2010-08-27 13:19:051876}
1877
[email protected]ad2a3ded2010-08-27 13:19:051878bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551879 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051880}
1881
[email protected]e6d1c4f2013-06-12 17:37:401882void SetExperimentEnabled(FlagsStorage* flags_storage,
1883 const std::string& internal_name,
1884 bool enable) {
1885 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1886 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071887}
1888
1889void RemoveFlagsSwitches(
1890 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551891 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071892}
1893
[email protected]e6d1c4f2013-06-12 17:37:401894void ResetAllFlags(FlagsStorage* flags_storage) {
1895 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001896}
1897
[email protected]a314ee5a2010-10-26 21:23:281898int GetCurrentPlatform() {
1899#if defined(OS_MACOSX)
1900 return kOsMac;
1901#elif defined(OS_WIN)
1902 return kOsWin;
1903#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1904 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211905#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281906 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401907#elif defined(OS_ANDROID)
1908 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281909#else
1910#error Unknown platform
1911#endif
1912}
1913
[email protected]e6d1c4f2013-06-12 17:37:401914void RecordUMAStatistics(FlagsStorage* flags_storage) {
1915 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541916 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1917 ++it) {
1918 std::string action("AboutFlags_");
1919 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381920 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541921 }
1922 // Since flag metrics are recorded every startup, add a tick so that the
1923 // stats can be made meaningful.
1924 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381925 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1926 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541927}
1928
[email protected]e2ddbc92010-10-15 20:02:071929//////////////////////////////////////////////////////////////////////////////
1930// FlagsState implementation.
1931
1932namespace {
1933
[email protected]83e9fa702013-02-25 19:30:441934typedef std::map<std::string, std::pair<std::string, std::string> >
1935 NameToSwitchAndValueMap;
1936
1937void SetFlagToSwitchMapping(const std::string& key,
1938 const std::string& switch_name,
1939 const std::string& switch_value,
1940 NameToSwitchAndValueMap* name_to_switch_map) {
1941 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1942 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1943}
1944
[email protected]e2ddbc92010-10-15 20:02:071945void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401946 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071947 if (command_line->HasSwitch(switches::kNoExperiments))
1948 return;
1949
1950 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001951
[email protected]e6d1c4f2013-06-12 17:37:401952 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1953 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071954
[email protected]a82744532011-02-11 16:15:531955 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191956 for (size_t i = 0; i < num_experiments; ++i) {
1957 const Experiment& e = experiments[i];
1958 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441959 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1960 e.command_line_value, &name_to_switch_map);
1961 } else if (e.type == Experiment::MULTI_VALUE) {
1962 for (int j = 0; j < e.num_choices; ++j) {
1963 SetFlagToSwitchMapping(e.NameForChoice(j),
1964 e.choices[j].command_line_switch,
1965 e.choices[j].command_line_value,
1966 &name_to_switch_map);
1967 }
[email protected]8a6ff28d2010-12-02 16:35:191968 } else {
[email protected]83e9fa702013-02-25 19:30:441969 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1970 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1971 &name_to_switch_map);
1972 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1973 e.command_line_value, &name_to_switch_map);
1974 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1975 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191976 }
1977 }
[email protected]e2ddbc92010-10-15 20:02:071978
1979 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531980 flags_switches_.insert(
1981 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1982 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071983 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1984 it != enabled_experiments.end();
1985 ++it) {
1986 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531987 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191988 name_to_switch_map.find(experiment_name);
1989 if (name_to_switch_it == name_to_switch_map.end()) {
1990 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071991 continue;
[email protected]8a6ff28d2010-12-02 16:35:191992 }
[email protected]e2ddbc92010-10-15 20:02:071993
[email protected]a82744532011-02-11 16:15:531994 const std::pair<std::string, std::string>&
1995 switch_and_value_pair = name_to_switch_it->second;
1996
1997 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1998 switch_and_value_pair.second);
1999 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072000 }
2001 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:532002 flags_switches_.insert(
2003 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2004 std::string()));
[email protected]e2ddbc92010-10-15 20:02:072005}
2006
2007bool FlagsState::IsRestartNeededToCommitChanges() {
2008 return needs_restart_;
2009}
2010
[email protected]e6d1c4f2013-06-12 17:37:402011void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2012 const std::string& internal_name,
2013 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442014 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192015 if (at_index != std::string::npos) {
2016 DCHECK(enable);
2017 // We're being asked to enable a multi-choice experiment. Disable the
2018 // currently selected choice.
2019 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222020 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402021 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192022
[email protected]28e35af2011-02-09 12:56:222023 // And enable the new choice, if it is not the default first choice.
2024 if (internal_name != experiment_name + "@0") {
2025 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402026 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082027 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402028 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222029 }
[email protected]8a6ff28d2010-12-02 16:35:192030 return;
2031 }
2032
[email protected]ad2a3ded2010-08-27 13:19:052033 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402034 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052035
[email protected]8a6ff28d2010-12-02 16:35:192036 const Experiment* e = NULL;
2037 for (size_t i = 0; i < num_experiments; ++i) {
2038 if (experiments[i].internal_name == internal_name) {
2039 e = experiments + i;
2040 break;
2041 }
2042 }
2043 DCHECK(e);
2044
2045 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592046 if (enable)
[email protected]147492b2013-03-19 23:52:082047 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592048 else
[email protected]147492b2013-03-19 23:52:082049 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192050 } else {
2051 if (enable) {
2052 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082053 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192054 } else {
2055 // Find the currently enabled choice and disable it.
2056 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442057 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192058 if (enabled_experiments.find(choice_name) !=
2059 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082060 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192061 enabled_experiments.erase(choice_name);
2062 // Continue on just in case there's a bug and more than one
2063 // experiment for this choice was enabled.
2064 }
2065 }
2066 }
2067 }
[email protected]ad2a3ded2010-08-27 13:19:052068
[email protected]e6d1c4f2013-06-12 17:37:402069 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052070}
2071
[email protected]e2ddbc92010-10-15 20:02:072072void FlagsState::RemoveFlagsSwitches(
2073 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532074 for (std::map<std::string, std::string>::const_iterator
2075 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2076 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072077 }
2078}
2079
[email protected]e6d1c4f2013-06-12 17:37:402080void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002081 needs_restart_ = true;
2082
2083 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402084 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002085}
2086
[email protected]e2ddbc92010-10-15 20:02:072087void FlagsState::reset() {
2088 needs_restart_ = false;
2089 flags_switches_.clear();
2090}
2091
[email protected]38e46812011-05-09 20:49:222092} // namespace
[email protected]e2ddbc92010-10-15 20:02:072093
2094namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192095
2096// WARNING: '@' is also used in the html file. If you update this constant you
2097// also need to update the html file.
2098const char kMultiSeparator[] = "@";
2099
[email protected]e2ddbc92010-10-15 20:02:072100void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552101 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072102}
[email protected]a314ee5a2010-10-26 21:23:282103
2104void SetExperiments(const Experiment* e, size_t count) {
2105 if (!e) {
2106 experiments = kExperiments;
2107 num_experiments = arraysize(kExperiments);
2108 } else {
2109 experiments = e;
2110 num_experiments = count;
2111 }
2112}
2113
[email protected]8a6ff28d2010-12-02 16:35:192114const Experiment* GetExperiments(size_t* count) {
2115 *count = num_experiments;
2116 return experiments;
2117}
2118
[email protected]e2ddbc92010-10-15 20:02:072119} // namespace testing
2120
[email protected]1a47d7e2010-10-15 00:37:242121} // namespace about_flags