blob: 9c13b8d309dae88430986122d58b650a5055bfd9 [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]0bc6c272012-07-17 03:32:0329#include "ui/app_list/app_list_switches.h"
[email protected]c051a1b2011-01-21 23:30:1730#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5931#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4832#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2733#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2434#include "ui/keyboard/keyboard_switches.h"
[email protected]8b1c3c72013-01-25 01:48:4335#include "ui/surface/surface_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0536
[email protected]f1c39242013-01-29 16:13:0137#if defined(ENABLE_MESSAGE_CENTER)
38#include "ui/message_center/message_center_switches.h"
39#endif
40
[email protected]dc04be7c2012-03-15 23:57:4941#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3142#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4943#endif
44
[email protected]badba1ad2012-11-16 17:21:4645#if defined(OS_CHROMEOS)
46#include "chromeos/chromeos_switches.h"
47#endif
48
[email protected]7f6f44c2011-12-14 13:23:3849using content::UserMetricsAction;
50
[email protected]1a47d7e2010-10-15 00:37:2451namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0552
[email protected]8a6ff28d2010-12-02 16:35:1953// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5354#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4455 Experiment::SINGLE_VALUE, \
56 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5357#define SINGLE_VALUE_TYPE(command_line_switch) \
58 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4459#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
60 disable_switch, disable_value) \
61 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
62 disable_switch, disable_value, NULL, 3
63#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
64 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5365#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4466 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1967
[email protected]e2ddbc92010-10-15 20:02:0768namespace {
69
[email protected]9c7453d2012-01-21 00:45:4070const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5671const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0572
[email protected]cc3e2052011-12-20 01:01:4073// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
74// whether the experiment is available on that platform.
75void AddOsStrings(unsigned bitmask, ListValue* list) {
76 struct {
77 unsigned bit;
78 const char* const name;
79 } kBitsToOs[] = {
80 {kOsMac, "Mac"},
81 {kOsWin, "Windows"},
82 {kOsLinux, "Linux"},
83 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0184 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5885 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4086 };
87 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
88 if (bitmask & kBitsToOs[i].bit)
89 list->Append(new StringValue(kBitsToOs[i].name));
90}
91
[email protected]128dc6c2012-06-22 20:30:3592const Experiment::Choice
93 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
94 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
95 "",
96 "" },
97 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
98 switches::kOmniboxHistoryQuickProviderReorderForInlining,
99 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
100 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
101 switches::kOmniboxHistoryQuickProviderReorderForInlining,
102 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
103};
104
[email protected]032d5e6c2012-02-17 17:53:55105const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
106 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
107 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
108 switches::kOmniboxInlineHistoryQuickProvider,
109 switches::kOmniboxInlineHistoryQuickProviderAllowed },
110 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
111 switches::kOmniboxInlineHistoryQuickProvider,
112 switches::kOmniboxInlineHistoryQuickProviderProhibited }
113};
114
[email protected]fb854192013-02-06 01:30:04115const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
116 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
117 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
118 switches::kEnableCompositingForFixedPosition, ""},
119 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
120 switches::kDisableCompositingForFixedPosition, ""},
121 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
122 switches::kEnableHighDpiCompositingForFixedPosition, ""}
123};
124
[email protected]8b1c3c72013-01-25 01:48:43125const Experiment::Choice kGDIPresentChoices[] = {
126 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
127 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
128 switches::kDoFirstShowPresentWithGDI, ""},
129 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
130 switches::kDoAllShowPresentWithGDI, ""}
131};
132
[email protected]d7932532012-11-21 21:10:31133const Experiment::Choice kTouchEventsChoices[] = {
134 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
135 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
136 switches::kTouchEvents,
137 switches::kTouchEventsEnabled },
138 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
139 switches::kTouchEvents,
140 switches::kTouchEventsDisabled }
141};
142
[email protected]347a0c72012-05-14 20:28:06143const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31144 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20145 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06146 switches::kTouchOptimizedUI,
147 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06149 switches::kTouchOptimizedUI,
150 switches::kTouchOptimizedUIDisabled }
151};
152
[email protected]66f409c2012-10-04 20:59:04153const Experiment::Choice kNaClDebugMaskChoices[] = {
154 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
155 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
156 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
157 // an option to switch off its debugging.
158 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
159 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
160 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
161 switches::kNaClDebugMask, "*://*/*debug.nmf" }
162};
163
[email protected]ea2f3342012-09-21 21:13:36164#if defined(OS_CHROMEOS)
165const Experiment::Choice kAshBootAnimationFunction[] = {
166 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
167 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
168 ash::switches::kAshBootAnimationFunction2, ""},
169 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
170 ash::switches::kAshBootAnimationFunction3, ""}
171};
[email protected]d96aef22012-10-30 11:47:02172
173const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]ad2fe9f2012-11-15 11:03:19174 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
[email protected]d96aef22012-10-30 11:47:02175 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]ad2fe9f2012-11-15 11:03:19176 switches::kEnableChromeCaptivePortalDetector, ""},
177 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
178 switches::kDisableChromeCaptivePortalDetector, ""}
[email protected]d96aef22012-10-30 11:47:02179};
[email protected]a78c7432013-03-13 06:22:43180
[email protected]ea2f3342012-09-21 21:13:36181#endif
182
[email protected]9323fdd12013-02-23 00:31:36183const Experiment::Choice kImplSidePaintingChoices[] = {
184 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
185 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
186 cc::switches::kEnableImplSidePainting, ""},
187 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
188 cc::switches::kDisableImplSidePainting, ""}
189};
190
[email protected]a42c85f2013-04-04 18:15:12191const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
192 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
193 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
194 cc::switches::kMaxTilesForInterestArea, "64"},
195 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
196 cc::switches::kMaxTilesForInterestArea, "128"},
197 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
198 cc::switches::kMaxTilesForInterestArea, "256"},
199 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
200 cc::switches::kMaxTilesForInterestArea, "512"}
201};
202
[email protected]a3618122013-04-26 21:15:34203const Experiment::Choice kDefaultTileWidthChoices[] = {
204 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
205 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
206 switches::kDefaultTileWidth, "128"},
207 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
208 switches::kDefaultTileWidth, "256"},
209 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
210 switches::kDefaultTileWidth, "512"},
211 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
212 switches::kDefaultTileWidth, "1024"}
213};
214
215const Experiment::Choice kDefaultTileHeightChoices[] = {
216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
217 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
218 switches::kDefaultTileHeight, "128"},
219 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
220 switches::kDefaultTileHeight, "256"},
221 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
222 switches::kDefaultTileHeight, "512"},
223 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
224 switches::kDefaultTileHeight, "1024"}
225};
226
[email protected]38484df12013-04-10 16:42:03227const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21228 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
230 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03231 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
232 switches::kUseSimpleCacheBackend, "on"}
233};
234
[email protected]4bc5050c2010-11-18 17:55:54235// RECORDING USER METRICS FOR FLAGS:
236// -----------------------------------------------------------------------------
237// The first line of the experiment is the internal name. If you'd like to
238// gather statistics about the usage of your flag, you should append a marker
239// comment to the end of the feature name, like so:
240// "my-special-feature", // FLAGS:RECORD_UMA
241//
242// After doing that, run //chrome/tools/extract_actions.py (see instructions at
243// the top of that file for details) to update the chromeactions.txt file, which
244// will enable UMA to record your feature flag.
245//
[email protected]783d5bb2012-10-24 03:47:14246// After your feature has shipped under a flag, you can locate the metrics under
247// the action name AboutFlags_internal-action-name. Actions are recorded once
248// per startup, so you should divide this number by AboutFlags_StartupTick to
249// get a sense of usage. Note that this will not be the same as number of users
250// with a given feature enabled because users can quit and relaunch the
251// application multiple times over a given time interval. The dashboard also
252// shows you how many (metrics reporting) users have enabled the flag over the
253// last seven days. However, note that this is not the same as the number of
254// users who have the flag enabled, since enabling the flag happens once,
255// whereas running with the flag enabled happens until the user flips the flag
256// again.
[email protected]4bc5050c2010-11-18 17:55:54257
[email protected]8a6ff28d2010-12-02 16:35:19258// To add a new experiment add to the end of kExperiments. There are two
259// distinct types of experiments:
260// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
261// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22262// . MULTI_VALUE: a list of choices, the first of which should correspond to a
263// deactivated state for this lab (i.e. no command line option). To specify
264// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
265// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19266// See the documentation of Experiment for details on the fields.
267//
268// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05269const Experiment kExperiments[] = {
270 {
[email protected]aac169d2011-03-18 19:53:03271 "expose-for-tabs", // FLAGS:RECORD_UMA
272 IDS_FLAGS_TABPOSE_NAME,
273 IDS_FLAGS_TABPOSE_DESCRIPTION,
274 kOsMac,
275#if defined(OS_MACOSX)
276 // The switch exists only on OS X.
277 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
278#else
279 SINGLE_VALUE_TYPE("")
280#endif
281 },
282 {
[email protected]4bc5050c2010-11-18 17:55:54283 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05284 IDS_FLAGS_CONFLICTS_CHECK_NAME,
285 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
286 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19287 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05288 },
289 {
[email protected]4bc5050c2010-11-18 17:55:54290 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54291 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
292 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45293 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22294 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31295 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22296 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
297 // always have PDF rasterization available, so no flag needed there.
298#if !defined(GOOGLE_CHROME_BUILD)
299 kOsWin,
300#else
301 0,
[email protected]fa6d2a2f2010-11-30 21:47:19302#endif
[email protected]8a6ff28d2010-12-02 16:35:19303 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42304 },
[email protected]60d77bd2012-08-22 00:10:07305#if defined(OS_WIN)
306 {
307 "print-raster",
308 IDS_FLAGS_PRINT_RASTER_NAME,
309 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
310 kOsWin,
311 SINGLE_VALUE_TYPE(switches::kPrintRaster)
312 },
313#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05314 {
[email protected]96c6f4c2011-05-18 19:36:22315 "ignore-gpu-blacklist",
316 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
317 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
318 kOsAll,
319 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
320 },
321 {
[email protected]0110cf112011-07-02 00:39:43322 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22323 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
324 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23325 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44326 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
327 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22328 },
329 {
[email protected]72787e392012-03-23 05:55:43330 "threaded-compositing-mode",
331 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
332 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58333 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44334 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
335 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59336 },
337 {
[email protected]17e27692013-02-06 17:02:09338 "force-accelerated-composited-scrolling",
339 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
340 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
341 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44342 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
343 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09344 },
345 {
[email protected]8b1c3c72013-01-25 01:48:43346 "present-with-GDI",
347 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
348 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
349 kOsWin,
350 MULTI_VALUE_TYPE(kGDIPresentChoices)
351 },
352 {
[email protected]2b608752013-05-01 03:34:36353 "enable-experimental-canvas-features",
354 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
355 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
356 kOsAll,
357 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
358 },
359 {
[email protected]81c64af62012-06-06 20:15:52360 "disable-accelerated-2d-canvas",
361 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
362 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
363 kOsAll,
364 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
365 },
366 {
[email protected]efcde132012-05-30 01:05:18367 "disable-threaded-animation",
368 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
369 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59370 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37371 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59372 },
373 {
[email protected]5963b772011-02-09 22:55:38374 "composited-layer-borders",
375 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
376 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
377 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57378 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38379 },
380 {
[email protected]a8f1eaa2011-03-07 19:00:58381 "show-fps-counter",
382 IDS_FLAGS_SHOW_FPS_COUNTER,
383 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
384 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57385 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58386 },
[email protected]8ff7f342011-05-25 01:49:47387 {
[email protected]70c98a332011-12-21 20:51:52388 "accelerated-filters",
389 IDS_FLAGS_ACCELERATED_FILTERS,
390 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
391 kOsAll,
392 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
393 },
394 {
[email protected]8ff7f342011-05-25 01:49:47395 "disable-gpu-vsync",
396 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
397 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56398 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47399 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
400 },
[email protected]deaba6d52011-09-23 14:47:12401 {
[email protected]4052d832013-01-16 05:31:01402 "enable-webgl",
403 IDS_FLAGS_ENABLE_WEBGL_NAME,
404 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
405 kOsAndroid,
406#if defined(OS_ANDROID)
407 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
408#else
409 SINGLE_VALUE_TYPE("")
410#endif
411 },
412 {
[email protected]deaba6d52011-09-23 14:47:12413 "disable-webgl",
414 IDS_FLAGS_DISABLE_WEBGL_NAME,
415 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56416 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01417#if defined(OS_ANDROID)
418 SINGLE_VALUE_TYPE("")
419#else
[email protected]deaba6d52011-09-23 14:47:12420 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01421#endif
[email protected]deaba6d52011-09-23 14:47:12422 },
[email protected]09096e02012-05-24 11:12:04423 {
[email protected]ce585bf2013-03-14 16:25:16424 "disable-webrtc",
425 IDS_FLAGS_DISABLE_WEBRTC_NAME,
426 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05427 kOsAndroid,
428#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16429 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05430#else
431 SINGLE_VALUE_TYPE("")
432#endif
433 },
[email protected]34cb5292013-04-15 06:06:31434#if defined(OS_ANDROID)
435 {
436 "enable-webaudio",
437 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
438 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
439 kOsAndroid,
440 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
441 },
442#endif
[email protected]d9da9582013-01-31 04:59:05443 {
[email protected]96bcdc102012-05-24 23:42:10444 "fixed-position-creates-stacking-context",
445 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
446 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
447 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44448 ENABLE_DISABLE_VALUE_TYPE(
449 switches::kEnableFixedPositionCreatesStackingContext,
450 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10451 },
[email protected]fb854192013-02-06 01:30:04452 {
453 "enable-compositing-for-fixed-position",
454 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
455 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
456 kOsAll,
457 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
458 },
[email protected]a7640ef22012-10-06 00:52:08459 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53460 {
[email protected]e3791ce92011-08-09 01:03:32461 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40462 IDS_FLAGS_ENABLE_NACL_NAME,
463 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56464 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19465 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40466 },
467 {
[email protected]9addd1c2012-09-15 14:28:24468 "enable-nacl-debug", // FLAGS:RECORD_UMA
469 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
470 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56471 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24472 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13473 },
474 {
[email protected]66f409c2012-10-04 20:59:04475 "nacl-debug-mask", // FLAGS:RECORD_UMA
476 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
477 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56478 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04479 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
480 },
481 {
[email protected]7babd1c2012-08-08 20:35:29482 "enable-pnacl", // FLAGS:RECORD_UMA
483 IDS_FLAGS_ENABLE_PNACL_NAME,
484 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56485 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29486 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
487 },
488 {
[email protected]4bc5050c2010-11-18 17:55:54489 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32490 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
491 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56492 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19493 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32494 },
[email protected]3627b06d2010-11-12 16:36:16495 {
[email protected]ac2e2acd2013-03-21 12:57:29496 "extensions-on-chrome-urls",
497 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
498 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
499 kOsAll,
500 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
501 },
502 {
[email protected]e9cddd52013-03-23 17:37:53503 "enable-adview",
504 IDS_FLAGS_ENABLE_ADVIEW_NAME,
505 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
506 kOsDesktop,
507 SINGLE_VALUE_TYPE(switches::kEnableAdview)
508 },
509 {
510 "enable-adview-src-attribute",
511 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
512 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
513 kOsDesktop,
514 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
515 },
516 {
[email protected]544471a2012-10-13 05:27:09517 "action-box",
[email protected]cab18ef2012-04-27 07:22:03518 IDS_FLAGS_ACTION_BOX_NAME,
519 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56520 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44521 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
522 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03523 },
524 {
[email protected]3a362432012-06-18 20:39:51525 "script-badges",
526 IDS_FLAGS_SCRIPT_BADGES_NAME,
527 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56528 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09529 SINGLE_VALUE_TYPE(switches::kScriptBadges)
530 },
531 {
532 "script-bubble",
533 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
534 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56535 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44536 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
537 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51538 },
539 {
[email protected]cbe224d2011-08-04 22:12:49540 "apps-new-install-bubble",
541 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
542 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56543 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49544 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
545 },
546 {
[email protected]80bd24e2010-11-30 09:34:38547 "disable-hyperlink-auditing",
548 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
549 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
550 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19551 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51552 },
553 {
554 "experimental-location-features", // FLAGS:RECORD_UMA
555 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
556 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
557 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19558 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
559 },
560 {
[email protected]5aea1862011-03-23 23:55:39561 "tab-groups-context-menu",
562 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
563 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
564 kOsWin,
565 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
566 },
[email protected]c94cebd2012-06-21 00:55:28567 {
568 "enable-instant-extended-api",
569 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
570 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56571 kOsDesktop,
[email protected]73444382013-02-26 19:31:51572 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
573 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28574 },
[email protected]e9bf9d92011-03-31 20:57:15575 {
[email protected]8cc9e532013-05-06 21:01:47576 "enable-local-first-load-ntp",
577 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
578 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
579 kOsDesktop,
580 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
581 switches::kDisableLocalFirstLoadNTP)
582 },
583 {
[email protected]07fd48a2013-04-13 02:53:27584 "enable-local-only-instant-extended-api",
585 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
586 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
587 kOsDesktop,
588 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
589 switches::kDisableLocalOnlyInstantExtendedAPI)
590 },
591 {
[email protected]354e33b2011-06-15 00:29:10592 "static-ip-config",
593 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
594 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
595 kOsCrOS,
596#if defined(OS_CHROMEOS)
597 // This switch exists only on Chrome OS.
598 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
599#else
600 SINGLE_VALUE_TYPE("")
601#endif
602 },
[email protected]3eb5728c2011-06-20 22:32:24603 {
604 "show-autofill-type-predictions",
605 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
606 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
607 kOsAll,
[email protected]e217c5632013-04-12 19:11:48608 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24609 },
[email protected]bff4d3e2011-06-21 23:58:52610 {
[email protected]a5e9faa2013-03-19 09:58:38611 "enable-sync-favicons",
612 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
613 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55614 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38615 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55616 },
617 {
[email protected]5d90a0a2012-11-15 02:43:40618 "sync-keystore-encryption",
619 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
620 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
621 kOsAll,
622 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
623 },
624 {
[email protected]e755a382012-09-13 17:16:35625 "enable-gesture-tap-highlight",
626 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
627 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
628 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47629 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
630 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35631 },
632 {
[email protected]a22ebd812011-06-23 00:05:39633 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
634 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
635 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
636 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40637 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25638 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39639 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
640 },
[email protected]81a6b0b2011-06-24 17:55:40641 {
[email protected]128dc6c2012-06-22 20:30:35642 "omnibox-history-quick-provider-reorder-for-inlining",
643 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
644 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
645 kOsAll,
646 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
647 },
648 {
[email protected]032d5e6c2012-02-17 17:53:55649 "omnibox-inline-history-quick-provider",
650 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
651 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
652 kOsAll,
653 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
654 },
655 {
[email protected]7e7a28092011-12-09 22:24:55656 "enable-panels",
657 IDS_FLAGS_ENABLE_PANELS_NAME,
658 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56659 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55660 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54661 },
[email protected]e3749d12011-07-25 22:22:12662 {
[email protected]27c14f02012-06-22 17:29:58663 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27664 "save-page-as-mhtml", // FLAGS:RECORD_UMA
665 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
666 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
667 kOsMac | kOsWin | kOsLinux,
668 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
669 },
670 {
[email protected]b7bb44f2011-09-01 05:17:03671 "enable-autologin",
672 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
673 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
674 kOsMac | kOsWin | kOsLinux,
675 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
676 },
[email protected]b9841172011-09-26 23:36:09677 {
[email protected]18cf89d2013-04-12 02:42:32678 "enable-spdy4a1",
679 IDS_FLAGS_ENABLE_SPDY4A1_NAME,
680 IDS_FLAGS_ENABLE_SPDY4A1_DESCRIPTION,
681 kOsAll,
682 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a1)
683 },
684 {
[email protected]27b3fe92012-03-21 05:35:06685 "enable-async-dns",
686 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
687 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46688 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44689 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
690 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06691 },
692 {
[email protected]1eb93802012-09-11 18:57:56693 "disable-media-source",
[email protected]da43c082012-09-07 18:56:11694 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
695 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32696 kOsAll,
[email protected]da43c082012-09-07 18:56:11697 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]6aa03b32011-10-27 21:44:44698 },
[email protected]e4e68dbb2011-11-18 01:50:22699 {
[email protected]36d98412013-01-31 20:28:53700 "disable-encrypted-media",
701 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
702 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56703 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53704 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03705 },
[email protected]f88628792012-12-18 07:07:50706 {
707 "enable-opus-playback",
708 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
709 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56710 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50711 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
712 },
[email protected]ca6eaa5a2013-01-24 16:16:04713 {
[email protected]c54e1aa2013-01-25 09:26:17714 "enable-vp9-playback",
715 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
716 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
717 kOsDesktop,
718 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
719 },
720 {
[email protected]6ac955b2013-04-19 23:43:32721 "enable-vp8-alpha-playback",
722 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
723 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
724 kOsDesktop,
725 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
726 },
727 {
[email protected]ca6eaa5a2013-01-24 16:16:04728 "enable-managed-users",
729 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
730 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58731 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04732 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
733 },
[email protected]dc04be7c2012-03-15 23:57:49734#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50735 {
[email protected]2a13a9a2013-04-19 04:00:21736 "ash-disable-auto-maximizing",
737 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
738 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
739 kOsWin | kOsLinux | kOsCrOS,
740 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
741 },
742 {
[email protected]cda278d2012-10-30 20:31:40743 "ash-disable-auto-window-placement",
744 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
745 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
746 kOsWin | kOsLinux | kOsCrOS,
747 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
748 },
[email protected]b4e4ec42012-11-29 21:42:40749 {
[email protected]16f55a22013-02-13 23:47:34750 "ash-disable-per-app-launcher",
751 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
752 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40753 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34754 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40755 },
[email protected]dc04be7c2012-03-15 23:57:49756#endif
[email protected]eaae8b462012-01-20 22:20:39757 {
[email protected]db543d322011-12-15 20:40:15758 "per-tile-painting",
759 IDS_FLAGS_PER_TILE_PAINTING_NAME,
760 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37761 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37762 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15763 },
[email protected]bf88c032011-12-22 19:05:47764 {
765 "enable-javascript-harmony",
766 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
767 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
768 kOsAll,
769 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
770 },
[email protected]7e7f378a2012-01-05 14:35:37771 {
[email protected]85646172012-01-09 22:45:54772 "enable-tab-browser-dragging",
773 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
774 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
775 kOsWin,
776 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
777 },
778 {
[email protected]068b7b52012-02-27 12:41:44779 "disable-restore-session-state",
780 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
781 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37782 kOsAll,
[email protected]068b7b52012-02-27 12:41:44783 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37784 },
[email protected]88864db2012-01-18 20:56:35785 {
786 "disable-software-rasterizer",
787 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
788 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
789#if defined(ENABLE_SWIFTSHADER)
790 kOsAll,
791#else
792 0,
793#endif
794 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
795 },
[email protected]15a5d722012-01-23 09:11:14796 {
[email protected]ff7b6dd2012-09-15 20:20:03797 "enable-experimental-webkit-features",
798 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
799 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16800 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03801 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49802 },
803 {
[email protected]0f95a252012-09-13 22:30:04804 "enable-css-shaders",
805 IDS_FLAGS_CSS_SHADERS_NAME,
806 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
807 kOsAll,
808 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
809 },
810 {
[email protected]9860c68b2012-02-02 01:58:09811 "enable-extension-activity-ui",
812 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
813 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56814 kOsDesktop,
[email protected]9860c68b2012-02-02 01:58:09815 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00816 },
[email protected]54ae4e92012-02-16 15:19:05817 {
[email protected]3e8befc2012-03-13 01:17:03818 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16819 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
820 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56821 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03822 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16823 },
[email protected]dc04be7c2012-03-15 23:57:49824#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01825 {
[email protected]3cd198a22012-03-12 20:38:01826 "enable-ash-oak",
827 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
828 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
829 kOsAll,
830 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
831 },
[email protected]31cf1c52012-02-29 20:55:01832#endif
[email protected]184ec592012-03-01 11:54:28833 {
834 "enable-devtools-experiments",
835 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
836 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56837 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28838 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
839 },
[email protected]76d1854e2012-03-02 23:57:44840 {
[email protected]2fefdb32013-02-26 14:28:10841 "silent-debugger-extension-api",
842 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
843 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
844 kOsDesktop,
845 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
846 },
847 {
[email protected]76d1854e2012-03-02 23:57:44848 "enable-suggestions-ntp",
849 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
850 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56851 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44852 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
853 },
[email protected]a3d54252012-04-05 20:04:13854 {
[email protected]1dbaf5e2012-11-30 05:51:32855 "spellcheck-autocorrect",
856 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
857 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
858 kOsWin | kOsLinux | kOsCrOS,
859 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
860 },
861 {
[email protected]d7932532012-11-21 21:10:31862 "touch-events",
863 IDS_TOUCH_EVENTS_NAME,
864 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56865 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31866 MULTI_VALUE_TYPE(kTouchEventsChoices)
867 },
868 {
[email protected]c9c73ad42012-04-18 03:35:59869 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06870 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
871 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55872 kOsWin,
[email protected]347a0c72012-05-14 20:28:06873 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59874 },
[email protected]8a6aaa72012-04-20 20:53:58875 {
[email protected]b9c96ff2012-11-26 22:24:40876 "disable-touch-adjustment",
877 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
878 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
879 kOsWin | kOsLinux | kOsCrOS,
880 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
881 },
882 {
[email protected]0b9383a2012-10-26 00:58:16883 "enable-tab-capture",
884 IDS_ENABLE_TAB_CAPTURE_NAME,
885 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25886 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44887 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
888 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16889 },
[email protected]0b60afa2012-04-19 17:36:39890#if defined(OS_CHROMEOS)
891 {
[email protected]7c4a9bc2012-09-11 22:10:05892 "enable-background-loader",
893 IDS_ENABLE_BACKLOADER_NAME,
894 IDS_ENABLE_BACKLOADER_DESCRIPTION,
895 kOsCrOS,
896 SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader)
897 },
898 {
[email protected]c5667b282012-08-31 00:32:50899 "enable-bezel-touch",
900 IDS_ENABLE_BEZEL_TOUCH_NAME,
901 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47902 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50903 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47904 },
905 {
[email protected]3f4181a2013-02-01 21:31:07906 "enable-screensaver-extension",
907 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
908 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
909 kOsCrOS,
910 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
911 },
912 {
[email protected]0b60afa2012-04-19 17:36:39913 "no-discard-tabs",
914 IDS_FLAGS_NO_DISCARD_TABS_NAME,
915 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
916 kOsCrOS,
917 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
918 },
919#endif
[email protected]79be6d32012-04-24 20:47:44920 {
[email protected]8d68a3e02013-01-12 15:57:10921 "enable-download-resumption",
922 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
923 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56924 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10925 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
926 },
927 {
[email protected]9a5940d2012-04-27 19:16:23928 "allow-nacl-socket-api",
929 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
930 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56931 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23932 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
933 },
[email protected]85333732012-05-01 19:02:24934 {
[email protected]60673ad72012-05-02 06:16:33935 "stacked-tab-strip",
936 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
937 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
938 kOsWin,
939 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
940 },
941 {
[email protected]4bd20202012-06-14 17:35:01942 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24943 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
944 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
945 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01946 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24947 },
[email protected]190349fd2012-05-02 00:10:47948#if defined(OS_CHROMEOS)
949 {
950 "allow-touchpad-three-finger-click",
951 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
952 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
953 kOsCrOS,
954 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
955 },
[email protected]fbc176b62012-10-27 02:19:58956 {
957 "allow-touchpad-three-finger-swipe",
958 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
959 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
960 kOsCrOS,
961 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe)
962 },
[email protected]190349fd2012-05-02 00:10:47963#endif
[email protected]1992a2f42012-10-23 18:32:21964 {
[email protected]a585e462013-01-26 00:37:15965 "use-client-login-signin-flow",
966 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
967 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21968 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15969 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21970 },
[email protected]8ee02242012-12-04 15:23:32971 {
972 "enable-desktop-guest-mode",
973 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
974 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
975 kOsMac | kOsWin | kOsLinux,
976 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
977 },
[email protected]53520b1b2012-05-07 21:43:37978#if defined(USE_ASH)
979 {
[email protected]8257d382013-03-26 13:08:42980 "show-launcher-alignment-menu",
981 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
982 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42983 kOsAll,
[email protected]8257d382013-03-26 13:08:42984 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42985 },
986 {
[email protected]2ddf37b2013-04-20 01:15:58987 "disable-minimize-on-second-launcher-item-click",
988 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
989 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
990 kOsAll,
991 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
992 },
993 {
[email protected]73074742012-05-17 01:44:41994 "show-touch-hud",
995 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
996 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
997 kOsAll,
998 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
999 },
1000 {
[email protected]9f0940b62012-05-23 22:56:351001 "enable-pinch",
1002 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1003 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061004 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381005 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1006 },
1007 {
1008 "pinch-zoom-scrollbars",
1009 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_NAME,
1010 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_DESCRIPTION,
1011 kOsCrOS,
1012 ENABLE_DISABLE_VALUE_TYPE(cc::switches::kEnablePinchZoomScrollbars,
1013 cc::switches::kDisablePinchZoomScrollbars)
[email protected]9f0940b62012-05-23 22:56:351014 },
[email protected]a8379312012-06-15 00:20:431015 {
1016 "app-list-show-apps-only",
1017 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME,
1018 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION,
1019 kOsAll,
[email protected]0bc6c272012-07-17 03:32:031020 SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly),
[email protected]a8379312012-06-15 00:20:431021 },
[email protected]a4016f12013-05-02 07:53:471022 {
1023 "forced-maximize-mode",
1024 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1025 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1026 kOsLinux | kOsWin | kOsCrOS,
1027 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1028 },
[email protected]73074742012-05-17 01:44:411029#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281030#if defined(OS_CHROMEOS)
1031 {
[email protected]8b04a1652012-08-04 02:59:491032 "disable-boot-animation",
1033 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1034 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581035 kOsCrOSOwnerOnly,
[email protected]8b04a1652012-08-04 02:59:491036 SINGLE_VALUE_TYPE(switches::kDisableBootAnimation),
1037 },
[email protected]95058572012-08-20 14:57:291038 {
[email protected]b4557192012-09-19 11:29:581039 "disable-boot-animation2",
1040 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
1041 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581042 kOsCrOSOwnerOnly,
[email protected]b4557192012-09-19 11:29:581043 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
1044 },
1045 {
[email protected]ea2f3342012-09-21 21:13:361046 "boot-animation-fucntion",
1047 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
1048 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581049 kOsCrOSOwnerOnly,
[email protected]ea2f3342012-09-21 21:13:361050 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
1051 },
[email protected]839667d62012-10-23 19:38:571052 {
[email protected]d96aef22012-10-30 11:47:021053 "captive-portal-detector",
1054 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1055 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581056 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021057 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1058 },
1059 {
[email protected]c11aa8f12012-12-18 18:43:141060 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571061 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1062 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1063 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141064 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571065 },
[email protected]f0280952012-11-06 20:30:501066 {
[email protected]ea2fab32013-04-16 06:55:021067 "file-manager-legacy",
1068 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1069 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231070 kOsCrOS,
[email protected]ea2fab32013-04-16 06:55:021071 SINGLE_VALUE_TYPE(switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231072 },
[email protected]3e035e82012-11-27 20:54:321073 {
[email protected]828d99052013-04-22 08:15:031074 "file-manager-legacy-ui",
1075 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1076 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101077 kOsCrOS,
[email protected]828d99052013-04-22 08:15:031078 SINGLE_VALUE_TYPE(switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101079 },
1080 {
[email protected]8039e06c2013-01-17 23:34:501081 "disable-launcher-per-display",
1082 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME,
1083 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION,
[email protected]62018dc2012-12-13 00:37:351084 kOsCrOS,
[email protected]8039e06c2013-01-17 23:34:501085 SINGLE_VALUE_TYPE(ash::switches::kAshDisableLauncherPerDisplay),
[email protected]62018dc2012-12-13 00:37:351086 },
[email protected]06b146d2013-02-07 06:06:471087 {
[email protected]c64d7732013-03-25 18:09:501088 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521089 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1090 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581091 kOsCrOSOwnerOnly,
[email protected]640aa2b2013-03-22 16:00:521092 SINGLE_VALUE_TYPE(switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471093 },
[email protected]6ad015c2013-03-06 00:49:511094 {
[email protected]c64d7732013-03-25 18:09:501095 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521096 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1097 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511098 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521099 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511100 },
[email protected]099b890c2013-04-25 19:16:261101 {
1102 "disable-quickoffice-component-app",
1103 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1104 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1105 kOsCrOS,
1106 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1107 },
[email protected]62018dc2012-12-13 00:37:351108#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391109 {
[email protected]6247aba2013-03-04 22:57:181110 "views-textfield",
1111 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1112 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391113 kOsWin,
[email protected]6247aba2013-03-04 22:57:181114 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1115 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391116 },
[email protected]bd0cd3bb2012-06-14 03:03:381117 {
[email protected]2d4817742012-12-17 20:16:181118 "enable-new-dialog-style",
1119 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME,
1120 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321121 kOsWin | kOsCrOS,
[email protected]2d4817742012-12-17 20:16:181122 SINGLE_VALUE_TYPE(switches::kEnableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321123 },
[email protected]7db8893a2012-07-26 00:49:401124 { "disable-accelerated-video-decode",
1125 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1126 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191127 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401128 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151129 },
[email protected]66ae9fc2012-06-19 21:33:521130#if defined(USE_ASH)
1131 {
1132 "ash-debug-shortcuts",
1133 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1134 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1135 kOsAll,
1136 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1137 },
1138#endif
[email protected]37fee0942012-08-07 21:07:451139 {
[email protected]ad3f6d22012-08-29 02:34:191140 "enable-contacts",
1141 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1142 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1143 kOsCrOS,
1144 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1145 },
[email protected]1d9bb9cd2012-08-28 22:02:501146#if defined(USE_ASH)
1147 { "ash-enable-advanced-gestures",
1148 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1149 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1150 kOsCrOS,
1151 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1152 },
[email protected]cfa24e62013-02-13 21:19:111153 { "ash-disable-tab-scrubbing",
1154 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1155 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161156 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111157 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161158 },
[email protected]00c8469e22013-05-08 21:40:081159 { "ash-drag-and-drop-applist-to-launcher",
1160 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1161 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1162 kOsCrOS,
1163 SINGLE_VALUE_TYPE(ash::switches::kAshDragAndDropAppListToLauncher),
1164 },
[email protected]83eef802012-12-02 07:43:521165 { "ash-enable-workspace-scrubbing",
1166 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1167 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1168 kOsCrOS,
1169 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1170 },
[email protected]cf2b1a82013-04-20 01:05:431171 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111172 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1173 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241174 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431175 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1176 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241177 },
[email protected]316708a2012-11-05 22:57:021178#if defined(OS_LINUX)
1179 { "ash-enable-memory-monitor",
1180 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1181 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1182 kOsCrOS,
1183 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1184 },
1185#endif
[email protected]1d9bb9cd2012-08-28 22:02:501186#endif
[email protected]9b7ab882012-09-10 23:46:361187#if defined(OS_CHROMEOS)
[email protected]9475ee6f2013-03-08 18:20:091188 { "ash-disable-new-network-status-area",
1189 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME,
1190 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION,
[email protected]badba1ad2012-11-16 17:21:461191 kOsCrOS,
[email protected]9475ee6f2013-03-08 18:20:091192 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea),
[email protected]badba1ad2012-11-16 17:21:461193 },
[email protected]9b7ab882012-09-10 23:46:361194 {
[email protected]354ff2d2013-05-01 17:06:311195 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121196 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1197 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1198 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311199 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1200 },
1201 {
1202 "ash-audio-device-menu",
1203 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1204 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1205 kOsCrOS,
1206 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121207 },
1208 {
[email protected]205f07892012-10-16 20:26:221209 "enable-carrier-switching",
1210 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1211 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1212 kOsCrOS,
1213 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1214 },
1215 {
[email protected]9b7ab882012-09-10 23:46:361216 "enable-request-tablet-site",
1217 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1218 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1219 kOsCrOS,
1220 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1221 },
1222#endif
[email protected]dab49c0b2012-10-04 05:55:351223 {
1224 "debug-packed-apps",
1225 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1226 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561227 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351228 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1229 },
[email protected]d1459ed2012-10-10 01:29:331230 {
1231 "enable-password-generation",
1232 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1233 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561234 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331235 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1236 },
[email protected]26d045f2012-10-18 21:18:431237 {
[email protected]76f7d4882012-10-26 21:09:221238 "enable-deferred-image-decoding",
1239 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1240 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221241 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221242 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1243 },
1244 {
[email protected]075543d2012-10-24 01:29:141245 "performance-monitor-gathering",
1246 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1247 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1248 kOsAll,
1249 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1250 },
[email protected]783d5bb2012-10-24 03:47:141251 {
[email protected]90b482d2013-04-04 10:45:581252 "disable-native-autofill-ui",
1253 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1254 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431255 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581256 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431257 },
1258 {
[email protected]a7259fb2012-11-08 06:22:231259 "enable-experimental-form-filling",
1260 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1261 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1262 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481263 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231264 },
[email protected]6e6efe42013-01-30 00:04:501265 {
[email protected]db3178c2013-03-21 14:54:541266 "wallet-service-use-prod",
1267 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1268 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1269 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481270 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541271 },
1272 {
[email protected]6e6efe42013-01-30 00:04:501273 "enable-interactive-autocomplete",
1274 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1275 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]57e67ac2013-02-22 03:37:221276 kOsWin | kOsCrOS | kOsAndroid,
[email protected]6e6efe42013-01-30 00:04:501277 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1278 },
[email protected]177260c2013-04-24 01:47:381279#if defined(USE_AURA)
1280 {
1281 "overscroll-history-navigation",
1282 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1283 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1284 kOsAll,
1285 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1286 switches::kOverscrollHistoryNavigation, "1",
1287 switches::kOverscrollHistoryNavigation, "0")
1288 },
1289#endif
[email protected]edbea622012-11-28 20:39:381290 {
1291 "enable-touch-drag-drop",
1292 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1293 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1294 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271295 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1296 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381297 },
[email protected]0e2f43b62013-02-21 00:47:151298 {
1299 "enable-touch-editing",
1300 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1301 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1302 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271303 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1304 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151305 },
[email protected]f1c39242013-01-29 16:13:011306#if defined(ENABLE_MESSAGE_CENTER)
[email protected]92e12dd92012-12-11 03:33:201307 {
1308 "enable-rich-notifications",
1309 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1310 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001311 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231312 ENABLE_DISABLE_VALUE_TYPE(
1313 message_center::switches::kEnableRichNotifications,
1314 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201315 },
[email protected]f1c39242013-01-29 16:13:011316#endif
[email protected]4d51c682012-12-11 11:34:551317 {
[email protected]ddec1aa2013-04-28 23:22:451318 "enable-sync-synced-notifications",
1319 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1320 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1321 kOsWin | kOsCrOS,
1322 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1323 switches::kDisableSyncSyncedNotifications)
1324 },
1325 {
[email protected]a50e16a2013-04-25 14:07:171326 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551327 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1328 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1329 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171330 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551331 },
[email protected]628a69a92012-12-23 04:09:341332 {
[email protected]fd030142013-02-08 02:04:381333 "enable-usermedia-screen-capture",
1334 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1335 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1336 kOsDesktop,
1337 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1338 },
[email protected]5b93e162013-02-19 06:33:091339 {
1340 "enable-apps-devtool-app",
1341 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1342 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1343 kOsDesktop,
1344 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1345 },
[email protected]9323fdd12013-02-23 00:31:361346 {
1347 "impl-side-painting",
1348 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1349 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041350 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361351 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1352 },
[email protected]a42c85f2013-04-04 18:15:121353 {
[email protected]1c92d3e2013-04-18 05:31:391354 "enable-websocket-experimental-implementation",
1355 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1356 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1357 kOsAll,
1358 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1359 },
1360 {
[email protected]a42c85f2013-04-04 18:15:121361 "max-tiles-for-interest-area",
1362 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1363 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1364 kOsAndroid | kOsLinux | kOsCrOS,
1365 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1366 },
[email protected]7cf7ccb2013-04-20 02:53:081367 {
1368 "enable-offline-mode",
1369 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1370 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1371 kOsAll,
1372 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1373 },
[email protected]a3618122013-04-26 21:15:341374 {
1375 "default-tile-width",
1376 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1377 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1378 kOsAll,
1379 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1380 },
1381 {
1382 "default-tile-height",
1383 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1384 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1385 kOsAll,
1386 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1387 },
[email protected]2f2f72b2013-03-08 22:37:311388 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1389#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371390 {
1391 "track-active-visit-time",
1392 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1393 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1394 kOsWin,
1395 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1396 },
[email protected]2f2f72b2013-03-08 22:37:311397#endif
[email protected]8cc71d42013-03-02 17:26:081398#if defined(OS_ANDROID)
1399 {
1400 "disable-gesture-requirement-for-media-playback",
1401 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1402 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1403 kOsAndroid,
1404 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1405 },
1406#endif
[email protected]e79f2fd52013-03-08 23:52:471407#if defined(OS_CHROMEOS)
1408 {
1409 "enable-experimental-bluetooth",
1410 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME,
1411 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION,
1412 kOsCrOS,
1413 SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth)
1414 },
1415#endif
[email protected]6077cab2013-03-11 19:36:141416#if defined(ENABLE_GOOGLE_NOW)
1417 {
1418 "enable-google-now",
1419 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1420 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1421 kOsWin | kOsCrOS,
1422 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1423 },
1424#endif
[email protected]4a9e2e02013-04-08 16:19:491425 {
1426 "enable-translate-alpha-languages",
1427 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1428 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1429 kOsAll,
1430 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1431 },
[email protected]86459e2c2013-04-10 13:39:241432#if defined(OS_CHROMEOS)
1433 {
1434 "enable-virtual-keyboard",
1435 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1436 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1437 kOsCrOS,
1438 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1439 },
1440#endif
[email protected]38484df12013-04-10 16:42:031441 {
1442 "enable-simple-cache-backend",
1443 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1444 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1445 kOsAndroid,
1446 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1447 },
[email protected]717e4e22013-04-10 20:52:231448 {
1449 "enable-tcp-fast-open",
1450 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1451 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111452 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231453 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1454 },
[email protected]8027acd2013-04-18 08:35:151455 {
1456 "enable-webp-in-accept-header",
1457 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1458 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1459 kOsAll,
1460 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1461 },
[email protected]58c740f2013-05-06 05:25:441462 {
1463 "apps-use-native-frame",
1464 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1465 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1466 kOsWin,
1467 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1468 },
[email protected]896d86b32013-05-09 19:36:441469 {
1470 "enable-syncfs-directory-operation",
1471 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1472 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1473 kOsAll,
1474 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1475 },
[email protected]a0e4b072011-08-17 01:47:071476};
[email protected]ad2a3ded2010-08-27 13:19:051477
[email protected]a314ee5a2010-10-26 21:23:281478const Experiment* experiments = kExperiments;
1479size_t num_experiments = arraysize(kExperiments);
1480
[email protected]e2ddbc92010-10-15 20:02:071481// Stores and encapsulates the little state that about:flags has.
1482class FlagsState {
1483 public:
1484 FlagsState() : needs_restart_(false) {}
1485 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1486 bool IsRestartNeededToCommitChanges();
1487 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281488 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071489 void RemoveFlagsSwitches(
1490 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001491 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071492 void reset();
1493
1494 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551495 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071496 return Singleton<FlagsState>::get();
1497 }
1498
1499 private:
1500 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531501 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071502
1503 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1504};
1505
[email protected]c7b7800a2010-10-07 18:51:351506// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491507// in a set.
[email protected]1a47d7e2010-10-15 00:37:241508void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051509 const ListValue* enabled_experiments = prefs->GetList(
1510 prefs::kEnabledLabsExperiments);
1511 if (!enabled_experiments)
1512 return;
1513
1514 for (ListValue::const_iterator it = enabled_experiments->begin();
1515 it != enabled_experiments->end();
1516 ++it) {
1517 std::string experiment_name;
1518 if (!(*it)->GetAsString(&experiment_name)) {
1519 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1520 continue;
1521 }
1522 result->insert(experiment_name);
1523 }
1524}
1525
[email protected]c6343372013-03-13 17:05:491526// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241527void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051528 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381529 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1530 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051531
1532 experiments_list->Clear();
1533 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1534 it != enabled_experiments.end();
1535 ++it) {
1536 experiments_list->Append(new StringValue(*it));
1537 }
1538}
1539
[email protected]8a6ff28d2010-12-02 16:35:191540// Adds the internal names for the specified experiment to |names|.
1541void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1542 if (e.type == Experiment::SINGLE_VALUE) {
1543 names->insert(e.internal_name);
1544 } else {
[email protected]83e9fa702013-02-25 19:30:441545 DCHECK(e.type == Experiment::MULTI_VALUE ||
1546 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191547 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441548 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191549 }
1550}
1551
[email protected]28e35af2011-02-09 12:56:221552// Confirms that an experiment is valid, used in a DCHECK in
1553// SanitizeList below.
1554bool ValidateExperiment(const Experiment& e) {
1555 switch (e.type) {
1556 case Experiment::SINGLE_VALUE:
1557 DCHECK_EQ(0, e.num_choices);
1558 DCHECK(!e.choices);
1559 break;
1560 case Experiment::MULTI_VALUE:
1561 DCHECK_GT(e.num_choices, 0);
1562 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531563 DCHECK(e.choices[0].command_line_switch);
1564 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221565 break;
[email protected]83e9fa702013-02-25 19:30:441566 case Experiment::ENABLE_DISABLE_VALUE:
1567 DCHECK_EQ(3, e.num_choices);
1568 DCHECK(!e.choices);
1569 DCHECK(e.command_line_switch);
1570 DCHECK(e.command_line_value);
1571 DCHECK(e.disable_command_line_switch);
1572 DCHECK(e.disable_command_line_value);
1573 break;
[email protected]28e35af2011-02-09 12:56:221574 default:
1575 NOTREACHED();
1576 }
1577 return true;
1578}
1579
[email protected]ad2a3ded2010-08-27 13:19:051580// Removes all experiments from prefs::kEnabledLabsExperiments that are
1581// unknown, to prevent this list to become very long as experiments are added
1582// and removed.
1583void SanitizeList(PrefService* prefs) {
1584 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221585 for (size_t i = 0; i < num_experiments; ++i) {
1586 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191587 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221588 }
[email protected]ad2a3ded2010-08-27 13:19:051589
1590 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241591 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051592
1593 std::set<std::string> new_enabled_experiments;
1594 std::set_intersection(
1595 known_experiments.begin(), known_experiments.end(),
1596 enabled_experiments.begin(), enabled_experiments.end(),
1597 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1598
[email protected]4c8853f2012-07-23 01:29:161599 if (new_enabled_experiments != enabled_experiments)
1600 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051601}
1602
[email protected]1a47d7e2010-10-15 00:37:241603void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051604 PrefService* prefs, std::set<std::string>* result) {
1605 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241606 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051607}
1608
[email protected]a314ee5a2010-10-26 21:23:281609// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1610// enabled on the current platform.
1611void GetSanitizedEnabledFlagsForCurrentPlatform(
1612 PrefService* prefs, std::set<std::string>* result) {
1613 GetSanitizedEnabledFlags(prefs, result);
1614
1615 // Filter out any experiments that aren't enabled on the current platform. We
1616 // don't remove these from prefs else syncing to a platform with a different
1617 // set of experiments would be lossy.
1618 std::set<std::string> platform_experiments;
1619 int current_platform = GetCurrentPlatform();
1620 for (size_t i = 0; i < num_experiments; ++i) {
1621 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191622 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581623#if defined(OS_CHROMEOS)
1624 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1625 AddInternalName(experiments[i], &platform_experiments);
1626#endif
[email protected]a314ee5a2010-10-26 21:23:281627 }
1628
1629 std::set<std::string> new_enabled_experiments;
1630 std::set_intersection(
1631 platform_experiments.begin(), platform_experiments.end(),
1632 result->begin(), result->end(),
1633 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1634
1635 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051636}
1637
[email protected]8a6ff28d2010-12-02 16:35:191638// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191639Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221640 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441641 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1642 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191643 ListValue* result = new ListValue;
1644 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191645 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441646 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191647 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441648 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221649 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191650 result->Append(value);
1651 }
1652 return result;
1653}
1654
[email protected]e2ddbc92010-10-15 20:02:071655} // namespace
1656
[email protected]83e9fa702013-02-25 19:30:441657std::string Experiment::NameForChoice(int index) const {
1658 DCHECK(type == Experiment::MULTI_VALUE ||
1659 type == Experiment::ENABLE_DISABLE_VALUE);
1660 DCHECK_LT(index, num_choices);
1661 return std::string(internal_name) + testing::kMultiSeparator +
1662 base::IntToString(index);
1663}
1664
1665string16 Experiment::DescriptionForChoice(int index) const {
1666 DCHECK(type == Experiment::MULTI_VALUE ||
1667 type == Experiment::ENABLE_DISABLE_VALUE);
1668 DCHECK_LT(index, num_choices);
1669 int description_id;
1670 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1671 const int kEnableDisableDescriptionIds[] = {
1672 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1673 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1674 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1675 };
1676 description_id = kEnableDisableDescriptionIds[index];
1677 } else {
1678 description_id = choices[index].description_id;
1679 }
1680 return l10n_util::GetStringUTF16(description_id);
1681}
1682
[email protected]1a47d7e2010-10-15 00:37:241683void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551684 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051685}
1686
[email protected]37736bd2013-04-18 11:53:581687ListValue* GetFlagsExperimentsData(PrefService* prefs, FlagAccess access) {
[email protected]ad2a3ded2010-08-27 13:19:051688 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241689 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051690
1691 int current_platform = GetCurrentPlatform();
1692
1693 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281694 for (size_t i = 0; i < num_experiments; ++i) {
1695 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051696
1697 DictionaryValue* data = new DictionaryValue();
1698 data->SetString("internal_name", experiment.internal_name);
1699 data->SetString("name",
1700 l10n_util::GetStringUTF16(experiment.visible_name_id));
1701 data->SetString("description",
1702 l10n_util::GetStringUTF16(
1703 experiment.visible_description_id));
[email protected]37736bd2013-04-18 11:53:581704 bool supported = (experiment.supported_platforms & current_platform) != 0;
1705#if defined(OS_CHROMEOS)
1706 if (access == kOwnerAccessToFlags &&
1707 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0)
1708 supported = true;
1709#endif
[email protected]cc3e2052011-12-20 01:01:401710 data->SetBoolean("supported", supported);
1711
1712 ListValue* supported_platforms = new ListValue();
1713 AddOsStrings(experiment.supported_platforms, supported_platforms);
1714 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051715
[email protected]28e35af2011-02-09 12:56:221716 switch (experiment.type) {
1717 case Experiment::SINGLE_VALUE:
1718 data->SetBoolean(
1719 "enabled",
1720 enabled_experiments.count(experiment.internal_name) > 0);
1721 break;
1722 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441723 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221724 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1725 break;
1726 default:
1727 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191728 }
1729
[email protected]ad2a3ded2010-08-27 13:19:051730 experiments_data->Append(data);
1731 }
1732 return experiments_data;
1733}
1734
[email protected]ad2a3ded2010-08-27 13:19:051735bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551736 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051737}
1738
1739void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351740 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551741 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071742}
1743
1744void RemoveFlagsSwitches(
1745 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551746 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071747}
1748
[email protected]cb93bf52013-02-20 01:20:001749void ResetAllFlags(PrefService* prefs) {
1750 FlagsState::GetInstance()->ResetAllFlags(prefs);
1751}
1752
[email protected]a314ee5a2010-10-26 21:23:281753int GetCurrentPlatform() {
1754#if defined(OS_MACOSX)
1755 return kOsMac;
1756#elif defined(OS_WIN)
1757 return kOsWin;
1758#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1759 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211760#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281761 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401762#elif defined(OS_ANDROID)
1763 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281764#else
1765#error Unknown platform
1766#endif
1767}
1768
[email protected]4bc5050c2010-11-18 17:55:541769void RecordUMAStatistics(const PrefService* prefs) {
1770 std::set<std::string> flags;
1771 GetEnabledFlags(prefs, &flags);
1772 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1773 ++it) {
1774 std::string action("AboutFlags_");
1775 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381776 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541777 }
1778 // Since flag metrics are recorded every startup, add a tick so that the
1779 // stats can be made meaningful.
1780 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381781 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1782 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541783}
1784
[email protected]e2ddbc92010-10-15 20:02:071785//////////////////////////////////////////////////////////////////////////////
1786// FlagsState implementation.
1787
1788namespace {
1789
[email protected]83e9fa702013-02-25 19:30:441790typedef std::map<std::string, std::pair<std::string, std::string> >
1791 NameToSwitchAndValueMap;
1792
1793void SetFlagToSwitchMapping(const std::string& key,
1794 const std::string& switch_name,
1795 const std::string& switch_value,
1796 NameToSwitchAndValueMap* name_to_switch_map) {
1797 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1798 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1799}
1800
[email protected]e2ddbc92010-10-15 20:02:071801void FlagsState::ConvertFlagsToSwitches(
1802 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071803 if (command_line->HasSwitch(switches::kNoExperiments))
1804 return;
1805
1806 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001807
[email protected]a314ee5a2010-10-26 21:23:281808 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071809
[email protected]a82744532011-02-11 16:15:531810 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191811 for (size_t i = 0; i < num_experiments; ++i) {
1812 const Experiment& e = experiments[i];
1813 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441814 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1815 e.command_line_value, &name_to_switch_map);
1816 } else if (e.type == Experiment::MULTI_VALUE) {
1817 for (int j = 0; j < e.num_choices; ++j) {
1818 SetFlagToSwitchMapping(e.NameForChoice(j),
1819 e.choices[j].command_line_switch,
1820 e.choices[j].command_line_value,
1821 &name_to_switch_map);
1822 }
[email protected]8a6ff28d2010-12-02 16:35:191823 } else {
[email protected]83e9fa702013-02-25 19:30:441824 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1825 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1826 &name_to_switch_map);
1827 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1828 e.command_line_value, &name_to_switch_map);
1829 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1830 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191831 }
1832 }
[email protected]e2ddbc92010-10-15 20:02:071833
1834 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531835 flags_switches_.insert(
1836 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1837 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071838 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1839 it != enabled_experiments.end();
1840 ++it) {
1841 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531842 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191843 name_to_switch_map.find(experiment_name);
1844 if (name_to_switch_it == name_to_switch_map.end()) {
1845 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071846 continue;
[email protected]8a6ff28d2010-12-02 16:35:191847 }
[email protected]e2ddbc92010-10-15 20:02:071848
[email protected]a82744532011-02-11 16:15:531849 const std::pair<std::string, std::string>&
1850 switch_and_value_pair = name_to_switch_it->second;
1851
1852 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1853 switch_and_value_pair.second);
1854 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071855 }
1856 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531857 flags_switches_.insert(
1858 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1859 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071860}
1861
1862bool FlagsState::IsRestartNeededToCommitChanges() {
1863 return needs_restart_;
1864}
1865
1866void FlagsState::SetExperimentEnabled(
1867 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441868 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191869 if (at_index != std::string::npos) {
1870 DCHECK(enable);
1871 // We're being asked to enable a multi-choice experiment. Disable the
1872 // currently selected choice.
1873 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221874 const std::string experiment_name = internal_name.substr(0, at_index);
1875 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191876
[email protected]28e35af2011-02-09 12:56:221877 // And enable the new choice, if it is not the default first choice.
1878 if (internal_name != experiment_name + "@0") {
1879 std::set<std::string> enabled_experiments;
1880 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081881 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221882 SetEnabledFlags(prefs, enabled_experiments);
1883 }
[email protected]8a6ff28d2010-12-02 16:35:191884 return;
1885 }
1886
[email protected]ad2a3ded2010-08-27 13:19:051887 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241888 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051889
[email protected]8a6ff28d2010-12-02 16:35:191890 const Experiment* e = NULL;
1891 for (size_t i = 0; i < num_experiments; ++i) {
1892 if (experiments[i].internal_name == internal_name) {
1893 e = experiments + i;
1894 break;
1895 }
1896 }
1897 DCHECK(e);
1898
1899 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591900 if (enable)
[email protected]147492b2013-03-19 23:52:081901 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591902 else
[email protected]147492b2013-03-19 23:52:081903 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191904 } else {
1905 if (enable) {
1906 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081907 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191908 } else {
1909 // Find the currently enabled choice and disable it.
1910 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441911 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191912 if (enabled_experiments.find(choice_name) !=
1913 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081914 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191915 enabled_experiments.erase(choice_name);
1916 // Continue on just in case there's a bug and more than one
1917 // experiment for this choice was enabled.
1918 }
1919 }
1920 }
1921 }
[email protected]ad2a3ded2010-08-27 13:19:051922
[email protected]1a47d7e2010-10-15 00:37:241923 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051924}
1925
[email protected]e2ddbc92010-10-15 20:02:071926void FlagsState::RemoveFlagsSwitches(
1927 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531928 for (std::map<std::string, std::string>::const_iterator
1929 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1930 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071931 }
1932}
1933
[email protected]cb93bf52013-02-20 01:20:001934void FlagsState::ResetAllFlags(PrefService* prefs) {
1935 needs_restart_ = true;
1936
1937 std::set<std::string> no_experiments;
1938 SetEnabledFlags(prefs, no_experiments);
1939}
1940
[email protected]e2ddbc92010-10-15 20:02:071941void FlagsState::reset() {
1942 needs_restart_ = false;
1943 flags_switches_.clear();
1944}
1945
[email protected]38e46812011-05-09 20:49:221946} // namespace
[email protected]e2ddbc92010-10-15 20:02:071947
1948namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191949
1950// WARNING: '@' is also used in the html file. If you update this constant you
1951// also need to update the html file.
1952const char kMultiSeparator[] = "@";
1953
[email protected]e2ddbc92010-10-15 20:02:071954void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551955 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071956}
[email protected]a314ee5a2010-10-26 21:23:281957
1958void SetExperiments(const Experiment* e, size_t count) {
1959 if (!e) {
1960 experiments = kExperiments;
1961 num_experiments = arraysize(kExperiments);
1962 } else {
1963 experiments = e;
1964 num_experiments = count;
1965 }
1966}
1967
[email protected]8a6ff28d2010-12-02 16:35:191968const Experiment* GetExperiments(size_t* count) {
1969 *count = num_experiments;
1970 return experiments;
1971}
1972
[email protected]e2ddbc92010-10-15 20:02:071973} // namespace testing
1974
[email protected]1a47d7e2010-10-15 00:37:241975} // namespace about_flags