blob: 9ec9a29e9844757f24ca733fd8117bb10b70f0f8 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4115#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2016#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5218#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4019#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1022#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3823#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0224#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0227#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1728#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5929#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4830#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2731#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2432#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5633#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2434#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5635
[email protected]dc04be7c2012-03-15 23:57:4936#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3137#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4938#endif
39
[email protected]badba1ad2012-11-16 17:21:4640#if defined(OS_CHROMEOS)
41#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5142#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4643#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]6d98abf2013-06-17 23:35:5188// Convert switch constants to proper CommandLine::StringType strings.
89CommandLine::StringType GetSwitchString(const std::string& flag) {
90 CommandLine cmd_line(CommandLine::NO_PROGRAM);
91 cmd_line.AppendSwitch(flag);
92 DCHECK(cmd_line.argv().size() == 2);
93 return cmd_line.argv()[1];
94}
95
96// Scoops flags from a command line.
97std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
98 const CommandLine& cmdline) {
99 std::set<CommandLine::StringType> flags;
100 // First do the ones between --flag-switches-begin and --flag-switches-end.
101 CommandLine::StringVector::const_iterator first =
102 std::find(cmdline.argv().begin(), cmdline.argv().end(),
103 GetSwitchString(switches::kFlagSwitchesBegin));
104 CommandLine::StringVector::const_iterator last =
105 std::find(cmdline.argv().begin(), cmdline.argv().end(),
106 GetSwitchString(switches::kFlagSwitchesEnd));
107 if (first != cmdline.argv().end() && last != cmdline.argv().end())
108 flags.insert(first + 1, last);
109#if defined(OS_CHROMEOS)
110 // Then add those between --policy-switches-begin and --policy-switches-end.
111 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
112 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
113 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
115 if (first != cmdline.argv().end() && last != cmdline.argv().end())
116 flags.insert(first + 1, last);
117#endif
118 return flags;
119}
120
[email protected]128dc6c2012-06-22 20:30:35121const Experiment::Choice
122 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
123 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
124 "",
125 "" },
126 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
127 switches::kOmniboxHistoryQuickProviderReorderForInlining,
128 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
129 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
130 switches::kOmniboxHistoryQuickProviderReorderForInlining,
131 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
132};
133
[email protected]032d5e6c2012-02-17 17:53:55134const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
135 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
136 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
137 switches::kOmniboxInlineHistoryQuickProvider,
138 switches::kOmniboxInlineHistoryQuickProviderAllowed },
139 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
140 switches::kOmniboxInlineHistoryQuickProvider,
141 switches::kOmniboxInlineHistoryQuickProviderProhibited }
142};
143
[email protected]fb854192013-02-06 01:30:04144const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
146 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
147 switches::kEnableCompositingForFixedPosition, ""},
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
149 switches::kDisableCompositingForFixedPosition, ""},
150 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
151 switches::kEnableHighDpiCompositingForFixedPosition, ""}
152};
153
[email protected]d8221b22013-05-23 05:35:43154const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
155 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
157 switches::kEnableCompositingForTransition, ""},
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
159 switches::kDisableCompositingForTransition, ""},
160};
161
[email protected]8b1c3c72013-01-25 01:48:43162const Experiment::Choice kGDIPresentChoices[] = {
163 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
164 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
165 switches::kDoFirstShowPresentWithGDI, ""},
166 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
167 switches::kDoAllShowPresentWithGDI, ""}
168};
169
[email protected]d7932532012-11-21 21:10:31170const Experiment::Choice kTouchEventsChoices[] = {
171 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
172 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
173 switches::kTouchEvents,
174 switches::kTouchEventsEnabled },
175 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
176 switches::kTouchEvents,
177 switches::kTouchEventsDisabled }
178};
179
[email protected]347a0c72012-05-14 20:28:06180const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31181 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20182 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06183 switches::kTouchOptimizedUI,
184 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20185 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06186 switches::kTouchOptimizedUI,
187 switches::kTouchOptimizedUIDisabled }
188};
189
[email protected]66f409c2012-10-04 20:59:04190const Experiment::Choice kNaClDebugMaskChoices[] = {
191 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
192 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
193 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
194 // an option to switch off its debugging.
195 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
196 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
197 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
198 switches::kNaClDebugMask, "*://*/*debug.nmf" }
199};
200
[email protected]ea2f3342012-09-21 21:13:36201#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02202
203const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24204 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02205 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24206 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19207 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24208 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02209};
[email protected]a78c7432013-03-13 06:22:43210
[email protected]ea2f3342012-09-21 21:13:36211#endif
212
[email protected]9323fdd12013-02-23 00:31:36213const Experiment::Choice kImplSidePaintingChoices[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
215 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
216 cc::switches::kEnableImplSidePainting, ""},
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
218 cc::switches::kDisableImplSidePainting, ""}
219};
220
[email protected]a42c85f2013-04-04 18:15:12221const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
223 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
224 cc::switches::kMaxTilesForInterestArea, "64"},
225 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
226 cc::switches::kMaxTilesForInterestArea, "128"},
227 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
228 cc::switches::kMaxTilesForInterestArea, "256"},
229 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
230 cc::switches::kMaxTilesForInterestArea, "512"}
231};
232
[email protected]a3618122013-04-26 21:15:34233const Experiment::Choice kDefaultTileWidthChoices[] = {
234 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
235 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
236 switches::kDefaultTileWidth, "128"},
237 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
238 switches::kDefaultTileWidth, "256"},
239 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
240 switches::kDefaultTileWidth, "512"},
241 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
242 switches::kDefaultTileWidth, "1024"}
243};
244
245const Experiment::Choice kDefaultTileHeightChoices[] = {
246 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
247 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
248 switches::kDefaultTileHeight, "128"},
249 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
250 switches::kDefaultTileHeight, "256"},
251 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
252 switches::kDefaultTileHeight, "512"},
253 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
254 switches::kDefaultTileHeight, "1024"}
255};
256
[email protected]38484df12013-04-10 16:42:03257const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21258 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
259 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
260 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03261 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
262 switches::kUseSimpleCacheBackend, "on"}
263};
264
[email protected]910ecfe2013-06-03 23:38:14265const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
266 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
267 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
268 switches::kTabCaptureUpscaleQuality, "fast" },
269 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
270 switches::kTabCaptureUpscaleQuality, "good" },
271 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
272 switches::kTabCaptureUpscaleQuality, "best" },
273};
274
275const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
276 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
277 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
278 switches::kTabCaptureDownscaleQuality, "fast" },
279 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
280 switches::kTabCaptureDownscaleQuality, "good" },
281 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
282 switches::kTabCaptureDownscaleQuality, "best" },
283};
284
[email protected]4bc5050c2010-11-18 17:55:54285// RECORDING USER METRICS FOR FLAGS:
286// -----------------------------------------------------------------------------
287// The first line of the experiment is the internal name. If you'd like to
288// gather statistics about the usage of your flag, you should append a marker
289// comment to the end of the feature name, like so:
290// "my-special-feature", // FLAGS:RECORD_UMA
291//
292// After doing that, run //chrome/tools/extract_actions.py (see instructions at
293// the top of that file for details) to update the chromeactions.txt file, which
294// will enable UMA to record your feature flag.
295//
[email protected]783d5bb2012-10-24 03:47:14296// After your feature has shipped under a flag, you can locate the metrics under
297// the action name AboutFlags_internal-action-name. Actions are recorded once
298// per startup, so you should divide this number by AboutFlags_StartupTick to
299// get a sense of usage. Note that this will not be the same as number of users
300// with a given feature enabled because users can quit and relaunch the
301// application multiple times over a given time interval. The dashboard also
302// shows you how many (metrics reporting) users have enabled the flag over the
303// last seven days. However, note that this is not the same as the number of
304// users who have the flag enabled, since enabling the flag happens once,
305// whereas running with the flag enabled happens until the user flips the flag
306// again.
[email protected]4bc5050c2010-11-18 17:55:54307
[email protected]8a6ff28d2010-12-02 16:35:19308// To add a new experiment add to the end of kExperiments. There are two
309// distinct types of experiments:
310// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
311// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22312// . MULTI_VALUE: a list of choices, the first of which should correspond to a
313// deactivated state for this lab (i.e. no command line option). To specify
314// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
315// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19316// See the documentation of Experiment for details on the fields.
317//
318// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05319const Experiment kExperiments[] = {
320 {
[email protected]aac169d2011-03-18 19:53:03321 "expose-for-tabs", // FLAGS:RECORD_UMA
322 IDS_FLAGS_TABPOSE_NAME,
323 IDS_FLAGS_TABPOSE_DESCRIPTION,
324 kOsMac,
325#if defined(OS_MACOSX)
326 // The switch exists only on OS X.
327 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
328#else
329 SINGLE_VALUE_TYPE("")
330#endif
331 },
332 {
[email protected]4bc5050c2010-11-18 17:55:54333 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05334 IDS_FLAGS_CONFLICTS_CHECK_NAME,
335 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
336 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19337 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05338 },
339 {
[email protected]96c6f4c2011-05-18 19:36:22340 "ignore-gpu-blacklist",
341 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
342 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
343 kOsAll,
344 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
345 },
346 {
[email protected]0110cf112011-07-02 00:39:43347 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22348 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
349 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23350 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44351 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
352 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22353 },
354 {
[email protected]72787e392012-03-23 05:55:43355 "threaded-compositing-mode",
356 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
357 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58358 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44359 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
360 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59361 },
362 {
[email protected]17e27692013-02-06 17:02:09363 "force-accelerated-composited-scrolling",
364 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
365 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
366 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44367 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
368 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09369 },
370 {
[email protected]8b1c3c72013-01-25 01:48:43371 "present-with-GDI",
372 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
373 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
374 kOsWin,
375 MULTI_VALUE_TYPE(kGDIPresentChoices)
376 },
377 {
[email protected]2b608752013-05-01 03:34:36378 "enable-experimental-canvas-features",
379 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
380 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
381 kOsAll,
382 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
383 },
384 {
[email protected]81c64af62012-06-06 20:15:52385 "disable-accelerated-2d-canvas",
386 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
387 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
388 kOsAll,
389 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
390 },
391 {
[email protected]efcde132012-05-30 01:05:18392 "disable-threaded-animation",
393 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
394 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59395 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37396 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59397 },
398 {
[email protected]5963b772011-02-09 22:55:38399 "composited-layer-borders",
400 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
401 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
402 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57403 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38404 },
405 {
[email protected]a8f1eaa2011-03-07 19:00:58406 "show-fps-counter",
407 IDS_FLAGS_SHOW_FPS_COUNTER,
408 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
409 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57410 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58411 },
[email protected]8ff7f342011-05-25 01:49:47412 {
[email protected]70c98a332011-12-21 20:51:52413 "accelerated-filters",
414 IDS_FLAGS_ACCELERATED_FILTERS,
415 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
416 kOsAll,
417 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
418 },
419 {
[email protected]8ff7f342011-05-25 01:49:47420 "disable-gpu-vsync",
421 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
422 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56423 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47424 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
425 },
[email protected]deaba6d52011-09-23 14:47:12426 {
[email protected]4052d832013-01-16 05:31:01427 "enable-webgl",
428 IDS_FLAGS_ENABLE_WEBGL_NAME,
429 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
430 kOsAndroid,
431#if defined(OS_ANDROID)
432 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
433#else
434 SINGLE_VALUE_TYPE("")
435#endif
436 },
437 {
[email protected]deaba6d52011-09-23 14:47:12438 "disable-webgl",
439 IDS_FLAGS_DISABLE_WEBGL_NAME,
440 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56441 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01442#if defined(OS_ANDROID)
443 SINGLE_VALUE_TYPE("")
444#else
[email protected]deaba6d52011-09-23 14:47:12445 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01446#endif
[email protected]deaba6d52011-09-23 14:47:12447 },
[email protected]09096e02012-05-24 11:12:04448 {
[email protected]ce585bf2013-03-14 16:25:16449 "disable-webrtc",
450 IDS_FLAGS_DISABLE_WEBRTC_NAME,
451 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05452 kOsAndroid,
453#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16454 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05455#else
456 SINGLE_VALUE_TYPE("")
457#endif
458 },
[email protected]5e2bc8c2013-05-28 22:59:57459#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30460 {
461 "enable-sctp-data-channels",
462 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
463 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
464 kOsAll,
465 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
466 },
[email protected]5e2bc8c2013-05-28 22:59:57467#endif
[email protected]34cb5292013-04-15 06:06:31468#if defined(OS_ANDROID)
469 {
[email protected]7b8a31632013-06-13 22:42:37470 "disable-webaudio",
471 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
472 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31473 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37474 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31475 },
476#endif
[email protected]d9da9582013-01-31 04:59:05477 {
[email protected]96bcdc102012-05-24 23:42:10478 "fixed-position-creates-stacking-context",
479 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
480 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
481 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44482 ENABLE_DISABLE_VALUE_TYPE(
483 switches::kEnableFixedPositionCreatesStackingContext,
484 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10485 },
[email protected]fb854192013-02-06 01:30:04486 {
487 "enable-compositing-for-fixed-position",
488 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
489 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
490 kOsAll,
491 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
492 },
[email protected]d8221b22013-05-23 05:35:43493 {
494 "enable-compositing-for-transition",
495 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
496 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
497 kOsAll,
498 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
499 },
[email protected]a7640ef22012-10-06 00:52:08500 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53501 {
[email protected]e3791ce92011-08-09 01:03:32502 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40503 IDS_FLAGS_ENABLE_NACL_NAME,
504 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56505 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19506 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40507 },
508 {
[email protected]9addd1c2012-09-15 14:28:24509 "enable-nacl-debug", // FLAGS:RECORD_UMA
510 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
511 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56512 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24513 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13514 },
515 {
[email protected]66f409c2012-10-04 20:59:04516 "nacl-debug-mask", // FLAGS:RECORD_UMA
517 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
518 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56519 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04520 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
521 },
522 {
[email protected]7babd1c2012-08-08 20:35:29523 "enable-pnacl", // FLAGS:RECORD_UMA
524 IDS_FLAGS_ENABLE_PNACL_NAME,
525 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56526 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29527 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
528 },
529 {
[email protected]4bc5050c2010-11-18 17:55:54530 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32531 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
532 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56533 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19534 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32535 },
[email protected]3627b06d2010-11-12 16:36:16536 {
[email protected]ac2e2acd2013-03-21 12:57:29537 "extensions-on-chrome-urls",
538 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
539 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
540 kOsAll,
541 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
542 },
543 {
[email protected]e9cddd52013-03-23 17:37:53544 "enable-adview",
545 IDS_FLAGS_ENABLE_ADVIEW_NAME,
546 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
547 kOsDesktop,
548 SINGLE_VALUE_TYPE(switches::kEnableAdview)
549 },
550 {
551 "enable-adview-src-attribute",
552 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
553 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
554 kOsDesktop,
555 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
556 },
557 {
[email protected]1f4da9e2013-06-27 05:23:44558 "enable-app-window-controls",
559 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
560 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
561 kOsDesktop,
562 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
563 },
564 {
[email protected]544471a2012-10-13 05:27:09565 "action-box",
[email protected]cab18ef2012-04-27 07:22:03566 IDS_FLAGS_ACTION_BOX_NAME,
567 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56568 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44569 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
570 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03571 },
572 {
[email protected]3a362432012-06-18 20:39:51573 "script-badges",
574 IDS_FLAGS_SCRIPT_BADGES_NAME,
575 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56576 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09577 SINGLE_VALUE_TYPE(switches::kScriptBadges)
578 },
579 {
580 "script-bubble",
581 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
582 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56583 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44584 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
585 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51586 },
587 {
[email protected]cbe224d2011-08-04 22:12:49588 "apps-new-install-bubble",
589 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
590 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56591 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49592 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
593 },
594 {
[email protected]80bd24e2010-11-30 09:34:38595 "disable-hyperlink-auditing",
596 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
597 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
598 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19599 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51600 },
601 {
602 "experimental-location-features", // FLAGS:RECORD_UMA
603 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
604 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
605 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19606 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
607 },
608 {
[email protected]5aea1862011-03-23 23:55:39609 "tab-groups-context-menu",
610 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
611 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
612 kOsWin,
613 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
614 },
[email protected]c94cebd2012-06-21 00:55:28615 {
616 "enable-instant-extended-api",
617 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
618 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46619 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51620 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
621 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28622 },
[email protected]e9bf9d92011-03-31 20:57:15623 {
[email protected]8cc9e532013-05-06 21:01:47624 "enable-local-first-load-ntp",
625 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
626 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46627 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47628 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
629 switches::kDisableLocalFirstLoadNTP)
630 },
631 {
[email protected]07fd48a2013-04-13 02:53:27632 "enable-local-only-instant-extended-api",
633 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
634 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46635 kOsMac | kOsWin | kOsCrOS,
[email protected]07fd48a2013-04-13 02:53:27636 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
637 switches::kDisableLocalOnlyInstantExtendedAPI)
638 },
639 {
[email protected]354e33b2011-06-15 00:29:10640 "static-ip-config",
641 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
642 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
643 kOsCrOS,
644#if defined(OS_CHROMEOS)
645 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24646 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10647#else
648 SINGLE_VALUE_TYPE("")
649#endif
650 },
[email protected]3eb5728c2011-06-20 22:32:24651 {
652 "show-autofill-type-predictions",
653 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
654 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
655 kOsAll,
[email protected]e217c5632013-04-12 19:11:48656 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24657 },
[email protected]bff4d3e2011-06-21 23:58:52658 {
[email protected]a5e9faa2013-03-19 09:58:38659 "enable-sync-favicons",
660 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
661 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55662 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38663 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55664 },
665 {
[email protected]e755a382012-09-13 17:16:35666 "enable-gesture-tap-highlight",
667 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
668 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
669 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47670 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
671 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35672 },
673 {
[email protected]a22ebd812011-06-23 00:05:39674 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
675 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
676 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
677 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40678 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25679 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39680 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
681 },
[email protected]81a6b0b2011-06-24 17:55:40682 {
[email protected]128dc6c2012-06-22 20:30:35683 "omnibox-history-quick-provider-reorder-for-inlining",
684 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
685 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
686 kOsAll,
687 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
688 },
689 {
[email protected]032d5e6c2012-02-17 17:53:55690 "omnibox-inline-history-quick-provider",
691 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
692 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
693 kOsAll,
694 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
695 },
696 {
[email protected]7e7a28092011-12-09 22:24:55697 "enable-panels",
698 IDS_FLAGS_ENABLE_PANELS_NAME,
699 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56700 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55701 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54702 },
[email protected]e3749d12011-07-25 22:22:12703 {
[email protected]27c14f02012-06-22 17:29:58704 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27705 "save-page-as-mhtml", // FLAGS:RECORD_UMA
706 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
707 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
708 kOsMac | kOsWin | kOsLinux,
709 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
710 },
711 {
[email protected]b7bb44f2011-09-01 05:17:03712 "enable-autologin",
713 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
714 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
715 kOsMac | kOsWin | kOsLinux,
716 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
717 },
[email protected]b9841172011-09-26 23:36:09718 {
[email protected]903e63382013-06-01 00:40:58719 "enable-quic",
720 IDS_FLAGS_ENABLE_QUIC_NAME,
721 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
722 kOsAll,
723 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
724 switches::kDisableQuic)
725 },
726 {
[email protected]27b3fe92012-03-21 05:35:06727 "enable-async-dns",
728 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
729 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46730 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44731 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
732 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06733 },
[email protected]85dd7ca2013-05-30 23:53:00734#if defined(ANDROID) && !defined(GOOGLE_TV)
735 {
736 "enable-media-source",
737 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
738 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
739 kOsAll,
740 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
741 },
742#else
[email protected]27b3fe92012-03-21 05:35:06743 {
[email protected]1eb93802012-09-11 18:57:56744 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31745 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
746 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32747 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31748 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44749 },
[email protected]85dd7ca2013-05-30 23:53:00750#endif
[email protected]e4e68dbb2011-11-18 01:50:22751 {
[email protected]16c242d2013-05-31 23:56:47752 "enable-encrypted-media",
753 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
754 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56755 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47756 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
757 },
758 {
759 "disable-encrypted-media",
760 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
761 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
762 kOsDesktop,
763 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03764 },
[email protected]f88628792012-12-18 07:07:50765 {
[email protected]d21ead42013-06-24 06:35:06766 "override-encrypted-media-canplaytype",
767 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
768 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
769 kOsMac | kOsWin,
770 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
771 },
772 {
[email protected]f88628792012-12-18 07:07:50773 "enable-opus-playback",
774 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
775 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56776 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50777 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
778 },
[email protected]b150b5532013-06-15 00:50:54779 {
[email protected]6ac955b2013-04-19 23:43:32780 "enable-vp8-alpha-playback",
781 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
782 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
783 kOsDesktop,
784 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
785 },
786 {
[email protected]ca6eaa5a2013-01-24 16:16:04787 "enable-managed-users",
788 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
789 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08790 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04791 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
792 },
[email protected]dc04be7c2012-03-15 23:57:49793#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50794 {
[email protected]2a13a9a2013-04-19 04:00:21795 "ash-disable-auto-maximizing",
796 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
797 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
798 kOsWin | kOsLinux | kOsCrOS,
799 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
800 },
801 {
[email protected]cda278d2012-10-30 20:31:40802 "ash-disable-auto-window-placement",
803 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
804 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
805 kOsWin | kOsLinux | kOsCrOS,
806 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
807 },
[email protected]b4e4ec42012-11-29 21:42:40808 {
[email protected]16f55a22013-02-13 23:47:34809 "ash-disable-per-app-launcher",
810 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
811 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40812 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34813 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40814 },
[email protected]dc04be7c2012-03-15 23:57:49815#endif
[email protected]eaae8b462012-01-20 22:20:39816 {
[email protected]db543d322011-12-15 20:40:15817 "per-tile-painting",
818 IDS_FLAGS_PER_TILE_PAINTING_NAME,
819 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37820 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37821 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15822 },
[email protected]bf88c032011-12-22 19:05:47823 {
824 "enable-javascript-harmony",
825 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
826 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
827 kOsAll,
828 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
829 },
[email protected]7e7f378a2012-01-05 14:35:37830 {
[email protected]85646172012-01-09 22:45:54831 "enable-tab-browser-dragging",
832 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
833 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
834 kOsWin,
835 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
836 },
837 {
[email protected]068b7b52012-02-27 12:41:44838 "disable-restore-session-state",
839 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
840 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37841 kOsAll,
[email protected]068b7b52012-02-27 12:41:44842 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37843 },
[email protected]88864db2012-01-18 20:56:35844 {
845 "disable-software-rasterizer",
846 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
847 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
848#if defined(ENABLE_SWIFTSHADER)
849 kOsAll,
850#else
851 0,
852#endif
853 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
854 },
[email protected]15a5d722012-01-23 09:11:14855 {
[email protected]ff7b6dd2012-09-15 20:20:03856 "enable-experimental-webkit-features",
857 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
858 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16859 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03860 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49861 },
862 {
[email protected]0f95a252012-09-13 22:30:04863 "enable-css-shaders",
864 IDS_FLAGS_CSS_SHADERS_NAME,
865 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
866 kOsAll,
867 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
868 },
869 {
[email protected]3e8befc2012-03-13 01:17:03870 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16871 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
872 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56873 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03874 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16875 },
[email protected]dc04be7c2012-03-15 23:57:49876#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01877 {
[email protected]3cd198a22012-03-12 20:38:01878 "enable-ash-oak",
879 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
880 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
881 kOsAll,
882 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
883 },
[email protected]31cf1c52012-02-29 20:55:01884#endif
[email protected]184ec592012-03-01 11:54:28885 {
886 "enable-devtools-experiments",
887 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
888 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56889 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28890 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
891 },
[email protected]76d1854e2012-03-02 23:57:44892 {
[email protected]2fefdb32013-02-26 14:28:10893 "silent-debugger-extension-api",
894 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
895 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
896 kOsDesktop,
897 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
898 },
899 {
[email protected]76d1854e2012-03-02 23:57:44900 "enable-suggestions-ntp",
901 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
902 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56903 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44904 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
905 },
[email protected]a3d54252012-04-05 20:04:13906 {
[email protected]1dbaf5e2012-11-30 05:51:32907 "spellcheck-autocorrect",
908 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
909 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
910 kOsWin | kOsLinux | kOsCrOS,
911 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
912 },
913 {
[email protected]e27137282013-06-20 02:38:35914 "enable-scroll-prediction",
915 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
916 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
917 kOsDesktop,
918 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
919 },
920 {
[email protected]d7932532012-11-21 21:10:31921 "touch-events",
922 IDS_TOUCH_EVENTS_NAME,
923 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56924 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31925 MULTI_VALUE_TYPE(kTouchEventsChoices)
926 },
927 {
[email protected]c9c73ad42012-04-18 03:35:59928 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06929 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
930 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55931 kOsWin,
[email protected]347a0c72012-05-14 20:28:06932 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59933 },
[email protected]8a6aaa72012-04-20 20:53:58934 {
[email protected]b9c96ff2012-11-26 22:24:40935 "disable-touch-adjustment",
936 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
937 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
938 kOsWin | kOsLinux | kOsCrOS,
939 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
940 },
941 {
[email protected]0b9383a2012-10-26 00:58:16942 "enable-tab-capture",
943 IDS_ENABLE_TAB_CAPTURE_NAME,
944 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25945 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44946 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
947 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16948 },
[email protected]0b60afa2012-04-19 17:36:39949#if defined(OS_CHROMEOS)
950 {
[email protected]690de0f2013-06-26 00:51:16951 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31952 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
953 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
954 kOsCrOS,
955 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
956 },
957 {
[email protected]7c4a9bc2012-09-11 22:10:05958 "enable-background-loader",
959 IDS_ENABLE_BACKLOADER_NAME,
960 IDS_ENABLE_BACKLOADER_DESCRIPTION,
961 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24962 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05963 },
964 {
[email protected]3f4181a2013-02-01 21:31:07965 "enable-screensaver-extension",
966 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
967 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
968 kOsCrOS,
969 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
970 },
971 {
[email protected]0b60afa2012-04-19 17:36:39972 "no-discard-tabs",
973 IDS_FLAGS_NO_DISCARD_TABS_NAME,
974 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
975 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24976 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39977 },
978#endif
[email protected]79be6d32012-04-24 20:47:44979 {
[email protected]8d68a3e02013-01-12 15:57:10980 "enable-download-resumption",
981 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
982 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56983 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10984 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
985 },
986 {
[email protected]9a5940d2012-04-27 19:16:23987 "allow-nacl-socket-api",
988 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
989 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56990 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23991 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
992 },
[email protected]85333732012-05-01 19:02:24993 {
[email protected]60673ad72012-05-02 06:16:33994 "stacked-tab-strip",
995 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
996 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
997 kOsWin,
998 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
999 },
1000 {
[email protected]4bd20202012-06-14 17:35:011001 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241002 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1003 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1004 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011005 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241006 },
[email protected]190349fd2012-05-02 00:10:471007#if defined(OS_CHROMEOS)
1008 {
1009 "allow-touchpad-three-finger-click",
1010 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1011 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1012 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241013 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471014 },
[email protected]fbc176b62012-10-27 02:19:581015 {
1016 "allow-touchpad-three-finger-swipe",
1017 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
1018 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
1019 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241020 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:581021 },
[email protected]190349fd2012-05-02 00:10:471022#endif
[email protected]1992a2f42012-10-23 18:32:211023 {
[email protected]8ee02242012-12-04 15:23:321024 "enable-desktop-guest-mode",
1025 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1026 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1027 kOsMac | kOsWin | kOsLinux,
1028 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1029 },
[email protected]53520b1b2012-05-07 21:43:371030#if defined(USE_ASH)
1031 {
[email protected]8257d382013-03-26 13:08:421032 "show-launcher-alignment-menu",
1033 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1034 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421035 kOsAll,
[email protected]8257d382013-03-26 13:08:421036 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421037 },
1038 {
[email protected]2ddf37b2013-04-20 01:15:581039 "disable-minimize-on-second-launcher-item-click",
1040 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1041 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1042 kOsAll,
1043 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1044 },
1045 {
[email protected]73074742012-05-17 01:44:411046 "show-touch-hud",
1047 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1048 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1049 kOsAll,
1050 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1051 },
1052 {
[email protected]9f0940b62012-05-23 22:56:351053 "enable-pinch",
1054 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1055 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061056 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381057 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1058 },
1059 {
[email protected]de0aaed2013-05-27 18:16:431060 "enable-pinch-virtual-viewport",
1061 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1062 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1063 kOsLinux | kOsWin | kOsCrOS,
1064 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1065 },
1066 {
[email protected]a4016f12013-05-02 07:53:471067 "forced-maximize-mode",
1068 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1069 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1070 kOsLinux | kOsWin | kOsCrOS,
1071 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1072 },
[email protected]73074742012-05-17 01:44:411073#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281074#if defined(OS_CHROMEOS)
1075 {
[email protected]8b04a1652012-08-04 02:59:491076 "disable-boot-animation",
1077 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1078 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581079 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241080 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491081 },
[email protected]95058572012-08-20 14:57:291082 {
[email protected]d96aef22012-10-30 11:47:021083 "captive-portal-detector",
1084 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1085 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581086 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021087 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1088 },
1089 {
[email protected]c11aa8f12012-12-18 18:43:141090 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571091 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1092 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1093 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141094 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571095 },
[email protected]f0280952012-11-06 20:30:501096 {
[email protected]53bc4352013-06-24 10:22:371097 "file-manager-show-checkboxes",
1098 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1099 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491100 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371101 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491102 },
1103 {
[email protected]50a3f5a2013-06-24 14:36:151104 "file-manager-enable-sharing",
1105 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_NAME,
1106 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_DESCRIPTION,
1107 kOsCrOS,
1108 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableSharing)
1109 },
1110 {
[email protected]c64d7732013-03-25 18:09:501111 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521112 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1113 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581114 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241115 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471116 },
[email protected]6ad015c2013-03-06 00:49:511117 {
[email protected]c64d7732013-03-25 18:09:501118 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521119 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1120 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511121 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521122 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511123 },
[email protected]099b890c2013-04-25 19:16:261124 {
1125 "disable-quickoffice-component-app",
1126 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1127 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1128 kOsCrOS,
1129 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1130 },
[email protected]62018dc2012-12-13 00:37:351131#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391132 {
[email protected]6247aba2013-03-04 22:57:181133 "views-textfield",
1134 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1135 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391136 kOsWin,
[email protected]6247aba2013-03-04 22:57:181137 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1138 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391139 },
[email protected]bd0cd3bb2012-06-14 03:03:381140 {
[email protected]ffbe5782013-05-09 23:22:081141 "new-dialog-style",
1142 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1143 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321144 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081145 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1146 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321147 },
[email protected]7db8893a2012-07-26 00:49:401148 { "disable-accelerated-video-decode",
1149 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1150 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191151 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401152 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151153 },
[email protected]66ae9fc2012-06-19 21:33:521154#if defined(USE_ASH)
1155 {
1156 "ash-debug-shortcuts",
1157 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1158 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1159 kOsAll,
1160 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1161 },
1162#endif
[email protected]37fee0942012-08-07 21:07:451163 {
[email protected]ad3f6d22012-08-29 02:34:191164 "enable-contacts",
1165 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1166 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1167 kOsCrOS,
1168 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1169 },
[email protected]1d9bb9cd2012-08-28 22:02:501170#if defined(USE_ASH)
1171 { "ash-enable-advanced-gestures",
1172 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1173 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1174 kOsCrOS,
1175 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1176 },
[email protected]cfa24e62013-02-13 21:19:111177 { "ash-disable-tab-scrubbing",
1178 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1179 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161180 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111181 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161182 },
[email protected]ad6fcc32013-05-30 03:46:481183 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081184 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1185 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1186 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481187 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081188 },
[email protected]83eef802012-12-02 07:43:521189 { "ash-enable-workspace-scrubbing",
1190 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1191 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1192 kOsCrOS,
1193 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1194 },
[email protected]cf2b1a82013-04-20 01:05:431195 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111196 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1197 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241198 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431199 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1200 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241201 },
[email protected]316708a2012-11-05 22:57:021202#if defined(OS_LINUX)
1203 { "ash-enable-memory-monitor",
1204 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1205 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1206 kOsCrOS,
1207 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1208 },
1209#endif
[email protected]1d9bb9cd2012-08-28 22:02:501210#endif
[email protected]9b7ab882012-09-10 23:46:361211#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131212 { "use-new-network-configuration-handlers",
1213 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1214 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1215 kOsCrOS,
1216 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1217 },
[email protected]ce98ef82013-05-31 22:43:241218 { "use-new-network-connection-handler",
1219 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1220 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1221 kOsCrOS,
1222 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1223 },
[email protected]9b7ab882012-09-10 23:46:361224 {
[email protected]354ff2d2013-05-01 17:06:311225 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121226 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1227 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1228 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311229 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1230 },
1231 {
1232 "ash-audio-device-menu",
1233 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1234 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1235 kOsCrOS,
1236 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121237 },
1238 {
[email protected]205f07892012-10-16 20:26:221239 "enable-carrier-switching",
1240 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1241 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1242 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241243 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221244 },
1245 {
[email protected]9b7ab882012-09-10 23:46:361246 "enable-request-tablet-site",
1247 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1248 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1249 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241250 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361251 },
1252#endif
[email protected]dab49c0b2012-10-04 05:55:351253 {
1254 "debug-packed-apps",
1255 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1256 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561257 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351258 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1259 },
[email protected]d1459ed2012-10-10 01:29:331260 {
1261 "enable-password-generation",
1262 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1263 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561264 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331265 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1266 },
[email protected]26d045f2012-10-18 21:18:431267 {
[email protected]17b9c742013-06-22 13:48:421268 "enable-password-autofill-public-suffix-domain-matching",
1269 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1270 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1271 kOsAndroid,
1272 SINGLE_VALUE_TYPE(
1273 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1274 },
1275 {
[email protected]76f7d4882012-10-26 21:09:221276 "enable-deferred-image-decoding",
1277 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1278 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221279 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221280 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1281 },
1282 {
[email protected]075543d2012-10-24 01:29:141283 "performance-monitor-gathering",
1284 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1285 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1286 kOsAll,
1287 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1288 },
[email protected]783d5bb2012-10-24 03:47:141289 {
[email protected]a7259fb2012-11-08 06:22:231290 "enable-experimental-form-filling",
1291 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1292 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1293 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481294 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231295 },
[email protected]6e6efe42013-01-30 00:04:501296 {
[email protected]db3178c2013-03-21 14:54:541297 "wallet-service-use-prod",
1298 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1299 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1300 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481301 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541302 },
1303 {
[email protected]6e6efe42013-01-30 00:04:501304 "enable-interactive-autocomplete",
1305 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1306 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061307 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171308 ENABLE_DISABLE_VALUE_TYPE(
1309 autofill::switches::kEnableInteractiveAutocomplete,
1310 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501311 },
[email protected]177260c2013-04-24 01:47:381312#if defined(USE_AURA)
1313 {
1314 "overscroll-history-navigation",
1315 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1316 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1317 kOsAll,
1318 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1319 switches::kOverscrollHistoryNavigation, "1",
1320 switches::kOverscrollHistoryNavigation, "0")
1321 },
1322#endif
[email protected]edbea622012-11-28 20:39:381323 {
1324 "enable-touch-drag-drop",
1325 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1326 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1327 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271328 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1329 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381330 },
[email protected]0e2f43b62013-02-21 00:47:151331 {
1332 "enable-touch-editing",
1333 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1334 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1335 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271336 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1337 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151338 },
[email protected]92e12dd92012-12-11 03:33:201339 {
1340 "enable-rich-notifications",
1341 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1342 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001343 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231344 ENABLE_DISABLE_VALUE_TYPE(
1345 message_center::switches::kEnableRichNotifications,
1346 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201347 },
[email protected]4d51c682012-12-11 11:34:551348 {
[email protected]ddec1aa2013-04-28 23:22:451349 "enable-sync-synced-notifications",
1350 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1351 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181352 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451353 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1354 switches::kDisableSyncSyncedNotifications)
1355 },
1356 {
[email protected]a50e16a2013-04-25 14:07:171357 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551358 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1359 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1360 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171361 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551362 },
[email protected]628a69a92012-12-23 04:09:341363 {
[email protected]fd030142013-02-08 02:04:381364 "enable-usermedia-screen-capture",
1365 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1366 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1367 kOsDesktop,
1368 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1369 },
[email protected]5b93e162013-02-19 06:33:091370 {
1371 "enable-apps-devtool-app",
1372 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1373 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1374 kOsDesktop,
1375 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1376 },
[email protected]9323fdd12013-02-23 00:31:361377 {
1378 "impl-side-painting",
1379 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1380 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041381 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361382 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1383 },
[email protected]a42c85f2013-04-04 18:15:121384 {
[email protected]1c92d3e2013-04-18 05:31:391385 "enable-websocket-experimental-implementation",
1386 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1387 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1388 kOsAll,
1389 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1390 },
1391 {
[email protected]a42c85f2013-04-04 18:15:121392 "max-tiles-for-interest-area",
1393 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1394 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1395 kOsAndroid | kOsLinux | kOsCrOS,
1396 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1397 },
[email protected]7cf7ccb2013-04-20 02:53:081398 {
1399 "enable-offline-mode",
1400 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1401 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1402 kOsAll,
1403 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1404 },
[email protected]a3618122013-04-26 21:15:341405 {
1406 "default-tile-width",
1407 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1408 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1409 kOsAll,
1410 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1411 },
1412 {
1413 "default-tile-height",
1414 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1415 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1416 kOsAll,
1417 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1418 },
[email protected]2f2f72b2013-03-08 22:37:311419 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1420#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371421 {
1422 "track-active-visit-time",
1423 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1424 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1425 kOsWin,
1426 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1427 },
[email protected]2f2f72b2013-03-08 22:37:311428#endif
[email protected]8cc71d42013-03-02 17:26:081429#if defined(OS_ANDROID)
1430 {
1431 "disable-gesture-requirement-for-media-playback",
1432 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1433 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1434 kOsAndroid,
1435 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1436 },
1437#endif
[email protected]6077cab2013-03-11 19:36:141438#if defined(ENABLE_GOOGLE_NOW)
1439 {
1440 "enable-google-now",
1441 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1442 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361443 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141444 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1445 },
1446#endif
[email protected]86459e2c2013-04-10 13:39:241447#if defined(OS_CHROMEOS)
1448 {
1449 "enable-virtual-keyboard",
1450 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1451 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1452 kOsCrOS,
1453 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1454 },
1455#endif
[email protected]38484df12013-04-10 16:42:031456 {
1457 "enable-simple-cache-backend",
1458 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1459 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251460 kOsAll,
[email protected]38484df12013-04-10 16:42:031461 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1462 },
[email protected]717e4e22013-04-10 20:52:231463 {
1464 "enable-tcp-fast-open",
1465 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1466 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111467 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231468 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1469 },
[email protected]8027acd2013-04-18 08:35:151470 {
[email protected]58c740f2013-05-06 05:25:441471 "apps-use-native-frame",
1472 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1473 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1474 kOsWin,
1475 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1476 },
[email protected]896d86b32013-05-09 19:36:441477 {
1478 "enable-syncfs-directory-operation",
1479 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1480 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1481 kOsAll,
1482 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1483 },
[email protected]a4ed7e12013-05-24 01:00:281484 {
1485 "enable-draggable-menu-button",
1486 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1487 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1488 kOsAndroid,
1489 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1490 },
[email protected]380532aa2013-05-24 11:59:351491 {
1492 "enable-reset-profile-settings",
1493 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1494 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1495 kOsAll,
1496 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1497 },
[email protected]56d3c6e42013-05-29 11:28:011498#if defined(OS_MACOSX)
1499 {
1500 "enable-app-list-shim",
1501 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1502 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1503 kOsMac,
1504 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1505 },
[email protected]cb29e162013-05-31 07:47:021506 {
1507 "enable-app-shims",
1508 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1509 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1510 kOsMac,
1511 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1512 },
[email protected]67604442013-06-15 00:04:331513 {
1514 "enable-simplified-fullscreen",
1515 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1516 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1517 kOsMac,
1518 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1519 },
[email protected]56d3c6e42013-05-29 11:28:011520#endif
[email protected]13177832013-05-31 07:46:051521#if defined(OS_CHROMEOS) || defined(OS_WIN)
1522 {
1523 "enable-omnibox-auto-completion-for-ime",
1524 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1525 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1526 kOsCrOS,
1527 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1528 },
1529#endif
[email protected]910ecfe2013-06-03 23:38:141530#if defined(USE_AURA)
1531 {
1532 "tab-capture-upscale-quality",
1533 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1534 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1535 kOsAll,
1536 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1537 },
1538 {
1539 "tab-capture-downscale-quality",
1540 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1541 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1542 kOsAll,
1543 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1544 },
1545#endif
[email protected]71d4f602013-06-04 23:21:101546 {
[email protected]5e099c62013-06-08 05:46:231547 "enable-spelling-service-feedback",
1548 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1549 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1550 kOsAll,
1551 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1552 },
1553 {
[email protected]71d4f602013-06-04 23:21:101554 "enable-webgl-draft-extensions",
1555 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1556 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1557 kOsAll,
1558 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1559 },
[email protected]deadc492013-06-07 21:39:281560 {
1561 "high-dpi-support",
1562 IDS_FLAGS_HIDPI_NAME,
1563 IDS_FLAGS_HIDPI_DESCRIPTION,
1564 kOsWin,
1565 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1566 switches::kHighDPISupport,"0")
1567 },
[email protected]77e69a512013-06-08 05:56:451568#if defined(OS_CHROMEOS)
1569 {
1570 "enable-quickoffice-editing",
1571 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1572 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1573 kOsCrOS,
1574 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1575 },
1576#endif
[email protected]82ca4212013-06-11 12:09:171577 {
1578 "enable-translate-settings",
1579 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1580 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1581 kOsAll,
1582 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1583 },
[email protected]a0e4b072011-08-17 01:47:071584};
[email protected]ad2a3ded2010-08-27 13:19:051585
[email protected]a314ee5a2010-10-26 21:23:281586const Experiment* experiments = kExperiments;
1587size_t num_experiments = arraysize(kExperiments);
1588
[email protected]e2ddbc92010-10-15 20:02:071589// Stores and encapsulates the little state that about:flags has.
1590class FlagsState {
1591 public:
1592 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401593 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1594 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071595 bool IsRestartNeededToCommitChanges();
1596 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401597 FlagsStorage* flags_storage,
1598 const std::string& internal_name,
1599 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071600 void RemoveFlagsSwitches(
1601 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401602 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071603 void reset();
1604
1605 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551606 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071607 return Singleton<FlagsState>::get();
1608 }
1609
1610 private:
1611 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531612 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071613
1614 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1615};
1616
[email protected]8a6ff28d2010-12-02 16:35:191617// Adds the internal names for the specified experiment to |names|.
1618void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1619 if (e.type == Experiment::SINGLE_VALUE) {
1620 names->insert(e.internal_name);
1621 } else {
[email protected]83e9fa702013-02-25 19:30:441622 DCHECK(e.type == Experiment::MULTI_VALUE ||
1623 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191624 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441625 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191626 }
1627}
1628
[email protected]28e35af2011-02-09 12:56:221629// Confirms that an experiment is valid, used in a DCHECK in
1630// SanitizeList below.
1631bool ValidateExperiment(const Experiment& e) {
1632 switch (e.type) {
1633 case Experiment::SINGLE_VALUE:
1634 DCHECK_EQ(0, e.num_choices);
1635 DCHECK(!e.choices);
1636 break;
1637 case Experiment::MULTI_VALUE:
1638 DCHECK_GT(e.num_choices, 0);
1639 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531640 DCHECK(e.choices[0].command_line_switch);
1641 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221642 break;
[email protected]83e9fa702013-02-25 19:30:441643 case Experiment::ENABLE_DISABLE_VALUE:
1644 DCHECK_EQ(3, e.num_choices);
1645 DCHECK(!e.choices);
1646 DCHECK(e.command_line_switch);
1647 DCHECK(e.command_line_value);
1648 DCHECK(e.disable_command_line_switch);
1649 DCHECK(e.disable_command_line_value);
1650 break;
[email protected]28e35af2011-02-09 12:56:221651 default:
1652 NOTREACHED();
1653 }
1654 return true;
1655}
1656
[email protected]ad2a3ded2010-08-27 13:19:051657// Removes all experiments from prefs::kEnabledLabsExperiments that are
1658// unknown, to prevent this list to become very long as experiments are added
1659// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401660void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051661 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221662 for (size_t i = 0; i < num_experiments; ++i) {
1663 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191664 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221665 }
[email protected]ad2a3ded2010-08-27 13:19:051666
[email protected]e6d1c4f2013-06-12 17:37:401667 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051668
1669 std::set<std::string> new_enabled_experiments;
1670 std::set_intersection(
1671 known_experiments.begin(), known_experiments.end(),
1672 enabled_experiments.begin(), enabled_experiments.end(),
1673 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1674
[email protected]4c8853f2012-07-23 01:29:161675 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401676 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051677}
1678
[email protected]1a47d7e2010-10-15 00:37:241679void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401680 FlagsStorage* flags_storage, std::set<std::string>* result) {
1681 SanitizeList(flags_storage);
1682 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051683}
1684
[email protected]a314ee5a2010-10-26 21:23:281685// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1686// enabled on the current platform.
1687void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401688 FlagsStorage* flags_storage, std::set<std::string>* result) {
1689 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281690
1691 // Filter out any experiments that aren't enabled on the current platform. We
1692 // don't remove these from prefs else syncing to a platform with a different
1693 // set of experiments would be lossy.
1694 std::set<std::string> platform_experiments;
1695 int current_platform = GetCurrentPlatform();
1696 for (size_t i = 0; i < num_experiments; ++i) {
1697 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191698 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581699#if defined(OS_CHROMEOS)
1700 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1701 AddInternalName(experiments[i], &platform_experiments);
1702#endif
[email protected]a314ee5a2010-10-26 21:23:281703 }
1704
1705 std::set<std::string> new_enabled_experiments;
1706 std::set_intersection(
1707 platform_experiments.begin(), platform_experiments.end(),
1708 result->begin(), result->end(),
1709 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1710
1711 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051712}
1713
[email protected]8a6ff28d2010-12-02 16:35:191714// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191715Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221716 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441717 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1718 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191719 ListValue* result = new ListValue;
1720 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191721 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441722 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191723 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441724 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221725 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191726 result->Append(value);
1727 }
1728 return result;
1729}
1730
[email protected]e2ddbc92010-10-15 20:02:071731} // namespace
1732
[email protected]83e9fa702013-02-25 19:30:441733std::string Experiment::NameForChoice(int index) const {
1734 DCHECK(type == Experiment::MULTI_VALUE ||
1735 type == Experiment::ENABLE_DISABLE_VALUE);
1736 DCHECK_LT(index, num_choices);
1737 return std::string(internal_name) + testing::kMultiSeparator +
1738 base::IntToString(index);
1739}
1740
1741string16 Experiment::DescriptionForChoice(int index) const {
1742 DCHECK(type == Experiment::MULTI_VALUE ||
1743 type == Experiment::ENABLE_DISABLE_VALUE);
1744 DCHECK_LT(index, num_choices);
1745 int description_id;
1746 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1747 const int kEnableDisableDescriptionIds[] = {
1748 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1749 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1750 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1751 };
1752 description_id = kEnableDisableDescriptionIds[index];
1753 } else {
1754 description_id = choices[index].description_id;
1755 }
1756 return l10n_util::GetStringUTF16(description_id);
1757}
1758
[email protected]e6d1c4f2013-06-12 17:37:401759void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1760 CommandLine* command_line) {
1761 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1762 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051763}
1764
[email protected]6d98abf2013-06-17 23:35:511765bool AreSwitchesIdenticalToCurrentCommandLine(
1766 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1767 std::set<CommandLine::StringType> new_flags =
1768 ExtractFlagsFromCommandLine(new_cmdline);
1769 std::set<CommandLine::StringType> active_flags =
1770 ExtractFlagsFromCommandLine(active_cmdline);
1771
1772 // Needed because std::equal doesn't check if the 2nd set is empty.
1773 if (new_flags.size() != active_flags.size())
1774 return false;
1775
1776 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1777}
1778
[email protected]e6d1c4f2013-06-12 17:37:401779void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521780 FlagAccess access,
1781 base::ListValue* supported_experiments,
1782 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051783 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401784 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051785
1786 int current_platform = GetCurrentPlatform();
1787
[email protected]a314ee5a2010-10-26 21:23:281788 for (size_t i = 0; i < num_experiments; ++i) {
1789 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051790
1791 DictionaryValue* data = new DictionaryValue();
1792 data->SetString("internal_name", experiment.internal_name);
1793 data->SetString("name",
1794 l10n_util::GetStringUTF16(experiment.visible_name_id));
1795 data->SetString("description",
1796 l10n_util::GetStringUTF16(
1797 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401798
1799 ListValue* supported_platforms = new ListValue();
1800 AddOsStrings(experiment.supported_platforms, supported_platforms);
1801 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051802
[email protected]28e35af2011-02-09 12:56:221803 switch (experiment.type) {
1804 case Experiment::SINGLE_VALUE:
1805 data->SetBoolean(
1806 "enabled",
1807 enabled_experiments.count(experiment.internal_name) > 0);
1808 break;
1809 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441810 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221811 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1812 break;
1813 default:
1814 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191815 }
1816
[email protected]ee28495a2013-05-20 04:10:521817 bool supported = (experiment.supported_platforms & current_platform) != 0;
1818#if defined(OS_CHROMEOS)
1819 if (access == kOwnerAccessToFlags &&
1820 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1821 supported = true;
1822 }
1823#endif
1824 if (supported)
1825 supported_experiments->Append(data);
1826 else
1827 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051828 }
[email protected]ad2a3ded2010-08-27 13:19:051829}
1830
[email protected]ad2a3ded2010-08-27 13:19:051831bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551832 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051833}
1834
[email protected]e6d1c4f2013-06-12 17:37:401835void SetExperimentEnabled(FlagsStorage* flags_storage,
1836 const std::string& internal_name,
1837 bool enable) {
1838 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1839 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071840}
1841
1842void RemoveFlagsSwitches(
1843 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551844 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071845}
1846
[email protected]e6d1c4f2013-06-12 17:37:401847void ResetAllFlags(FlagsStorage* flags_storage) {
1848 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001849}
1850
[email protected]a314ee5a2010-10-26 21:23:281851int GetCurrentPlatform() {
1852#if defined(OS_MACOSX)
1853 return kOsMac;
1854#elif defined(OS_WIN)
1855 return kOsWin;
1856#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1857 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211858#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281859 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401860#elif defined(OS_ANDROID)
1861 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281862#else
1863#error Unknown platform
1864#endif
1865}
1866
[email protected]e6d1c4f2013-06-12 17:37:401867void RecordUMAStatistics(FlagsStorage* flags_storage) {
1868 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541869 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1870 ++it) {
1871 std::string action("AboutFlags_");
1872 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381873 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541874 }
1875 // Since flag metrics are recorded every startup, add a tick so that the
1876 // stats can be made meaningful.
1877 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381878 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1879 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541880}
1881
[email protected]e2ddbc92010-10-15 20:02:071882//////////////////////////////////////////////////////////////////////////////
1883// FlagsState implementation.
1884
1885namespace {
1886
[email protected]83e9fa702013-02-25 19:30:441887typedef std::map<std::string, std::pair<std::string, std::string> >
1888 NameToSwitchAndValueMap;
1889
1890void SetFlagToSwitchMapping(const std::string& key,
1891 const std::string& switch_name,
1892 const std::string& switch_value,
1893 NameToSwitchAndValueMap* name_to_switch_map) {
1894 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1895 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1896}
1897
[email protected]e2ddbc92010-10-15 20:02:071898void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401899 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071900 if (command_line->HasSwitch(switches::kNoExperiments))
1901 return;
1902
1903 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001904
[email protected]e6d1c4f2013-06-12 17:37:401905 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1906 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071907
[email protected]a82744532011-02-11 16:15:531908 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191909 for (size_t i = 0; i < num_experiments; ++i) {
1910 const Experiment& e = experiments[i];
1911 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441912 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1913 e.command_line_value, &name_to_switch_map);
1914 } else if (e.type == Experiment::MULTI_VALUE) {
1915 for (int j = 0; j < e.num_choices; ++j) {
1916 SetFlagToSwitchMapping(e.NameForChoice(j),
1917 e.choices[j].command_line_switch,
1918 e.choices[j].command_line_value,
1919 &name_to_switch_map);
1920 }
[email protected]8a6ff28d2010-12-02 16:35:191921 } else {
[email protected]83e9fa702013-02-25 19:30:441922 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1923 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1924 &name_to_switch_map);
1925 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1926 e.command_line_value, &name_to_switch_map);
1927 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1928 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191929 }
1930 }
[email protected]e2ddbc92010-10-15 20:02:071931
1932 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531933 flags_switches_.insert(
1934 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1935 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071936 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1937 it != enabled_experiments.end();
1938 ++it) {
1939 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531940 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191941 name_to_switch_map.find(experiment_name);
1942 if (name_to_switch_it == name_to_switch_map.end()) {
1943 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071944 continue;
[email protected]8a6ff28d2010-12-02 16:35:191945 }
[email protected]e2ddbc92010-10-15 20:02:071946
[email protected]a82744532011-02-11 16:15:531947 const std::pair<std::string, std::string>&
1948 switch_and_value_pair = name_to_switch_it->second;
1949
1950 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1951 switch_and_value_pair.second);
1952 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071953 }
1954 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531955 flags_switches_.insert(
1956 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1957 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071958}
1959
1960bool FlagsState::IsRestartNeededToCommitChanges() {
1961 return needs_restart_;
1962}
1963
[email protected]e6d1c4f2013-06-12 17:37:401964void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1965 const std::string& internal_name,
1966 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441967 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191968 if (at_index != std::string::npos) {
1969 DCHECK(enable);
1970 // We're being asked to enable a multi-choice experiment. Disable the
1971 // currently selected choice.
1972 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221973 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:401974 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191975
[email protected]28e35af2011-02-09 12:56:221976 // And enable the new choice, if it is not the default first choice.
1977 if (internal_name != experiment_name + "@0") {
1978 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401979 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081980 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:401981 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:221982 }
[email protected]8a6ff28d2010-12-02 16:35:191983 return;
1984 }
1985
[email protected]ad2a3ded2010-08-27 13:19:051986 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401987 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051988
[email protected]8a6ff28d2010-12-02 16:35:191989 const Experiment* e = NULL;
1990 for (size_t i = 0; i < num_experiments; ++i) {
1991 if (experiments[i].internal_name == internal_name) {
1992 e = experiments + i;
1993 break;
1994 }
1995 }
1996 DCHECK(e);
1997
1998 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591999 if (enable)
[email protected]147492b2013-03-19 23:52:082000 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592001 else
[email protected]147492b2013-03-19 23:52:082002 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192003 } else {
2004 if (enable) {
2005 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082006 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192007 } else {
2008 // Find the currently enabled choice and disable it.
2009 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442010 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192011 if (enabled_experiments.find(choice_name) !=
2012 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082013 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192014 enabled_experiments.erase(choice_name);
2015 // Continue on just in case there's a bug and more than one
2016 // experiment for this choice was enabled.
2017 }
2018 }
2019 }
2020 }
[email protected]ad2a3ded2010-08-27 13:19:052021
[email protected]e6d1c4f2013-06-12 17:37:402022 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052023}
2024
[email protected]e2ddbc92010-10-15 20:02:072025void FlagsState::RemoveFlagsSwitches(
2026 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532027 for (std::map<std::string, std::string>::const_iterator
2028 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2029 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072030 }
2031}
2032
[email protected]e6d1c4f2013-06-12 17:37:402033void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002034 needs_restart_ = true;
2035
2036 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402037 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002038}
2039
[email protected]e2ddbc92010-10-15 20:02:072040void FlagsState::reset() {
2041 needs_restart_ = false;
2042 flags_switches_.clear();
2043}
2044
[email protected]38e46812011-05-09 20:49:222045} // namespace
[email protected]e2ddbc92010-10-15 20:02:072046
2047namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192048
2049// WARNING: '@' is also used in the html file. If you update this constant you
2050// also need to update the html file.
2051const char kMultiSeparator[] = "@";
2052
[email protected]e2ddbc92010-10-15 20:02:072053void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552054 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072055}
[email protected]a314ee5a2010-10-26 21:23:282056
2057void SetExperiments(const Experiment* e, size_t count) {
2058 if (!e) {
2059 experiments = kExperiments;
2060 num_experiments = arraysize(kExperiments);
2061 } else {
2062 experiments = e;
2063 num_experiments = count;
2064 }
2065}
2066
[email protected]8a6ff28d2010-12-02 16:35:192067const Experiment* GetExperiments(size_t* count) {
2068 *count = num_experiments;
2069 return experiments;
2070}
2071
[email protected]e2ddbc92010-10-15 20:02:072072} // namespace testing
2073
[email protected]1a47d7e2010-10-15 00:37:242074} // namespace about_flags