blob: 8dbe0998b35bb029b825caf33fe3101211a8c702 [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]83eef802012-12-02 07:43:521159 { "ash-enable-workspace-scrubbing",
1160 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1161 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1162 kOsCrOS,
1163 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1164 },
[email protected]cf2b1a82013-04-20 01:05:431165 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111166 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1167 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241168 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431169 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1170 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241171 },
[email protected]316708a2012-11-05 22:57:021172#if defined(OS_LINUX)
1173 { "ash-enable-memory-monitor",
1174 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1175 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1176 kOsCrOS,
1177 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1178 },
1179#endif
[email protected]1d9bb9cd2012-08-28 22:02:501180#endif
[email protected]9b7ab882012-09-10 23:46:361181#if defined(OS_CHROMEOS)
[email protected]9475ee6f2013-03-08 18:20:091182 { "ash-disable-new-network-status-area",
1183 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME,
1184 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION,
[email protected]badba1ad2012-11-16 17:21:461185 kOsCrOS,
[email protected]9475ee6f2013-03-08 18:20:091186 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea),
[email protected]badba1ad2012-11-16 17:21:461187 },
[email protected]9b7ab882012-09-10 23:46:361188 {
[email protected]354ff2d2013-05-01 17:06:311189 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121190 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1191 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1192 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311193 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1194 },
1195 {
1196 "ash-audio-device-menu",
1197 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1198 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1199 kOsCrOS,
1200 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121201 },
1202 {
[email protected]205f07892012-10-16 20:26:221203 "enable-carrier-switching",
1204 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1205 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1206 kOsCrOS,
1207 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1208 },
1209 {
[email protected]9b7ab882012-09-10 23:46:361210 "enable-request-tablet-site",
1211 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1212 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1213 kOsCrOS,
1214 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1215 },
1216#endif
[email protected]dab49c0b2012-10-04 05:55:351217 {
1218 "debug-packed-apps",
1219 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1220 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561221 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351222 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1223 },
[email protected]d1459ed2012-10-10 01:29:331224 {
1225 "enable-password-generation",
1226 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1227 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561228 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331229 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1230 },
[email protected]26d045f2012-10-18 21:18:431231 {
[email protected]76f7d4882012-10-26 21:09:221232 "enable-deferred-image-decoding",
1233 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1234 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221235 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221236 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1237 },
1238 {
[email protected]075543d2012-10-24 01:29:141239 "performance-monitor-gathering",
1240 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1241 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1242 kOsAll,
1243 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1244 },
[email protected]783d5bb2012-10-24 03:47:141245 {
[email protected]90b482d2013-04-04 10:45:581246 "disable-native-autofill-ui",
1247 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1248 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431249 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581250 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431251 },
1252 {
[email protected]a7259fb2012-11-08 06:22:231253 "enable-experimental-form-filling",
1254 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1255 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1256 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481257 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231258 },
[email protected]6e6efe42013-01-30 00:04:501259 {
[email protected]db3178c2013-03-21 14:54:541260 "wallet-service-use-prod",
1261 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1262 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1263 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481264 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541265 },
1266 {
[email protected]6e6efe42013-01-30 00:04:501267 "enable-interactive-autocomplete",
1268 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1269 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]57e67ac2013-02-22 03:37:221270 kOsWin | kOsCrOS | kOsAndroid,
[email protected]6e6efe42013-01-30 00:04:501271 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1272 },
[email protected]177260c2013-04-24 01:47:381273#if defined(USE_AURA)
1274 {
1275 "overscroll-history-navigation",
1276 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1277 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1278 kOsAll,
1279 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1280 switches::kOverscrollHistoryNavigation, "1",
1281 switches::kOverscrollHistoryNavigation, "0")
1282 },
1283#endif
[email protected]edbea622012-11-28 20:39:381284 {
1285 "enable-touch-drag-drop",
1286 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1287 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1288 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271289 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1290 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381291 },
[email protected]0e2f43b62013-02-21 00:47:151292 {
1293 "enable-touch-editing",
1294 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1295 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1296 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271297 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1298 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151299 },
[email protected]f1c39242013-01-29 16:13:011300#if defined(ENABLE_MESSAGE_CENTER)
[email protected]92e12dd92012-12-11 03:33:201301 {
1302 "enable-rich-notifications",
1303 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1304 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001305 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231306 ENABLE_DISABLE_VALUE_TYPE(
1307 message_center::switches::kEnableRichNotifications,
1308 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201309 },
[email protected]f1c39242013-01-29 16:13:011310#endif
[email protected]4d51c682012-12-11 11:34:551311 {
[email protected]ddec1aa2013-04-28 23:22:451312 "enable-sync-synced-notifications",
1313 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1314 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1315 kOsWin | kOsCrOS,
1316 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1317 switches::kDisableSyncSyncedNotifications)
1318 },
1319 {
[email protected]a50e16a2013-04-25 14:07:171320 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551321 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1322 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1323 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171324 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551325 },
[email protected]628a69a92012-12-23 04:09:341326 {
[email protected]fd030142013-02-08 02:04:381327 "enable-usermedia-screen-capture",
1328 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1329 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1330 kOsDesktop,
1331 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1332 },
[email protected]5b93e162013-02-19 06:33:091333 {
1334 "enable-apps-devtool-app",
1335 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1336 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1337 kOsDesktop,
1338 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1339 },
[email protected]9323fdd12013-02-23 00:31:361340 {
1341 "impl-side-painting",
1342 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1343 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041344 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361345 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1346 },
[email protected]a42c85f2013-04-04 18:15:121347 {
[email protected]1c92d3e2013-04-18 05:31:391348 "enable-websocket-experimental-implementation",
1349 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1350 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1351 kOsAll,
1352 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1353 },
1354 {
[email protected]a42c85f2013-04-04 18:15:121355 "max-tiles-for-interest-area",
1356 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1357 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1358 kOsAndroid | kOsLinux | kOsCrOS,
1359 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1360 },
[email protected]7cf7ccb2013-04-20 02:53:081361 {
1362 "enable-offline-mode",
1363 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1364 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1365 kOsAll,
1366 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1367 },
[email protected]a3618122013-04-26 21:15:341368 {
1369 "default-tile-width",
1370 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1371 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1372 kOsAll,
1373 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1374 },
1375 {
1376 "default-tile-height",
1377 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1378 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1379 kOsAll,
1380 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1381 },
[email protected]2f2f72b2013-03-08 22:37:311382 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1383#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371384 {
1385 "track-active-visit-time",
1386 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1387 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1388 kOsWin,
1389 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1390 },
[email protected]2f2f72b2013-03-08 22:37:311391#endif
[email protected]8cc71d42013-03-02 17:26:081392#if defined(OS_ANDROID)
1393 {
1394 "disable-gesture-requirement-for-media-playback",
1395 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1396 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1397 kOsAndroid,
1398 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1399 },
1400#endif
[email protected]e79f2fd52013-03-08 23:52:471401#if defined(OS_CHROMEOS)
1402 {
1403 "enable-experimental-bluetooth",
1404 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME,
1405 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION,
1406 kOsCrOS,
1407 SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth)
1408 },
1409#endif
[email protected]6077cab2013-03-11 19:36:141410#if defined(ENABLE_GOOGLE_NOW)
1411 {
1412 "enable-google-now",
1413 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1414 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1415 kOsWin | kOsCrOS,
1416 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1417 },
1418#endif
[email protected]4a9e2e02013-04-08 16:19:491419 {
1420 "enable-translate-alpha-languages",
1421 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1422 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1423 kOsAll,
1424 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1425 },
[email protected]86459e2c2013-04-10 13:39:241426#if defined(OS_CHROMEOS)
1427 {
1428 "enable-virtual-keyboard",
1429 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1430 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1431 kOsCrOS,
1432 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1433 },
1434#endif
[email protected]38484df12013-04-10 16:42:031435 {
1436 "enable-simple-cache-backend",
1437 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1438 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1439 kOsAndroid,
1440 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1441 },
[email protected]717e4e22013-04-10 20:52:231442 {
1443 "enable-tcp-fast-open",
1444 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1445 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111446 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231447 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1448 },
[email protected]8027acd2013-04-18 08:35:151449 {
1450 "enable-webp-in-accept-header",
1451 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1452 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1453 kOsAll,
1454 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1455 },
[email protected]58c740f2013-05-06 05:25:441456 {
1457 "apps-use-native-frame",
1458 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1459 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1460 kOsWin,
1461 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1462 },
[email protected]a0e4b072011-08-17 01:47:071463};
[email protected]ad2a3ded2010-08-27 13:19:051464
[email protected]a314ee5a2010-10-26 21:23:281465const Experiment* experiments = kExperiments;
1466size_t num_experiments = arraysize(kExperiments);
1467
[email protected]e2ddbc92010-10-15 20:02:071468// Stores and encapsulates the little state that about:flags has.
1469class FlagsState {
1470 public:
1471 FlagsState() : needs_restart_(false) {}
1472 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1473 bool IsRestartNeededToCommitChanges();
1474 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281475 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071476 void RemoveFlagsSwitches(
1477 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001478 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071479 void reset();
1480
1481 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551482 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071483 return Singleton<FlagsState>::get();
1484 }
1485
1486 private:
1487 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531488 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071489
1490 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1491};
1492
[email protected]c7b7800a2010-10-07 18:51:351493// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491494// in a set.
[email protected]1a47d7e2010-10-15 00:37:241495void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051496 const ListValue* enabled_experiments = prefs->GetList(
1497 prefs::kEnabledLabsExperiments);
1498 if (!enabled_experiments)
1499 return;
1500
1501 for (ListValue::const_iterator it = enabled_experiments->begin();
1502 it != enabled_experiments->end();
1503 ++it) {
1504 std::string experiment_name;
1505 if (!(*it)->GetAsString(&experiment_name)) {
1506 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1507 continue;
1508 }
1509 result->insert(experiment_name);
1510 }
1511}
1512
[email protected]c6343372013-03-13 17:05:491513// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241514void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051515 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381516 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1517 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051518
1519 experiments_list->Clear();
1520 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1521 it != enabled_experiments.end();
1522 ++it) {
1523 experiments_list->Append(new StringValue(*it));
1524 }
1525}
1526
[email protected]8a6ff28d2010-12-02 16:35:191527// Adds the internal names for the specified experiment to |names|.
1528void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1529 if (e.type == Experiment::SINGLE_VALUE) {
1530 names->insert(e.internal_name);
1531 } else {
[email protected]83e9fa702013-02-25 19:30:441532 DCHECK(e.type == Experiment::MULTI_VALUE ||
1533 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191534 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441535 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191536 }
1537}
1538
[email protected]28e35af2011-02-09 12:56:221539// Confirms that an experiment is valid, used in a DCHECK in
1540// SanitizeList below.
1541bool ValidateExperiment(const Experiment& e) {
1542 switch (e.type) {
1543 case Experiment::SINGLE_VALUE:
1544 DCHECK_EQ(0, e.num_choices);
1545 DCHECK(!e.choices);
1546 break;
1547 case Experiment::MULTI_VALUE:
1548 DCHECK_GT(e.num_choices, 0);
1549 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531550 DCHECK(e.choices[0].command_line_switch);
1551 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221552 break;
[email protected]83e9fa702013-02-25 19:30:441553 case Experiment::ENABLE_DISABLE_VALUE:
1554 DCHECK_EQ(3, e.num_choices);
1555 DCHECK(!e.choices);
1556 DCHECK(e.command_line_switch);
1557 DCHECK(e.command_line_value);
1558 DCHECK(e.disable_command_line_switch);
1559 DCHECK(e.disable_command_line_value);
1560 break;
[email protected]28e35af2011-02-09 12:56:221561 default:
1562 NOTREACHED();
1563 }
1564 return true;
1565}
1566
[email protected]ad2a3ded2010-08-27 13:19:051567// Removes all experiments from prefs::kEnabledLabsExperiments that are
1568// unknown, to prevent this list to become very long as experiments are added
1569// and removed.
1570void SanitizeList(PrefService* prefs) {
1571 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221572 for (size_t i = 0; i < num_experiments; ++i) {
1573 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191574 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221575 }
[email protected]ad2a3ded2010-08-27 13:19:051576
1577 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241578 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051579
1580 std::set<std::string> new_enabled_experiments;
1581 std::set_intersection(
1582 known_experiments.begin(), known_experiments.end(),
1583 enabled_experiments.begin(), enabled_experiments.end(),
1584 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1585
[email protected]4c8853f2012-07-23 01:29:161586 if (new_enabled_experiments != enabled_experiments)
1587 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051588}
1589
[email protected]1a47d7e2010-10-15 00:37:241590void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051591 PrefService* prefs, std::set<std::string>* result) {
1592 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241593 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051594}
1595
[email protected]a314ee5a2010-10-26 21:23:281596// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1597// enabled on the current platform.
1598void GetSanitizedEnabledFlagsForCurrentPlatform(
1599 PrefService* prefs, std::set<std::string>* result) {
1600 GetSanitizedEnabledFlags(prefs, result);
1601
1602 // Filter out any experiments that aren't enabled on the current platform. We
1603 // don't remove these from prefs else syncing to a platform with a different
1604 // set of experiments would be lossy.
1605 std::set<std::string> platform_experiments;
1606 int current_platform = GetCurrentPlatform();
1607 for (size_t i = 0; i < num_experiments; ++i) {
1608 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191609 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581610#if defined(OS_CHROMEOS)
1611 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1612 AddInternalName(experiments[i], &platform_experiments);
1613#endif
[email protected]a314ee5a2010-10-26 21:23:281614 }
1615
1616 std::set<std::string> new_enabled_experiments;
1617 std::set_intersection(
1618 platform_experiments.begin(), platform_experiments.end(),
1619 result->begin(), result->end(),
1620 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1621
1622 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051623}
1624
[email protected]8a6ff28d2010-12-02 16:35:191625// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191626Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221627 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441628 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1629 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191630 ListValue* result = new ListValue;
1631 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191632 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441633 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191634 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441635 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221636 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191637 result->Append(value);
1638 }
1639 return result;
1640}
1641
[email protected]e2ddbc92010-10-15 20:02:071642} // namespace
1643
[email protected]83e9fa702013-02-25 19:30:441644std::string Experiment::NameForChoice(int index) const {
1645 DCHECK(type == Experiment::MULTI_VALUE ||
1646 type == Experiment::ENABLE_DISABLE_VALUE);
1647 DCHECK_LT(index, num_choices);
1648 return std::string(internal_name) + testing::kMultiSeparator +
1649 base::IntToString(index);
1650}
1651
1652string16 Experiment::DescriptionForChoice(int index) const {
1653 DCHECK(type == Experiment::MULTI_VALUE ||
1654 type == Experiment::ENABLE_DISABLE_VALUE);
1655 DCHECK_LT(index, num_choices);
1656 int description_id;
1657 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1658 const int kEnableDisableDescriptionIds[] = {
1659 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1660 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1661 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1662 };
1663 description_id = kEnableDisableDescriptionIds[index];
1664 } else {
1665 description_id = choices[index].description_id;
1666 }
1667 return l10n_util::GetStringUTF16(description_id);
1668}
1669
[email protected]1a47d7e2010-10-15 00:37:241670void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551671 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051672}
1673
[email protected]37736bd2013-04-18 11:53:581674ListValue* GetFlagsExperimentsData(PrefService* prefs, FlagAccess access) {
[email protected]ad2a3ded2010-08-27 13:19:051675 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241676 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051677
1678 int current_platform = GetCurrentPlatform();
1679
1680 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281681 for (size_t i = 0; i < num_experiments; ++i) {
1682 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051683
1684 DictionaryValue* data = new DictionaryValue();
1685 data->SetString("internal_name", experiment.internal_name);
1686 data->SetString("name",
1687 l10n_util::GetStringUTF16(experiment.visible_name_id));
1688 data->SetString("description",
1689 l10n_util::GetStringUTF16(
1690 experiment.visible_description_id));
[email protected]37736bd2013-04-18 11:53:581691 bool supported = (experiment.supported_platforms & current_platform) != 0;
1692#if defined(OS_CHROMEOS)
1693 if (access == kOwnerAccessToFlags &&
1694 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0)
1695 supported = true;
1696#endif
[email protected]cc3e2052011-12-20 01:01:401697 data->SetBoolean("supported", supported);
1698
1699 ListValue* supported_platforms = new ListValue();
1700 AddOsStrings(experiment.supported_platforms, supported_platforms);
1701 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051702
[email protected]28e35af2011-02-09 12:56:221703 switch (experiment.type) {
1704 case Experiment::SINGLE_VALUE:
1705 data->SetBoolean(
1706 "enabled",
1707 enabled_experiments.count(experiment.internal_name) > 0);
1708 break;
1709 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441710 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221711 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1712 break;
1713 default:
1714 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191715 }
1716
[email protected]ad2a3ded2010-08-27 13:19:051717 experiments_data->Append(data);
1718 }
1719 return experiments_data;
1720}
1721
[email protected]ad2a3ded2010-08-27 13:19:051722bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551723 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051724}
1725
1726void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351727 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551728 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071729}
1730
1731void RemoveFlagsSwitches(
1732 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551733 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071734}
1735
[email protected]cb93bf52013-02-20 01:20:001736void ResetAllFlags(PrefService* prefs) {
1737 FlagsState::GetInstance()->ResetAllFlags(prefs);
1738}
1739
[email protected]a314ee5a2010-10-26 21:23:281740int GetCurrentPlatform() {
1741#if defined(OS_MACOSX)
1742 return kOsMac;
1743#elif defined(OS_WIN)
1744 return kOsWin;
1745#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1746 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211747#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281748 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401749#elif defined(OS_ANDROID)
1750 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281751#else
1752#error Unknown platform
1753#endif
1754}
1755
[email protected]4bc5050c2010-11-18 17:55:541756void RecordUMAStatistics(const PrefService* prefs) {
1757 std::set<std::string> flags;
1758 GetEnabledFlags(prefs, &flags);
1759 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1760 ++it) {
1761 std::string action("AboutFlags_");
1762 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381763 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541764 }
1765 // Since flag metrics are recorded every startup, add a tick so that the
1766 // stats can be made meaningful.
1767 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381768 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1769 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541770}
1771
[email protected]e2ddbc92010-10-15 20:02:071772//////////////////////////////////////////////////////////////////////////////
1773// FlagsState implementation.
1774
1775namespace {
1776
[email protected]83e9fa702013-02-25 19:30:441777typedef std::map<std::string, std::pair<std::string, std::string> >
1778 NameToSwitchAndValueMap;
1779
1780void SetFlagToSwitchMapping(const std::string& key,
1781 const std::string& switch_name,
1782 const std::string& switch_value,
1783 NameToSwitchAndValueMap* name_to_switch_map) {
1784 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1785 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1786}
1787
[email protected]e2ddbc92010-10-15 20:02:071788void FlagsState::ConvertFlagsToSwitches(
1789 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071790 if (command_line->HasSwitch(switches::kNoExperiments))
1791 return;
1792
1793 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001794
[email protected]a314ee5a2010-10-26 21:23:281795 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071796
[email protected]a82744532011-02-11 16:15:531797 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191798 for (size_t i = 0; i < num_experiments; ++i) {
1799 const Experiment& e = experiments[i];
1800 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441801 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1802 e.command_line_value, &name_to_switch_map);
1803 } else if (e.type == Experiment::MULTI_VALUE) {
1804 for (int j = 0; j < e.num_choices; ++j) {
1805 SetFlagToSwitchMapping(e.NameForChoice(j),
1806 e.choices[j].command_line_switch,
1807 e.choices[j].command_line_value,
1808 &name_to_switch_map);
1809 }
[email protected]8a6ff28d2010-12-02 16:35:191810 } else {
[email protected]83e9fa702013-02-25 19:30:441811 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1812 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1813 &name_to_switch_map);
1814 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1815 e.command_line_value, &name_to_switch_map);
1816 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1817 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191818 }
1819 }
[email protected]e2ddbc92010-10-15 20:02:071820
1821 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531822 flags_switches_.insert(
1823 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1824 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071825 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1826 it != enabled_experiments.end();
1827 ++it) {
1828 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531829 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191830 name_to_switch_map.find(experiment_name);
1831 if (name_to_switch_it == name_to_switch_map.end()) {
1832 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071833 continue;
[email protected]8a6ff28d2010-12-02 16:35:191834 }
[email protected]e2ddbc92010-10-15 20:02:071835
[email protected]a82744532011-02-11 16:15:531836 const std::pair<std::string, std::string>&
1837 switch_and_value_pair = name_to_switch_it->second;
1838
1839 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1840 switch_and_value_pair.second);
1841 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071842 }
1843 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531844 flags_switches_.insert(
1845 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1846 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071847}
1848
1849bool FlagsState::IsRestartNeededToCommitChanges() {
1850 return needs_restart_;
1851}
1852
1853void FlagsState::SetExperimentEnabled(
1854 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441855 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191856 if (at_index != std::string::npos) {
1857 DCHECK(enable);
1858 // We're being asked to enable a multi-choice experiment. Disable the
1859 // currently selected choice.
1860 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221861 const std::string experiment_name = internal_name.substr(0, at_index);
1862 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191863
[email protected]28e35af2011-02-09 12:56:221864 // And enable the new choice, if it is not the default first choice.
1865 if (internal_name != experiment_name + "@0") {
1866 std::set<std::string> enabled_experiments;
1867 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081868 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221869 SetEnabledFlags(prefs, enabled_experiments);
1870 }
[email protected]8a6ff28d2010-12-02 16:35:191871 return;
1872 }
1873
[email protected]ad2a3ded2010-08-27 13:19:051874 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241875 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051876
[email protected]8a6ff28d2010-12-02 16:35:191877 const Experiment* e = NULL;
1878 for (size_t i = 0; i < num_experiments; ++i) {
1879 if (experiments[i].internal_name == internal_name) {
1880 e = experiments + i;
1881 break;
1882 }
1883 }
1884 DCHECK(e);
1885
1886 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591887 if (enable)
[email protected]147492b2013-03-19 23:52:081888 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591889 else
[email protected]147492b2013-03-19 23:52:081890 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191891 } else {
1892 if (enable) {
1893 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081894 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191895 } else {
1896 // Find the currently enabled choice and disable it.
1897 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441898 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191899 if (enabled_experiments.find(choice_name) !=
1900 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081901 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191902 enabled_experiments.erase(choice_name);
1903 // Continue on just in case there's a bug and more than one
1904 // experiment for this choice was enabled.
1905 }
1906 }
1907 }
1908 }
[email protected]ad2a3ded2010-08-27 13:19:051909
[email protected]1a47d7e2010-10-15 00:37:241910 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051911}
1912
[email protected]e2ddbc92010-10-15 20:02:071913void FlagsState::RemoveFlagsSwitches(
1914 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531915 for (std::map<std::string, std::string>::const_iterator
1916 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1917 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071918 }
1919}
1920
[email protected]cb93bf52013-02-20 01:20:001921void FlagsState::ResetAllFlags(PrefService* prefs) {
1922 needs_restart_ = true;
1923
1924 std::set<std::string> no_experiments;
1925 SetEnabledFlags(prefs, no_experiments);
1926}
1927
[email protected]e2ddbc92010-10-15 20:02:071928void FlagsState::reset() {
1929 needs_restart_ = false;
1930 flags_switches_.clear();
1931}
1932
[email protected]38e46812011-05-09 20:49:221933} // namespace
[email protected]e2ddbc92010-10-15 20:02:071934
1935namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191936
1937// WARNING: '@' is also used in the html file. If you update this constant you
1938// also need to update the html file.
1939const char kMultiSeparator[] = "@";
1940
[email protected]e2ddbc92010-10-15 20:02:071941void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551942 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071943}
[email protected]a314ee5a2010-10-26 21:23:281944
1945void SetExperiments(const Experiment* e, size_t count) {
1946 if (!e) {
1947 experiments = kExperiments;
1948 num_experiments = arraysize(kExperiments);
1949 } else {
1950 experiments = e;
1951 num_experiments = count;
1952 }
1953}
1954
[email protected]8a6ff28d2010-12-02 16:35:191955const Experiment* GetExperiments(size_t* count) {
1956 *count = num_experiments;
1957 return experiments;
1958}
1959
[email protected]e2ddbc92010-10-15 20:02:071960} // namespace testing
1961
[email protected]1a47d7e2010-10-15 00:37:241962} // namespace about_flags