blob: 875aa9e7268eebe00908fd676fcde76b6af10fbd [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]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4115#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2016#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5218#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4019#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3822#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0223#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0524#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0226#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1727#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5928#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4829#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2730#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2431#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5632#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2433#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5634
[email protected]dc04be7c2012-03-15 23:57:4935#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3136#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4937#endif
38
[email protected]badba1ad2012-11-16 17:21:4639#if defined(OS_CHROMEOS)
40#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5141#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4642#endif
43
[email protected]7f6f44c2011-12-14 13:23:3844using content::UserMetricsAction;
45
[email protected]1a47d7e2010-10-15 00:37:2446namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0547
[email protected]8a6ff28d2010-12-02 16:35:1948// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5349#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4450 Experiment::SINGLE_VALUE, \
51 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5352#define SINGLE_VALUE_TYPE(command_line_switch) \
53 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4454#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
55 disable_switch, disable_value) \
56 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
57 disable_switch, disable_value, NULL, 3
58#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
59 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5360#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4461 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1962
[email protected]e2ddbc92010-10-15 20:02:0763namespace {
64
[email protected]9c7453d2012-01-21 00:45:4065const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5666const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0567
[email protected]cc3e2052011-12-20 01:01:4068// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
69// whether the experiment is available on that platform.
70void AddOsStrings(unsigned bitmask, ListValue* list) {
71 struct {
72 unsigned bit;
73 const char* const name;
74 } kBitsToOs[] = {
75 {kOsMac, "Mac"},
76 {kOsWin, "Windows"},
77 {kOsLinux, "Linux"},
78 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0179 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5880 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4081 };
82 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
83 if (bitmask & kBitsToOs[i].bit)
84 list->Append(new StringValue(kBitsToOs[i].name));
85}
86
[email protected]6d98abf2013-06-17 23:35:5187// Convert switch constants to proper CommandLine::StringType strings.
88CommandLine::StringType GetSwitchString(const std::string& flag) {
89 CommandLine cmd_line(CommandLine::NO_PROGRAM);
90 cmd_line.AppendSwitch(flag);
91 DCHECK(cmd_line.argv().size() == 2);
92 return cmd_line.argv()[1];
93}
94
95// Scoops flags from a command line.
96std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
97 const CommandLine& cmdline) {
98 std::set<CommandLine::StringType> flags;
99 // First do the ones between --flag-switches-begin and --flag-switches-end.
100 CommandLine::StringVector::const_iterator first =
101 std::find(cmdline.argv().begin(), cmdline.argv().end(),
102 GetSwitchString(switches::kFlagSwitchesBegin));
103 CommandLine::StringVector::const_iterator last =
104 std::find(cmdline.argv().begin(), cmdline.argv().end(),
105 GetSwitchString(switches::kFlagSwitchesEnd));
106 if (first != cmdline.argv().end() && last != cmdline.argv().end())
107 flags.insert(first + 1, last);
108#if defined(OS_CHROMEOS)
109 // Then add those between --policy-switches-begin and --policy-switches-end.
110 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
111 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
112 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
113 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
114 if (first != cmdline.argv().end() && last != cmdline.argv().end())
115 flags.insert(first + 1, last);
116#endif
117 return flags;
118}
119
[email protected]128dc6c2012-06-22 20:30:35120const Experiment::Choice
121 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
122 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
123 "",
124 "" },
125 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
126 switches::kOmniboxHistoryQuickProviderReorderForInlining,
127 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
128 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
129 switches::kOmniboxHistoryQuickProviderReorderForInlining,
130 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
131};
132
[email protected]032d5e6c2012-02-17 17:53:55133const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
134 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
135 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
136 switches::kOmniboxInlineHistoryQuickProvider,
137 switches::kOmniboxInlineHistoryQuickProviderAllowed },
138 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
139 switches::kOmniboxInlineHistoryQuickProvider,
140 switches::kOmniboxInlineHistoryQuickProviderProhibited }
141};
142
[email protected]fb854192013-02-06 01:30:04143const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
144 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
145 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
146 switches::kEnableCompositingForFixedPosition, ""},
147 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
148 switches::kDisableCompositingForFixedPosition, ""},
149 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
150 switches::kEnableHighDpiCompositingForFixedPosition, ""}
151};
152
[email protected]d8221b22013-05-23 05:35:43153const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
154 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
155 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
156 switches::kEnableCompositingForTransition, ""},
157 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
158 switches::kDisableCompositingForTransition, ""},
159};
160
[email protected]8b1c3c72013-01-25 01:48:43161const Experiment::Choice kGDIPresentChoices[] = {
162 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
163 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
164 switches::kDoFirstShowPresentWithGDI, ""},
165 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
166 switches::kDoAllShowPresentWithGDI, ""}
167};
168
[email protected]d7932532012-11-21 21:10:31169const Experiment::Choice kTouchEventsChoices[] = {
170 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
171 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
172 switches::kTouchEvents,
173 switches::kTouchEventsEnabled },
174 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
175 switches::kTouchEvents,
176 switches::kTouchEventsDisabled }
177};
178
[email protected]347a0c72012-05-14 20:28:06179const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31180 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20181 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06182 switches::kTouchOptimizedUI,
183 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20184 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06185 switches::kTouchOptimizedUI,
186 switches::kTouchOptimizedUIDisabled }
187};
188
[email protected]66f409c2012-10-04 20:59:04189const Experiment::Choice kNaClDebugMaskChoices[] = {
190 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
191 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
192 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
193 // an option to switch off its debugging.
194 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
195 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
196 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
197 switches::kNaClDebugMask, "*://*/*debug.nmf" }
198};
199
[email protected]ea2f3342012-09-21 21:13:36200#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02201
202const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24203 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02204 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24205 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19206 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24207 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02208};
[email protected]a78c7432013-03-13 06:22:43209
[email protected]ea2f3342012-09-21 21:13:36210#endif
211
[email protected]9323fdd12013-02-23 00:31:36212const Experiment::Choice kImplSidePaintingChoices[] = {
213 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
214 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
215 cc::switches::kEnableImplSidePainting, ""},
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
217 cc::switches::kDisableImplSidePainting, ""}
218};
219
[email protected]a42c85f2013-04-04 18:15:12220const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
221 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
223 cc::switches::kMaxTilesForInterestArea, "64"},
224 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
225 cc::switches::kMaxTilesForInterestArea, "128"},
226 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
227 cc::switches::kMaxTilesForInterestArea, "256"},
228 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
229 cc::switches::kMaxTilesForInterestArea, "512"}
230};
231
[email protected]a3618122013-04-26 21:15:34232const Experiment::Choice kDefaultTileWidthChoices[] = {
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
234 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
235 switches::kDefaultTileWidth, "128"},
236 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
237 switches::kDefaultTileWidth, "256"},
238 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
239 switches::kDefaultTileWidth, "512"},
240 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
241 switches::kDefaultTileWidth, "1024"}
242};
243
244const Experiment::Choice kDefaultTileHeightChoices[] = {
245 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
246 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
247 switches::kDefaultTileHeight, "128"},
248 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
249 switches::kDefaultTileHeight, "256"},
250 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
251 switches::kDefaultTileHeight, "512"},
252 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
253 switches::kDefaultTileHeight, "1024"}
254};
255
[email protected]38484df12013-04-10 16:42:03256const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21257 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
258 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
259 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03260 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
261 switches::kUseSimpleCacheBackend, "on"}
262};
263
[email protected]910ecfe2013-06-03 23:38:14264const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
265 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
266 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
267 switches::kTabCaptureUpscaleQuality, "fast" },
268 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
269 switches::kTabCaptureUpscaleQuality, "good" },
270 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
271 switches::kTabCaptureUpscaleQuality, "best" },
272};
273
274const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
275 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
276 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
277 switches::kTabCaptureDownscaleQuality, "fast" },
278 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
279 switches::kTabCaptureDownscaleQuality, "good" },
280 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
281 switches::kTabCaptureDownscaleQuality, "best" },
282};
283
[email protected]4bc5050c2010-11-18 17:55:54284// RECORDING USER METRICS FOR FLAGS:
285// -----------------------------------------------------------------------------
286// The first line of the experiment is the internal name. If you'd like to
287// gather statistics about the usage of your flag, you should append a marker
288// comment to the end of the feature name, like so:
289// "my-special-feature", // FLAGS:RECORD_UMA
290//
291// After doing that, run //chrome/tools/extract_actions.py (see instructions at
292// the top of that file for details) to update the chromeactions.txt file, which
293// will enable UMA to record your feature flag.
294//
[email protected]783d5bb2012-10-24 03:47:14295// After your feature has shipped under a flag, you can locate the metrics under
296// the action name AboutFlags_internal-action-name. Actions are recorded once
297// per startup, so you should divide this number by AboutFlags_StartupTick to
298// get a sense of usage. Note that this will not be the same as number of users
299// with a given feature enabled because users can quit and relaunch the
300// application multiple times over a given time interval. The dashboard also
301// shows you how many (metrics reporting) users have enabled the flag over the
302// last seven days. However, note that this is not the same as the number of
303// users who have the flag enabled, since enabling the flag happens once,
304// whereas running with the flag enabled happens until the user flips the flag
305// again.
[email protected]4bc5050c2010-11-18 17:55:54306
[email protected]8a6ff28d2010-12-02 16:35:19307// To add a new experiment add to the end of kExperiments. There are two
308// distinct types of experiments:
309// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
310// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22311// . MULTI_VALUE: a list of choices, the first of which should correspond to a
312// deactivated state for this lab (i.e. no command line option). To specify
313// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
314// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19315// See the documentation of Experiment for details on the fields.
316//
317// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05318const Experiment kExperiments[] = {
319 {
[email protected]aac169d2011-03-18 19:53:03320 "expose-for-tabs", // FLAGS:RECORD_UMA
321 IDS_FLAGS_TABPOSE_NAME,
322 IDS_FLAGS_TABPOSE_DESCRIPTION,
323 kOsMac,
324#if defined(OS_MACOSX)
325 // The switch exists only on OS X.
326 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
327#else
328 SINGLE_VALUE_TYPE("")
329#endif
330 },
331 {
[email protected]4bc5050c2010-11-18 17:55:54332 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05333 IDS_FLAGS_CONFLICTS_CHECK_NAME,
334 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
335 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19336 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05337 },
338 {
[email protected]96c6f4c2011-05-18 19:36:22339 "ignore-gpu-blacklist",
340 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
341 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
342 kOsAll,
343 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
344 },
345 {
[email protected]0110cf112011-07-02 00:39:43346 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22347 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
348 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23349 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44350 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
351 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22352 },
353 {
[email protected]72787e392012-03-23 05:55:43354 "threaded-compositing-mode",
355 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
356 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58357 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44358 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
359 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59360 },
361 {
[email protected]17e27692013-02-06 17:02:09362 "force-accelerated-composited-scrolling",
363 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
364 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
365 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44366 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
367 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09368 },
369 {
[email protected]8b1c3c72013-01-25 01:48:43370 "present-with-GDI",
371 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
372 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
373 kOsWin,
374 MULTI_VALUE_TYPE(kGDIPresentChoices)
375 },
376 {
[email protected]2b608752013-05-01 03:34:36377 "enable-experimental-canvas-features",
378 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
379 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
380 kOsAll,
381 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
382 },
383 {
[email protected]81c64af62012-06-06 20:15:52384 "disable-accelerated-2d-canvas",
385 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
386 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
387 kOsAll,
388 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
389 },
390 {
[email protected]efcde132012-05-30 01:05:18391 "disable-threaded-animation",
392 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
393 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59394 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37395 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59396 },
397 {
[email protected]5963b772011-02-09 22:55:38398 "composited-layer-borders",
399 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
400 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
401 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57402 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38403 },
404 {
[email protected]a8f1eaa2011-03-07 19:00:58405 "show-fps-counter",
406 IDS_FLAGS_SHOW_FPS_COUNTER,
407 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
408 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57409 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58410 },
[email protected]8ff7f342011-05-25 01:49:47411 {
[email protected]70c98a332011-12-21 20:51:52412 "accelerated-filters",
413 IDS_FLAGS_ACCELERATED_FILTERS,
414 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
415 kOsAll,
416 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
417 },
418 {
[email protected]8ff7f342011-05-25 01:49:47419 "disable-gpu-vsync",
420 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
421 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56422 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47423 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
424 },
[email protected]deaba6d52011-09-23 14:47:12425 {
[email protected]4052d832013-01-16 05:31:01426 "enable-webgl",
427 IDS_FLAGS_ENABLE_WEBGL_NAME,
428 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
429 kOsAndroid,
430#if defined(OS_ANDROID)
431 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
432#else
433 SINGLE_VALUE_TYPE("")
434#endif
435 },
436 {
[email protected]deaba6d52011-09-23 14:47:12437 "disable-webgl",
438 IDS_FLAGS_DISABLE_WEBGL_NAME,
439 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56440 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01441#if defined(OS_ANDROID)
442 SINGLE_VALUE_TYPE("")
443#else
[email protected]deaba6d52011-09-23 14:47:12444 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01445#endif
[email protected]deaba6d52011-09-23 14:47:12446 },
[email protected]09096e02012-05-24 11:12:04447 {
[email protected]ce585bf2013-03-14 16:25:16448 "disable-webrtc",
449 IDS_FLAGS_DISABLE_WEBRTC_NAME,
450 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05451 kOsAndroid,
452#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16453 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05454#else
455 SINGLE_VALUE_TYPE("")
456#endif
457 },
[email protected]5e2bc8c2013-05-28 22:59:57458#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30459 {
460 "enable-sctp-data-channels",
461 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
462 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
463 kOsAll,
464 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
465 },
[email protected]5e2bc8c2013-05-28 22:59:57466#endif
[email protected]34cb5292013-04-15 06:06:31467#if defined(OS_ANDROID)
468 {
[email protected]7b8a31632013-06-13 22:42:37469 "disable-webaudio",
470 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
471 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31472 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37473 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31474 },
475#endif
[email protected]d9da9582013-01-31 04:59:05476 {
[email protected]96bcdc102012-05-24 23:42:10477 "fixed-position-creates-stacking-context",
478 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
479 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
480 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44481 ENABLE_DISABLE_VALUE_TYPE(
482 switches::kEnableFixedPositionCreatesStackingContext,
483 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10484 },
[email protected]fb854192013-02-06 01:30:04485 {
486 "enable-compositing-for-fixed-position",
487 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
488 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
489 kOsAll,
490 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
491 },
[email protected]d8221b22013-05-23 05:35:43492 {
493 "enable-compositing-for-transition",
494 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
495 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
496 kOsAll,
497 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
498 },
[email protected]a7640ef22012-10-06 00:52:08499 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53500 {
[email protected]e3791ce92011-08-09 01:03:32501 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40502 IDS_FLAGS_ENABLE_NACL_NAME,
503 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56504 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19505 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40506 },
507 {
[email protected]9addd1c2012-09-15 14:28:24508 "enable-nacl-debug", // FLAGS:RECORD_UMA
509 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
510 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56511 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24512 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13513 },
514 {
[email protected]66f409c2012-10-04 20:59:04515 "nacl-debug-mask", // FLAGS:RECORD_UMA
516 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
517 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56518 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04519 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
520 },
521 {
[email protected]7babd1c2012-08-08 20:35:29522 "enable-pnacl", // FLAGS:RECORD_UMA
523 IDS_FLAGS_ENABLE_PNACL_NAME,
524 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56525 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29526 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
527 },
528 {
[email protected]4bc5050c2010-11-18 17:55:54529 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32530 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
531 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56532 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19533 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32534 },
[email protected]3627b06d2010-11-12 16:36:16535 {
[email protected]ac2e2acd2013-03-21 12:57:29536 "extensions-on-chrome-urls",
537 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
538 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
539 kOsAll,
540 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
541 },
542 {
[email protected]e9cddd52013-03-23 17:37:53543 "enable-adview",
544 IDS_FLAGS_ENABLE_ADVIEW_NAME,
545 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
546 kOsDesktop,
547 SINGLE_VALUE_TYPE(switches::kEnableAdview)
548 },
549 {
550 "enable-adview-src-attribute",
551 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
552 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
553 kOsDesktop,
554 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
555 },
556 {
[email protected]544471a2012-10-13 05:27:09557 "action-box",
[email protected]cab18ef2012-04-27 07:22:03558 IDS_FLAGS_ACTION_BOX_NAME,
559 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56560 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44561 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
562 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03563 },
564 {
[email protected]3a362432012-06-18 20:39:51565 "script-badges",
566 IDS_FLAGS_SCRIPT_BADGES_NAME,
567 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56568 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09569 SINGLE_VALUE_TYPE(switches::kScriptBadges)
570 },
571 {
572 "script-bubble",
573 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
574 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56575 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44576 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
577 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51578 },
579 {
[email protected]cbe224d2011-08-04 22:12:49580 "apps-new-install-bubble",
581 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
582 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56583 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49584 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
585 },
586 {
[email protected]80bd24e2010-11-30 09:34:38587 "disable-hyperlink-auditing",
588 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
589 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
590 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19591 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51592 },
593 {
594 "experimental-location-features", // FLAGS:RECORD_UMA
595 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
596 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
597 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19598 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
599 },
600 {
[email protected]5aea1862011-03-23 23:55:39601 "tab-groups-context-menu",
602 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
603 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
604 kOsWin,
605 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
606 },
[email protected]c94cebd2012-06-21 00:55:28607 {
608 "enable-instant-extended-api",
609 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
610 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46611 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51612 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
613 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28614 },
[email protected]e9bf9d92011-03-31 20:57:15615 {
[email protected]8cc9e532013-05-06 21:01:47616 "enable-local-first-load-ntp",
617 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
618 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46619 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47620 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
621 switches::kDisableLocalFirstLoadNTP)
622 },
623 {
[email protected]07fd48a2013-04-13 02:53:27624 "enable-local-only-instant-extended-api",
625 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
626 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46627 kOsMac | kOsWin | kOsCrOS,
[email protected]07fd48a2013-04-13 02:53:27628 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
629 switches::kDisableLocalOnlyInstantExtendedAPI)
630 },
631 {
[email protected]354e33b2011-06-15 00:29:10632 "static-ip-config",
633 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
634 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
635 kOsCrOS,
636#if defined(OS_CHROMEOS)
637 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24638 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10639#else
640 SINGLE_VALUE_TYPE("")
641#endif
642 },
[email protected]3eb5728c2011-06-20 22:32:24643 {
644 "show-autofill-type-predictions",
645 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
646 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
647 kOsAll,
[email protected]e217c5632013-04-12 19:11:48648 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24649 },
[email protected]bff4d3e2011-06-21 23:58:52650 {
[email protected]a5e9faa2013-03-19 09:58:38651 "enable-sync-favicons",
652 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
653 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55654 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38655 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55656 },
657 {
[email protected]e755a382012-09-13 17:16:35658 "enable-gesture-tap-highlight",
659 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
660 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
661 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47662 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
663 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35664 },
665 {
[email protected]a22ebd812011-06-23 00:05:39666 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
667 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
668 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
669 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40670 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25671 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39672 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
673 },
[email protected]81a6b0b2011-06-24 17:55:40674 {
[email protected]128dc6c2012-06-22 20:30:35675 "omnibox-history-quick-provider-reorder-for-inlining",
676 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
677 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
678 kOsAll,
679 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
680 },
681 {
[email protected]032d5e6c2012-02-17 17:53:55682 "omnibox-inline-history-quick-provider",
683 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
684 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
685 kOsAll,
686 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
687 },
688 {
[email protected]7e7a28092011-12-09 22:24:55689 "enable-panels",
690 IDS_FLAGS_ENABLE_PANELS_NAME,
691 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56692 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55693 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54694 },
[email protected]e3749d12011-07-25 22:22:12695 {
[email protected]27c14f02012-06-22 17:29:58696 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27697 "save-page-as-mhtml", // FLAGS:RECORD_UMA
698 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
699 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
700 kOsMac | kOsWin | kOsLinux,
701 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
702 },
703 {
[email protected]b7bb44f2011-09-01 05:17:03704 "enable-autologin",
705 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
706 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
707 kOsMac | kOsWin | kOsLinux,
708 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
709 },
[email protected]b9841172011-09-26 23:36:09710 {
[email protected]903e63382013-06-01 00:40:58711 "enable-quic",
712 IDS_FLAGS_ENABLE_QUIC_NAME,
713 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
714 kOsAll,
715 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
716 switches::kDisableQuic)
717 },
718 {
[email protected]27b3fe92012-03-21 05:35:06719 "enable-async-dns",
720 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
721 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46722 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44723 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
724 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06725 },
[email protected]85dd7ca2013-05-30 23:53:00726#if defined(ANDROID) && !defined(GOOGLE_TV)
727 {
728 "enable-media-source",
729 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
730 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
731 kOsAll,
732 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
733 },
734#else
[email protected]27b3fe92012-03-21 05:35:06735 {
[email protected]1eb93802012-09-11 18:57:56736 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31737 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
738 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32739 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31740 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44741 },
[email protected]85dd7ca2013-05-30 23:53:00742#endif
[email protected]e4e68dbb2011-11-18 01:50:22743 {
[email protected]16c242d2013-05-31 23:56:47744 "enable-encrypted-media",
745 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
746 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56747 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47748 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
749 },
750 {
751 "disable-encrypted-media",
752 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
753 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
754 kOsDesktop,
755 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03756 },
[email protected]f88628792012-12-18 07:07:50757 {
[email protected]d21ead42013-06-24 06:35:06758 "override-encrypted-media-canplaytype",
759 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
760 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
761 kOsMac | kOsWin,
762 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
763 },
764 {
[email protected]f88628792012-12-18 07:07:50765 "enable-opus-playback",
766 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
767 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56768 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50769 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
770 },
[email protected]b150b5532013-06-15 00:50:54771 {
[email protected]6ac955b2013-04-19 23:43:32772 "enable-vp8-alpha-playback",
773 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
774 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
775 kOsDesktop,
776 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
777 },
778 {
[email protected]ca6eaa5a2013-01-24 16:16:04779 "enable-managed-users",
780 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
781 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08782 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04783 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
784 },
[email protected]dc04be7c2012-03-15 23:57:49785#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50786 {
[email protected]2a13a9a2013-04-19 04:00:21787 "ash-disable-auto-maximizing",
788 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
789 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
790 kOsWin | kOsLinux | kOsCrOS,
791 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
792 },
793 {
[email protected]cda278d2012-10-30 20:31:40794 "ash-disable-auto-window-placement",
795 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
796 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
797 kOsWin | kOsLinux | kOsCrOS,
798 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
799 },
[email protected]b4e4ec42012-11-29 21:42:40800 {
[email protected]16f55a22013-02-13 23:47:34801 "ash-disable-per-app-launcher",
802 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
803 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40804 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34805 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40806 },
[email protected]dc04be7c2012-03-15 23:57:49807#endif
[email protected]eaae8b462012-01-20 22:20:39808 {
[email protected]db543d322011-12-15 20:40:15809 "per-tile-painting",
810 IDS_FLAGS_PER_TILE_PAINTING_NAME,
811 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37812 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37813 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15814 },
[email protected]bf88c032011-12-22 19:05:47815 {
816 "enable-javascript-harmony",
817 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
818 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
819 kOsAll,
820 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
821 },
[email protected]7e7f378a2012-01-05 14:35:37822 {
[email protected]85646172012-01-09 22:45:54823 "enable-tab-browser-dragging",
824 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
825 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
826 kOsWin,
827 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
828 },
829 {
[email protected]068b7b52012-02-27 12:41:44830 "disable-restore-session-state",
831 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
832 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37833 kOsAll,
[email protected]068b7b52012-02-27 12:41:44834 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37835 },
[email protected]88864db2012-01-18 20:56:35836 {
837 "disable-software-rasterizer",
838 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
839 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
840#if defined(ENABLE_SWIFTSHADER)
841 kOsAll,
842#else
843 0,
844#endif
845 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
846 },
[email protected]15a5d722012-01-23 09:11:14847 {
[email protected]ff7b6dd2012-09-15 20:20:03848 "enable-experimental-webkit-features",
849 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
850 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16851 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03852 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49853 },
854 {
[email protected]0f95a252012-09-13 22:30:04855 "enable-css-shaders",
856 IDS_FLAGS_CSS_SHADERS_NAME,
857 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
858 kOsAll,
859 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
860 },
861 {
[email protected]3e8befc2012-03-13 01:17:03862 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16863 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
864 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56865 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03866 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16867 },
[email protected]dc04be7c2012-03-15 23:57:49868#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01869 {
[email protected]3cd198a22012-03-12 20:38:01870 "enable-ash-oak",
871 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
872 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
873 kOsAll,
874 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
875 },
[email protected]31cf1c52012-02-29 20:55:01876#endif
[email protected]184ec592012-03-01 11:54:28877 {
878 "enable-devtools-experiments",
879 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
880 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56881 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28882 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
883 },
[email protected]76d1854e2012-03-02 23:57:44884 {
[email protected]2fefdb32013-02-26 14:28:10885 "silent-debugger-extension-api",
886 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
887 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
888 kOsDesktop,
889 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
890 },
891 {
[email protected]76d1854e2012-03-02 23:57:44892 "enable-suggestions-ntp",
893 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
894 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56895 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44896 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
897 },
[email protected]a3d54252012-04-05 20:04:13898 {
[email protected]1dbaf5e2012-11-30 05:51:32899 "spellcheck-autocorrect",
900 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
901 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
902 kOsWin | kOsLinux | kOsCrOS,
903 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
904 },
905 {
[email protected]e27137282013-06-20 02:38:35906 "enable-scroll-prediction",
907 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
908 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
909 kOsDesktop,
910 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
911 },
912 {
[email protected]d7932532012-11-21 21:10:31913 "touch-events",
914 IDS_TOUCH_EVENTS_NAME,
915 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56916 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31917 MULTI_VALUE_TYPE(kTouchEventsChoices)
918 },
919 {
[email protected]c9c73ad42012-04-18 03:35:59920 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06921 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
922 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55923 kOsWin,
[email protected]347a0c72012-05-14 20:28:06924 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59925 },
[email protected]8a6aaa72012-04-20 20:53:58926 {
[email protected]b9c96ff2012-11-26 22:24:40927 "disable-touch-adjustment",
928 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
929 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
930 kOsWin | kOsLinux | kOsCrOS,
931 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
932 },
933 {
[email protected]0b9383a2012-10-26 00:58:16934 "enable-tab-capture",
935 IDS_ENABLE_TAB_CAPTURE_NAME,
936 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25937 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44938 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
939 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16940 },
[email protected]0b60afa2012-04-19 17:36:39941#if defined(OS_CHROMEOS)
942 {
[email protected]1dd46bd2013-06-14 07:08:31943 "ash-use-alt-shelf",
944 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
945 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
946 kOsCrOS,
947 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
948 },
949 {
[email protected]7c4a9bc2012-09-11 22:10:05950 "enable-background-loader",
951 IDS_ENABLE_BACKLOADER_NAME,
952 IDS_ENABLE_BACKLOADER_DESCRIPTION,
953 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24954 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05955 },
956 {
[email protected]3f4181a2013-02-01 21:31:07957 "enable-screensaver-extension",
958 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
959 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
960 kOsCrOS,
961 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
962 },
963 {
[email protected]0b60afa2012-04-19 17:36:39964 "no-discard-tabs",
965 IDS_FLAGS_NO_DISCARD_TABS_NAME,
966 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
967 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24968 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39969 },
970#endif
[email protected]79be6d32012-04-24 20:47:44971 {
[email protected]8d68a3e02013-01-12 15:57:10972 "enable-download-resumption",
973 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
974 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56975 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10976 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
977 },
978 {
[email protected]9a5940d2012-04-27 19:16:23979 "allow-nacl-socket-api",
980 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
981 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56982 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23983 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
984 },
[email protected]85333732012-05-01 19:02:24985 {
[email protected]60673ad72012-05-02 06:16:33986 "stacked-tab-strip",
987 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
988 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
989 kOsWin,
990 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
991 },
992 {
[email protected]4bd20202012-06-14 17:35:01993 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24994 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
995 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
996 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01997 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24998 },
[email protected]190349fd2012-05-02 00:10:47999#if defined(OS_CHROMEOS)
1000 {
1001 "allow-touchpad-three-finger-click",
1002 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1003 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1004 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241005 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471006 },
[email protected]fbc176b62012-10-27 02:19:581007 {
1008 "allow-touchpad-three-finger-swipe",
1009 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
1010 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
1011 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241012 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:581013 },
[email protected]190349fd2012-05-02 00:10:471014#endif
[email protected]1992a2f42012-10-23 18:32:211015 {
[email protected]8ee02242012-12-04 15:23:321016 "enable-desktop-guest-mode",
1017 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1018 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1019 kOsMac | kOsWin | kOsLinux,
1020 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1021 },
[email protected]53520b1b2012-05-07 21:43:371022#if defined(USE_ASH)
1023 {
[email protected]8257d382013-03-26 13:08:421024 "show-launcher-alignment-menu",
1025 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1026 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421027 kOsAll,
[email protected]8257d382013-03-26 13:08:421028 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421029 },
1030 {
[email protected]2ddf37b2013-04-20 01:15:581031 "disable-minimize-on-second-launcher-item-click",
1032 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1033 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1034 kOsAll,
1035 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1036 },
1037 {
[email protected]73074742012-05-17 01:44:411038 "show-touch-hud",
1039 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1040 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1041 kOsAll,
1042 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1043 },
1044 {
[email protected]9f0940b62012-05-23 22:56:351045 "enable-pinch",
1046 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1047 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061048 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381049 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1050 },
1051 {
[email protected]de0aaed2013-05-27 18:16:431052 "enable-pinch-virtual-viewport",
1053 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1054 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1055 kOsLinux | kOsWin | kOsCrOS,
1056 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1057 },
1058 {
[email protected]a4016f12013-05-02 07:53:471059 "forced-maximize-mode",
1060 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1061 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1062 kOsLinux | kOsWin | kOsCrOS,
1063 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1064 },
[email protected]73074742012-05-17 01:44:411065#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281066#if defined(OS_CHROMEOS)
1067 {
[email protected]8b04a1652012-08-04 02:59:491068 "disable-boot-animation",
1069 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1070 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581071 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241072 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491073 },
[email protected]95058572012-08-20 14:57:291074 {
[email protected]d96aef22012-10-30 11:47:021075 "captive-portal-detector",
1076 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1077 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581078 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021079 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1080 },
1081 {
[email protected]c11aa8f12012-12-18 18:43:141082 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571083 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1084 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1085 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141086 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571087 },
[email protected]f0280952012-11-06 20:30:501088 {
[email protected]465fc2d2013-06-14 09:28:491089 "file-manager-no-checkboxes",
1090 IDS_FLAGS_FILE_MANAGER_NO_CHECKBOXES_NAME,
1091 IDS_FLAGS_FILE_MANAGER_NO_CHECKBOXES_DESCRIPTION,
1092 kOsCrOS,
1093 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerNoCheckboxes)
1094 },
1095 {
[email protected]c64d7732013-03-25 18:09:501096 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521097 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1098 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581099 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241100 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471101 },
[email protected]6ad015c2013-03-06 00:49:511102 {
[email protected]c64d7732013-03-25 18:09:501103 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521104 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1105 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511106 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521107 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511108 },
[email protected]099b890c2013-04-25 19:16:261109 {
1110 "disable-quickoffice-component-app",
1111 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1112 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1113 kOsCrOS,
1114 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1115 },
[email protected]62018dc2012-12-13 00:37:351116#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391117 {
[email protected]6247aba2013-03-04 22:57:181118 "views-textfield",
1119 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1120 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391121 kOsWin,
[email protected]6247aba2013-03-04 22:57:181122 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1123 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391124 },
[email protected]bd0cd3bb2012-06-14 03:03:381125 {
[email protected]ffbe5782013-05-09 23:22:081126 "new-dialog-style",
1127 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1128 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321129 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081130 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1131 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321132 },
[email protected]7db8893a2012-07-26 00:49:401133 { "disable-accelerated-video-decode",
1134 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1135 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191136 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401137 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151138 },
[email protected]66ae9fc2012-06-19 21:33:521139#if defined(USE_ASH)
1140 {
1141 "ash-debug-shortcuts",
1142 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1143 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1144 kOsAll,
1145 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1146 },
1147#endif
[email protected]37fee0942012-08-07 21:07:451148 {
[email protected]ad3f6d22012-08-29 02:34:191149 "enable-contacts",
1150 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1151 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1154 },
[email protected]1d9bb9cd2012-08-28 22:02:501155#if defined(USE_ASH)
1156 { "ash-enable-advanced-gestures",
1157 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1158 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1161 },
[email protected]cfa24e62013-02-13 21:19:111162 { "ash-disable-tab-scrubbing",
1163 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1164 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161165 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111166 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161167 },
[email protected]ad6fcc32013-05-30 03:46:481168 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081169 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1170 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1171 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481172 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081173 },
[email protected]83eef802012-12-02 07:43:521174 { "ash-enable-workspace-scrubbing",
1175 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1176 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1177 kOsCrOS,
1178 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1179 },
[email protected]cf2b1a82013-04-20 01:05:431180 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111181 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1182 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241183 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431184 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1185 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241186 },
[email protected]316708a2012-11-05 22:57:021187#if defined(OS_LINUX)
1188 { "ash-enable-memory-monitor",
1189 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1190 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1191 kOsCrOS,
1192 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1193 },
1194#endif
[email protected]1d9bb9cd2012-08-28 22:02:501195#endif
[email protected]9b7ab882012-09-10 23:46:361196#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131197 { "use-new-network-configuration-handlers",
1198 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1199 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1200 kOsCrOS,
1201 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1202 },
[email protected]ce98ef82013-05-31 22:43:241203 { "use-new-network-connection-handler",
1204 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1205 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1206 kOsCrOS,
1207 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1208 },
[email protected]9b7ab882012-09-10 23:46:361209 {
[email protected]354ff2d2013-05-01 17:06:311210 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121211 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1212 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1213 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311214 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1215 },
1216 {
1217 "ash-audio-device-menu",
1218 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1219 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1220 kOsCrOS,
1221 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121222 },
1223 {
[email protected]205f07892012-10-16 20:26:221224 "enable-carrier-switching",
1225 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1226 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1227 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241228 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221229 },
1230 {
[email protected]9b7ab882012-09-10 23:46:361231 "enable-request-tablet-site",
1232 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1233 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1234 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241235 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361236 },
1237#endif
[email protected]dab49c0b2012-10-04 05:55:351238 {
1239 "debug-packed-apps",
1240 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1241 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561242 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351243 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1244 },
[email protected]d1459ed2012-10-10 01:29:331245 {
1246 "enable-password-generation",
1247 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1248 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561249 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331250 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1251 },
[email protected]26d045f2012-10-18 21:18:431252 {
[email protected]17b9c742013-06-22 13:48:421253 "enable-password-autofill-public-suffix-domain-matching",
1254 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1255 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1256 kOsAndroid,
1257 SINGLE_VALUE_TYPE(
1258 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1259 },
1260 {
[email protected]76f7d4882012-10-26 21:09:221261 "enable-deferred-image-decoding",
1262 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1263 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221264 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221265 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1266 },
1267 {
[email protected]075543d2012-10-24 01:29:141268 "performance-monitor-gathering",
1269 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1270 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1271 kOsAll,
1272 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1273 },
[email protected]783d5bb2012-10-24 03:47:141274 {
[email protected]a7259fb2012-11-08 06:22:231275 "enable-experimental-form-filling",
1276 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1277 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1278 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481279 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231280 },
[email protected]6e6efe42013-01-30 00:04:501281 {
[email protected]db3178c2013-03-21 14:54:541282 "wallet-service-use-prod",
1283 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1284 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1285 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481286 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541287 },
1288 {
[email protected]6e6efe42013-01-30 00:04:501289 "enable-interactive-autocomplete",
1290 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1291 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061292 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171293 ENABLE_DISABLE_VALUE_TYPE(
1294 autofill::switches::kEnableInteractiveAutocomplete,
1295 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501296 },
[email protected]177260c2013-04-24 01:47:381297#if defined(USE_AURA)
1298 {
1299 "overscroll-history-navigation",
1300 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1301 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1302 kOsAll,
1303 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1304 switches::kOverscrollHistoryNavigation, "1",
1305 switches::kOverscrollHistoryNavigation, "0")
1306 },
1307#endif
[email protected]edbea622012-11-28 20:39:381308 {
1309 "enable-touch-drag-drop",
1310 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1311 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1312 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271313 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1314 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381315 },
[email protected]0e2f43b62013-02-21 00:47:151316 {
1317 "enable-touch-editing",
1318 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1319 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1320 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271321 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1322 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151323 },
[email protected]92e12dd92012-12-11 03:33:201324 {
1325 "enable-rich-notifications",
1326 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1327 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001328 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231329 ENABLE_DISABLE_VALUE_TYPE(
1330 message_center::switches::kEnableRichNotifications,
1331 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201332 },
[email protected]4d51c682012-12-11 11:34:551333 {
[email protected]ddec1aa2013-04-28 23:22:451334 "enable-sync-synced-notifications",
1335 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1336 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181337 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451338 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1339 switches::kDisableSyncSyncedNotifications)
1340 },
1341 {
[email protected]a50e16a2013-04-25 14:07:171342 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551343 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1344 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1345 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171346 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551347 },
[email protected]628a69a92012-12-23 04:09:341348 {
[email protected]fd030142013-02-08 02:04:381349 "enable-usermedia-screen-capture",
1350 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1351 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1352 kOsDesktop,
1353 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1354 },
[email protected]5b93e162013-02-19 06:33:091355 {
1356 "enable-apps-devtool-app",
1357 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1358 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1359 kOsDesktop,
1360 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1361 },
[email protected]9323fdd12013-02-23 00:31:361362 {
1363 "impl-side-painting",
1364 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1365 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041366 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361367 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1368 },
[email protected]a42c85f2013-04-04 18:15:121369 {
[email protected]1c92d3e2013-04-18 05:31:391370 "enable-websocket-experimental-implementation",
1371 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1372 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1373 kOsAll,
1374 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1375 },
1376 {
[email protected]a42c85f2013-04-04 18:15:121377 "max-tiles-for-interest-area",
1378 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1379 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1380 kOsAndroid | kOsLinux | kOsCrOS,
1381 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1382 },
[email protected]7cf7ccb2013-04-20 02:53:081383 {
1384 "enable-offline-mode",
1385 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1386 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1387 kOsAll,
1388 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1389 },
[email protected]a3618122013-04-26 21:15:341390 {
1391 "default-tile-width",
1392 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1393 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1394 kOsAll,
1395 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1396 },
1397 {
1398 "default-tile-height",
1399 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1400 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1401 kOsAll,
1402 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1403 },
[email protected]2f2f72b2013-03-08 22:37:311404 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1405#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371406 {
1407 "track-active-visit-time",
1408 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1409 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1410 kOsWin,
1411 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1412 },
[email protected]2f2f72b2013-03-08 22:37:311413#endif
[email protected]8cc71d42013-03-02 17:26:081414#if defined(OS_ANDROID)
1415 {
1416 "disable-gesture-requirement-for-media-playback",
1417 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1418 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1419 kOsAndroid,
1420 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1421 },
1422#endif
[email protected]6077cab2013-03-11 19:36:141423#if defined(ENABLE_GOOGLE_NOW)
1424 {
1425 "enable-google-now",
1426 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1427 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361428 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141429 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1430 },
1431#endif
[email protected]86459e2c2013-04-10 13:39:241432#if defined(OS_CHROMEOS)
1433 {
1434 "enable-virtual-keyboard",
1435 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1436 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1437 kOsCrOS,
1438 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1439 },
1440#endif
[email protected]38484df12013-04-10 16:42:031441 {
1442 "enable-simple-cache-backend",
1443 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1444 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251445 kOsAll,
[email protected]38484df12013-04-10 16:42:031446 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1447 },
[email protected]717e4e22013-04-10 20:52:231448 {
1449 "enable-tcp-fast-open",
1450 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1451 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111452 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231453 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1454 },
[email protected]8027acd2013-04-18 08:35:151455 {
[email protected]58c740f2013-05-06 05:25:441456 "apps-use-native-frame",
1457 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1458 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1459 kOsWin,
1460 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1461 },
[email protected]896d86b32013-05-09 19:36:441462 {
1463 "enable-syncfs-directory-operation",
1464 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1465 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1466 kOsAll,
1467 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1468 },
[email protected]a4ed7e12013-05-24 01:00:281469 {
1470 "enable-draggable-menu-button",
1471 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1472 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1473 kOsAndroid,
1474 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1475 },
[email protected]380532aa2013-05-24 11:59:351476 {
1477 "enable-reset-profile-settings",
1478 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1479 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1480 kOsAll,
1481 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1482 },
[email protected]56d3c6e42013-05-29 11:28:011483#if defined(OS_MACOSX)
1484 {
1485 "enable-app-list-shim",
1486 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1487 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1488 kOsMac,
1489 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1490 },
[email protected]cb29e162013-05-31 07:47:021491 {
1492 "enable-app-shims",
1493 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1494 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1495 kOsMac,
1496 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1497 },
[email protected]67604442013-06-15 00:04:331498 {
1499 "enable-simplified-fullscreen",
1500 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1501 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1502 kOsMac,
1503 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1504 },
[email protected]56d3c6e42013-05-29 11:28:011505#endif
[email protected]13177832013-05-31 07:46:051506#if defined(OS_CHROMEOS) || defined(OS_WIN)
1507 {
1508 "enable-omnibox-auto-completion-for-ime",
1509 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1510 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1511 kOsCrOS,
1512 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1513 },
1514#endif
[email protected]910ecfe2013-06-03 23:38:141515#if defined(USE_AURA)
1516 {
1517 "tab-capture-upscale-quality",
1518 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1519 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1520 kOsAll,
1521 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1522 },
1523 {
1524 "tab-capture-downscale-quality",
1525 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1526 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1527 kOsAll,
1528 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1529 },
1530#endif
[email protected]71d4f602013-06-04 23:21:101531 {
[email protected]5e099c62013-06-08 05:46:231532 "enable-spelling-service-feedback",
1533 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1534 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1535 kOsAll,
1536 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1537 },
1538 {
[email protected]71d4f602013-06-04 23:21:101539 "enable-webgl-draft-extensions",
1540 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1541 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1542 kOsAll,
1543 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1544 },
[email protected]deadc492013-06-07 21:39:281545 {
1546 "high-dpi-support",
1547 IDS_FLAGS_HIDPI_NAME,
1548 IDS_FLAGS_HIDPI_DESCRIPTION,
1549 kOsWin,
1550 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1551 switches::kHighDPISupport,"0")
1552 },
[email protected]77e69a512013-06-08 05:56:451553#if defined(OS_CHROMEOS)
1554 {
1555 "enable-quickoffice-editing",
1556 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1557 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1558 kOsCrOS,
1559 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1560 },
1561#endif
[email protected]82ca4212013-06-11 12:09:171562 {
1563 "enable-translate-settings",
1564 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1565 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1566 kOsAll,
1567 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1568 },
[email protected]a0e4b072011-08-17 01:47:071569};
[email protected]ad2a3ded2010-08-27 13:19:051570
[email protected]a314ee5a2010-10-26 21:23:281571const Experiment* experiments = kExperiments;
1572size_t num_experiments = arraysize(kExperiments);
1573
[email protected]e2ddbc92010-10-15 20:02:071574// Stores and encapsulates the little state that about:flags has.
1575class FlagsState {
1576 public:
1577 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401578 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1579 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071580 bool IsRestartNeededToCommitChanges();
1581 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401582 FlagsStorage* flags_storage,
1583 const std::string& internal_name,
1584 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071585 void RemoveFlagsSwitches(
1586 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401587 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071588 void reset();
1589
1590 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551591 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071592 return Singleton<FlagsState>::get();
1593 }
1594
1595 private:
1596 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531597 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071598
1599 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1600};
1601
[email protected]8a6ff28d2010-12-02 16:35:191602// Adds the internal names for the specified experiment to |names|.
1603void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1604 if (e.type == Experiment::SINGLE_VALUE) {
1605 names->insert(e.internal_name);
1606 } else {
[email protected]83e9fa702013-02-25 19:30:441607 DCHECK(e.type == Experiment::MULTI_VALUE ||
1608 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191609 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441610 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191611 }
1612}
1613
[email protected]28e35af2011-02-09 12:56:221614// Confirms that an experiment is valid, used in a DCHECK in
1615// SanitizeList below.
1616bool ValidateExperiment(const Experiment& e) {
1617 switch (e.type) {
1618 case Experiment::SINGLE_VALUE:
1619 DCHECK_EQ(0, e.num_choices);
1620 DCHECK(!e.choices);
1621 break;
1622 case Experiment::MULTI_VALUE:
1623 DCHECK_GT(e.num_choices, 0);
1624 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531625 DCHECK(e.choices[0].command_line_switch);
1626 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221627 break;
[email protected]83e9fa702013-02-25 19:30:441628 case Experiment::ENABLE_DISABLE_VALUE:
1629 DCHECK_EQ(3, e.num_choices);
1630 DCHECK(!e.choices);
1631 DCHECK(e.command_line_switch);
1632 DCHECK(e.command_line_value);
1633 DCHECK(e.disable_command_line_switch);
1634 DCHECK(e.disable_command_line_value);
1635 break;
[email protected]28e35af2011-02-09 12:56:221636 default:
1637 NOTREACHED();
1638 }
1639 return true;
1640}
1641
[email protected]ad2a3ded2010-08-27 13:19:051642// Removes all experiments from prefs::kEnabledLabsExperiments that are
1643// unknown, to prevent this list to become very long as experiments are added
1644// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401645void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051646 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221647 for (size_t i = 0; i < num_experiments; ++i) {
1648 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191649 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221650 }
[email protected]ad2a3ded2010-08-27 13:19:051651
[email protected]e6d1c4f2013-06-12 17:37:401652 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051653
1654 std::set<std::string> new_enabled_experiments;
1655 std::set_intersection(
1656 known_experiments.begin(), known_experiments.end(),
1657 enabled_experiments.begin(), enabled_experiments.end(),
1658 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1659
[email protected]4c8853f2012-07-23 01:29:161660 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401661 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051662}
1663
[email protected]1a47d7e2010-10-15 00:37:241664void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401665 FlagsStorage* flags_storage, std::set<std::string>* result) {
1666 SanitizeList(flags_storage);
1667 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051668}
1669
[email protected]a314ee5a2010-10-26 21:23:281670// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1671// enabled on the current platform.
1672void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401673 FlagsStorage* flags_storage, std::set<std::string>* result) {
1674 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281675
1676 // Filter out any experiments that aren't enabled on the current platform. We
1677 // don't remove these from prefs else syncing to a platform with a different
1678 // set of experiments would be lossy.
1679 std::set<std::string> platform_experiments;
1680 int current_platform = GetCurrentPlatform();
1681 for (size_t i = 0; i < num_experiments; ++i) {
1682 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191683 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581684#if defined(OS_CHROMEOS)
1685 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1686 AddInternalName(experiments[i], &platform_experiments);
1687#endif
[email protected]a314ee5a2010-10-26 21:23:281688 }
1689
1690 std::set<std::string> new_enabled_experiments;
1691 std::set_intersection(
1692 platform_experiments.begin(), platform_experiments.end(),
1693 result->begin(), result->end(),
1694 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1695
1696 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051697}
1698
[email protected]8a6ff28d2010-12-02 16:35:191699// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191700Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221701 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441702 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1703 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191704 ListValue* result = new ListValue;
1705 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191706 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441707 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191708 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441709 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221710 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191711 result->Append(value);
1712 }
1713 return result;
1714}
1715
[email protected]e2ddbc92010-10-15 20:02:071716} // namespace
1717
[email protected]83e9fa702013-02-25 19:30:441718std::string Experiment::NameForChoice(int index) const {
1719 DCHECK(type == Experiment::MULTI_VALUE ||
1720 type == Experiment::ENABLE_DISABLE_VALUE);
1721 DCHECK_LT(index, num_choices);
1722 return std::string(internal_name) + testing::kMultiSeparator +
1723 base::IntToString(index);
1724}
1725
1726string16 Experiment::DescriptionForChoice(int index) const {
1727 DCHECK(type == Experiment::MULTI_VALUE ||
1728 type == Experiment::ENABLE_DISABLE_VALUE);
1729 DCHECK_LT(index, num_choices);
1730 int description_id;
1731 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1732 const int kEnableDisableDescriptionIds[] = {
1733 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1734 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1735 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1736 };
1737 description_id = kEnableDisableDescriptionIds[index];
1738 } else {
1739 description_id = choices[index].description_id;
1740 }
1741 return l10n_util::GetStringUTF16(description_id);
1742}
1743
[email protected]e6d1c4f2013-06-12 17:37:401744void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1745 CommandLine* command_line) {
1746 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1747 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051748}
1749
[email protected]6d98abf2013-06-17 23:35:511750bool AreSwitchesIdenticalToCurrentCommandLine(
1751 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1752 std::set<CommandLine::StringType> new_flags =
1753 ExtractFlagsFromCommandLine(new_cmdline);
1754 std::set<CommandLine::StringType> active_flags =
1755 ExtractFlagsFromCommandLine(active_cmdline);
1756
1757 // Needed because std::equal doesn't check if the 2nd set is empty.
1758 if (new_flags.size() != active_flags.size())
1759 return false;
1760
1761 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1762}
1763
[email protected]e6d1c4f2013-06-12 17:37:401764void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521765 FlagAccess access,
1766 base::ListValue* supported_experiments,
1767 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051768 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401769 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051770
1771 int current_platform = GetCurrentPlatform();
1772
[email protected]a314ee5a2010-10-26 21:23:281773 for (size_t i = 0; i < num_experiments; ++i) {
1774 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051775
1776 DictionaryValue* data = new DictionaryValue();
1777 data->SetString("internal_name", experiment.internal_name);
1778 data->SetString("name",
1779 l10n_util::GetStringUTF16(experiment.visible_name_id));
1780 data->SetString("description",
1781 l10n_util::GetStringUTF16(
1782 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401783
1784 ListValue* supported_platforms = new ListValue();
1785 AddOsStrings(experiment.supported_platforms, supported_platforms);
1786 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051787
[email protected]28e35af2011-02-09 12:56:221788 switch (experiment.type) {
1789 case Experiment::SINGLE_VALUE:
1790 data->SetBoolean(
1791 "enabled",
1792 enabled_experiments.count(experiment.internal_name) > 0);
1793 break;
1794 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441795 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221796 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1797 break;
1798 default:
1799 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191800 }
1801
[email protected]ee28495a2013-05-20 04:10:521802 bool supported = (experiment.supported_platforms & current_platform) != 0;
1803#if defined(OS_CHROMEOS)
1804 if (access == kOwnerAccessToFlags &&
1805 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1806 supported = true;
1807 }
1808#endif
1809 if (supported)
1810 supported_experiments->Append(data);
1811 else
1812 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051813 }
[email protected]ad2a3ded2010-08-27 13:19:051814}
1815
[email protected]ad2a3ded2010-08-27 13:19:051816bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551817 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051818}
1819
[email protected]e6d1c4f2013-06-12 17:37:401820void SetExperimentEnabled(FlagsStorage* flags_storage,
1821 const std::string& internal_name,
1822 bool enable) {
1823 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1824 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071825}
1826
1827void RemoveFlagsSwitches(
1828 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551829 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071830}
1831
[email protected]e6d1c4f2013-06-12 17:37:401832void ResetAllFlags(FlagsStorage* flags_storage) {
1833 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001834}
1835
[email protected]a314ee5a2010-10-26 21:23:281836int GetCurrentPlatform() {
1837#if defined(OS_MACOSX)
1838 return kOsMac;
1839#elif defined(OS_WIN)
1840 return kOsWin;
1841#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1842 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211843#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281844 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401845#elif defined(OS_ANDROID)
1846 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281847#else
1848#error Unknown platform
1849#endif
1850}
1851
[email protected]e6d1c4f2013-06-12 17:37:401852void RecordUMAStatistics(FlagsStorage* flags_storage) {
1853 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541854 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1855 ++it) {
1856 std::string action("AboutFlags_");
1857 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381858 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541859 }
1860 // Since flag metrics are recorded every startup, add a tick so that the
1861 // stats can be made meaningful.
1862 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381863 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1864 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541865}
1866
[email protected]e2ddbc92010-10-15 20:02:071867//////////////////////////////////////////////////////////////////////////////
1868// FlagsState implementation.
1869
1870namespace {
1871
[email protected]83e9fa702013-02-25 19:30:441872typedef std::map<std::string, std::pair<std::string, std::string> >
1873 NameToSwitchAndValueMap;
1874
1875void SetFlagToSwitchMapping(const std::string& key,
1876 const std::string& switch_name,
1877 const std::string& switch_value,
1878 NameToSwitchAndValueMap* name_to_switch_map) {
1879 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1880 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1881}
1882
[email protected]e2ddbc92010-10-15 20:02:071883void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401884 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071885 if (command_line->HasSwitch(switches::kNoExperiments))
1886 return;
1887
1888 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001889
[email protected]e6d1c4f2013-06-12 17:37:401890 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1891 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071892
[email protected]a82744532011-02-11 16:15:531893 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191894 for (size_t i = 0; i < num_experiments; ++i) {
1895 const Experiment& e = experiments[i];
1896 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441897 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1898 e.command_line_value, &name_to_switch_map);
1899 } else if (e.type == Experiment::MULTI_VALUE) {
1900 for (int j = 0; j < e.num_choices; ++j) {
1901 SetFlagToSwitchMapping(e.NameForChoice(j),
1902 e.choices[j].command_line_switch,
1903 e.choices[j].command_line_value,
1904 &name_to_switch_map);
1905 }
[email protected]8a6ff28d2010-12-02 16:35:191906 } else {
[email protected]83e9fa702013-02-25 19:30:441907 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1908 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1909 &name_to_switch_map);
1910 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1911 e.command_line_value, &name_to_switch_map);
1912 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1913 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191914 }
1915 }
[email protected]e2ddbc92010-10-15 20:02:071916
1917 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531918 flags_switches_.insert(
1919 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1920 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071921 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1922 it != enabled_experiments.end();
1923 ++it) {
1924 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531925 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191926 name_to_switch_map.find(experiment_name);
1927 if (name_to_switch_it == name_to_switch_map.end()) {
1928 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071929 continue;
[email protected]8a6ff28d2010-12-02 16:35:191930 }
[email protected]e2ddbc92010-10-15 20:02:071931
[email protected]a82744532011-02-11 16:15:531932 const std::pair<std::string, std::string>&
1933 switch_and_value_pair = name_to_switch_it->second;
1934
1935 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1936 switch_and_value_pair.second);
1937 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071938 }
1939 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531940 flags_switches_.insert(
1941 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1942 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071943}
1944
1945bool FlagsState::IsRestartNeededToCommitChanges() {
1946 return needs_restart_;
1947}
1948
[email protected]e6d1c4f2013-06-12 17:37:401949void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1950 const std::string& internal_name,
1951 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441952 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191953 if (at_index != std::string::npos) {
1954 DCHECK(enable);
1955 // We're being asked to enable a multi-choice experiment. Disable the
1956 // currently selected choice.
1957 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221958 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:401959 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191960
[email protected]28e35af2011-02-09 12:56:221961 // And enable the new choice, if it is not the default first choice.
1962 if (internal_name != experiment_name + "@0") {
1963 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401964 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081965 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:401966 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:221967 }
[email protected]8a6ff28d2010-12-02 16:35:191968 return;
1969 }
1970
[email protected]ad2a3ded2010-08-27 13:19:051971 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401972 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051973
[email protected]8a6ff28d2010-12-02 16:35:191974 const Experiment* e = NULL;
1975 for (size_t i = 0; i < num_experiments; ++i) {
1976 if (experiments[i].internal_name == internal_name) {
1977 e = experiments + i;
1978 break;
1979 }
1980 }
1981 DCHECK(e);
1982
1983 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591984 if (enable)
[email protected]147492b2013-03-19 23:52:081985 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591986 else
[email protected]147492b2013-03-19 23:52:081987 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191988 } else {
1989 if (enable) {
1990 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081991 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191992 } else {
1993 // Find the currently enabled choice and disable it.
1994 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441995 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191996 if (enabled_experiments.find(choice_name) !=
1997 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081998 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191999 enabled_experiments.erase(choice_name);
2000 // Continue on just in case there's a bug and more than one
2001 // experiment for this choice was enabled.
2002 }
2003 }
2004 }
2005 }
[email protected]ad2a3ded2010-08-27 13:19:052006
[email protected]e6d1c4f2013-06-12 17:37:402007 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052008}
2009
[email protected]e2ddbc92010-10-15 20:02:072010void FlagsState::RemoveFlagsSwitches(
2011 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532012 for (std::map<std::string, std::string>::const_iterator
2013 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2014 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072015 }
2016}
2017
[email protected]e6d1c4f2013-06-12 17:37:402018void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002019 needs_restart_ = true;
2020
2021 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402022 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002023}
2024
[email protected]e2ddbc92010-10-15 20:02:072025void FlagsState::reset() {
2026 needs_restart_ = false;
2027 flags_switches_.clear();
2028}
2029
[email protected]38e46812011-05-09 20:49:222030} // namespace
[email protected]e2ddbc92010-10-15 20:02:072031
2032namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192033
2034// WARNING: '@' is also used in the html file. If you update this constant you
2035// also need to update the html file.
2036const char kMultiSeparator[] = "@";
2037
[email protected]e2ddbc92010-10-15 20:02:072038void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552039 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072040}
[email protected]a314ee5a2010-10-26 21:23:282041
2042void SetExperiments(const Experiment* e, size_t count) {
2043 if (!e) {
2044 experiments = kExperiments;
2045 num_experiments = arraysize(kExperiments);
2046 } else {
2047 experiments = e;
2048 num_experiments = count;
2049 }
2050}
2051
[email protected]8a6ff28d2010-12-02 16:35:192052const Experiment* GetExperiments(size_t* count) {
2053 *count = num_experiments;
2054 return experiments;
2055}
2056
[email protected]e2ddbc92010-10-15 20:02:072057} // namespace testing
2058
[email protected]1a47d7e2010-10-15 00:37:242059} // namespace about_flags