blob: aaeb410477fed11e92b6a47f5c3df85e55b8b95c [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]3853a4c2013-02-11 17:15:5715#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0317#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3820#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
23#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0526#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0227#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0228#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1729#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5930#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4831#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2732#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2433#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5634#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2435#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5636
[email protected]dc04be7c2012-03-15 23:57:4937#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3138#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4939#endif
40
[email protected]badba1ad2012-11-16 17:21:4641#if defined(OS_CHROMEOS)
42#include "chromeos/chromeos_switches.h"
43#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]128dc6c2012-06-22 20:30:3588const Experiment::Choice
89 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
90 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
91 "",
92 "" },
93 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
94 switches::kOmniboxHistoryQuickProviderReorderForInlining,
95 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
96 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
97 switches::kOmniboxHistoryQuickProviderReorderForInlining,
98 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
99};
100
[email protected]032d5e6c2012-02-17 17:53:55101const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
102 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
103 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
104 switches::kOmniboxInlineHistoryQuickProvider,
105 switches::kOmniboxInlineHistoryQuickProviderAllowed },
106 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
107 switches::kOmniboxInlineHistoryQuickProvider,
108 switches::kOmniboxInlineHistoryQuickProviderProhibited }
109};
110
[email protected]fb854192013-02-06 01:30:04111const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
112 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
113 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
114 switches::kEnableCompositingForFixedPosition, ""},
115 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
116 switches::kDisableCompositingForFixedPosition, ""},
117 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
118 switches::kEnableHighDpiCompositingForFixedPosition, ""}
119};
120
[email protected]d8221b22013-05-23 05:35:43121const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
122 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
123 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
124 switches::kEnableCompositingForTransition, ""},
125 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
126 switches::kDisableCompositingForTransition, ""},
127};
128
[email protected]8b1c3c72013-01-25 01:48:43129const Experiment::Choice kGDIPresentChoices[] = {
130 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
131 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
132 switches::kDoFirstShowPresentWithGDI, ""},
133 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
134 switches::kDoAllShowPresentWithGDI, ""}
135};
136
[email protected]d7932532012-11-21 21:10:31137const Experiment::Choice kTouchEventsChoices[] = {
138 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
139 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
140 switches::kTouchEvents,
141 switches::kTouchEventsEnabled },
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
143 switches::kTouchEvents,
144 switches::kTouchEventsDisabled }
145};
146
[email protected]347a0c72012-05-14 20:28:06147const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31148 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20149 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06150 switches::kTouchOptimizedUI,
151 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20152 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06153 switches::kTouchOptimizedUI,
154 switches::kTouchOptimizedUIDisabled }
155};
156
[email protected]66f409c2012-10-04 20:59:04157const Experiment::Choice kNaClDebugMaskChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
159 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
160 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
161 // an option to switch off its debugging.
162 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
163 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
164 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
165 switches::kNaClDebugMask, "*://*/*debug.nmf" }
166};
167
[email protected]ea2f3342012-09-21 21:13:36168#if defined(OS_CHROMEOS)
169const Experiment::Choice kAshBootAnimationFunction[] = {
170 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
171 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
172 ash::switches::kAshBootAnimationFunction2, ""},
173 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
174 ash::switches::kAshBootAnimationFunction3, ""}
175};
[email protected]d96aef22012-10-30 11:47:02176
177const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24178 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02179 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24180 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19181 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24182 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02183};
[email protected]a78c7432013-03-13 06:22:43184
[email protected]ea2f3342012-09-21 21:13:36185#endif
186
[email protected]9323fdd12013-02-23 00:31:36187const Experiment::Choice kImplSidePaintingChoices[] = {
188 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
189 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
190 cc::switches::kEnableImplSidePainting, ""},
191 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
192 cc::switches::kDisableImplSidePainting, ""}
193};
194
[email protected]a42c85f2013-04-04 18:15:12195const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
196 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
197 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
198 cc::switches::kMaxTilesForInterestArea, "64"},
199 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
200 cc::switches::kMaxTilesForInterestArea, "128"},
201 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
202 cc::switches::kMaxTilesForInterestArea, "256"},
203 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
204 cc::switches::kMaxTilesForInterestArea, "512"}
205};
206
[email protected]a3618122013-04-26 21:15:34207const Experiment::Choice kDefaultTileWidthChoices[] = {
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
209 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
210 switches::kDefaultTileWidth, "128"},
211 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
212 switches::kDefaultTileWidth, "256"},
213 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
214 switches::kDefaultTileWidth, "512"},
215 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
216 switches::kDefaultTileWidth, "1024"}
217};
218
219const Experiment::Choice kDefaultTileHeightChoices[] = {
220 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
221 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
222 switches::kDefaultTileHeight, "128"},
223 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
224 switches::kDefaultTileHeight, "256"},
225 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
226 switches::kDefaultTileHeight, "512"},
227 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
228 switches::kDefaultTileHeight, "1024"}
229};
230
[email protected]38484df12013-04-10 16:42:03231const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21232 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
234 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03235 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
236 switches::kUseSimpleCacheBackend, "on"}
237};
238
[email protected]4bc5050c2010-11-18 17:55:54239// RECORDING USER METRICS FOR FLAGS:
240// -----------------------------------------------------------------------------
241// The first line of the experiment is the internal name. If you'd like to
242// gather statistics about the usage of your flag, you should append a marker
243// comment to the end of the feature name, like so:
244// "my-special-feature", // FLAGS:RECORD_UMA
245//
246// After doing that, run //chrome/tools/extract_actions.py (see instructions at
247// the top of that file for details) to update the chromeactions.txt file, which
248// will enable UMA to record your feature flag.
249//
[email protected]783d5bb2012-10-24 03:47:14250// After your feature has shipped under a flag, you can locate the metrics under
251// the action name AboutFlags_internal-action-name. Actions are recorded once
252// per startup, so you should divide this number by AboutFlags_StartupTick to
253// get a sense of usage. Note that this will not be the same as number of users
254// with a given feature enabled because users can quit and relaunch the
255// application multiple times over a given time interval. The dashboard also
256// shows you how many (metrics reporting) users have enabled the flag over the
257// last seven days. However, note that this is not the same as the number of
258// users who have the flag enabled, since enabling the flag happens once,
259// whereas running with the flag enabled happens until the user flips the flag
260// again.
[email protected]4bc5050c2010-11-18 17:55:54261
[email protected]8a6ff28d2010-12-02 16:35:19262// To add a new experiment add to the end of kExperiments. There are two
263// distinct types of experiments:
264// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
265// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22266// . MULTI_VALUE: a list of choices, the first of which should correspond to a
267// deactivated state for this lab (i.e. no command line option). To specify
268// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
269// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19270// See the documentation of Experiment for details on the fields.
271//
272// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05273const Experiment kExperiments[] = {
274 {
[email protected]aac169d2011-03-18 19:53:03275 "expose-for-tabs", // FLAGS:RECORD_UMA
276 IDS_FLAGS_TABPOSE_NAME,
277 IDS_FLAGS_TABPOSE_DESCRIPTION,
278 kOsMac,
279#if defined(OS_MACOSX)
280 // The switch exists only on OS X.
281 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
282#else
283 SINGLE_VALUE_TYPE("")
284#endif
285 },
286 {
[email protected]4bc5050c2010-11-18 17:55:54287 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05288 IDS_FLAGS_CONFLICTS_CHECK_NAME,
289 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
290 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19291 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05292 },
293 {
[email protected]4bc5050c2010-11-18 17:55:54294 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54295 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
296 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45297 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22298 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31299 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22300 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
301 // always have PDF rasterization available, so no flag needed there.
302#if !defined(GOOGLE_CHROME_BUILD)
303 kOsWin,
304#else
305 0,
[email protected]fa6d2a2f2010-11-30 21:47:19306#endif
[email protected]8a6ff28d2010-12-02 16:35:19307 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42308 },
[email protected]60d77bd2012-08-22 00:10:07309#if defined(OS_WIN)
310 {
311 "print-raster",
312 IDS_FLAGS_PRINT_RASTER_NAME,
313 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
314 kOsWin,
315 SINGLE_VALUE_TYPE(switches::kPrintRaster)
316 },
317#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05318 {
[email protected]96c6f4c2011-05-18 19:36:22319 "ignore-gpu-blacklist",
320 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
321 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
322 kOsAll,
323 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
324 },
325 {
[email protected]0110cf112011-07-02 00:39:43326 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22327 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
328 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23329 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44330 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
331 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22332 },
333 {
[email protected]72787e392012-03-23 05:55:43334 "threaded-compositing-mode",
335 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
336 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58337 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44338 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
339 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59340 },
341 {
[email protected]17e27692013-02-06 17:02:09342 "force-accelerated-composited-scrolling",
343 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
344 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
345 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44346 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
347 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09348 },
349 {
[email protected]8b1c3c72013-01-25 01:48:43350 "present-with-GDI",
351 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
352 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
353 kOsWin,
354 MULTI_VALUE_TYPE(kGDIPresentChoices)
355 },
356 {
[email protected]2b608752013-05-01 03:34:36357 "enable-experimental-canvas-features",
358 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
359 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
360 kOsAll,
361 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
362 },
363 {
[email protected]81c64af62012-06-06 20:15:52364 "disable-accelerated-2d-canvas",
365 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
366 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
367 kOsAll,
368 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
369 },
370 {
[email protected]efcde132012-05-30 01:05:18371 "disable-threaded-animation",
372 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
373 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59374 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37375 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59376 },
377 {
[email protected]5963b772011-02-09 22:55:38378 "composited-layer-borders",
379 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
380 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
381 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57382 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38383 },
384 {
[email protected]a8f1eaa2011-03-07 19:00:58385 "show-fps-counter",
386 IDS_FLAGS_SHOW_FPS_COUNTER,
387 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
388 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57389 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58390 },
[email protected]8ff7f342011-05-25 01:49:47391 {
[email protected]70c98a332011-12-21 20:51:52392 "accelerated-filters",
393 IDS_FLAGS_ACCELERATED_FILTERS,
394 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
395 kOsAll,
396 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
397 },
398 {
[email protected]8ff7f342011-05-25 01:49:47399 "disable-gpu-vsync",
400 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
401 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56402 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47403 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
404 },
[email protected]deaba6d52011-09-23 14:47:12405 {
[email protected]4052d832013-01-16 05:31:01406 "enable-webgl",
407 IDS_FLAGS_ENABLE_WEBGL_NAME,
408 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
409 kOsAndroid,
410#if defined(OS_ANDROID)
411 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
412#else
413 SINGLE_VALUE_TYPE("")
414#endif
415 },
416 {
[email protected]deaba6d52011-09-23 14:47:12417 "disable-webgl",
418 IDS_FLAGS_DISABLE_WEBGL_NAME,
419 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56420 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01421#if defined(OS_ANDROID)
422 SINGLE_VALUE_TYPE("")
423#else
[email protected]deaba6d52011-09-23 14:47:12424 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01425#endif
[email protected]deaba6d52011-09-23 14:47:12426 },
[email protected]09096e02012-05-24 11:12:04427 {
[email protected]ce585bf2013-03-14 16:25:16428 "disable-webrtc",
429 IDS_FLAGS_DISABLE_WEBRTC_NAME,
430 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05431 kOsAndroid,
432#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16433 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05434#else
435 SINGLE_VALUE_TYPE("")
436#endif
437 },
[email protected]d816ddc2013-05-23 14:28:30438 {
439 "enable-sctp-data-channels",
440 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
441 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
442 kOsAll,
443 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
444 },
[email protected]34cb5292013-04-15 06:06:31445#if defined(OS_ANDROID)
446 {
447 "enable-webaudio",
448 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
449 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
450 kOsAndroid,
451 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
452 },
453#endif
[email protected]d9da9582013-01-31 04:59:05454 {
[email protected]96bcdc102012-05-24 23:42:10455 "fixed-position-creates-stacking-context",
456 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
457 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
458 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44459 ENABLE_DISABLE_VALUE_TYPE(
460 switches::kEnableFixedPositionCreatesStackingContext,
461 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10462 },
[email protected]fb854192013-02-06 01:30:04463 {
464 "enable-compositing-for-fixed-position",
465 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
466 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
467 kOsAll,
468 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
469 },
[email protected]d8221b22013-05-23 05:35:43470 {
471 "enable-compositing-for-transition",
472 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
473 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
474 kOsAll,
475 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
476 },
[email protected]a7640ef22012-10-06 00:52:08477 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53478 {
[email protected]e3791ce92011-08-09 01:03:32479 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40480 IDS_FLAGS_ENABLE_NACL_NAME,
481 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56482 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19483 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40484 },
485 {
[email protected]9addd1c2012-09-15 14:28:24486 "enable-nacl-debug", // FLAGS:RECORD_UMA
487 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
488 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56489 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24490 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13491 },
492 {
[email protected]66f409c2012-10-04 20:59:04493 "nacl-debug-mask", // FLAGS:RECORD_UMA
494 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
495 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56496 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04497 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
498 },
499 {
[email protected]7babd1c2012-08-08 20:35:29500 "enable-pnacl", // FLAGS:RECORD_UMA
501 IDS_FLAGS_ENABLE_PNACL_NAME,
502 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56503 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29504 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
505 },
506 {
[email protected]4bc5050c2010-11-18 17:55:54507 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32508 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
509 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56510 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19511 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32512 },
[email protected]3627b06d2010-11-12 16:36:16513 {
[email protected]ac2e2acd2013-03-21 12:57:29514 "extensions-on-chrome-urls",
515 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
516 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
517 kOsAll,
518 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
519 },
520 {
[email protected]e9cddd52013-03-23 17:37:53521 "enable-adview",
522 IDS_FLAGS_ENABLE_ADVIEW_NAME,
523 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
524 kOsDesktop,
525 SINGLE_VALUE_TYPE(switches::kEnableAdview)
526 },
527 {
528 "enable-adview-src-attribute",
529 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
530 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
531 kOsDesktop,
532 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
533 },
534 {
[email protected]544471a2012-10-13 05:27:09535 "action-box",
[email protected]cab18ef2012-04-27 07:22:03536 IDS_FLAGS_ACTION_BOX_NAME,
537 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56538 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44539 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
540 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03541 },
542 {
[email protected]3a362432012-06-18 20:39:51543 "script-badges",
544 IDS_FLAGS_SCRIPT_BADGES_NAME,
545 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56546 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09547 SINGLE_VALUE_TYPE(switches::kScriptBadges)
548 },
549 {
550 "script-bubble",
551 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
552 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56553 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44554 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
555 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51556 },
557 {
[email protected]cbe224d2011-08-04 22:12:49558 "apps-new-install-bubble",
559 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
560 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56561 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49562 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
563 },
564 {
[email protected]80bd24e2010-11-30 09:34:38565 "disable-hyperlink-auditing",
566 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
567 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
568 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19569 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51570 },
571 {
572 "experimental-location-features", // FLAGS:RECORD_UMA
573 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
574 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
575 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19576 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
577 },
578 {
[email protected]5aea1862011-03-23 23:55:39579 "tab-groups-context-menu",
580 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
581 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
582 kOsWin,
583 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
584 },
[email protected]c94cebd2012-06-21 00:55:28585 {
586 "enable-instant-extended-api",
587 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
588 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56589 kOsDesktop,
[email protected]73444382013-02-26 19:31:51590 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
591 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28592 },
[email protected]e9bf9d92011-03-31 20:57:15593 {
[email protected]8cc9e532013-05-06 21:01:47594 "enable-local-first-load-ntp",
595 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
596 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
597 kOsDesktop,
598 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
599 switches::kDisableLocalFirstLoadNTP)
600 },
601 {
[email protected]07fd48a2013-04-13 02:53:27602 "enable-local-only-instant-extended-api",
603 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
604 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
605 kOsDesktop,
606 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
607 switches::kDisableLocalOnlyInstantExtendedAPI)
608 },
609 {
[email protected]354e33b2011-06-15 00:29:10610 "static-ip-config",
611 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
612 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
613 kOsCrOS,
614#if defined(OS_CHROMEOS)
615 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24616 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10617#else
618 SINGLE_VALUE_TYPE("")
619#endif
620 },
[email protected]3eb5728c2011-06-20 22:32:24621 {
622 "show-autofill-type-predictions",
623 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
624 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
625 kOsAll,
[email protected]e217c5632013-04-12 19:11:48626 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24627 },
[email protected]bff4d3e2011-06-21 23:58:52628 {
[email protected]a5e9faa2013-03-19 09:58:38629 "enable-sync-favicons",
630 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
631 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55632 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38633 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55634 },
635 {
[email protected]5d90a0a2012-11-15 02:43:40636 "sync-keystore-encryption",
637 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
638 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
639 kOsAll,
640 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
641 },
642 {
[email protected]e755a382012-09-13 17:16:35643 "enable-gesture-tap-highlight",
644 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
645 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
646 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47647 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
648 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35649 },
650 {
[email protected]a22ebd812011-06-23 00:05:39651 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
652 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
653 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
654 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40655 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25656 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39657 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
658 },
[email protected]81a6b0b2011-06-24 17:55:40659 {
[email protected]128dc6c2012-06-22 20:30:35660 "omnibox-history-quick-provider-reorder-for-inlining",
661 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
662 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
663 kOsAll,
664 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
665 },
666 {
[email protected]032d5e6c2012-02-17 17:53:55667 "omnibox-inline-history-quick-provider",
668 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
669 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
670 kOsAll,
671 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
672 },
673 {
[email protected]7e7a28092011-12-09 22:24:55674 "enable-panels",
675 IDS_FLAGS_ENABLE_PANELS_NAME,
676 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56677 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55678 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54679 },
[email protected]e3749d12011-07-25 22:22:12680 {
[email protected]27c14f02012-06-22 17:29:58681 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27682 "save-page-as-mhtml", // FLAGS:RECORD_UMA
683 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
684 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
685 kOsMac | kOsWin | kOsLinux,
686 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
687 },
688 {
[email protected]b7bb44f2011-09-01 05:17:03689 "enable-autologin",
690 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
691 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
692 kOsMac | kOsWin | kOsLinux,
693 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
694 },
[email protected]b9841172011-09-26 23:36:09695 {
[email protected]27b3fe92012-03-21 05:35:06696 "enable-async-dns",
697 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
698 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46699 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44700 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
701 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06702 },
703 {
[email protected]1eb93802012-09-11 18:57:56704 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31705 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
706 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32707 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31708 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44709 },
[email protected]e4e68dbb2011-11-18 01:50:22710 {
[email protected]36d98412013-01-31 20:28:53711 "disable-encrypted-media",
712 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
713 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56714 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53715 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03716 },
[email protected]f88628792012-12-18 07:07:50717 {
718 "enable-opus-playback",
719 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
720 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56721 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50722 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
723 },
[email protected]ca6eaa5a2013-01-24 16:16:04724 {
[email protected]c54e1aa2013-01-25 09:26:17725 "enable-vp9-playback",
726 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
727 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
728 kOsDesktop,
729 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
730 },
731 {
[email protected]6ac955b2013-04-19 23:43:32732 "enable-vp8-alpha-playback",
733 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
734 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
735 kOsDesktop,
736 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
737 },
738 {
[email protected]ca6eaa5a2013-01-24 16:16:04739 "enable-managed-users",
740 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
741 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58742 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04743 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
744 },
[email protected]dc04be7c2012-03-15 23:57:49745#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50746 {
[email protected]2a13a9a2013-04-19 04:00:21747 "ash-disable-auto-maximizing",
748 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
749 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
750 kOsWin | kOsLinux | kOsCrOS,
751 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
752 },
753 {
[email protected]cda278d2012-10-30 20:31:40754 "ash-disable-auto-window-placement",
755 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
756 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
757 kOsWin | kOsLinux | kOsCrOS,
758 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
759 },
[email protected]b4e4ec42012-11-29 21:42:40760 {
[email protected]16f55a22013-02-13 23:47:34761 "ash-disable-per-app-launcher",
762 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
763 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40764 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34765 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40766 },
[email protected]dc04be7c2012-03-15 23:57:49767#endif
[email protected]eaae8b462012-01-20 22:20:39768 {
[email protected]db543d322011-12-15 20:40:15769 "per-tile-painting",
770 IDS_FLAGS_PER_TILE_PAINTING_NAME,
771 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37772 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37773 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15774 },
[email protected]bf88c032011-12-22 19:05:47775 {
776 "enable-javascript-harmony",
777 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
778 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
779 kOsAll,
780 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
781 },
[email protected]7e7f378a2012-01-05 14:35:37782 {
[email protected]85646172012-01-09 22:45:54783 "enable-tab-browser-dragging",
784 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
785 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
786 kOsWin,
787 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
788 },
789 {
[email protected]068b7b52012-02-27 12:41:44790 "disable-restore-session-state",
791 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
792 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37793 kOsAll,
[email protected]068b7b52012-02-27 12:41:44794 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37795 },
[email protected]88864db2012-01-18 20:56:35796 {
797 "disable-software-rasterizer",
798 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
799 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
800#if defined(ENABLE_SWIFTSHADER)
801 kOsAll,
802#else
803 0,
804#endif
805 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
806 },
[email protected]15a5d722012-01-23 09:11:14807 {
[email protected]ff7b6dd2012-09-15 20:20:03808 "enable-experimental-webkit-features",
809 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
810 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16811 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03812 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49813 },
814 {
[email protected]0f95a252012-09-13 22:30:04815 "enable-css-shaders",
816 IDS_FLAGS_CSS_SHADERS_NAME,
817 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
818 kOsAll,
819 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
820 },
821 {
[email protected]9860c68b2012-02-02 01:58:09822 "enable-extension-activity-ui",
823 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
824 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56825 kOsDesktop,
[email protected]9860c68b2012-02-02 01:58:09826 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00827 },
[email protected]54ae4e92012-02-16 15:19:05828 {
[email protected]3e8befc2012-03-13 01:17:03829 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16830 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
831 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56832 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03833 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16834 },
[email protected]dc04be7c2012-03-15 23:57:49835#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01836 {
[email protected]3cd198a22012-03-12 20:38:01837 "enable-ash-oak",
838 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
839 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
840 kOsAll,
841 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
842 },
[email protected]31cf1c52012-02-29 20:55:01843#endif
[email protected]184ec592012-03-01 11:54:28844 {
845 "enable-devtools-experiments",
846 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
847 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56848 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28849 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
850 },
[email protected]76d1854e2012-03-02 23:57:44851 {
[email protected]2fefdb32013-02-26 14:28:10852 "silent-debugger-extension-api",
853 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
854 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
855 kOsDesktop,
856 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
857 },
858 {
[email protected]76d1854e2012-03-02 23:57:44859 "enable-suggestions-ntp",
860 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
861 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56862 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44863 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
864 },
[email protected]a3d54252012-04-05 20:04:13865 {
[email protected]1dbaf5e2012-11-30 05:51:32866 "spellcheck-autocorrect",
867 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
868 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
869 kOsWin | kOsLinux | kOsCrOS,
870 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
871 },
872 {
[email protected]d7932532012-11-21 21:10:31873 "touch-events",
874 IDS_TOUCH_EVENTS_NAME,
875 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56876 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31877 MULTI_VALUE_TYPE(kTouchEventsChoices)
878 },
879 {
[email protected]c9c73ad42012-04-18 03:35:59880 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06881 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
882 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55883 kOsWin,
[email protected]347a0c72012-05-14 20:28:06884 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59885 },
[email protected]8a6aaa72012-04-20 20:53:58886 {
[email protected]b9c96ff2012-11-26 22:24:40887 "disable-touch-adjustment",
888 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
889 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
890 kOsWin | kOsLinux | kOsCrOS,
891 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
892 },
893 {
[email protected]0b9383a2012-10-26 00:58:16894 "enable-tab-capture",
895 IDS_ENABLE_TAB_CAPTURE_NAME,
896 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25897 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44898 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
899 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16900 },
[email protected]0b60afa2012-04-19 17:36:39901#if defined(OS_CHROMEOS)
902 {
[email protected]7c4a9bc2012-09-11 22:10:05903 "enable-background-loader",
904 IDS_ENABLE_BACKLOADER_NAME,
905 IDS_ENABLE_BACKLOADER_DESCRIPTION,
906 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24907 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05908 },
909 {
[email protected]c5667b282012-08-31 00:32:50910 "enable-bezel-touch",
911 IDS_ENABLE_BEZEL_TOUCH_NAME,
912 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47913 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50914 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47915 },
916 {
[email protected]3f4181a2013-02-01 21:31:07917 "enable-screensaver-extension",
918 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
919 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
920 kOsCrOS,
921 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
922 },
923 {
[email protected]0b60afa2012-04-19 17:36:39924 "no-discard-tabs",
925 IDS_FLAGS_NO_DISCARD_TABS_NAME,
926 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
927 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24928 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39929 },
930#endif
[email protected]79be6d32012-04-24 20:47:44931 {
[email protected]8d68a3e02013-01-12 15:57:10932 "enable-download-resumption",
933 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
934 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56935 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10936 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
937 },
938 {
[email protected]9a5940d2012-04-27 19:16:23939 "allow-nacl-socket-api",
940 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
941 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56942 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23943 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
944 },
[email protected]85333732012-05-01 19:02:24945 {
[email protected]60673ad72012-05-02 06:16:33946 "stacked-tab-strip",
947 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
948 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
949 kOsWin,
950 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
951 },
952 {
[email protected]4bd20202012-06-14 17:35:01953 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24954 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
955 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
956 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01957 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24958 },
[email protected]190349fd2012-05-02 00:10:47959#if defined(OS_CHROMEOS)
960 {
961 "allow-touchpad-three-finger-click",
962 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
963 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
964 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24965 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47966 },
[email protected]fbc176b62012-10-27 02:19:58967 {
968 "allow-touchpad-three-finger-swipe",
969 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
970 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
971 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24972 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:58973 },
[email protected]190349fd2012-05-02 00:10:47974#endif
[email protected]1992a2f42012-10-23 18:32:21975 {
[email protected]a585e462013-01-26 00:37:15976 "use-client-login-signin-flow",
977 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
978 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21979 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15980 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21981 },
[email protected]8ee02242012-12-04 15:23:32982 {
983 "enable-desktop-guest-mode",
984 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
985 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
986 kOsMac | kOsWin | kOsLinux,
987 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
988 },
[email protected]53520b1b2012-05-07 21:43:37989#if defined(USE_ASH)
990 {
[email protected]8257d382013-03-26 13:08:42991 "show-launcher-alignment-menu",
992 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
993 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42994 kOsAll,
[email protected]8257d382013-03-26 13:08:42995 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42996 },
997 {
[email protected]2ddf37b2013-04-20 01:15:58998 "disable-minimize-on-second-launcher-item-click",
999 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1000 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1001 kOsAll,
1002 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1003 },
1004 {
[email protected]73074742012-05-17 01:44:411005 "show-touch-hud",
1006 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1007 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1008 kOsAll,
1009 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1010 },
1011 {
[email protected]9f0940b62012-05-23 22:56:351012 "enable-pinch",
1013 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1014 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061015 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381016 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1017 },
1018 {
[email protected]a4016f12013-05-02 07:53:471019 "forced-maximize-mode",
1020 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1021 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1022 kOsLinux | kOsWin | kOsCrOS,
1023 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1024 },
[email protected]73074742012-05-17 01:44:411025#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281026#if defined(OS_CHROMEOS)
1027 {
[email protected]8b04a1652012-08-04 02:59:491028 "disable-boot-animation",
1029 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1030 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581031 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241032 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491033 },
[email protected]95058572012-08-20 14:57:291034 {
[email protected]b4557192012-09-19 11:29:581035 "disable-boot-animation2",
1036 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
1037 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581038 kOsCrOSOwnerOnly,
[email protected]b4557192012-09-19 11:29:581039 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
1040 },
1041 {
[email protected]ea2f3342012-09-21 21:13:361042 "boot-animation-fucntion",
1043 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
1044 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581045 kOsCrOSOwnerOnly,
[email protected]ea2f3342012-09-21 21:13:361046 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
1047 },
[email protected]839667d62012-10-23 19:38:571048 {
[email protected]d96aef22012-10-30 11:47:021049 "captive-portal-detector",
1050 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1051 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581052 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021053 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1054 },
1055 {
[email protected]c11aa8f12012-12-18 18:43:141056 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571057 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1058 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1059 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141060 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571061 },
[email protected]f0280952012-11-06 20:30:501062 {
[email protected]ea2fab32013-04-16 06:55:021063 "file-manager-legacy",
1064 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1065 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231066 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241067 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231068 },
[email protected]3e035e82012-11-27 20:54:321069 {
[email protected]828d99052013-04-22 08:15:031070 "file-manager-legacy-ui",
1071 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1072 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101073 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241074 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101075 },
1076 {
[email protected]c64d7732013-03-25 18:09:501077 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521078 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1079 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581080 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241081 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471082 },
[email protected]6ad015c2013-03-06 00:49:511083 {
[email protected]c64d7732013-03-25 18:09:501084 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521085 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1086 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511087 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521088 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511089 },
[email protected]099b890c2013-04-25 19:16:261090 {
1091 "disable-quickoffice-component-app",
1092 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1093 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1094 kOsCrOS,
1095 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1096 },
[email protected]62018dc2012-12-13 00:37:351097#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391098 {
[email protected]6247aba2013-03-04 22:57:181099 "views-textfield",
1100 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1101 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391102 kOsWin,
[email protected]6247aba2013-03-04 22:57:181103 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1104 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391105 },
[email protected]bd0cd3bb2012-06-14 03:03:381106 {
[email protected]ffbe5782013-05-09 23:22:081107 "new-dialog-style",
1108 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1109 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321110 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081111 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1112 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321113 },
[email protected]7db8893a2012-07-26 00:49:401114 { "disable-accelerated-video-decode",
1115 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1116 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191117 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401118 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151119 },
[email protected]66ae9fc2012-06-19 21:33:521120#if defined(USE_ASH)
1121 {
1122 "ash-debug-shortcuts",
1123 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1124 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1125 kOsAll,
1126 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1127 },
1128#endif
[email protected]37fee0942012-08-07 21:07:451129 {
[email protected]ad3f6d22012-08-29 02:34:191130 "enable-contacts",
1131 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1132 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1133 kOsCrOS,
1134 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1135 },
[email protected]1d9bb9cd2012-08-28 22:02:501136#if defined(USE_ASH)
1137 { "ash-enable-advanced-gestures",
1138 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1139 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1140 kOsCrOS,
1141 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1142 },
[email protected]cfa24e62013-02-13 21:19:111143 { "ash-disable-tab-scrubbing",
1144 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1145 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161146 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111147 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161148 },
[email protected]00c8469e22013-05-08 21:40:081149 { "ash-drag-and-drop-applist-to-launcher",
1150 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1151 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(ash::switches::kAshDragAndDropAppListToLauncher),
1154 },
[email protected]83eef802012-12-02 07:43:521155 { "ash-enable-workspace-scrubbing",
1156 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1157 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1158 kOsCrOS,
1159 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1160 },
[email protected]cf2b1a82013-04-20 01:05:431161 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111162 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1163 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241164 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431165 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1166 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241167 },
[email protected]316708a2012-11-05 22:57:021168#if defined(OS_LINUX)
1169 { "ash-enable-memory-monitor",
1170 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1171 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1172 kOsCrOS,
1173 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1174 },
1175#endif
[email protected]1d9bb9cd2012-08-28 22:02:501176#endif
[email protected]9b7ab882012-09-10 23:46:361177#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131178 { "use-new-network-configuration-handlers",
1179 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1180 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1181 kOsCrOS,
1182 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1183 },
[email protected]9b7ab882012-09-10 23:46:361184 {
[email protected]354ff2d2013-05-01 17:06:311185 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121186 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1187 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1188 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311189 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1190 },
1191 {
1192 "ash-audio-device-menu",
1193 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1194 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1195 kOsCrOS,
1196 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121197 },
1198 {
[email protected]205f07892012-10-16 20:26:221199 "enable-carrier-switching",
1200 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1201 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1202 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241203 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221204 },
1205 {
[email protected]9b7ab882012-09-10 23:46:361206 "enable-request-tablet-site",
1207 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1208 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1209 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241210 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361211 },
1212#endif
[email protected]dab49c0b2012-10-04 05:55:351213 {
1214 "debug-packed-apps",
1215 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1216 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561217 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351218 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1219 },
[email protected]d1459ed2012-10-10 01:29:331220 {
1221 "enable-password-generation",
1222 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1223 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561224 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331225 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1226 },
[email protected]26d045f2012-10-18 21:18:431227 {
[email protected]76f7d4882012-10-26 21:09:221228 "enable-deferred-image-decoding",
1229 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1230 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221231 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221232 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1233 },
1234 {
[email protected]075543d2012-10-24 01:29:141235 "performance-monitor-gathering",
1236 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1237 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1238 kOsAll,
1239 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1240 },
[email protected]783d5bb2012-10-24 03:47:141241 {
[email protected]90b482d2013-04-04 10:45:581242 "disable-native-autofill-ui",
1243 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1244 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431245 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581246 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431247 },
1248 {
[email protected]a7259fb2012-11-08 06:22:231249 "enable-experimental-form-filling",
1250 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1251 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1252 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481253 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231254 },
[email protected]6e6efe42013-01-30 00:04:501255 {
[email protected]db3178c2013-03-21 14:54:541256 "wallet-service-use-prod",
1257 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1258 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1259 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481260 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541261 },
1262 {
[email protected]6e6efe42013-01-30 00:04:501263 "enable-interactive-autocomplete",
1264 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1265 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]dc1cb7d82013-05-22 18:00:001266 kOsWin | kOsCrOS | kOsAndroid,
[email protected]000f3ad2013-05-16 02:19:171267 ENABLE_DISABLE_VALUE_TYPE(
1268 autofill::switches::kEnableInteractiveAutocomplete,
1269 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501270 },
[email protected]177260c2013-04-24 01:47:381271#if defined(USE_AURA)
1272 {
1273 "overscroll-history-navigation",
1274 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1275 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1276 kOsAll,
1277 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1278 switches::kOverscrollHistoryNavigation, "1",
1279 switches::kOverscrollHistoryNavigation, "0")
1280 },
1281#endif
[email protected]edbea622012-11-28 20:39:381282 {
1283 "enable-touch-drag-drop",
1284 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1285 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1286 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271287 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1288 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381289 },
[email protected]0e2f43b62013-02-21 00:47:151290 {
1291 "enable-touch-editing",
1292 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1293 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1294 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271295 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1296 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151297 },
[email protected]92e12dd92012-12-11 03:33:201298 {
1299 "enable-rich-notifications",
1300 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1301 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001302 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231303 ENABLE_DISABLE_VALUE_TYPE(
1304 message_center::switches::kEnableRichNotifications,
1305 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201306 },
[email protected]4d51c682012-12-11 11:34:551307 {
[email protected]ddec1aa2013-04-28 23:22:451308 "enable-sync-synced-notifications",
1309 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1310 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1311 kOsWin | kOsCrOS,
1312 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1313 switches::kDisableSyncSyncedNotifications)
1314 },
1315 {
[email protected]a50e16a2013-04-25 14:07:171316 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551317 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1318 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1319 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171320 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551321 },
[email protected]628a69a92012-12-23 04:09:341322 {
[email protected]fd030142013-02-08 02:04:381323 "enable-usermedia-screen-capture",
1324 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1325 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1326 kOsDesktop,
1327 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1328 },
[email protected]5b93e162013-02-19 06:33:091329 {
1330 "enable-apps-devtool-app",
1331 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1332 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1333 kOsDesktop,
1334 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1335 },
[email protected]9323fdd12013-02-23 00:31:361336 {
1337 "impl-side-painting",
1338 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1339 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041340 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361341 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1342 },
[email protected]a42c85f2013-04-04 18:15:121343 {
[email protected]1c92d3e2013-04-18 05:31:391344 "enable-websocket-experimental-implementation",
1345 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1346 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1347 kOsAll,
1348 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1349 },
1350 {
[email protected]a42c85f2013-04-04 18:15:121351 "max-tiles-for-interest-area",
1352 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1353 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1354 kOsAndroid | kOsLinux | kOsCrOS,
1355 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1356 },
[email protected]7cf7ccb2013-04-20 02:53:081357 {
1358 "enable-offline-mode",
1359 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1360 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1361 kOsAll,
1362 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1363 },
[email protected]a3618122013-04-26 21:15:341364 {
1365 "default-tile-width",
1366 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1367 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1368 kOsAll,
1369 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1370 },
1371 {
1372 "default-tile-height",
1373 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1374 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1375 kOsAll,
1376 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1377 },
[email protected]2f2f72b2013-03-08 22:37:311378 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1379#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371380 {
1381 "track-active-visit-time",
1382 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1383 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1384 kOsWin,
1385 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1386 },
[email protected]2f2f72b2013-03-08 22:37:311387#endif
[email protected]8cc71d42013-03-02 17:26:081388#if defined(OS_ANDROID)
1389 {
1390 "disable-gesture-requirement-for-media-playback",
1391 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1392 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1393 kOsAndroid,
1394 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1395 },
1396#endif
[email protected]6077cab2013-03-11 19:36:141397#if defined(ENABLE_GOOGLE_NOW)
1398 {
1399 "enable-google-now",
1400 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1401 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1402 kOsWin | kOsCrOS,
1403 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1404 },
1405#endif
[email protected]4a9e2e02013-04-08 16:19:491406 {
1407 "enable-translate-alpha-languages",
1408 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1409 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1410 kOsAll,
1411 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1412 },
[email protected]86459e2c2013-04-10 13:39:241413#if defined(OS_CHROMEOS)
1414 {
1415 "enable-virtual-keyboard",
1416 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1417 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1418 kOsCrOS,
1419 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1420 },
1421#endif
[email protected]38484df12013-04-10 16:42:031422 {
1423 "enable-simple-cache-backend",
1424 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1425 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1426 kOsAndroid,
1427 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1428 },
[email protected]717e4e22013-04-10 20:52:231429 {
1430 "enable-tcp-fast-open",
1431 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1432 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111433 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231434 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1435 },
[email protected]8027acd2013-04-18 08:35:151436 {
1437 "enable-webp-in-accept-header",
1438 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1439 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1440 kOsAll,
1441 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1442 },
[email protected]58c740f2013-05-06 05:25:441443 {
1444 "apps-use-native-frame",
1445 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1446 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1447 kOsWin,
1448 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1449 },
[email protected]896d86b32013-05-09 19:36:441450 {
1451 "enable-syncfs-directory-operation",
1452 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1453 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1454 kOsAll,
1455 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1456 },
[email protected]a4ed7e12013-05-24 01:00:281457 {
1458 "enable-draggable-menu-button",
1459 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1460 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1461 kOsAndroid,
1462 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1463 },
[email protected]a0e4b072011-08-17 01:47:071464};
[email protected]ad2a3ded2010-08-27 13:19:051465
[email protected]a314ee5a2010-10-26 21:23:281466const Experiment* experiments = kExperiments;
1467size_t num_experiments = arraysize(kExperiments);
1468
[email protected]e2ddbc92010-10-15 20:02:071469// Stores and encapsulates the little state that about:flags has.
1470class FlagsState {
1471 public:
1472 FlagsState() : needs_restart_(false) {}
1473 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1474 bool IsRestartNeededToCommitChanges();
1475 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281476 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071477 void RemoveFlagsSwitches(
1478 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001479 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071480 void reset();
1481
1482 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551483 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071484 return Singleton<FlagsState>::get();
1485 }
1486
1487 private:
1488 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531489 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071490
1491 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1492};
1493
[email protected]c7b7800a2010-10-07 18:51:351494// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491495// in a set.
[email protected]1a47d7e2010-10-15 00:37:241496void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051497 const ListValue* enabled_experiments = prefs->GetList(
1498 prefs::kEnabledLabsExperiments);
1499 if (!enabled_experiments)
1500 return;
1501
1502 for (ListValue::const_iterator it = enabled_experiments->begin();
1503 it != enabled_experiments->end();
1504 ++it) {
1505 std::string experiment_name;
1506 if (!(*it)->GetAsString(&experiment_name)) {
1507 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1508 continue;
1509 }
1510 result->insert(experiment_name);
1511 }
1512}
1513
[email protected]c6343372013-03-13 17:05:491514// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241515void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051516 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381517 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1518 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051519
1520 experiments_list->Clear();
1521 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1522 it != enabled_experiments.end();
1523 ++it) {
1524 experiments_list->Append(new StringValue(*it));
1525 }
1526}
1527
[email protected]8a6ff28d2010-12-02 16:35:191528// Adds the internal names for the specified experiment to |names|.
1529void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1530 if (e.type == Experiment::SINGLE_VALUE) {
1531 names->insert(e.internal_name);
1532 } else {
[email protected]83e9fa702013-02-25 19:30:441533 DCHECK(e.type == Experiment::MULTI_VALUE ||
1534 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191535 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441536 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191537 }
1538}
1539
[email protected]28e35af2011-02-09 12:56:221540// Confirms that an experiment is valid, used in a DCHECK in
1541// SanitizeList below.
1542bool ValidateExperiment(const Experiment& e) {
1543 switch (e.type) {
1544 case Experiment::SINGLE_VALUE:
1545 DCHECK_EQ(0, e.num_choices);
1546 DCHECK(!e.choices);
1547 break;
1548 case Experiment::MULTI_VALUE:
1549 DCHECK_GT(e.num_choices, 0);
1550 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531551 DCHECK(e.choices[0].command_line_switch);
1552 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221553 break;
[email protected]83e9fa702013-02-25 19:30:441554 case Experiment::ENABLE_DISABLE_VALUE:
1555 DCHECK_EQ(3, e.num_choices);
1556 DCHECK(!e.choices);
1557 DCHECK(e.command_line_switch);
1558 DCHECK(e.command_line_value);
1559 DCHECK(e.disable_command_line_switch);
1560 DCHECK(e.disable_command_line_value);
1561 break;
[email protected]28e35af2011-02-09 12:56:221562 default:
1563 NOTREACHED();
1564 }
1565 return true;
1566}
1567
[email protected]ad2a3ded2010-08-27 13:19:051568// Removes all experiments from prefs::kEnabledLabsExperiments that are
1569// unknown, to prevent this list to become very long as experiments are added
1570// and removed.
1571void SanitizeList(PrefService* prefs) {
1572 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221573 for (size_t i = 0; i < num_experiments; ++i) {
1574 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191575 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221576 }
[email protected]ad2a3ded2010-08-27 13:19:051577
1578 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241579 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051580
1581 std::set<std::string> new_enabled_experiments;
1582 std::set_intersection(
1583 known_experiments.begin(), known_experiments.end(),
1584 enabled_experiments.begin(), enabled_experiments.end(),
1585 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1586
[email protected]4c8853f2012-07-23 01:29:161587 if (new_enabled_experiments != enabled_experiments)
1588 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051589}
1590
[email protected]1a47d7e2010-10-15 00:37:241591void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051592 PrefService* prefs, std::set<std::string>* result) {
1593 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241594 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051595}
1596
[email protected]a314ee5a2010-10-26 21:23:281597// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1598// enabled on the current platform.
1599void GetSanitizedEnabledFlagsForCurrentPlatform(
1600 PrefService* prefs, std::set<std::string>* result) {
1601 GetSanitizedEnabledFlags(prefs, result);
1602
1603 // Filter out any experiments that aren't enabled on the current platform. We
1604 // don't remove these from prefs else syncing to a platform with a different
1605 // set of experiments would be lossy.
1606 std::set<std::string> platform_experiments;
1607 int current_platform = GetCurrentPlatform();
1608 for (size_t i = 0; i < num_experiments; ++i) {
1609 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191610 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581611#if defined(OS_CHROMEOS)
1612 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1613 AddInternalName(experiments[i], &platform_experiments);
1614#endif
[email protected]a314ee5a2010-10-26 21:23:281615 }
1616
1617 std::set<std::string> new_enabled_experiments;
1618 std::set_intersection(
1619 platform_experiments.begin(), platform_experiments.end(),
1620 result->begin(), result->end(),
1621 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1622
1623 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051624}
1625
[email protected]8a6ff28d2010-12-02 16:35:191626// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191627Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221628 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441629 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1630 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191631 ListValue* result = new ListValue;
1632 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191633 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441634 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191635 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441636 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221637 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191638 result->Append(value);
1639 }
1640 return result;
1641}
1642
[email protected]e2ddbc92010-10-15 20:02:071643} // namespace
1644
[email protected]83e9fa702013-02-25 19:30:441645std::string Experiment::NameForChoice(int index) const {
1646 DCHECK(type == Experiment::MULTI_VALUE ||
1647 type == Experiment::ENABLE_DISABLE_VALUE);
1648 DCHECK_LT(index, num_choices);
1649 return std::string(internal_name) + testing::kMultiSeparator +
1650 base::IntToString(index);
1651}
1652
1653string16 Experiment::DescriptionForChoice(int index) const {
1654 DCHECK(type == Experiment::MULTI_VALUE ||
1655 type == Experiment::ENABLE_DISABLE_VALUE);
1656 DCHECK_LT(index, num_choices);
1657 int description_id;
1658 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1659 const int kEnableDisableDescriptionIds[] = {
1660 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1661 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1662 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1663 };
1664 description_id = kEnableDisableDescriptionIds[index];
1665 } else {
1666 description_id = choices[index].description_id;
1667 }
1668 return l10n_util::GetStringUTF16(description_id);
1669}
1670
[email protected]1a47d7e2010-10-15 00:37:241671void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551672 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051673}
1674
[email protected]ee28495a2013-05-20 04:10:521675void GetFlagsExperimentsData(PrefService* prefs,
1676 FlagAccess access,
1677 base::ListValue* supported_experiments,
1678 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051679 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241680 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051681
1682 int current_platform = GetCurrentPlatform();
1683
[email protected]a314ee5a2010-10-26 21:23:281684 for (size_t i = 0; i < num_experiments; ++i) {
1685 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051686
1687 DictionaryValue* data = new DictionaryValue();
1688 data->SetString("internal_name", experiment.internal_name);
1689 data->SetString("name",
1690 l10n_util::GetStringUTF16(experiment.visible_name_id));
1691 data->SetString("description",
1692 l10n_util::GetStringUTF16(
1693 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401694
1695 ListValue* supported_platforms = new ListValue();
1696 AddOsStrings(experiment.supported_platforms, supported_platforms);
1697 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051698
[email protected]28e35af2011-02-09 12:56:221699 switch (experiment.type) {
1700 case Experiment::SINGLE_VALUE:
1701 data->SetBoolean(
1702 "enabled",
1703 enabled_experiments.count(experiment.internal_name) > 0);
1704 break;
1705 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441706 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221707 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1708 break;
1709 default:
1710 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191711 }
1712
[email protected]ee28495a2013-05-20 04:10:521713 bool supported = (experiment.supported_platforms & current_platform) != 0;
1714#if defined(OS_CHROMEOS)
1715 if (access == kOwnerAccessToFlags &&
1716 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1717 supported = true;
1718 }
1719#endif
1720 if (supported)
1721 supported_experiments->Append(data);
1722 else
1723 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051724 }
[email protected]ad2a3ded2010-08-27 13:19:051725}
1726
[email protected]ad2a3ded2010-08-27 13:19:051727bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551728 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051729}
1730
1731void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351732 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551733 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071734}
1735
1736void RemoveFlagsSwitches(
1737 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551738 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071739}
1740
[email protected]cb93bf52013-02-20 01:20:001741void ResetAllFlags(PrefService* prefs) {
1742 FlagsState::GetInstance()->ResetAllFlags(prefs);
1743}
1744
[email protected]a314ee5a2010-10-26 21:23:281745int GetCurrentPlatform() {
1746#if defined(OS_MACOSX)
1747 return kOsMac;
1748#elif defined(OS_WIN)
1749 return kOsWin;
1750#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1751 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211752#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281753 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401754#elif defined(OS_ANDROID)
1755 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281756#else
1757#error Unknown platform
1758#endif
1759}
1760
[email protected]4bc5050c2010-11-18 17:55:541761void RecordUMAStatistics(const PrefService* prefs) {
1762 std::set<std::string> flags;
1763 GetEnabledFlags(prefs, &flags);
1764 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1765 ++it) {
1766 std::string action("AboutFlags_");
1767 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381768 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541769 }
1770 // Since flag metrics are recorded every startup, add a tick so that the
1771 // stats can be made meaningful.
1772 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381773 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1774 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541775}
1776
[email protected]e2ddbc92010-10-15 20:02:071777//////////////////////////////////////////////////////////////////////////////
1778// FlagsState implementation.
1779
1780namespace {
1781
[email protected]83e9fa702013-02-25 19:30:441782typedef std::map<std::string, std::pair<std::string, std::string> >
1783 NameToSwitchAndValueMap;
1784
1785void SetFlagToSwitchMapping(const std::string& key,
1786 const std::string& switch_name,
1787 const std::string& switch_value,
1788 NameToSwitchAndValueMap* name_to_switch_map) {
1789 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1790 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1791}
1792
[email protected]e2ddbc92010-10-15 20:02:071793void FlagsState::ConvertFlagsToSwitches(
1794 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071795 if (command_line->HasSwitch(switches::kNoExperiments))
1796 return;
1797
1798 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001799
[email protected]a314ee5a2010-10-26 21:23:281800 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071801
[email protected]a82744532011-02-11 16:15:531802 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191803 for (size_t i = 0; i < num_experiments; ++i) {
1804 const Experiment& e = experiments[i];
1805 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441806 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1807 e.command_line_value, &name_to_switch_map);
1808 } else if (e.type == Experiment::MULTI_VALUE) {
1809 for (int j = 0; j < e.num_choices; ++j) {
1810 SetFlagToSwitchMapping(e.NameForChoice(j),
1811 e.choices[j].command_line_switch,
1812 e.choices[j].command_line_value,
1813 &name_to_switch_map);
1814 }
[email protected]8a6ff28d2010-12-02 16:35:191815 } else {
[email protected]83e9fa702013-02-25 19:30:441816 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1817 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1818 &name_to_switch_map);
1819 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1820 e.command_line_value, &name_to_switch_map);
1821 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1822 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191823 }
1824 }
[email protected]e2ddbc92010-10-15 20:02:071825
1826 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531827 flags_switches_.insert(
1828 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1829 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071830 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1831 it != enabled_experiments.end();
1832 ++it) {
1833 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531834 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191835 name_to_switch_map.find(experiment_name);
1836 if (name_to_switch_it == name_to_switch_map.end()) {
1837 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071838 continue;
[email protected]8a6ff28d2010-12-02 16:35:191839 }
[email protected]e2ddbc92010-10-15 20:02:071840
[email protected]a82744532011-02-11 16:15:531841 const std::pair<std::string, std::string>&
1842 switch_and_value_pair = name_to_switch_it->second;
1843
1844 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1845 switch_and_value_pair.second);
1846 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071847 }
1848 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531849 flags_switches_.insert(
1850 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1851 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071852}
1853
1854bool FlagsState::IsRestartNeededToCommitChanges() {
1855 return needs_restart_;
1856}
1857
1858void FlagsState::SetExperimentEnabled(
1859 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441860 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191861 if (at_index != std::string::npos) {
1862 DCHECK(enable);
1863 // We're being asked to enable a multi-choice experiment. Disable the
1864 // currently selected choice.
1865 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221866 const std::string experiment_name = internal_name.substr(0, at_index);
1867 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191868
[email protected]28e35af2011-02-09 12:56:221869 // And enable the new choice, if it is not the default first choice.
1870 if (internal_name != experiment_name + "@0") {
1871 std::set<std::string> enabled_experiments;
1872 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081873 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221874 SetEnabledFlags(prefs, enabled_experiments);
1875 }
[email protected]8a6ff28d2010-12-02 16:35:191876 return;
1877 }
1878
[email protected]ad2a3ded2010-08-27 13:19:051879 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241880 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051881
[email protected]8a6ff28d2010-12-02 16:35:191882 const Experiment* e = NULL;
1883 for (size_t i = 0; i < num_experiments; ++i) {
1884 if (experiments[i].internal_name == internal_name) {
1885 e = experiments + i;
1886 break;
1887 }
1888 }
1889 DCHECK(e);
1890
1891 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591892 if (enable)
[email protected]147492b2013-03-19 23:52:081893 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591894 else
[email protected]147492b2013-03-19 23:52:081895 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191896 } else {
1897 if (enable) {
1898 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081899 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191900 } else {
1901 // Find the currently enabled choice and disable it.
1902 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441903 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191904 if (enabled_experiments.find(choice_name) !=
1905 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081906 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191907 enabled_experiments.erase(choice_name);
1908 // Continue on just in case there's a bug and more than one
1909 // experiment for this choice was enabled.
1910 }
1911 }
1912 }
1913 }
[email protected]ad2a3ded2010-08-27 13:19:051914
[email protected]1a47d7e2010-10-15 00:37:241915 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051916}
1917
[email protected]e2ddbc92010-10-15 20:02:071918void FlagsState::RemoveFlagsSwitches(
1919 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531920 for (std::map<std::string, std::string>::const_iterator
1921 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1922 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071923 }
1924}
1925
[email protected]cb93bf52013-02-20 01:20:001926void FlagsState::ResetAllFlags(PrefService* prefs) {
1927 needs_restart_ = true;
1928
1929 std::set<std::string> no_experiments;
1930 SetEnabledFlags(prefs, no_experiments);
1931}
1932
[email protected]e2ddbc92010-10-15 20:02:071933void FlagsState::reset() {
1934 needs_restart_ = false;
1935 flags_switches_.clear();
1936}
1937
[email protected]38e46812011-05-09 20:49:221938} // namespace
[email protected]e2ddbc92010-10-15 20:02:071939
1940namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191941
1942// WARNING: '@' is also used in the html file. If you update this constant you
1943// also need to update the html file.
1944const char kMultiSeparator[] = "@";
1945
[email protected]e2ddbc92010-10-15 20:02:071946void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551947 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071948}
[email protected]a314ee5a2010-10-26 21:23:281949
1950void SetExperiments(const Experiment* e, size_t count) {
1951 if (!e) {
1952 experiments = kExperiments;
1953 num_experiments = arraysize(kExperiments);
1954 } else {
1955 experiments = e;
1956 num_experiments = count;
1957 }
1958}
1959
[email protected]8a6ff28d2010-12-02 16:35:191960const Experiment* GetExperiments(size_t* count) {
1961 *count = num_experiments;
1962 return experiments;
1963}
1964
[email protected]e2ddbc92010-10-15 20:02:071965} // namespace testing
1966
[email protected]1a47d7e2010-10-15 00:37:241967} // namespace about_flags