blob: 6a84afb781c9cd8c681321b623fa02709eccc421 [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]88c92012013-07-02 11:56:34544 "enable-fast-unload",
545 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
546 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
547 kOsAll,
548 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
549 },
550 {
[email protected]e9cddd52013-03-23 17:37:53551 "enable-adview",
552 IDS_FLAGS_ENABLE_ADVIEW_NAME,
553 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
554 kOsDesktop,
555 SINGLE_VALUE_TYPE(switches::kEnableAdview)
556 },
557 {
558 "enable-adview-src-attribute",
559 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
560 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
561 kOsDesktop,
562 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
563 },
564 {
[email protected]1f4da9e2013-06-27 05:23:44565 "enable-app-window-controls",
566 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
567 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
568 kOsDesktop,
569 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
570 },
571 {
[email protected]544471a2012-10-13 05:27:09572 "action-box",
[email protected]cab18ef2012-04-27 07:22:03573 IDS_FLAGS_ACTION_BOX_NAME,
574 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56575 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44576 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
577 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03578 },
579 {
[email protected]3a362432012-06-18 20:39:51580 "script-badges",
581 IDS_FLAGS_SCRIPT_BADGES_NAME,
582 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56583 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09584 SINGLE_VALUE_TYPE(switches::kScriptBadges)
585 },
586 {
587 "script-bubble",
588 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
589 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56590 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44591 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
592 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51593 },
594 {
[email protected]cbe224d2011-08-04 22:12:49595 "apps-new-install-bubble",
596 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
597 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56598 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49599 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
600 },
601 {
[email protected]80bd24e2010-11-30 09:34:38602 "disable-hyperlink-auditing",
603 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
604 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
605 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19606 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51607 },
608 {
609 "experimental-location-features", // FLAGS:RECORD_UMA
610 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
611 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
612 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19613 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
614 },
615 {
[email protected]5aea1862011-03-23 23:55:39616 "tab-groups-context-menu",
617 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
618 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
619 kOsWin,
620 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
621 },
[email protected]c94cebd2012-06-21 00:55:28622 {
623 "enable-instant-extended-api",
624 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
625 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46626 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51627 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
628 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28629 },
[email protected]e9bf9d92011-03-31 20:57:15630 {
[email protected]8cc9e532013-05-06 21:01:47631 "enable-local-first-load-ntp",
632 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
633 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46634 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47635 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
636 switches::kDisableLocalFirstLoadNTP)
637 },
638 {
[email protected]354e33b2011-06-15 00:29:10639 "static-ip-config",
640 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
641 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
642 kOsCrOS,
643#if defined(OS_CHROMEOS)
644 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24645 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10646#else
647 SINGLE_VALUE_TYPE("")
648#endif
649 },
[email protected]3eb5728c2011-06-20 22:32:24650 {
651 "show-autofill-type-predictions",
652 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
653 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
654 kOsAll,
[email protected]e217c5632013-04-12 19:11:48655 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24656 },
[email protected]bff4d3e2011-06-21 23:58:52657 {
[email protected]a5e9faa2013-03-19 09:58:38658 "enable-sync-favicons",
659 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
660 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55661 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38662 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55663 },
664 {
[email protected]e755a382012-09-13 17:16:35665 "enable-gesture-tap-highlight",
666 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
667 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
668 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47669 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
670 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35671 },
672 {
[email protected]a22ebd812011-06-23 00:05:39673 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
674 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
675 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
676 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40677 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25678 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39679 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
680 },
[email protected]81a6b0b2011-06-24 17:55:40681 {
[email protected]128dc6c2012-06-22 20:30:35682 "omnibox-history-quick-provider-reorder-for-inlining",
683 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
684 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
685 kOsAll,
686 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
687 },
688 {
[email protected]032d5e6c2012-02-17 17:53:55689 "omnibox-inline-history-quick-provider",
690 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
691 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
692 kOsAll,
693 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
694 },
695 {
[email protected]7e7a28092011-12-09 22:24:55696 "enable-panels",
697 IDS_FLAGS_ENABLE_PANELS_NAME,
698 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56699 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55700 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54701 },
[email protected]e3749d12011-07-25 22:22:12702 {
[email protected]27c14f02012-06-22 17:29:58703 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27704 "save-page-as-mhtml", // FLAGS:RECORD_UMA
705 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
706 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
707 kOsMac | kOsWin | kOsLinux,
708 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
709 },
710 {
[email protected]b7bb44f2011-09-01 05:17:03711 "enable-autologin",
712 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
713 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
714 kOsMac | kOsWin | kOsLinux,
715 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
716 },
[email protected]b9841172011-09-26 23:36:09717 {
[email protected]903e63382013-06-01 00:40:58718 "enable-quic",
719 IDS_FLAGS_ENABLE_QUIC_NAME,
720 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
721 kOsAll,
722 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
723 switches::kDisableQuic)
724 },
725 {
[email protected]bca09b9982013-06-27 22:30:46726 "enable-spdy4a2",
727 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
728 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
729 kOsAll,
730 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
731 },
732 {
[email protected]27b3fe92012-03-21 05:35:06733 "enable-async-dns",
734 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
735 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46736 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44737 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
738 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06739 },
[email protected]85dd7ca2013-05-30 23:53:00740#if defined(ANDROID) && !defined(GOOGLE_TV)
741 {
742 "enable-media-source",
743 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
744 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
745 kOsAll,
746 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
747 },
748#else
[email protected]27b3fe92012-03-21 05:35:06749 {
[email protected]1eb93802012-09-11 18:57:56750 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31751 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
752 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32753 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31754 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44755 },
[email protected]85dd7ca2013-05-30 23:53:00756#endif
[email protected]e4e68dbb2011-11-18 01:50:22757 {
[email protected]16c242d2013-05-31 23:56:47758 "enable-encrypted-media",
759 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
760 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56761 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47762 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
763 },
764 {
765 "disable-encrypted-media",
766 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
767 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
768 kOsDesktop,
769 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03770 },
[email protected]f88628792012-12-18 07:07:50771 {
[email protected]d21ead42013-06-24 06:35:06772 "override-encrypted-media-canplaytype",
773 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
774 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
775 kOsMac | kOsWin,
776 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
777 },
778 {
[email protected]f88628792012-12-18 07:07:50779 "enable-opus-playback",
780 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
781 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56782 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50783 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
784 },
[email protected]b150b5532013-06-15 00:50:54785 {
[email protected]6ac955b2013-04-19 23:43:32786 "enable-vp8-alpha-playback",
787 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
788 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
789 kOsDesktop,
790 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
791 },
792 {
[email protected]ca6eaa5a2013-01-24 16:16:04793 "enable-managed-users",
794 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
795 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08796 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04797 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
798 },
[email protected]dc04be7c2012-03-15 23:57:49799#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50800 {
[email protected]2a13a9a2013-04-19 04:00:21801 "ash-disable-auto-maximizing",
802 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
803 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
804 kOsWin | kOsLinux | kOsCrOS,
805 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
806 },
807 {
[email protected]cda278d2012-10-30 20:31:40808 "ash-disable-auto-window-placement",
809 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
810 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
811 kOsWin | kOsLinux | kOsCrOS,
812 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
813 },
[email protected]b4e4ec42012-11-29 21:42:40814 {
[email protected]16f55a22013-02-13 23:47:34815 "ash-disable-per-app-launcher",
816 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
817 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40818 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34819 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40820 },
[email protected]dc04be7c2012-03-15 23:57:49821#endif
[email protected]eaae8b462012-01-20 22:20:39822 {
[email protected]db543d322011-12-15 20:40:15823 "per-tile-painting",
824 IDS_FLAGS_PER_TILE_PAINTING_NAME,
825 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37826 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37827 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15828 },
[email protected]bf88c032011-12-22 19:05:47829 {
830 "enable-javascript-harmony",
831 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
832 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
833 kOsAll,
834 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
835 },
[email protected]7e7f378a2012-01-05 14:35:37836 {
[email protected]85646172012-01-09 22:45:54837 "enable-tab-browser-dragging",
838 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
839 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
840 kOsWin,
841 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
842 },
843 {
[email protected]068b7b52012-02-27 12:41:44844 "disable-restore-session-state",
845 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
846 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37847 kOsAll,
[email protected]068b7b52012-02-27 12:41:44848 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37849 },
[email protected]88864db2012-01-18 20:56:35850 {
851 "disable-software-rasterizer",
852 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
853 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
854#if defined(ENABLE_SWIFTSHADER)
855 kOsAll,
856#else
857 0,
858#endif
859 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
860 },
[email protected]15a5d722012-01-23 09:11:14861 {
[email protected]ff7b6dd2012-09-15 20:20:03862 "enable-experimental-webkit-features",
863 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
864 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16865 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03866 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49867 },
868 {
[email protected]0f95a252012-09-13 22:30:04869 "enable-css-shaders",
870 IDS_FLAGS_CSS_SHADERS_NAME,
871 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
872 kOsAll,
873 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
874 },
875 {
[email protected]3e8befc2012-03-13 01:17:03876 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16877 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
878 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56879 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03880 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16881 },
[email protected]dc04be7c2012-03-15 23:57:49882#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01883 {
[email protected]3cd198a22012-03-12 20:38:01884 "enable-ash-oak",
885 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
886 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
887 kOsAll,
888 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
889 },
[email protected]31cf1c52012-02-29 20:55:01890#endif
[email protected]184ec592012-03-01 11:54:28891 {
892 "enable-devtools-experiments",
893 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
894 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56895 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28896 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
897 },
[email protected]76d1854e2012-03-02 23:57:44898 {
[email protected]2fefdb32013-02-26 14:28:10899 "silent-debugger-extension-api",
900 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
901 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
902 kOsDesktop,
903 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
904 },
905 {
[email protected]76d1854e2012-03-02 23:57:44906 "enable-suggestions-ntp",
907 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
908 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56909 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44910 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
911 },
[email protected]a3d54252012-04-05 20:04:13912 {
[email protected]1dbaf5e2012-11-30 05:51:32913 "spellcheck-autocorrect",
914 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
915 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
916 kOsWin | kOsLinux | kOsCrOS,
917 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
918 },
919 {
[email protected]e27137282013-06-20 02:38:35920 "enable-scroll-prediction",
921 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
922 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
923 kOsDesktop,
924 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
925 },
926 {
[email protected]d7932532012-11-21 21:10:31927 "touch-events",
928 IDS_TOUCH_EVENTS_NAME,
929 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56930 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31931 MULTI_VALUE_TYPE(kTouchEventsChoices)
932 },
933 {
[email protected]c9c73ad42012-04-18 03:35:59934 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06935 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
936 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55937 kOsWin,
[email protected]347a0c72012-05-14 20:28:06938 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59939 },
[email protected]8a6aaa72012-04-20 20:53:58940 {
[email protected]b9c96ff2012-11-26 22:24:40941 "disable-touch-adjustment",
942 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
943 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
944 kOsWin | kOsLinux | kOsCrOS,
945 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
946 },
947 {
[email protected]0b9383a2012-10-26 00:58:16948 "enable-tab-capture",
949 IDS_ENABLE_TAB_CAPTURE_NAME,
950 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25951 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44952 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
953 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16954 },
[email protected]0b60afa2012-04-19 17:36:39955#if defined(OS_CHROMEOS)
956 {
[email protected]690de0f2013-06-26 00:51:16957 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31958 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
959 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
960 kOsCrOS,
961 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
962 },
963 {
[email protected]7c4a9bc2012-09-11 22:10:05964 "enable-background-loader",
965 IDS_ENABLE_BACKLOADER_NAME,
966 IDS_ENABLE_BACKLOADER_DESCRIPTION,
967 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24968 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05969 },
970 {
[email protected]3f4181a2013-02-01 21:31:07971 "enable-screensaver-extension",
972 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
973 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
974 kOsCrOS,
975 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
976 },
977 {
[email protected]0b60afa2012-04-19 17:36:39978 "no-discard-tabs",
979 IDS_FLAGS_NO_DISCARD_TABS_NAME,
980 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
981 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24982 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39983 },
984#endif
[email protected]79be6d32012-04-24 20:47:44985 {
[email protected]8d68a3e02013-01-12 15:57:10986 "enable-download-resumption",
987 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
988 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56989 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10990 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
991 },
992 {
[email protected]9a5940d2012-04-27 19:16:23993 "allow-nacl-socket-api",
994 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
995 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56996 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23997 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
998 },
[email protected]85333732012-05-01 19:02:24999 {
[email protected]60673ad72012-05-02 06:16:331000 "stacked-tab-strip",
1001 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1002 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1003 kOsWin,
1004 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1005 },
1006 {
[email protected]4bd20202012-06-14 17:35:011007 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241008 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1009 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1010 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011011 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241012 },
[email protected]190349fd2012-05-02 00:10:471013#if defined(OS_CHROMEOS)
1014 {
1015 "allow-touchpad-three-finger-click",
1016 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1017 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1018 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241019 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471020 },
[email protected]fbc176b62012-10-27 02:19:581021 {
1022 "allow-touchpad-three-finger-swipe",
1023 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
1024 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
1025 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241026 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:581027 },
[email protected]190349fd2012-05-02 00:10:471028#endif
[email protected]1992a2f42012-10-23 18:32:211029 {
[email protected]8ee02242012-12-04 15:23:321030 "enable-desktop-guest-mode",
1031 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1032 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1033 kOsMac | kOsWin | kOsLinux,
1034 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1035 },
[email protected]53520b1b2012-05-07 21:43:371036#if defined(USE_ASH)
1037 {
[email protected]8257d382013-03-26 13:08:421038 "show-launcher-alignment-menu",
1039 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1040 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421041 kOsAll,
[email protected]8257d382013-03-26 13:08:421042 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421043 },
1044 {
[email protected]2ddf37b2013-04-20 01:15:581045 "disable-minimize-on-second-launcher-item-click",
1046 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1047 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1048 kOsAll,
1049 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1050 },
1051 {
[email protected]73074742012-05-17 01:44:411052 "show-touch-hud",
1053 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1054 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1055 kOsAll,
1056 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1057 },
1058 {
[email protected]9f0940b62012-05-23 22:56:351059 "enable-pinch",
1060 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1061 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061062 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381063 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1064 },
1065 {
[email protected]de0aaed2013-05-27 18:16:431066 "enable-pinch-virtual-viewport",
1067 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1068 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1069 kOsLinux | kOsWin | kOsCrOS,
1070 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1071 },
1072 {
[email protected]a4016f12013-05-02 07:53:471073 "forced-maximize-mode",
1074 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1075 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1076 kOsLinux | kOsWin | kOsCrOS,
1077 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1078 },
[email protected]73074742012-05-17 01:44:411079#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281080#if defined(OS_CHROMEOS)
1081 {
[email protected]8b04a1652012-08-04 02:59:491082 "disable-boot-animation",
1083 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1084 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581085 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241086 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491087 },
[email protected]95058572012-08-20 14:57:291088 {
[email protected]d96aef22012-10-30 11:47:021089 "captive-portal-detector",
1090 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1091 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581092 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021093 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1094 },
1095 {
[email protected]c11aa8f12012-12-18 18:43:141096 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571097 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1098 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1099 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141100 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571101 },
[email protected]f0280952012-11-06 20:30:501102 {
[email protected]53bc4352013-06-24 10:22:371103 "file-manager-show-checkboxes",
1104 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1105 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491106 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371107 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491108 },
1109 {
[email protected]50a3f5a2013-06-24 14:36:151110 "file-manager-enable-sharing",
1111 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_NAME,
1112 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_DESCRIPTION,
1113 kOsCrOS,
1114 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableSharing)
1115 },
1116 {
[email protected]c64d7732013-03-25 18:09:501117 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521118 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1119 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581120 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241121 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471122 },
[email protected]6ad015c2013-03-06 00:49:511123 {
[email protected]c64d7732013-03-25 18:09:501124 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521125 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1126 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511127 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521128 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511129 },
[email protected]099b890c2013-04-25 19:16:261130 {
1131 "disable-quickoffice-component-app",
1132 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1133 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1134 kOsCrOS,
1135 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1136 },
[email protected]62018dc2012-12-13 00:37:351137#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391138 {
[email protected]6247aba2013-03-04 22:57:181139 "views-textfield",
1140 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1141 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391142 kOsWin,
[email protected]6247aba2013-03-04 22:57:181143 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1144 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391145 },
[email protected]bd0cd3bb2012-06-14 03:03:381146 {
[email protected]ffbe5782013-05-09 23:22:081147 "new-dialog-style",
1148 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1149 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321150 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081151 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1152 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321153 },
[email protected]7db8893a2012-07-26 00:49:401154 { "disable-accelerated-video-decode",
1155 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1156 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191157 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401158 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151159 },
[email protected]66ae9fc2012-06-19 21:33:521160#if defined(USE_ASH)
1161 {
1162 "ash-debug-shortcuts",
1163 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1164 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1165 kOsAll,
1166 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1167 },
1168#endif
[email protected]37fee0942012-08-07 21:07:451169 {
[email protected]ad3f6d22012-08-29 02:34:191170 "enable-contacts",
1171 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1172 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1173 kOsCrOS,
1174 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1175 },
[email protected]1d9bb9cd2012-08-28 22:02:501176#if defined(USE_ASH)
1177 { "ash-enable-advanced-gestures",
1178 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1179 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1180 kOsCrOS,
1181 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1182 },
[email protected]cfa24e62013-02-13 21:19:111183 { "ash-disable-tab-scrubbing",
1184 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1185 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161186 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111187 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161188 },
[email protected]ad6fcc32013-05-30 03:46:481189 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081190 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1191 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1192 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481193 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081194 },
[email protected]83eef802012-12-02 07:43:521195 { "ash-enable-workspace-scrubbing",
1196 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1197 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1198 kOsCrOS,
1199 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1200 },
[email protected]cf2b1a82013-04-20 01:05:431201 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111202 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1203 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241204 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431205 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1206 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241207 },
[email protected]316708a2012-11-05 22:57:021208#if defined(OS_LINUX)
1209 { "ash-enable-memory-monitor",
1210 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1211 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1212 kOsCrOS,
1213 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1214 },
1215#endif
[email protected]1d9bb9cd2012-08-28 22:02:501216#endif
[email protected]9b7ab882012-09-10 23:46:361217#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131218 { "use-new-network-configuration-handlers",
1219 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1220 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1221 kOsCrOS,
1222 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1223 },
[email protected]ce98ef82013-05-31 22:43:241224 { "use-new-network-connection-handler",
1225 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1226 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1227 kOsCrOS,
1228 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1229 },
[email protected]9b7ab882012-09-10 23:46:361230 {
[email protected]354ff2d2013-05-01 17:06:311231 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121232 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1233 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1234 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311235 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1236 },
1237 {
1238 "ash-audio-device-menu",
1239 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1240 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1241 kOsCrOS,
1242 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121243 },
1244 {
[email protected]205f07892012-10-16 20:26:221245 "enable-carrier-switching",
1246 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1247 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1248 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241249 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221250 },
1251 {
[email protected]9b7ab882012-09-10 23:46:361252 "enable-request-tablet-site",
1253 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1254 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1255 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241256 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361257 },
1258#endif
[email protected]dab49c0b2012-10-04 05:55:351259 {
1260 "debug-packed-apps",
1261 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1262 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561263 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351264 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1265 },
[email protected]d1459ed2012-10-10 01:29:331266 {
1267 "enable-password-generation",
1268 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1269 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561270 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331271 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1272 },
[email protected]26d045f2012-10-18 21:18:431273 {
[email protected]17b9c742013-06-22 13:48:421274 "enable-password-autofill-public-suffix-domain-matching",
1275 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1276 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1277 kOsAndroid,
1278 SINGLE_VALUE_TYPE(
1279 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1280 },
1281 {
[email protected]76f7d4882012-10-26 21:09:221282 "enable-deferred-image-decoding",
1283 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1284 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221285 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221286 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1287 },
1288 {
[email protected]075543d2012-10-24 01:29:141289 "performance-monitor-gathering",
1290 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1291 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1292 kOsAll,
1293 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1294 },
[email protected]783d5bb2012-10-24 03:47:141295 {
[email protected]a7259fb2012-11-08 06:22:231296 "enable-experimental-form-filling",
1297 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1298 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1299 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481300 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231301 },
[email protected]6e6efe42013-01-30 00:04:501302 {
[email protected]db3178c2013-03-21 14:54:541303 "wallet-service-use-prod",
1304 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1305 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1306 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481307 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541308 },
1309 {
[email protected]6e6efe42013-01-30 00:04:501310 "enable-interactive-autocomplete",
1311 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1312 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061313 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171314 ENABLE_DISABLE_VALUE_TYPE(
1315 autofill::switches::kEnableInteractiveAutocomplete,
1316 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501317 },
[email protected]177260c2013-04-24 01:47:381318#if defined(USE_AURA)
1319 {
1320 "overscroll-history-navigation",
1321 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1322 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1323 kOsAll,
1324 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1325 switches::kOverscrollHistoryNavigation, "1",
1326 switches::kOverscrollHistoryNavigation, "0")
1327 },
1328#endif
[email protected]edbea622012-11-28 20:39:381329 {
1330 "enable-touch-drag-drop",
1331 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1332 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1333 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271334 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1335 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381336 },
[email protected]0e2f43b62013-02-21 00:47:151337 {
1338 "enable-touch-editing",
1339 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1340 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1341 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271342 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1343 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151344 },
[email protected]92e12dd92012-12-11 03:33:201345 {
1346 "enable-rich-notifications",
1347 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1348 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361349 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231350 ENABLE_DISABLE_VALUE_TYPE(
1351 message_center::switches::kEnableRichNotifications,
1352 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201353 },
[email protected]4d51c682012-12-11 11:34:551354 {
[email protected]ddec1aa2013-04-28 23:22:451355 "enable-sync-synced-notifications",
1356 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1357 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181358 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451359 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1360 switches::kDisableSyncSyncedNotifications)
1361 },
1362 {
[email protected]a50e16a2013-04-25 14:07:171363 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551364 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1365 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1366 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171367 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551368 },
[email protected]628a69a92012-12-23 04:09:341369 {
[email protected]fd030142013-02-08 02:04:381370 "enable-usermedia-screen-capture",
1371 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1372 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1373 kOsDesktop,
1374 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1375 },
[email protected]5b93e162013-02-19 06:33:091376 {
1377 "enable-apps-devtool-app",
1378 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1379 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1380 kOsDesktop,
1381 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1382 },
[email protected]9323fdd12013-02-23 00:31:361383 {
1384 "impl-side-painting",
1385 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1386 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041387 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361388 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1389 },
[email protected]a42c85f2013-04-04 18:15:121390 {
[email protected]1c92d3e2013-04-18 05:31:391391 "enable-websocket-experimental-implementation",
1392 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1393 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1394 kOsAll,
1395 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1396 },
1397 {
[email protected]a42c85f2013-04-04 18:15:121398 "max-tiles-for-interest-area",
1399 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1400 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1401 kOsAndroid | kOsLinux | kOsCrOS,
1402 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1403 },
[email protected]7cf7ccb2013-04-20 02:53:081404 {
1405 "enable-offline-mode",
1406 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1407 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1408 kOsAll,
1409 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1410 },
[email protected]a3618122013-04-26 21:15:341411 {
1412 "default-tile-width",
1413 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1414 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1415 kOsAll,
1416 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1417 },
1418 {
1419 "default-tile-height",
1420 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1421 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1422 kOsAll,
1423 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1424 },
[email protected]2f2f72b2013-03-08 22:37:311425 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1426#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371427 {
1428 "track-active-visit-time",
1429 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1430 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1431 kOsWin,
1432 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1433 },
[email protected]2f2f72b2013-03-08 22:37:311434#endif
[email protected]8cc71d42013-03-02 17:26:081435#if defined(OS_ANDROID)
1436 {
1437 "disable-gesture-requirement-for-media-playback",
1438 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1439 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1440 kOsAndroid,
1441 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1442 },
1443#endif
[email protected]6077cab2013-03-11 19:36:141444#if defined(ENABLE_GOOGLE_NOW)
1445 {
1446 "enable-google-now",
1447 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1448 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361449 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141450 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1451 },
1452#endif
[email protected]86459e2c2013-04-10 13:39:241453#if defined(OS_CHROMEOS)
1454 {
1455 "enable-virtual-keyboard",
1456 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1457 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1458 kOsCrOS,
1459 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1460 },
1461#endif
[email protected]38484df12013-04-10 16:42:031462 {
1463 "enable-simple-cache-backend",
1464 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1465 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251466 kOsAll,
[email protected]38484df12013-04-10 16:42:031467 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1468 },
[email protected]717e4e22013-04-10 20:52:231469 {
1470 "enable-tcp-fast-open",
1471 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1472 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111473 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231474 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1475 },
[email protected]8027acd2013-04-18 08:35:151476 {
[email protected]58c740f2013-05-06 05:25:441477 "apps-use-native-frame",
1478 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1479 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1480 kOsWin,
1481 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1482 },
[email protected]896d86b32013-05-09 19:36:441483 {
1484 "enable-syncfs-directory-operation",
1485 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1486 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1487 kOsAll,
1488 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1489 },
[email protected]a4ed7e12013-05-24 01:00:281490 {
[email protected]380532aa2013-05-24 11:59:351491 "enable-reset-profile-settings",
1492 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1493 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1494 kOsAll,
1495 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1496 },
[email protected]56d3c6e42013-05-29 11:28:011497#if defined(OS_MACOSX)
1498 {
1499 "enable-app-list-shim",
1500 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1501 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1502 kOsMac,
1503 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1504 },
[email protected]cb29e162013-05-31 07:47:021505 {
1506 "enable-app-shims",
1507 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1508 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1509 kOsMac,
1510 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1511 },
[email protected]67604442013-06-15 00:04:331512 {
1513 "enable-simplified-fullscreen",
1514 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1515 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1516 kOsMac,
1517 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1518 },
[email protected]56d3c6e42013-05-29 11:28:011519#endif
[email protected]13177832013-05-31 07:46:051520#if defined(OS_CHROMEOS) || defined(OS_WIN)
1521 {
1522 "enable-omnibox-auto-completion-for-ime",
1523 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1524 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1525 kOsCrOS,
1526 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1527 },
1528#endif
[email protected]910ecfe2013-06-03 23:38:141529#if defined(USE_AURA)
1530 {
1531 "tab-capture-upscale-quality",
1532 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1533 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1534 kOsAll,
1535 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1536 },
1537 {
1538 "tab-capture-downscale-quality",
1539 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1540 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1541 kOsAll,
1542 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1543 },
1544#endif
[email protected]71d4f602013-06-04 23:21:101545 {
[email protected]5e099c62013-06-08 05:46:231546 "enable-spelling-service-feedback",
1547 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1548 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1549 kOsAll,
1550 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1551 },
1552 {
[email protected]71d4f602013-06-04 23:21:101553 "enable-webgl-draft-extensions",
1554 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1555 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1556 kOsAll,
1557 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1558 },
[email protected]deadc492013-06-07 21:39:281559 {
1560 "high-dpi-support",
1561 IDS_FLAGS_HIDPI_NAME,
1562 IDS_FLAGS_HIDPI_DESCRIPTION,
1563 kOsWin,
1564 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1565 switches::kHighDPISupport,"0")
1566 },
[email protected]77e69a512013-06-08 05:56:451567#if defined(OS_CHROMEOS)
1568 {
1569 "enable-quickoffice-editing",
1570 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1571 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1572 kOsCrOS,
1573 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1574 },
1575#endif
[email protected]82ca4212013-06-11 12:09:171576 {
1577 "enable-translate-settings",
1578 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1579 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1580 kOsAll,
1581 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1582 },
[email protected]bc1697a82013-06-27 15:48:311583 {
1584 "enable-web-midi",
1585 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1586 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1587 kOsMac,
1588 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1589 },
[email protected]020df792013-06-29 14:26:211590 {
1591 "enable-new-profile-management",
1592 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1593 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1594 kOsWin,
1595 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1596 },
1597 {
1598 "enable-gaia-profile-info",
1599 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1600 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
1601 kOsMac | kOsWin,
1602 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1603 },
[email protected]a0e4b072011-08-17 01:47:071604};
[email protected]ad2a3ded2010-08-27 13:19:051605
[email protected]a314ee5a2010-10-26 21:23:281606const Experiment* experiments = kExperiments;
1607size_t num_experiments = arraysize(kExperiments);
1608
[email protected]e2ddbc92010-10-15 20:02:071609// Stores and encapsulates the little state that about:flags has.
1610class FlagsState {
1611 public:
1612 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401613 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1614 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071615 bool IsRestartNeededToCommitChanges();
1616 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401617 FlagsStorage* flags_storage,
1618 const std::string& internal_name,
1619 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071620 void RemoveFlagsSwitches(
1621 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401622 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071623 void reset();
1624
1625 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551626 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071627 return Singleton<FlagsState>::get();
1628 }
1629
1630 private:
1631 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531632 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071633
1634 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1635};
1636
[email protected]8a6ff28d2010-12-02 16:35:191637// Adds the internal names for the specified experiment to |names|.
1638void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1639 if (e.type == Experiment::SINGLE_VALUE) {
1640 names->insert(e.internal_name);
1641 } else {
[email protected]83e9fa702013-02-25 19:30:441642 DCHECK(e.type == Experiment::MULTI_VALUE ||
1643 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191644 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441645 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191646 }
1647}
1648
[email protected]28e35af2011-02-09 12:56:221649// Confirms that an experiment is valid, used in a DCHECK in
1650// SanitizeList below.
1651bool ValidateExperiment(const Experiment& e) {
1652 switch (e.type) {
1653 case Experiment::SINGLE_VALUE:
1654 DCHECK_EQ(0, e.num_choices);
1655 DCHECK(!e.choices);
1656 break;
1657 case Experiment::MULTI_VALUE:
1658 DCHECK_GT(e.num_choices, 0);
1659 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531660 DCHECK(e.choices[0].command_line_switch);
1661 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221662 break;
[email protected]83e9fa702013-02-25 19:30:441663 case Experiment::ENABLE_DISABLE_VALUE:
1664 DCHECK_EQ(3, e.num_choices);
1665 DCHECK(!e.choices);
1666 DCHECK(e.command_line_switch);
1667 DCHECK(e.command_line_value);
1668 DCHECK(e.disable_command_line_switch);
1669 DCHECK(e.disable_command_line_value);
1670 break;
[email protected]28e35af2011-02-09 12:56:221671 default:
1672 NOTREACHED();
1673 }
1674 return true;
1675}
1676
[email protected]ad2a3ded2010-08-27 13:19:051677// Removes all experiments from prefs::kEnabledLabsExperiments that are
1678// unknown, to prevent this list to become very long as experiments are added
1679// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401680void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051681 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221682 for (size_t i = 0; i < num_experiments; ++i) {
1683 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191684 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221685 }
[email protected]ad2a3ded2010-08-27 13:19:051686
[email protected]e6d1c4f2013-06-12 17:37:401687 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051688
1689 std::set<std::string> new_enabled_experiments;
1690 std::set_intersection(
1691 known_experiments.begin(), known_experiments.end(),
1692 enabled_experiments.begin(), enabled_experiments.end(),
1693 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1694
[email protected]4c8853f2012-07-23 01:29:161695 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401696 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051697}
1698
[email protected]1a47d7e2010-10-15 00:37:241699void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401700 FlagsStorage* flags_storage, std::set<std::string>* result) {
1701 SanitizeList(flags_storage);
1702 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051703}
1704
[email protected]a314ee5a2010-10-26 21:23:281705// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1706// enabled on the current platform.
1707void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401708 FlagsStorage* flags_storage, std::set<std::string>* result) {
1709 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281710
1711 // Filter out any experiments that aren't enabled on the current platform. We
1712 // don't remove these from prefs else syncing to a platform with a different
1713 // set of experiments would be lossy.
1714 std::set<std::string> platform_experiments;
1715 int current_platform = GetCurrentPlatform();
1716 for (size_t i = 0; i < num_experiments; ++i) {
1717 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191718 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581719#if defined(OS_CHROMEOS)
1720 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1721 AddInternalName(experiments[i], &platform_experiments);
1722#endif
[email protected]a314ee5a2010-10-26 21:23:281723 }
1724
1725 std::set<std::string> new_enabled_experiments;
1726 std::set_intersection(
1727 platform_experiments.begin(), platform_experiments.end(),
1728 result->begin(), result->end(),
1729 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1730
1731 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051732}
1733
[email protected]8a6ff28d2010-12-02 16:35:191734// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191735Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221736 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441737 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1738 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191739 ListValue* result = new ListValue;
1740 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191741 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441742 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191743 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441744 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221745 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191746 result->Append(value);
1747 }
1748 return result;
1749}
1750
[email protected]e2ddbc92010-10-15 20:02:071751} // namespace
1752
[email protected]83e9fa702013-02-25 19:30:441753std::string Experiment::NameForChoice(int index) const {
1754 DCHECK(type == Experiment::MULTI_VALUE ||
1755 type == Experiment::ENABLE_DISABLE_VALUE);
1756 DCHECK_LT(index, num_choices);
1757 return std::string(internal_name) + testing::kMultiSeparator +
1758 base::IntToString(index);
1759}
1760
1761string16 Experiment::DescriptionForChoice(int index) const {
1762 DCHECK(type == Experiment::MULTI_VALUE ||
1763 type == Experiment::ENABLE_DISABLE_VALUE);
1764 DCHECK_LT(index, num_choices);
1765 int description_id;
1766 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1767 const int kEnableDisableDescriptionIds[] = {
1768 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1769 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1770 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1771 };
1772 description_id = kEnableDisableDescriptionIds[index];
1773 } else {
1774 description_id = choices[index].description_id;
1775 }
1776 return l10n_util::GetStringUTF16(description_id);
1777}
1778
[email protected]e6d1c4f2013-06-12 17:37:401779void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1780 CommandLine* command_line) {
1781 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1782 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051783}
1784
[email protected]6d98abf2013-06-17 23:35:511785bool AreSwitchesIdenticalToCurrentCommandLine(
1786 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1787 std::set<CommandLine::StringType> new_flags =
1788 ExtractFlagsFromCommandLine(new_cmdline);
1789 std::set<CommandLine::StringType> active_flags =
1790 ExtractFlagsFromCommandLine(active_cmdline);
1791
1792 // Needed because std::equal doesn't check if the 2nd set is empty.
1793 if (new_flags.size() != active_flags.size())
1794 return false;
1795
1796 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1797}
1798
[email protected]e6d1c4f2013-06-12 17:37:401799void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521800 FlagAccess access,
1801 base::ListValue* supported_experiments,
1802 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051803 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401804 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051805
1806 int current_platform = GetCurrentPlatform();
1807
[email protected]a314ee5a2010-10-26 21:23:281808 for (size_t i = 0; i < num_experiments; ++i) {
1809 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051810
1811 DictionaryValue* data = new DictionaryValue();
1812 data->SetString("internal_name", experiment.internal_name);
1813 data->SetString("name",
1814 l10n_util::GetStringUTF16(experiment.visible_name_id));
1815 data->SetString("description",
1816 l10n_util::GetStringUTF16(
1817 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401818
1819 ListValue* supported_platforms = new ListValue();
1820 AddOsStrings(experiment.supported_platforms, supported_platforms);
1821 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051822
[email protected]28e35af2011-02-09 12:56:221823 switch (experiment.type) {
1824 case Experiment::SINGLE_VALUE:
1825 data->SetBoolean(
1826 "enabled",
1827 enabled_experiments.count(experiment.internal_name) > 0);
1828 break;
1829 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441830 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221831 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1832 break;
1833 default:
1834 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191835 }
1836
[email protected]ee28495a2013-05-20 04:10:521837 bool supported = (experiment.supported_platforms & current_platform) != 0;
1838#if defined(OS_CHROMEOS)
1839 if (access == kOwnerAccessToFlags &&
1840 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1841 supported = true;
1842 }
1843#endif
1844 if (supported)
1845 supported_experiments->Append(data);
1846 else
1847 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051848 }
[email protected]ad2a3ded2010-08-27 13:19:051849}
1850
[email protected]ad2a3ded2010-08-27 13:19:051851bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551852 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051853}
1854
[email protected]e6d1c4f2013-06-12 17:37:401855void SetExperimentEnabled(FlagsStorage* flags_storage,
1856 const std::string& internal_name,
1857 bool enable) {
1858 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1859 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071860}
1861
1862void RemoveFlagsSwitches(
1863 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551864 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071865}
1866
[email protected]e6d1c4f2013-06-12 17:37:401867void ResetAllFlags(FlagsStorage* flags_storage) {
1868 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001869}
1870
[email protected]a314ee5a2010-10-26 21:23:281871int GetCurrentPlatform() {
1872#if defined(OS_MACOSX)
1873 return kOsMac;
1874#elif defined(OS_WIN)
1875 return kOsWin;
1876#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1877 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211878#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281879 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401880#elif defined(OS_ANDROID)
1881 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281882#else
1883#error Unknown platform
1884#endif
1885}
1886
[email protected]e6d1c4f2013-06-12 17:37:401887void RecordUMAStatistics(FlagsStorage* flags_storage) {
1888 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541889 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1890 ++it) {
1891 std::string action("AboutFlags_");
1892 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381893 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541894 }
1895 // Since flag metrics are recorded every startup, add a tick so that the
1896 // stats can be made meaningful.
1897 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381898 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1899 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541900}
1901
[email protected]e2ddbc92010-10-15 20:02:071902//////////////////////////////////////////////////////////////////////////////
1903// FlagsState implementation.
1904
1905namespace {
1906
[email protected]83e9fa702013-02-25 19:30:441907typedef std::map<std::string, std::pair<std::string, std::string> >
1908 NameToSwitchAndValueMap;
1909
1910void SetFlagToSwitchMapping(const std::string& key,
1911 const std::string& switch_name,
1912 const std::string& switch_value,
1913 NameToSwitchAndValueMap* name_to_switch_map) {
1914 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1915 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1916}
1917
[email protected]e2ddbc92010-10-15 20:02:071918void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401919 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071920 if (command_line->HasSwitch(switches::kNoExperiments))
1921 return;
1922
1923 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001924
[email protected]e6d1c4f2013-06-12 17:37:401925 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1926 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071927
[email protected]a82744532011-02-11 16:15:531928 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191929 for (size_t i = 0; i < num_experiments; ++i) {
1930 const Experiment& e = experiments[i];
1931 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441932 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1933 e.command_line_value, &name_to_switch_map);
1934 } else if (e.type == Experiment::MULTI_VALUE) {
1935 for (int j = 0; j < e.num_choices; ++j) {
1936 SetFlagToSwitchMapping(e.NameForChoice(j),
1937 e.choices[j].command_line_switch,
1938 e.choices[j].command_line_value,
1939 &name_to_switch_map);
1940 }
[email protected]8a6ff28d2010-12-02 16:35:191941 } else {
[email protected]83e9fa702013-02-25 19:30:441942 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1943 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1944 &name_to_switch_map);
1945 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1946 e.command_line_value, &name_to_switch_map);
1947 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1948 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191949 }
1950 }
[email protected]e2ddbc92010-10-15 20:02:071951
1952 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531953 flags_switches_.insert(
1954 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1955 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071956 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1957 it != enabled_experiments.end();
1958 ++it) {
1959 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531960 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191961 name_to_switch_map.find(experiment_name);
1962 if (name_to_switch_it == name_to_switch_map.end()) {
1963 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071964 continue;
[email protected]8a6ff28d2010-12-02 16:35:191965 }
[email protected]e2ddbc92010-10-15 20:02:071966
[email protected]a82744532011-02-11 16:15:531967 const std::pair<std::string, std::string>&
1968 switch_and_value_pair = name_to_switch_it->second;
1969
1970 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1971 switch_and_value_pair.second);
1972 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071973 }
1974 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531975 flags_switches_.insert(
1976 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1977 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071978}
1979
1980bool FlagsState::IsRestartNeededToCommitChanges() {
1981 return needs_restart_;
1982}
1983
[email protected]e6d1c4f2013-06-12 17:37:401984void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1985 const std::string& internal_name,
1986 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441987 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191988 if (at_index != std::string::npos) {
1989 DCHECK(enable);
1990 // We're being asked to enable a multi-choice experiment. Disable the
1991 // currently selected choice.
1992 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221993 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:401994 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191995
[email protected]28e35af2011-02-09 12:56:221996 // And enable the new choice, if it is not the default first choice.
1997 if (internal_name != experiment_name + "@0") {
1998 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401999 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082000 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402001 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222002 }
[email protected]8a6ff28d2010-12-02 16:35:192003 return;
2004 }
2005
[email protected]ad2a3ded2010-08-27 13:19:052006 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402007 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052008
[email protected]8a6ff28d2010-12-02 16:35:192009 const Experiment* e = NULL;
2010 for (size_t i = 0; i < num_experiments; ++i) {
2011 if (experiments[i].internal_name == internal_name) {
2012 e = experiments + i;
2013 break;
2014 }
2015 }
2016 DCHECK(e);
2017
2018 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592019 if (enable)
[email protected]147492b2013-03-19 23:52:082020 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592021 else
[email protected]147492b2013-03-19 23:52:082022 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192023 } else {
2024 if (enable) {
2025 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082026 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192027 } else {
2028 // Find the currently enabled choice and disable it.
2029 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442030 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192031 if (enabled_experiments.find(choice_name) !=
2032 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082033 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192034 enabled_experiments.erase(choice_name);
2035 // Continue on just in case there's a bug and more than one
2036 // experiment for this choice was enabled.
2037 }
2038 }
2039 }
2040 }
[email protected]ad2a3ded2010-08-27 13:19:052041
[email protected]e6d1c4f2013-06-12 17:37:402042 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052043}
2044
[email protected]e2ddbc92010-10-15 20:02:072045void FlagsState::RemoveFlagsSwitches(
2046 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532047 for (std::map<std::string, std::string>::const_iterator
2048 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2049 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072050 }
2051}
2052
[email protected]e6d1c4f2013-06-12 17:37:402053void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002054 needs_restart_ = true;
2055
2056 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402057 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002058}
2059
[email protected]e2ddbc92010-10-15 20:02:072060void FlagsState::reset() {
2061 needs_restart_ = false;
2062 flags_switches_.clear();
2063}
2064
[email protected]38e46812011-05-09 20:49:222065} // namespace
[email protected]e2ddbc92010-10-15 20:02:072066
2067namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192068
2069// WARNING: '@' is also used in the html file. If you update this constant you
2070// also need to update the html file.
2071const char kMultiSeparator[] = "@";
2072
[email protected]e2ddbc92010-10-15 20:02:072073void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552074 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072075}
[email protected]a314ee5a2010-10-26 21:23:282076
2077void SetExperiments(const Experiment* e, size_t count) {
2078 if (!e) {
2079 experiments = kExperiments;
2080 num_experiments = arraysize(kExperiments);
2081 } else {
2082 experiments = e;
2083 num_experiments = count;
2084 }
2085}
2086
[email protected]8a6ff28d2010-12-02 16:35:192087const Experiment* GetExperiments(size_t* count) {
2088 *count = num_experiments;
2089 return experiments;
2090}
2091
[email protected]e2ddbc92010-10-15 20:02:072092} // namespace testing
2093
[email protected]1a47d7e2010-10-15 00:37:242094} // namespace about_flags