blob: 24cf123df5e32c073ec91a6d2654605f2d6fc4f3 [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]cbb22eb2013-06-24 23:53:1022#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3823#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0224#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0227#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1728#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5929#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4830#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2731#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2432#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5633#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2434#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5635
[email protected]dc04be7c2012-03-15 23:57:4936#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3137#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4938#endif
39
[email protected]badba1ad2012-11-16 17:21:4640#if defined(OS_CHROMEOS)
41#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5142#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4643#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]6d98abf2013-06-17 23:35:5188// Convert switch constants to proper CommandLine::StringType strings.
89CommandLine::StringType GetSwitchString(const std::string& flag) {
90 CommandLine cmd_line(CommandLine::NO_PROGRAM);
91 cmd_line.AppendSwitch(flag);
92 DCHECK(cmd_line.argv().size() == 2);
93 return cmd_line.argv()[1];
94}
95
96// Scoops flags from a command line.
97std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
98 const CommandLine& cmdline) {
99 std::set<CommandLine::StringType> flags;
100 // First do the ones between --flag-switches-begin and --flag-switches-end.
101 CommandLine::StringVector::const_iterator first =
102 std::find(cmdline.argv().begin(), cmdline.argv().end(),
103 GetSwitchString(switches::kFlagSwitchesBegin));
104 CommandLine::StringVector::const_iterator last =
105 std::find(cmdline.argv().begin(), cmdline.argv().end(),
106 GetSwitchString(switches::kFlagSwitchesEnd));
107 if (first != cmdline.argv().end() && last != cmdline.argv().end())
108 flags.insert(first + 1, last);
109#if defined(OS_CHROMEOS)
110 // Then add those between --policy-switches-begin and --policy-switches-end.
111 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
112 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
113 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
115 if (first != cmdline.argv().end() && last != cmdline.argv().end())
116 flags.insert(first + 1, last);
117#endif
118 return flags;
119}
120
[email protected]128dc6c2012-06-22 20:30:35121const Experiment::Choice
122 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
123 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
124 "",
125 "" },
126 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
127 switches::kOmniboxHistoryQuickProviderReorderForInlining,
128 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
129 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
130 switches::kOmniboxHistoryQuickProviderReorderForInlining,
131 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
132};
133
[email protected]032d5e6c2012-02-17 17:53:55134const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
135 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
136 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
137 switches::kOmniboxInlineHistoryQuickProvider,
138 switches::kOmniboxInlineHistoryQuickProviderAllowed },
139 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
140 switches::kOmniboxInlineHistoryQuickProvider,
141 switches::kOmniboxInlineHistoryQuickProviderProhibited }
142};
143
[email protected]fb854192013-02-06 01:30:04144const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
146 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
147 switches::kEnableCompositingForFixedPosition, ""},
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
149 switches::kDisableCompositingForFixedPosition, ""},
150 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
151 switches::kEnableHighDpiCompositingForFixedPosition, ""}
152};
153
[email protected]d8221b22013-05-23 05:35:43154const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
155 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
157 switches::kEnableCompositingForTransition, ""},
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
159 switches::kDisableCompositingForTransition, ""},
160};
161
[email protected]8b1c3c72013-01-25 01:48:43162const Experiment::Choice kGDIPresentChoices[] = {
163 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
164 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
165 switches::kDoFirstShowPresentWithGDI, ""},
166 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
167 switches::kDoAllShowPresentWithGDI, ""}
168};
169
[email protected]d7932532012-11-21 21:10:31170const Experiment::Choice kTouchEventsChoices[] = {
171 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
172 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
173 switches::kTouchEvents,
174 switches::kTouchEventsEnabled },
175 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
176 switches::kTouchEvents,
177 switches::kTouchEventsDisabled }
178};
179
[email protected]347a0c72012-05-14 20:28:06180const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31181 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20182 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06183 switches::kTouchOptimizedUI,
184 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20185 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06186 switches::kTouchOptimizedUI,
187 switches::kTouchOptimizedUIDisabled }
188};
189
[email protected]66f409c2012-10-04 20:59:04190const Experiment::Choice kNaClDebugMaskChoices[] = {
191 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
192 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
193 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
194 // an option to switch off its debugging.
195 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
196 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
197 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
198 switches::kNaClDebugMask, "*://*/*debug.nmf" }
199};
200
[email protected]ea2f3342012-09-21 21:13:36201#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02202
203const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24204 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02205 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24206 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19207 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24208 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02209};
[email protected]a78c7432013-03-13 06:22:43210
[email protected]ea2f3342012-09-21 21:13:36211#endif
212
[email protected]9323fdd12013-02-23 00:31:36213const Experiment::Choice kImplSidePaintingChoices[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
215 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
216 cc::switches::kEnableImplSidePainting, ""},
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
218 cc::switches::kDisableImplSidePainting, ""}
219};
220
[email protected]a42c85f2013-04-04 18:15:12221const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
223 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
224 cc::switches::kMaxTilesForInterestArea, "64"},
225 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
226 cc::switches::kMaxTilesForInterestArea, "128"},
227 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
228 cc::switches::kMaxTilesForInterestArea, "256"},
229 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
230 cc::switches::kMaxTilesForInterestArea, "512"}
231};
232
[email protected]a3618122013-04-26 21:15:34233const Experiment::Choice kDefaultTileWidthChoices[] = {
234 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
235 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
236 switches::kDefaultTileWidth, "128"},
237 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
238 switches::kDefaultTileWidth, "256"},
239 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
240 switches::kDefaultTileWidth, "512"},
241 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
242 switches::kDefaultTileWidth, "1024"}
243};
244
245const Experiment::Choice kDefaultTileHeightChoices[] = {
246 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
247 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
248 switches::kDefaultTileHeight, "128"},
249 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
250 switches::kDefaultTileHeight, "256"},
251 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
252 switches::kDefaultTileHeight, "512"},
253 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
254 switches::kDefaultTileHeight, "1024"}
255};
256
[email protected]38484df12013-04-10 16:42:03257const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21258 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
259 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
260 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03261 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
262 switches::kUseSimpleCacheBackend, "on"}
263};
264
[email protected]910ecfe2013-06-03 23:38:14265const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
266 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
267 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
268 switches::kTabCaptureUpscaleQuality, "fast" },
269 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
270 switches::kTabCaptureUpscaleQuality, "good" },
271 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
272 switches::kTabCaptureUpscaleQuality, "best" },
273};
274
275const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
276 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
277 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
278 switches::kTabCaptureDownscaleQuality, "fast" },
279 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
280 switches::kTabCaptureDownscaleQuality, "good" },
281 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
282 switches::kTabCaptureDownscaleQuality, "best" },
283};
284
[email protected]4bc5050c2010-11-18 17:55:54285// RECORDING USER METRICS FOR FLAGS:
286// -----------------------------------------------------------------------------
287// The first line of the experiment is the internal name. If you'd like to
288// gather statistics about the usage of your flag, you should append a marker
289// comment to the end of the feature name, like so:
290// "my-special-feature", // FLAGS:RECORD_UMA
291//
292// After doing that, run //chrome/tools/extract_actions.py (see instructions at
293// the top of that file for details) to update the chromeactions.txt file, which
294// will enable UMA to record your feature flag.
295//
[email protected]783d5bb2012-10-24 03:47:14296// After your feature has shipped under a flag, you can locate the metrics under
297// the action name AboutFlags_internal-action-name. Actions are recorded once
298// per startup, so you should divide this number by AboutFlags_StartupTick to
299// get a sense of usage. Note that this will not be the same as number of users
300// with a given feature enabled because users can quit and relaunch the
301// application multiple times over a given time interval. The dashboard also
302// shows you how many (metrics reporting) users have enabled the flag over the
303// last seven days. However, note that this is not the same as the number of
304// users who have the flag enabled, since enabling the flag happens once,
305// whereas running with the flag enabled happens until the user flips the flag
306// again.
[email protected]4bc5050c2010-11-18 17:55:54307
[email protected]8a6ff28d2010-12-02 16:35:19308// To add a new experiment add to the end of kExperiments. There are two
309// distinct types of experiments:
310// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
311// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22312// . MULTI_VALUE: a list of choices, the first of which should correspond to a
313// deactivated state for this lab (i.e. no command line option). To specify
314// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
315// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19316// See the documentation of Experiment for details on the fields.
317//
318// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05319const Experiment kExperiments[] = {
320 {
[email protected]aac169d2011-03-18 19:53:03321 "expose-for-tabs", // FLAGS:RECORD_UMA
322 IDS_FLAGS_TABPOSE_NAME,
323 IDS_FLAGS_TABPOSE_DESCRIPTION,
324 kOsMac,
325#if defined(OS_MACOSX)
326 // The switch exists only on OS X.
327 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
328#else
329 SINGLE_VALUE_TYPE("")
330#endif
331 },
332 {
[email protected]4bc5050c2010-11-18 17:55:54333 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05334 IDS_FLAGS_CONFLICTS_CHECK_NAME,
335 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
336 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19337 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05338 },
339 {
[email protected]96c6f4c2011-05-18 19:36:22340 "ignore-gpu-blacklist",
341 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
342 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
343 kOsAll,
344 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
345 },
346 {
[email protected]0110cf112011-07-02 00:39:43347 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22348 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
349 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23350 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44351 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
352 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22353 },
354 {
[email protected]72787e392012-03-23 05:55:43355 "threaded-compositing-mode",
356 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
357 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58358 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44359 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
360 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59361 },
362 {
[email protected]17e27692013-02-06 17:02:09363 "force-accelerated-composited-scrolling",
364 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
365 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
366 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44367 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
368 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09369 },
370 {
[email protected]8b1c3c72013-01-25 01:48:43371 "present-with-GDI",
372 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
373 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
374 kOsWin,
375 MULTI_VALUE_TYPE(kGDIPresentChoices)
376 },
377 {
[email protected]2b608752013-05-01 03:34:36378 "enable-experimental-canvas-features",
379 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
380 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
381 kOsAll,
382 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
383 },
384 {
[email protected]81c64af62012-06-06 20:15:52385 "disable-accelerated-2d-canvas",
386 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
387 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
388 kOsAll,
389 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
390 },
391 {
[email protected]efcde132012-05-30 01:05:18392 "disable-threaded-animation",
393 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
394 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59395 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37396 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59397 },
398 {
[email protected]5963b772011-02-09 22:55:38399 "composited-layer-borders",
400 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
401 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
402 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57403 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38404 },
405 {
[email protected]a8f1eaa2011-03-07 19:00:58406 "show-fps-counter",
407 IDS_FLAGS_SHOW_FPS_COUNTER,
408 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
409 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57410 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58411 },
[email protected]8ff7f342011-05-25 01:49:47412 {
[email protected]70c98a332011-12-21 20:51:52413 "accelerated-filters",
414 IDS_FLAGS_ACCELERATED_FILTERS,
415 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
416 kOsAll,
417 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
418 },
419 {
[email protected]8ff7f342011-05-25 01:49:47420 "disable-gpu-vsync",
421 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
422 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56423 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47424 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
425 },
[email protected]deaba6d52011-09-23 14:47:12426 {
[email protected]4052d832013-01-16 05:31:01427 "enable-webgl",
428 IDS_FLAGS_ENABLE_WEBGL_NAME,
429 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
430 kOsAndroid,
431#if defined(OS_ANDROID)
432 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
433#else
434 SINGLE_VALUE_TYPE("")
435#endif
436 },
437 {
[email protected]deaba6d52011-09-23 14:47:12438 "disable-webgl",
439 IDS_FLAGS_DISABLE_WEBGL_NAME,
440 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56441 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01442#if defined(OS_ANDROID)
443 SINGLE_VALUE_TYPE("")
444#else
[email protected]deaba6d52011-09-23 14:47:12445 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01446#endif
[email protected]deaba6d52011-09-23 14:47:12447 },
[email protected]09096e02012-05-24 11:12:04448 {
[email protected]ce585bf2013-03-14 16:25:16449 "disable-webrtc",
450 IDS_FLAGS_DISABLE_WEBRTC_NAME,
451 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05452 kOsAndroid,
453#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16454 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05455#else
456 SINGLE_VALUE_TYPE("")
457#endif
458 },
[email protected]5e2bc8c2013-05-28 22:59:57459#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30460 {
461 "enable-sctp-data-channels",
462 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
463 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
464 kOsAll,
465 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
466 },
[email protected]5e2bc8c2013-05-28 22:59:57467#endif
[email protected]34cb5292013-04-15 06:06:31468#if defined(OS_ANDROID)
469 {
[email protected]7b8a31632013-06-13 22:42:37470 "disable-webaudio",
471 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
472 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31473 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37474 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31475 },
476#endif
[email protected]d9da9582013-01-31 04:59:05477 {
[email protected]96bcdc102012-05-24 23:42:10478 "fixed-position-creates-stacking-context",
479 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
480 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
481 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44482 ENABLE_DISABLE_VALUE_TYPE(
483 switches::kEnableFixedPositionCreatesStackingContext,
484 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10485 },
[email protected]fb854192013-02-06 01:30:04486 {
487 "enable-compositing-for-fixed-position",
488 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
489 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
490 kOsAll,
491 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
492 },
[email protected]d8221b22013-05-23 05:35:43493 {
494 "enable-compositing-for-transition",
495 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
496 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
497 kOsAll,
498 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
499 },
[email protected]a7640ef22012-10-06 00:52:08500 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53501 {
[email protected]e3791ce92011-08-09 01:03:32502 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40503 IDS_FLAGS_ENABLE_NACL_NAME,
504 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56505 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19506 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40507 },
508 {
[email protected]9addd1c2012-09-15 14:28:24509 "enable-nacl-debug", // FLAGS:RECORD_UMA
510 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
511 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56512 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24513 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13514 },
515 {
[email protected]66f409c2012-10-04 20:59:04516 "nacl-debug-mask", // FLAGS:RECORD_UMA
517 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
518 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56519 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04520 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
521 },
522 {
[email protected]7babd1c2012-08-08 20:35:29523 "enable-pnacl", // FLAGS:RECORD_UMA
524 IDS_FLAGS_ENABLE_PNACL_NAME,
525 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56526 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29527 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
528 },
529 {
[email protected]4bc5050c2010-11-18 17:55:54530 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32531 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
532 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56533 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19534 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32535 },
[email protected]3627b06d2010-11-12 16:36:16536 {
[email protected]ac2e2acd2013-03-21 12:57:29537 "extensions-on-chrome-urls",
538 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
539 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
540 kOsAll,
541 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
542 },
543 {
[email protected]e9cddd52013-03-23 17:37:53544 "enable-adview",
545 IDS_FLAGS_ENABLE_ADVIEW_NAME,
546 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
547 kOsDesktop,
548 SINGLE_VALUE_TYPE(switches::kEnableAdview)
549 },
550 {
551 "enable-adview-src-attribute",
552 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
553 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
554 kOsDesktop,
555 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
556 },
557 {
[email protected]1f4da9e2013-06-27 05:23:44558 "enable-app-window-controls",
559 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
560 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
561 kOsDesktop,
562 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
563 },
564 {
[email protected]544471a2012-10-13 05:27:09565 "action-box",
[email protected]cab18ef2012-04-27 07:22:03566 IDS_FLAGS_ACTION_BOX_NAME,
567 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56568 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44569 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
570 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03571 },
572 {
[email protected]3a362432012-06-18 20:39:51573 "script-badges",
574 IDS_FLAGS_SCRIPT_BADGES_NAME,
575 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56576 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09577 SINGLE_VALUE_TYPE(switches::kScriptBadges)
578 },
579 {
580 "script-bubble",
581 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
582 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56583 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44584 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
585 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51586 },
587 {
[email protected]cbe224d2011-08-04 22:12:49588 "apps-new-install-bubble",
589 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
590 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56591 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49592 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
593 },
594 {
[email protected]80bd24e2010-11-30 09:34:38595 "disable-hyperlink-auditing",
596 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
597 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
598 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19599 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51600 },
601 {
602 "experimental-location-features", // FLAGS:RECORD_UMA
603 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
604 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
605 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19606 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
607 },
608 {
[email protected]5aea1862011-03-23 23:55:39609 "tab-groups-context-menu",
610 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
611 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
612 kOsWin,
613 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
614 },
[email protected]c94cebd2012-06-21 00:55:28615 {
616 "enable-instant-extended-api",
617 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
618 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46619 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51620 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
621 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28622 },
[email protected]e9bf9d92011-03-31 20:57:15623 {
[email protected]8cc9e532013-05-06 21:01:47624 "enable-local-first-load-ntp",
625 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
626 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46627 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47628 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
629 switches::kDisableLocalFirstLoadNTP)
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]bca09b9982013-06-27 22:30:46719 "enable-spdy4a2",
720 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
721 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
722 kOsAll,
723 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
724 },
725 {
[email protected]27b3fe92012-03-21 05:35:06726 "enable-async-dns",
727 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
728 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46729 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44730 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
731 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06732 },
[email protected]85dd7ca2013-05-30 23:53:00733#if defined(ANDROID) && !defined(GOOGLE_TV)
734 {
735 "enable-media-source",
736 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
737 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
738 kOsAll,
739 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
740 },
741#else
[email protected]27b3fe92012-03-21 05:35:06742 {
[email protected]1eb93802012-09-11 18:57:56743 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31744 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
745 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32746 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31747 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44748 },
[email protected]85dd7ca2013-05-30 23:53:00749#endif
[email protected]e4e68dbb2011-11-18 01:50:22750 {
[email protected]16c242d2013-05-31 23:56:47751 "enable-encrypted-media",
752 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
753 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56754 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47755 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
756 },
757 {
758 "disable-encrypted-media",
759 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
760 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
761 kOsDesktop,
762 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03763 },
[email protected]f88628792012-12-18 07:07:50764 {
[email protected]d21ead42013-06-24 06:35:06765 "override-encrypted-media-canplaytype",
766 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
767 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
768 kOsMac | kOsWin,
769 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
770 },
771 {
[email protected]f88628792012-12-18 07:07:50772 "enable-opus-playback",
773 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
774 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56775 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50776 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
777 },
[email protected]b150b5532013-06-15 00:50:54778 {
[email protected]6ac955b2013-04-19 23:43:32779 "enable-vp8-alpha-playback",
780 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
781 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
782 kOsDesktop,
783 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
784 },
785 {
[email protected]ca6eaa5a2013-01-24 16:16:04786 "enable-managed-users",
787 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
788 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08789 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04790 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
791 },
[email protected]dc04be7c2012-03-15 23:57:49792#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50793 {
[email protected]2a13a9a2013-04-19 04:00:21794 "ash-disable-auto-maximizing",
795 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
796 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
797 kOsWin | kOsLinux | kOsCrOS,
798 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
799 },
800 {
[email protected]cda278d2012-10-30 20:31:40801 "ash-disable-auto-window-placement",
802 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
803 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
804 kOsWin | kOsLinux | kOsCrOS,
805 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
806 },
[email protected]b4e4ec42012-11-29 21:42:40807 {
[email protected]16f55a22013-02-13 23:47:34808 "ash-disable-per-app-launcher",
809 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
810 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40811 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34812 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40813 },
[email protected]dc04be7c2012-03-15 23:57:49814#endif
[email protected]eaae8b462012-01-20 22:20:39815 {
[email protected]db543d322011-12-15 20:40:15816 "per-tile-painting",
817 IDS_FLAGS_PER_TILE_PAINTING_NAME,
818 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37819 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37820 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15821 },
[email protected]bf88c032011-12-22 19:05:47822 {
823 "enable-javascript-harmony",
824 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
825 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
826 kOsAll,
827 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
828 },
[email protected]7e7f378a2012-01-05 14:35:37829 {
[email protected]85646172012-01-09 22:45:54830 "enable-tab-browser-dragging",
831 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
832 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
833 kOsWin,
834 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
835 },
836 {
[email protected]068b7b52012-02-27 12:41:44837 "disable-restore-session-state",
838 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
839 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37840 kOsAll,
[email protected]068b7b52012-02-27 12:41:44841 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37842 },
[email protected]88864db2012-01-18 20:56:35843 {
844 "disable-software-rasterizer",
845 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
846 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
847#if defined(ENABLE_SWIFTSHADER)
848 kOsAll,
849#else
850 0,
851#endif
852 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
853 },
[email protected]15a5d722012-01-23 09:11:14854 {
[email protected]ff7b6dd2012-09-15 20:20:03855 "enable-experimental-webkit-features",
856 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
857 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16858 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03859 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49860 },
861 {
[email protected]0f95a252012-09-13 22:30:04862 "enable-css-shaders",
863 IDS_FLAGS_CSS_SHADERS_NAME,
864 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
865 kOsAll,
866 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
867 },
868 {
[email protected]3e8befc2012-03-13 01:17:03869 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16870 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
871 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56872 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03873 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16874 },
[email protected]dc04be7c2012-03-15 23:57:49875#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01876 {
[email protected]3cd198a22012-03-12 20:38:01877 "enable-ash-oak",
878 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
879 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
880 kOsAll,
881 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
882 },
[email protected]31cf1c52012-02-29 20:55:01883#endif
[email protected]184ec592012-03-01 11:54:28884 {
885 "enable-devtools-experiments",
886 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
887 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56888 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28889 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
890 },
[email protected]76d1854e2012-03-02 23:57:44891 {
[email protected]2fefdb32013-02-26 14:28:10892 "silent-debugger-extension-api",
893 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
894 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
895 kOsDesktop,
896 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
897 },
898 {
[email protected]76d1854e2012-03-02 23:57:44899 "enable-suggestions-ntp",
900 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
901 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56902 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44903 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
904 },
[email protected]a3d54252012-04-05 20:04:13905 {
[email protected]1dbaf5e2012-11-30 05:51:32906 "spellcheck-autocorrect",
907 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
908 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
909 kOsWin | kOsLinux | kOsCrOS,
910 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
911 },
912 {
[email protected]e27137282013-06-20 02:38:35913 "enable-scroll-prediction",
914 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
915 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
916 kOsDesktop,
917 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
918 },
919 {
[email protected]d7932532012-11-21 21:10:31920 "touch-events",
921 IDS_TOUCH_EVENTS_NAME,
922 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56923 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31924 MULTI_VALUE_TYPE(kTouchEventsChoices)
925 },
926 {
[email protected]c9c73ad42012-04-18 03:35:59927 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06928 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
929 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55930 kOsWin,
[email protected]347a0c72012-05-14 20:28:06931 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59932 },
[email protected]8a6aaa72012-04-20 20:53:58933 {
[email protected]b9c96ff2012-11-26 22:24:40934 "disable-touch-adjustment",
935 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
936 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
937 kOsWin | kOsLinux | kOsCrOS,
938 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
939 },
940 {
[email protected]0b9383a2012-10-26 00:58:16941 "enable-tab-capture",
942 IDS_ENABLE_TAB_CAPTURE_NAME,
943 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25944 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44945 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
946 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16947 },
[email protected]0b60afa2012-04-19 17:36:39948#if defined(OS_CHROMEOS)
949 {
[email protected]690de0f2013-06-26 00:51:16950 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31951 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
952 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
953 kOsCrOS,
954 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
955 },
956 {
[email protected]7c4a9bc2012-09-11 22:10:05957 "enable-background-loader",
958 IDS_ENABLE_BACKLOADER_NAME,
959 IDS_ENABLE_BACKLOADER_DESCRIPTION,
960 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24961 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05962 },
963 {
[email protected]3f4181a2013-02-01 21:31:07964 "enable-screensaver-extension",
965 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
966 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
967 kOsCrOS,
968 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
969 },
970 {
[email protected]0b60afa2012-04-19 17:36:39971 "no-discard-tabs",
972 IDS_FLAGS_NO_DISCARD_TABS_NAME,
973 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
974 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24975 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39976 },
977#endif
[email protected]79be6d32012-04-24 20:47:44978 {
[email protected]8d68a3e02013-01-12 15:57:10979 "enable-download-resumption",
980 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
981 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56982 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10983 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
984 },
985 {
[email protected]9a5940d2012-04-27 19:16:23986 "allow-nacl-socket-api",
987 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
988 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56989 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23990 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
991 },
[email protected]85333732012-05-01 19:02:24992 {
[email protected]60673ad72012-05-02 06:16:33993 "stacked-tab-strip",
994 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
995 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
996 kOsWin,
997 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
998 },
999 {
[email protected]4bd20202012-06-14 17:35:011000 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241001 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1002 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1003 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011004 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241005 },
[email protected]190349fd2012-05-02 00:10:471006#if defined(OS_CHROMEOS)
1007 {
1008 "allow-touchpad-three-finger-click",
1009 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1010 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1011 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241012 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471013 },
[email protected]fbc176b62012-10-27 02:19:581014 {
1015 "allow-touchpad-three-finger-swipe",
1016 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
1017 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
1018 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241019 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:581020 },
[email protected]190349fd2012-05-02 00:10:471021#endif
[email protected]1992a2f42012-10-23 18:32:211022 {
[email protected]8ee02242012-12-04 15:23:321023 "enable-desktop-guest-mode",
1024 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1025 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1026 kOsMac | kOsWin | kOsLinux,
1027 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1028 },
[email protected]53520b1b2012-05-07 21:43:371029#if defined(USE_ASH)
1030 {
[email protected]8257d382013-03-26 13:08:421031 "show-launcher-alignment-menu",
1032 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1033 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421034 kOsAll,
[email protected]8257d382013-03-26 13:08:421035 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421036 },
1037 {
[email protected]2ddf37b2013-04-20 01:15:581038 "disable-minimize-on-second-launcher-item-click",
1039 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1040 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1041 kOsAll,
1042 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1043 },
1044 {
[email protected]73074742012-05-17 01:44:411045 "show-touch-hud",
1046 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1047 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1048 kOsAll,
1049 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1050 },
1051 {
[email protected]9f0940b62012-05-23 22:56:351052 "enable-pinch",
1053 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1054 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061055 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381056 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1057 },
1058 {
[email protected]de0aaed2013-05-27 18:16:431059 "enable-pinch-virtual-viewport",
1060 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1061 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1062 kOsLinux | kOsWin | kOsCrOS,
1063 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1064 },
1065 {
[email protected]a4016f12013-05-02 07:53:471066 "forced-maximize-mode",
1067 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1068 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1069 kOsLinux | kOsWin | kOsCrOS,
1070 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1071 },
[email protected]73074742012-05-17 01:44:411072#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281073#if defined(OS_CHROMEOS)
1074 {
[email protected]8b04a1652012-08-04 02:59:491075 "disable-boot-animation",
1076 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1077 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581078 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241079 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491080 },
[email protected]95058572012-08-20 14:57:291081 {
[email protected]d96aef22012-10-30 11:47:021082 "captive-portal-detector",
1083 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1084 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581085 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021086 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1087 },
1088 {
[email protected]c11aa8f12012-12-18 18:43:141089 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571090 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1091 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1092 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141093 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571094 },
[email protected]f0280952012-11-06 20:30:501095 {
[email protected]53bc4352013-06-24 10:22:371096 "file-manager-show-checkboxes",
1097 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1098 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491099 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371100 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491101 },
1102 {
[email protected]50a3f5a2013-06-24 14:36:151103 "file-manager-enable-sharing",
1104 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_NAME,
1105 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_DESCRIPTION,
1106 kOsCrOS,
1107 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableSharing)
1108 },
1109 {
[email protected]c64d7732013-03-25 18:09:501110 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521111 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1112 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581113 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241114 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471115 },
[email protected]6ad015c2013-03-06 00:49:511116 {
[email protected]c64d7732013-03-25 18:09:501117 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521118 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1119 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511120 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521121 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511122 },
[email protected]099b890c2013-04-25 19:16:261123 {
1124 "disable-quickoffice-component-app",
1125 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1126 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1127 kOsCrOS,
1128 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1129 },
[email protected]62018dc2012-12-13 00:37:351130#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391131 {
[email protected]6247aba2013-03-04 22:57:181132 "views-textfield",
1133 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1134 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391135 kOsWin,
[email protected]6247aba2013-03-04 22:57:181136 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1137 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391138 },
[email protected]bd0cd3bb2012-06-14 03:03:381139 {
[email protected]ffbe5782013-05-09 23:22:081140 "new-dialog-style",
1141 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1142 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321143 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081144 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1145 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321146 },
[email protected]7db8893a2012-07-26 00:49:401147 { "disable-accelerated-video-decode",
1148 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1149 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191150 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401151 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151152 },
[email protected]66ae9fc2012-06-19 21:33:521153#if defined(USE_ASH)
1154 {
1155 "ash-debug-shortcuts",
1156 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1157 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1158 kOsAll,
1159 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1160 },
1161#endif
[email protected]37fee0942012-08-07 21:07:451162 {
[email protected]ad3f6d22012-08-29 02:34:191163 "enable-contacts",
1164 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1165 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1166 kOsCrOS,
1167 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1168 },
[email protected]1d9bb9cd2012-08-28 22:02:501169#if defined(USE_ASH)
1170 { "ash-enable-advanced-gestures",
1171 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1172 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1173 kOsCrOS,
1174 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1175 },
[email protected]cfa24e62013-02-13 21:19:111176 { "ash-disable-tab-scrubbing",
1177 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1178 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161179 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111180 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161181 },
[email protected]ad6fcc32013-05-30 03:46:481182 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081183 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1184 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1185 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481186 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081187 },
[email protected]83eef802012-12-02 07:43:521188 { "ash-enable-workspace-scrubbing",
1189 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1190 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1191 kOsCrOS,
1192 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1193 },
[email protected]cf2b1a82013-04-20 01:05:431194 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111195 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1196 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241197 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431198 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1199 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241200 },
[email protected]316708a2012-11-05 22:57:021201#if defined(OS_LINUX)
1202 { "ash-enable-memory-monitor",
1203 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1204 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1205 kOsCrOS,
1206 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1207 },
1208#endif
[email protected]1d9bb9cd2012-08-28 22:02:501209#endif
[email protected]9b7ab882012-09-10 23:46:361210#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131211 { "use-new-network-configuration-handlers",
1212 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1213 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1214 kOsCrOS,
1215 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1216 },
[email protected]ce98ef82013-05-31 22:43:241217 { "use-new-network-connection-handler",
1218 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1219 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1220 kOsCrOS,
1221 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1222 },
[email protected]9b7ab882012-09-10 23:46:361223 {
[email protected]354ff2d2013-05-01 17:06:311224 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121225 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1226 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1227 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311228 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1229 },
1230 {
1231 "ash-audio-device-menu",
1232 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1233 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1234 kOsCrOS,
1235 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121236 },
1237 {
[email protected]205f07892012-10-16 20:26:221238 "enable-carrier-switching",
1239 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1240 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1241 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241242 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221243 },
1244 {
[email protected]9b7ab882012-09-10 23:46:361245 "enable-request-tablet-site",
1246 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1247 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1248 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241249 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361250 },
1251#endif
[email protected]dab49c0b2012-10-04 05:55:351252 {
1253 "debug-packed-apps",
1254 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1255 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561256 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351257 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1258 },
[email protected]d1459ed2012-10-10 01:29:331259 {
1260 "enable-password-generation",
1261 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1262 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561263 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331264 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1265 },
[email protected]26d045f2012-10-18 21:18:431266 {
[email protected]17b9c742013-06-22 13:48:421267 "enable-password-autofill-public-suffix-domain-matching",
1268 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1269 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1270 kOsAndroid,
1271 SINGLE_VALUE_TYPE(
1272 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1273 },
1274 {
[email protected]76f7d4882012-10-26 21:09:221275 "enable-deferred-image-decoding",
1276 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1277 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221278 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221279 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1280 },
1281 {
[email protected]075543d2012-10-24 01:29:141282 "performance-monitor-gathering",
1283 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1284 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1285 kOsAll,
1286 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1287 },
[email protected]783d5bb2012-10-24 03:47:141288 {
[email protected]a7259fb2012-11-08 06:22:231289 "enable-experimental-form-filling",
1290 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1291 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1292 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481293 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231294 },
[email protected]6e6efe42013-01-30 00:04:501295 {
[email protected]db3178c2013-03-21 14:54:541296 "wallet-service-use-prod",
1297 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1298 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1299 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481300 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541301 },
1302 {
[email protected]6e6efe42013-01-30 00:04:501303 "enable-interactive-autocomplete",
1304 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1305 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061306 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171307 ENABLE_DISABLE_VALUE_TYPE(
1308 autofill::switches::kEnableInteractiveAutocomplete,
1309 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501310 },
[email protected]177260c2013-04-24 01:47:381311#if defined(USE_AURA)
1312 {
1313 "overscroll-history-navigation",
1314 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1315 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1316 kOsAll,
1317 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1318 switches::kOverscrollHistoryNavigation, "1",
1319 switches::kOverscrollHistoryNavigation, "0")
1320 },
1321#endif
[email protected]edbea622012-11-28 20:39:381322 {
1323 "enable-touch-drag-drop",
1324 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1325 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1326 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271327 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1328 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381329 },
[email protected]0e2f43b62013-02-21 00:47:151330 {
1331 "enable-touch-editing",
1332 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1333 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1334 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271335 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1336 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151337 },
[email protected]92e12dd92012-12-11 03:33:201338 {
1339 "enable-rich-notifications",
1340 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1341 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361342 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231343 ENABLE_DISABLE_VALUE_TYPE(
1344 message_center::switches::kEnableRichNotifications,
1345 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201346 },
[email protected]4d51c682012-12-11 11:34:551347 {
[email protected]ddec1aa2013-04-28 23:22:451348 "enable-sync-synced-notifications",
1349 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1350 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181351 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451352 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1353 switches::kDisableSyncSyncedNotifications)
1354 },
1355 {
[email protected]a50e16a2013-04-25 14:07:171356 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551357 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1358 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1359 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171360 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551361 },
[email protected]628a69a92012-12-23 04:09:341362 {
[email protected]fd030142013-02-08 02:04:381363 "enable-usermedia-screen-capture",
1364 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1365 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1366 kOsDesktop,
1367 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1368 },
[email protected]5b93e162013-02-19 06:33:091369 {
1370 "enable-apps-devtool-app",
1371 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1372 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1373 kOsDesktop,
1374 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1375 },
[email protected]9323fdd12013-02-23 00:31:361376 {
1377 "impl-side-painting",
1378 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1379 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041380 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361381 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1382 },
[email protected]a42c85f2013-04-04 18:15:121383 {
[email protected]1c92d3e2013-04-18 05:31:391384 "enable-websocket-experimental-implementation",
1385 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1386 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1387 kOsAll,
1388 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1389 },
1390 {
[email protected]a42c85f2013-04-04 18:15:121391 "max-tiles-for-interest-area",
1392 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1393 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1394 kOsAndroid | kOsLinux | kOsCrOS,
1395 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1396 },
[email protected]7cf7ccb2013-04-20 02:53:081397 {
1398 "enable-offline-mode",
1399 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1400 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1401 kOsAll,
1402 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1403 },
[email protected]a3618122013-04-26 21:15:341404 {
1405 "default-tile-width",
1406 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1407 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1408 kOsAll,
1409 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1410 },
1411 {
1412 "default-tile-height",
1413 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1414 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1415 kOsAll,
1416 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1417 },
[email protected]2f2f72b2013-03-08 22:37:311418 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1419#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371420 {
1421 "track-active-visit-time",
1422 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1423 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1424 kOsWin,
1425 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1426 },
[email protected]2f2f72b2013-03-08 22:37:311427#endif
[email protected]8cc71d42013-03-02 17:26:081428#if defined(OS_ANDROID)
1429 {
1430 "disable-gesture-requirement-for-media-playback",
1431 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1432 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1433 kOsAndroid,
1434 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1435 },
1436#endif
[email protected]6077cab2013-03-11 19:36:141437#if defined(ENABLE_GOOGLE_NOW)
1438 {
1439 "enable-google-now",
1440 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1441 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361442 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141443 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1444 },
1445#endif
[email protected]86459e2c2013-04-10 13:39:241446#if defined(OS_CHROMEOS)
1447 {
1448 "enable-virtual-keyboard",
1449 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1450 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1451 kOsCrOS,
1452 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1453 },
1454#endif
[email protected]38484df12013-04-10 16:42:031455 {
1456 "enable-simple-cache-backend",
1457 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1458 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251459 kOsAll,
[email protected]38484df12013-04-10 16:42:031460 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1461 },
[email protected]717e4e22013-04-10 20:52:231462 {
1463 "enable-tcp-fast-open",
1464 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1465 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111466 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231467 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1468 },
[email protected]8027acd2013-04-18 08:35:151469 {
[email protected]58c740f2013-05-06 05:25:441470 "apps-use-native-frame",
1471 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1472 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1473 kOsWin,
1474 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1475 },
[email protected]896d86b32013-05-09 19:36:441476 {
1477 "enable-syncfs-directory-operation",
1478 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1479 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1480 kOsAll,
1481 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1482 },
[email protected]a4ed7e12013-05-24 01:00:281483 {
[email protected]380532aa2013-05-24 11:59:351484 "enable-reset-profile-settings",
1485 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1486 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1487 kOsAll,
1488 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1489 },
[email protected]56d3c6e42013-05-29 11:28:011490#if defined(OS_MACOSX)
1491 {
1492 "enable-app-list-shim",
1493 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1494 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1495 kOsMac,
1496 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1497 },
[email protected]cb29e162013-05-31 07:47:021498 {
1499 "enable-app-shims",
1500 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1501 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1502 kOsMac,
1503 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1504 },
[email protected]67604442013-06-15 00:04:331505 {
1506 "enable-simplified-fullscreen",
1507 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1508 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1509 kOsMac,
1510 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1511 },
[email protected]56d3c6e42013-05-29 11:28:011512#endif
[email protected]13177832013-05-31 07:46:051513#if defined(OS_CHROMEOS) || defined(OS_WIN)
1514 {
1515 "enable-omnibox-auto-completion-for-ime",
1516 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1517 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1518 kOsCrOS,
1519 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1520 },
1521#endif
[email protected]910ecfe2013-06-03 23:38:141522#if defined(USE_AURA)
1523 {
1524 "tab-capture-upscale-quality",
1525 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1526 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1527 kOsAll,
1528 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1529 },
1530 {
1531 "tab-capture-downscale-quality",
1532 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1533 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1534 kOsAll,
1535 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1536 },
1537#endif
[email protected]71d4f602013-06-04 23:21:101538 {
[email protected]5e099c62013-06-08 05:46:231539 "enable-spelling-service-feedback",
1540 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1541 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1542 kOsAll,
1543 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1544 },
1545 {
[email protected]71d4f602013-06-04 23:21:101546 "enable-webgl-draft-extensions",
1547 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1548 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1549 kOsAll,
1550 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1551 },
[email protected]deadc492013-06-07 21:39:281552 {
1553 "high-dpi-support",
1554 IDS_FLAGS_HIDPI_NAME,
1555 IDS_FLAGS_HIDPI_DESCRIPTION,
1556 kOsWin,
1557 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1558 switches::kHighDPISupport,"0")
1559 },
[email protected]77e69a512013-06-08 05:56:451560#if defined(OS_CHROMEOS)
1561 {
1562 "enable-quickoffice-editing",
1563 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1564 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1565 kOsCrOS,
1566 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1567 },
1568#endif
[email protected]82ca4212013-06-11 12:09:171569 {
1570 "enable-translate-settings",
1571 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1572 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1573 kOsAll,
1574 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1575 },
[email protected]bc1697a82013-06-27 15:48:311576 {
1577 "enable-web-midi",
1578 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1579 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1580 kOsMac,
1581 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1582 },
[email protected]020df792013-06-29 14:26:211583 {
1584 "enable-new-profile-management",
1585 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1586 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1587 kOsWin,
1588 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1589 },
1590 {
1591 "enable-gaia-profile-info",
1592 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1593 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
1594 kOsMac | kOsWin,
1595 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1596 },
[email protected]a0e4b072011-08-17 01:47:071597};
[email protected]ad2a3ded2010-08-27 13:19:051598
[email protected]a314ee5a2010-10-26 21:23:281599const Experiment* experiments = kExperiments;
1600size_t num_experiments = arraysize(kExperiments);
1601
[email protected]e2ddbc92010-10-15 20:02:071602// Stores and encapsulates the little state that about:flags has.
1603class FlagsState {
1604 public:
1605 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401606 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1607 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071608 bool IsRestartNeededToCommitChanges();
1609 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401610 FlagsStorage* flags_storage,
1611 const std::string& internal_name,
1612 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071613 void RemoveFlagsSwitches(
1614 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401615 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071616 void reset();
1617
1618 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551619 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071620 return Singleton<FlagsState>::get();
1621 }
1622
1623 private:
1624 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531625 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071626
1627 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1628};
1629
[email protected]8a6ff28d2010-12-02 16:35:191630// Adds the internal names for the specified experiment to |names|.
1631void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1632 if (e.type == Experiment::SINGLE_VALUE) {
1633 names->insert(e.internal_name);
1634 } else {
[email protected]83e9fa702013-02-25 19:30:441635 DCHECK(e.type == Experiment::MULTI_VALUE ||
1636 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191637 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441638 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191639 }
1640}
1641
[email protected]28e35af2011-02-09 12:56:221642// Confirms that an experiment is valid, used in a DCHECK in
1643// SanitizeList below.
1644bool ValidateExperiment(const Experiment& e) {
1645 switch (e.type) {
1646 case Experiment::SINGLE_VALUE:
1647 DCHECK_EQ(0, e.num_choices);
1648 DCHECK(!e.choices);
1649 break;
1650 case Experiment::MULTI_VALUE:
1651 DCHECK_GT(e.num_choices, 0);
1652 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531653 DCHECK(e.choices[0].command_line_switch);
1654 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221655 break;
[email protected]83e9fa702013-02-25 19:30:441656 case Experiment::ENABLE_DISABLE_VALUE:
1657 DCHECK_EQ(3, e.num_choices);
1658 DCHECK(!e.choices);
1659 DCHECK(e.command_line_switch);
1660 DCHECK(e.command_line_value);
1661 DCHECK(e.disable_command_line_switch);
1662 DCHECK(e.disable_command_line_value);
1663 break;
[email protected]28e35af2011-02-09 12:56:221664 default:
1665 NOTREACHED();
1666 }
1667 return true;
1668}
1669
[email protected]ad2a3ded2010-08-27 13:19:051670// Removes all experiments from prefs::kEnabledLabsExperiments that are
1671// unknown, to prevent this list to become very long as experiments are added
1672// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401673void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051674 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221675 for (size_t i = 0; i < num_experiments; ++i) {
1676 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191677 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221678 }
[email protected]ad2a3ded2010-08-27 13:19:051679
[email protected]e6d1c4f2013-06-12 17:37:401680 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051681
1682 std::set<std::string> new_enabled_experiments;
1683 std::set_intersection(
1684 known_experiments.begin(), known_experiments.end(),
1685 enabled_experiments.begin(), enabled_experiments.end(),
1686 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1687
[email protected]4c8853f2012-07-23 01:29:161688 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401689 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051690}
1691
[email protected]1a47d7e2010-10-15 00:37:241692void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401693 FlagsStorage* flags_storage, std::set<std::string>* result) {
1694 SanitizeList(flags_storage);
1695 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051696}
1697
[email protected]a314ee5a2010-10-26 21:23:281698// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1699// enabled on the current platform.
1700void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401701 FlagsStorage* flags_storage, std::set<std::string>* result) {
1702 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281703
1704 // Filter out any experiments that aren't enabled on the current platform. We
1705 // don't remove these from prefs else syncing to a platform with a different
1706 // set of experiments would be lossy.
1707 std::set<std::string> platform_experiments;
1708 int current_platform = GetCurrentPlatform();
1709 for (size_t i = 0; i < num_experiments; ++i) {
1710 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191711 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581712#if defined(OS_CHROMEOS)
1713 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1714 AddInternalName(experiments[i], &platform_experiments);
1715#endif
[email protected]a314ee5a2010-10-26 21:23:281716 }
1717
1718 std::set<std::string> new_enabled_experiments;
1719 std::set_intersection(
1720 platform_experiments.begin(), platform_experiments.end(),
1721 result->begin(), result->end(),
1722 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1723
1724 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051725}
1726
[email protected]8a6ff28d2010-12-02 16:35:191727// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191728Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221729 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441730 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1731 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191732 ListValue* result = new ListValue;
1733 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191734 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441735 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191736 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441737 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221738 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191739 result->Append(value);
1740 }
1741 return result;
1742}
1743
[email protected]e2ddbc92010-10-15 20:02:071744} // namespace
1745
[email protected]83e9fa702013-02-25 19:30:441746std::string Experiment::NameForChoice(int index) const {
1747 DCHECK(type == Experiment::MULTI_VALUE ||
1748 type == Experiment::ENABLE_DISABLE_VALUE);
1749 DCHECK_LT(index, num_choices);
1750 return std::string(internal_name) + testing::kMultiSeparator +
1751 base::IntToString(index);
1752}
1753
1754string16 Experiment::DescriptionForChoice(int index) const {
1755 DCHECK(type == Experiment::MULTI_VALUE ||
1756 type == Experiment::ENABLE_DISABLE_VALUE);
1757 DCHECK_LT(index, num_choices);
1758 int description_id;
1759 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1760 const int kEnableDisableDescriptionIds[] = {
1761 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1762 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1763 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1764 };
1765 description_id = kEnableDisableDescriptionIds[index];
1766 } else {
1767 description_id = choices[index].description_id;
1768 }
1769 return l10n_util::GetStringUTF16(description_id);
1770}
1771
[email protected]e6d1c4f2013-06-12 17:37:401772void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1773 CommandLine* command_line) {
1774 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1775 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051776}
1777
[email protected]6d98abf2013-06-17 23:35:511778bool AreSwitchesIdenticalToCurrentCommandLine(
1779 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1780 std::set<CommandLine::StringType> new_flags =
1781 ExtractFlagsFromCommandLine(new_cmdline);
1782 std::set<CommandLine::StringType> active_flags =
1783 ExtractFlagsFromCommandLine(active_cmdline);
1784
1785 // Needed because std::equal doesn't check if the 2nd set is empty.
1786 if (new_flags.size() != active_flags.size())
1787 return false;
1788
1789 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1790}
1791
[email protected]e6d1c4f2013-06-12 17:37:401792void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521793 FlagAccess access,
1794 base::ListValue* supported_experiments,
1795 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051796 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401797 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051798
1799 int current_platform = GetCurrentPlatform();
1800
[email protected]a314ee5a2010-10-26 21:23:281801 for (size_t i = 0; i < num_experiments; ++i) {
1802 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051803
1804 DictionaryValue* data = new DictionaryValue();
1805 data->SetString("internal_name", experiment.internal_name);
1806 data->SetString("name",
1807 l10n_util::GetStringUTF16(experiment.visible_name_id));
1808 data->SetString("description",
1809 l10n_util::GetStringUTF16(
1810 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401811
1812 ListValue* supported_platforms = new ListValue();
1813 AddOsStrings(experiment.supported_platforms, supported_platforms);
1814 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051815
[email protected]28e35af2011-02-09 12:56:221816 switch (experiment.type) {
1817 case Experiment::SINGLE_VALUE:
1818 data->SetBoolean(
1819 "enabled",
1820 enabled_experiments.count(experiment.internal_name) > 0);
1821 break;
1822 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441823 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221824 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1825 break;
1826 default:
1827 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191828 }
1829
[email protected]ee28495a2013-05-20 04:10:521830 bool supported = (experiment.supported_platforms & current_platform) != 0;
1831#if defined(OS_CHROMEOS)
1832 if (access == kOwnerAccessToFlags &&
1833 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1834 supported = true;
1835 }
1836#endif
1837 if (supported)
1838 supported_experiments->Append(data);
1839 else
1840 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051841 }
[email protected]ad2a3ded2010-08-27 13:19:051842}
1843
[email protected]ad2a3ded2010-08-27 13:19:051844bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551845 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051846}
1847
[email protected]e6d1c4f2013-06-12 17:37:401848void SetExperimentEnabled(FlagsStorage* flags_storage,
1849 const std::string& internal_name,
1850 bool enable) {
1851 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1852 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071853}
1854
1855void RemoveFlagsSwitches(
1856 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551857 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071858}
1859
[email protected]e6d1c4f2013-06-12 17:37:401860void ResetAllFlags(FlagsStorage* flags_storage) {
1861 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001862}
1863
[email protected]a314ee5a2010-10-26 21:23:281864int GetCurrentPlatform() {
1865#if defined(OS_MACOSX)
1866 return kOsMac;
1867#elif defined(OS_WIN)
1868 return kOsWin;
1869#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1870 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211871#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281872 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401873#elif defined(OS_ANDROID)
1874 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281875#else
1876#error Unknown platform
1877#endif
1878}
1879
[email protected]e6d1c4f2013-06-12 17:37:401880void RecordUMAStatistics(FlagsStorage* flags_storage) {
1881 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541882 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1883 ++it) {
1884 std::string action("AboutFlags_");
1885 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381886 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541887 }
1888 // Since flag metrics are recorded every startup, add a tick so that the
1889 // stats can be made meaningful.
1890 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381891 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1892 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541893}
1894
[email protected]e2ddbc92010-10-15 20:02:071895//////////////////////////////////////////////////////////////////////////////
1896// FlagsState implementation.
1897
1898namespace {
1899
[email protected]83e9fa702013-02-25 19:30:441900typedef std::map<std::string, std::pair<std::string, std::string> >
1901 NameToSwitchAndValueMap;
1902
1903void SetFlagToSwitchMapping(const std::string& key,
1904 const std::string& switch_name,
1905 const std::string& switch_value,
1906 NameToSwitchAndValueMap* name_to_switch_map) {
1907 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1908 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1909}
1910
[email protected]e2ddbc92010-10-15 20:02:071911void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401912 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071913 if (command_line->HasSwitch(switches::kNoExperiments))
1914 return;
1915
1916 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001917
[email protected]e6d1c4f2013-06-12 17:37:401918 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1919 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071920
[email protected]a82744532011-02-11 16:15:531921 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191922 for (size_t i = 0; i < num_experiments; ++i) {
1923 const Experiment& e = experiments[i];
1924 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441925 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1926 e.command_line_value, &name_to_switch_map);
1927 } else if (e.type == Experiment::MULTI_VALUE) {
1928 for (int j = 0; j < e.num_choices; ++j) {
1929 SetFlagToSwitchMapping(e.NameForChoice(j),
1930 e.choices[j].command_line_switch,
1931 e.choices[j].command_line_value,
1932 &name_to_switch_map);
1933 }
[email protected]8a6ff28d2010-12-02 16:35:191934 } else {
[email protected]83e9fa702013-02-25 19:30:441935 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1936 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1937 &name_to_switch_map);
1938 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1939 e.command_line_value, &name_to_switch_map);
1940 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1941 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191942 }
1943 }
[email protected]e2ddbc92010-10-15 20:02:071944
1945 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531946 flags_switches_.insert(
1947 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1948 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071949 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1950 it != enabled_experiments.end();
1951 ++it) {
1952 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531953 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191954 name_to_switch_map.find(experiment_name);
1955 if (name_to_switch_it == name_to_switch_map.end()) {
1956 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071957 continue;
[email protected]8a6ff28d2010-12-02 16:35:191958 }
[email protected]e2ddbc92010-10-15 20:02:071959
[email protected]a82744532011-02-11 16:15:531960 const std::pair<std::string, std::string>&
1961 switch_and_value_pair = name_to_switch_it->second;
1962
1963 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1964 switch_and_value_pair.second);
1965 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071966 }
1967 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531968 flags_switches_.insert(
1969 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1970 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071971}
1972
1973bool FlagsState::IsRestartNeededToCommitChanges() {
1974 return needs_restart_;
1975}
1976
[email protected]e6d1c4f2013-06-12 17:37:401977void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1978 const std::string& internal_name,
1979 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441980 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191981 if (at_index != std::string::npos) {
1982 DCHECK(enable);
1983 // We're being asked to enable a multi-choice experiment. Disable the
1984 // currently selected choice.
1985 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221986 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:401987 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191988
[email protected]28e35af2011-02-09 12:56:221989 // And enable the new choice, if it is not the default first choice.
1990 if (internal_name != experiment_name + "@0") {
1991 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401992 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081993 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:401994 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:221995 }
[email protected]8a6ff28d2010-12-02 16:35:191996 return;
1997 }
1998
[email protected]ad2a3ded2010-08-27 13:19:051999 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402000 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052001
[email protected]8a6ff28d2010-12-02 16:35:192002 const Experiment* e = NULL;
2003 for (size_t i = 0; i < num_experiments; ++i) {
2004 if (experiments[i].internal_name == internal_name) {
2005 e = experiments + i;
2006 break;
2007 }
2008 }
2009 DCHECK(e);
2010
2011 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592012 if (enable)
[email protected]147492b2013-03-19 23:52:082013 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592014 else
[email protected]147492b2013-03-19 23:52:082015 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192016 } else {
2017 if (enable) {
2018 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082019 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192020 } else {
2021 // Find the currently enabled choice and disable it.
2022 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442023 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192024 if (enabled_experiments.find(choice_name) !=
2025 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082026 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192027 enabled_experiments.erase(choice_name);
2028 // Continue on just in case there's a bug and more than one
2029 // experiment for this choice was enabled.
2030 }
2031 }
2032 }
2033 }
[email protected]ad2a3ded2010-08-27 13:19:052034
[email protected]e6d1c4f2013-06-12 17:37:402035 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052036}
2037
[email protected]e2ddbc92010-10-15 20:02:072038void FlagsState::RemoveFlagsSwitches(
2039 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532040 for (std::map<std::string, std::string>::const_iterator
2041 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2042 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072043 }
2044}
2045
[email protected]e6d1c4f2013-06-12 17:37:402046void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002047 needs_restart_ = true;
2048
2049 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402050 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002051}
2052
[email protected]e2ddbc92010-10-15 20:02:072053void FlagsState::reset() {
2054 needs_restart_ = false;
2055 flags_switches_.clear();
2056}
2057
[email protected]38e46812011-05-09 20:49:222058} // namespace
[email protected]e2ddbc92010-10-15 20:02:072059
2060namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192061
2062// WARNING: '@' is also used in the html file. If you update this constant you
2063// also need to update the html file.
2064const char kMultiSeparator[] = "@";
2065
[email protected]e2ddbc92010-10-15 20:02:072066void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552067 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072068}
[email protected]a314ee5a2010-10-26 21:23:282069
2070void SetExperiments(const Experiment* e, size_t count) {
2071 if (!e) {
2072 experiments = kExperiments;
2073 num_experiments = arraysize(kExperiments);
2074 } else {
2075 experiments = e;
2076 num_experiments = count;
2077 }
2078}
2079
[email protected]8a6ff28d2010-12-02 16:35:192080const Experiment* GetExperiments(size_t* count) {
2081 *count = num_experiments;
2082 return experiments;
2083}
2084
[email protected]e2ddbc92010-10-15 20:02:072085} // namespace testing
2086
[email protected]1a47d7e2010-10-15 00:37:242087} // namespace about_flags