blob: 680bfa2e71b7d272e4f31e3f3b6c9e049d72cc70 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5715#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0317#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3820#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
23#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0526#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0227#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0228#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1729#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5930#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4831#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2732#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2433#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5634#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2435#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5636
[email protected]dc04be7c2012-03-15 23:57:4937#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3138#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4939#endif
40
[email protected]badba1ad2012-11-16 17:21:4641#if defined(OS_CHROMEOS)
42#include "chromeos/chromeos_switches.h"
43#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]128dc6c2012-06-22 20:30:3588const Experiment::Choice
89 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
90 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
91 "",
92 "" },
93 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
94 switches::kOmniboxHistoryQuickProviderReorderForInlining,
95 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
96 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
97 switches::kOmniboxHistoryQuickProviderReorderForInlining,
98 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
99};
100
[email protected]032d5e6c2012-02-17 17:53:55101const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
102 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
103 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
104 switches::kOmniboxInlineHistoryQuickProvider,
105 switches::kOmniboxInlineHistoryQuickProviderAllowed },
106 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
107 switches::kOmniboxInlineHistoryQuickProvider,
108 switches::kOmniboxInlineHistoryQuickProviderProhibited }
109};
110
[email protected]fb854192013-02-06 01:30:04111const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
112 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
113 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
114 switches::kEnableCompositingForFixedPosition, ""},
115 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
116 switches::kDisableCompositingForFixedPosition, ""},
117 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
118 switches::kEnableHighDpiCompositingForFixedPosition, ""}
119};
120
[email protected]d8221b22013-05-23 05:35:43121const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
122 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
123 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
124 switches::kEnableCompositingForTransition, ""},
125 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
126 switches::kDisableCompositingForTransition, ""},
127};
128
[email protected]8b1c3c72013-01-25 01:48:43129const Experiment::Choice kGDIPresentChoices[] = {
130 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
131 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
132 switches::kDoFirstShowPresentWithGDI, ""},
133 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
134 switches::kDoAllShowPresentWithGDI, ""}
135};
136
[email protected]d7932532012-11-21 21:10:31137const Experiment::Choice kTouchEventsChoices[] = {
138 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
139 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
140 switches::kTouchEvents,
141 switches::kTouchEventsEnabled },
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
143 switches::kTouchEvents,
144 switches::kTouchEventsDisabled }
145};
146
[email protected]347a0c72012-05-14 20:28:06147const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31148 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20149 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06150 switches::kTouchOptimizedUI,
151 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20152 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06153 switches::kTouchOptimizedUI,
154 switches::kTouchOptimizedUIDisabled }
155};
156
[email protected]66f409c2012-10-04 20:59:04157const Experiment::Choice kNaClDebugMaskChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
159 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
160 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
161 // an option to switch off its debugging.
162 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
163 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
164 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
165 switches::kNaClDebugMask, "*://*/*debug.nmf" }
166};
167
[email protected]ea2f3342012-09-21 21:13:36168#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02169
170const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24171 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02172 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24173 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19174 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24175 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02176};
[email protected]a78c7432013-03-13 06:22:43177
[email protected]ea2f3342012-09-21 21:13:36178#endif
179
[email protected]9323fdd12013-02-23 00:31:36180const Experiment::Choice kImplSidePaintingChoices[] = {
181 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
182 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
183 cc::switches::kEnableImplSidePainting, ""},
184 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
185 cc::switches::kDisableImplSidePainting, ""}
186};
187
[email protected]a42c85f2013-04-04 18:15:12188const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
190 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
191 cc::switches::kMaxTilesForInterestArea, "64"},
192 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
193 cc::switches::kMaxTilesForInterestArea, "128"},
194 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
195 cc::switches::kMaxTilesForInterestArea, "256"},
196 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
197 cc::switches::kMaxTilesForInterestArea, "512"}
198};
199
[email protected]a3618122013-04-26 21:15:34200const Experiment::Choice kDefaultTileWidthChoices[] = {
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
202 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
203 switches::kDefaultTileWidth, "128"},
204 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
205 switches::kDefaultTileWidth, "256"},
206 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
207 switches::kDefaultTileWidth, "512"},
208 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
209 switches::kDefaultTileWidth, "1024"}
210};
211
212const Experiment::Choice kDefaultTileHeightChoices[] = {
213 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
214 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
215 switches::kDefaultTileHeight, "128"},
216 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
217 switches::kDefaultTileHeight, "256"},
218 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
219 switches::kDefaultTileHeight, "512"},
220 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
221 switches::kDefaultTileHeight, "1024"}
222};
223
[email protected]38484df12013-04-10 16:42:03224const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21225 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
227 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
229 switches::kUseSimpleCacheBackend, "on"}
230};
231
[email protected]910ecfe2013-06-03 23:38:14232const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
234 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
235 switches::kTabCaptureUpscaleQuality, "fast" },
236 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
237 switches::kTabCaptureUpscaleQuality, "good" },
238 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
239 switches::kTabCaptureUpscaleQuality, "best" },
240};
241
242const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
243 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
244 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
245 switches::kTabCaptureDownscaleQuality, "fast" },
246 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
247 switches::kTabCaptureDownscaleQuality, "good" },
248 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
249 switches::kTabCaptureDownscaleQuality, "best" },
250};
251
[email protected]4bc5050c2010-11-18 17:55:54252// RECORDING USER METRICS FOR FLAGS:
253// -----------------------------------------------------------------------------
254// The first line of the experiment is the internal name. If you'd like to
255// gather statistics about the usage of your flag, you should append a marker
256// comment to the end of the feature name, like so:
257// "my-special-feature", // FLAGS:RECORD_UMA
258//
259// After doing that, run //chrome/tools/extract_actions.py (see instructions at
260// the top of that file for details) to update the chromeactions.txt file, which
261// will enable UMA to record your feature flag.
262//
[email protected]783d5bb2012-10-24 03:47:14263// After your feature has shipped under a flag, you can locate the metrics under
264// the action name AboutFlags_internal-action-name. Actions are recorded once
265// per startup, so you should divide this number by AboutFlags_StartupTick to
266// get a sense of usage. Note that this will not be the same as number of users
267// with a given feature enabled because users can quit and relaunch the
268// application multiple times over a given time interval. The dashboard also
269// shows you how many (metrics reporting) users have enabled the flag over the
270// last seven days. However, note that this is not the same as the number of
271// users who have the flag enabled, since enabling the flag happens once,
272// whereas running with the flag enabled happens until the user flips the flag
273// again.
[email protected]4bc5050c2010-11-18 17:55:54274
[email protected]8a6ff28d2010-12-02 16:35:19275// To add a new experiment add to the end of kExperiments. There are two
276// distinct types of experiments:
277// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
278// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22279// . MULTI_VALUE: a list of choices, the first of which should correspond to a
280// deactivated state for this lab (i.e. no command line option). To specify
281// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
282// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19283// See the documentation of Experiment for details on the fields.
284//
285// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05286const Experiment kExperiments[] = {
287 {
[email protected]aac169d2011-03-18 19:53:03288 "expose-for-tabs", // FLAGS:RECORD_UMA
289 IDS_FLAGS_TABPOSE_NAME,
290 IDS_FLAGS_TABPOSE_DESCRIPTION,
291 kOsMac,
292#if defined(OS_MACOSX)
293 // The switch exists only on OS X.
294 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
295#else
296 SINGLE_VALUE_TYPE("")
297#endif
298 },
299 {
[email protected]4bc5050c2010-11-18 17:55:54300 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05301 IDS_FLAGS_CONFLICTS_CHECK_NAME,
302 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
303 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19304 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05305 },
306 {
[email protected]96c6f4c2011-05-18 19:36:22307 "ignore-gpu-blacklist",
308 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
309 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
310 kOsAll,
311 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
312 },
313 {
[email protected]0110cf112011-07-02 00:39:43314 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22315 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
316 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23317 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44318 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
319 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22320 },
321 {
[email protected]72787e392012-03-23 05:55:43322 "threaded-compositing-mode",
323 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
324 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58325 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44326 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
327 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59328 },
329 {
[email protected]17e27692013-02-06 17:02:09330 "force-accelerated-composited-scrolling",
331 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
332 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
333 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44334 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
335 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09336 },
337 {
[email protected]8b1c3c72013-01-25 01:48:43338 "present-with-GDI",
339 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
340 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
341 kOsWin,
342 MULTI_VALUE_TYPE(kGDIPresentChoices)
343 },
344 {
[email protected]2b608752013-05-01 03:34:36345 "enable-experimental-canvas-features",
346 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
347 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
348 kOsAll,
349 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
350 },
351 {
[email protected]81c64af62012-06-06 20:15:52352 "disable-accelerated-2d-canvas",
353 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
354 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
355 kOsAll,
356 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
357 },
358 {
[email protected]efcde132012-05-30 01:05:18359 "disable-threaded-animation",
360 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
361 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59362 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37363 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59364 },
365 {
[email protected]5963b772011-02-09 22:55:38366 "composited-layer-borders",
367 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
368 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
369 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57370 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38371 },
372 {
[email protected]a8f1eaa2011-03-07 19:00:58373 "show-fps-counter",
374 IDS_FLAGS_SHOW_FPS_COUNTER,
375 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
376 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57377 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58378 },
[email protected]8ff7f342011-05-25 01:49:47379 {
[email protected]70c98a332011-12-21 20:51:52380 "accelerated-filters",
381 IDS_FLAGS_ACCELERATED_FILTERS,
382 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
383 kOsAll,
384 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
385 },
386 {
[email protected]8ff7f342011-05-25 01:49:47387 "disable-gpu-vsync",
388 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
389 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56390 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47391 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
392 },
[email protected]deaba6d52011-09-23 14:47:12393 {
[email protected]4052d832013-01-16 05:31:01394 "enable-webgl",
395 IDS_FLAGS_ENABLE_WEBGL_NAME,
396 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
397 kOsAndroid,
398#if defined(OS_ANDROID)
399 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
400#else
401 SINGLE_VALUE_TYPE("")
402#endif
403 },
404 {
[email protected]deaba6d52011-09-23 14:47:12405 "disable-webgl",
406 IDS_FLAGS_DISABLE_WEBGL_NAME,
407 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56408 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01409#if defined(OS_ANDROID)
410 SINGLE_VALUE_TYPE("")
411#else
[email protected]deaba6d52011-09-23 14:47:12412 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01413#endif
[email protected]deaba6d52011-09-23 14:47:12414 },
[email protected]09096e02012-05-24 11:12:04415 {
[email protected]ce585bf2013-03-14 16:25:16416 "disable-webrtc",
417 IDS_FLAGS_DISABLE_WEBRTC_NAME,
418 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05419 kOsAndroid,
420#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16421 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05422#else
423 SINGLE_VALUE_TYPE("")
424#endif
425 },
[email protected]5e2bc8c2013-05-28 22:59:57426#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30427 {
428 "enable-sctp-data-channels",
429 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
430 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
431 kOsAll,
432 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
433 },
[email protected]5e2bc8c2013-05-28 22:59:57434#endif
[email protected]34cb5292013-04-15 06:06:31435#if defined(OS_ANDROID)
436 {
437 "enable-webaudio",
438 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
439 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
440 kOsAndroid,
441 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
442 },
443#endif
[email protected]d9da9582013-01-31 04:59:05444 {
[email protected]96bcdc102012-05-24 23:42:10445 "fixed-position-creates-stacking-context",
446 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
447 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
448 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44449 ENABLE_DISABLE_VALUE_TYPE(
450 switches::kEnableFixedPositionCreatesStackingContext,
451 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10452 },
[email protected]fb854192013-02-06 01:30:04453 {
454 "enable-compositing-for-fixed-position",
455 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
456 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
457 kOsAll,
458 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
459 },
[email protected]d8221b22013-05-23 05:35:43460 {
461 "enable-compositing-for-transition",
462 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
463 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
464 kOsAll,
465 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
466 },
[email protected]a7640ef22012-10-06 00:52:08467 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53468 {
[email protected]e3791ce92011-08-09 01:03:32469 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40470 IDS_FLAGS_ENABLE_NACL_NAME,
471 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56472 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19473 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40474 },
475 {
[email protected]9addd1c2012-09-15 14:28:24476 "enable-nacl-debug", // FLAGS:RECORD_UMA
477 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
478 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56479 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24480 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13481 },
482 {
[email protected]66f409c2012-10-04 20:59:04483 "nacl-debug-mask", // FLAGS:RECORD_UMA
484 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
485 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56486 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04487 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
488 },
489 {
[email protected]7babd1c2012-08-08 20:35:29490 "enable-pnacl", // FLAGS:RECORD_UMA
491 IDS_FLAGS_ENABLE_PNACL_NAME,
492 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56493 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29494 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
495 },
496 {
[email protected]4bc5050c2010-11-18 17:55:54497 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32498 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
499 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56500 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19501 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32502 },
[email protected]3627b06d2010-11-12 16:36:16503 {
[email protected]ac2e2acd2013-03-21 12:57:29504 "extensions-on-chrome-urls",
505 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
506 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
507 kOsAll,
508 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
509 },
510 {
[email protected]e9cddd52013-03-23 17:37:53511 "enable-adview",
512 IDS_FLAGS_ENABLE_ADVIEW_NAME,
513 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
514 kOsDesktop,
515 SINGLE_VALUE_TYPE(switches::kEnableAdview)
516 },
517 {
518 "enable-adview-src-attribute",
519 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
520 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
521 kOsDesktop,
522 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
523 },
524 {
[email protected]544471a2012-10-13 05:27:09525 "action-box",
[email protected]cab18ef2012-04-27 07:22:03526 IDS_FLAGS_ACTION_BOX_NAME,
527 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56528 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44529 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
530 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03531 },
532 {
[email protected]3a362432012-06-18 20:39:51533 "script-badges",
534 IDS_FLAGS_SCRIPT_BADGES_NAME,
535 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56536 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09537 SINGLE_VALUE_TYPE(switches::kScriptBadges)
538 },
539 {
540 "script-bubble",
541 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
542 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56543 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44544 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
545 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51546 },
547 {
[email protected]cbe224d2011-08-04 22:12:49548 "apps-new-install-bubble",
549 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
550 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56551 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49552 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
553 },
554 {
[email protected]80bd24e2010-11-30 09:34:38555 "disable-hyperlink-auditing",
556 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
557 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
558 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19559 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51560 },
561 {
562 "experimental-location-features", // FLAGS:RECORD_UMA
563 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
564 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
565 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19566 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
567 },
568 {
[email protected]5aea1862011-03-23 23:55:39569 "tab-groups-context-menu",
570 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
571 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
572 kOsWin,
573 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
574 },
[email protected]c94cebd2012-06-21 00:55:28575 {
576 "enable-instant-extended-api",
577 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
578 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56579 kOsDesktop,
[email protected]73444382013-02-26 19:31:51580 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
581 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28582 },
[email protected]e9bf9d92011-03-31 20:57:15583 {
[email protected]8cc9e532013-05-06 21:01:47584 "enable-local-first-load-ntp",
585 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
586 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
587 kOsDesktop,
588 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
589 switches::kDisableLocalFirstLoadNTP)
590 },
591 {
[email protected]07fd48a2013-04-13 02:53:27592 "enable-local-only-instant-extended-api",
593 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
594 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
595 kOsDesktop,
596 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
597 switches::kDisableLocalOnlyInstantExtendedAPI)
598 },
599 {
[email protected]354e33b2011-06-15 00:29:10600 "static-ip-config",
601 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
602 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
603 kOsCrOS,
604#if defined(OS_CHROMEOS)
605 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24606 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10607#else
608 SINGLE_VALUE_TYPE("")
609#endif
610 },
[email protected]3eb5728c2011-06-20 22:32:24611 {
612 "show-autofill-type-predictions",
613 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
614 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
615 kOsAll,
[email protected]e217c5632013-04-12 19:11:48616 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24617 },
[email protected]bff4d3e2011-06-21 23:58:52618 {
[email protected]a5e9faa2013-03-19 09:58:38619 "enable-sync-favicons",
620 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
621 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55622 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38623 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55624 },
625 {
[email protected]5d90a0a2012-11-15 02:43:40626 "sync-keystore-encryption",
627 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
628 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
629 kOsAll,
630 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
631 },
632 {
[email protected]e755a382012-09-13 17:16:35633 "enable-gesture-tap-highlight",
634 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
635 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
636 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47637 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
638 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35639 },
640 {
[email protected]a22ebd812011-06-23 00:05:39641 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
642 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
643 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
644 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40645 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25646 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39647 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
648 },
[email protected]81a6b0b2011-06-24 17:55:40649 {
[email protected]128dc6c2012-06-22 20:30:35650 "omnibox-history-quick-provider-reorder-for-inlining",
651 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
652 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
653 kOsAll,
654 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
655 },
656 {
[email protected]032d5e6c2012-02-17 17:53:55657 "omnibox-inline-history-quick-provider",
658 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
659 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
660 kOsAll,
661 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
662 },
663 {
[email protected]7e7a28092011-12-09 22:24:55664 "enable-panels",
665 IDS_FLAGS_ENABLE_PANELS_NAME,
666 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56667 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55668 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54669 },
[email protected]e3749d12011-07-25 22:22:12670 {
[email protected]27c14f02012-06-22 17:29:58671 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27672 "save-page-as-mhtml", // FLAGS:RECORD_UMA
673 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
674 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
675 kOsMac | kOsWin | kOsLinux,
676 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
677 },
678 {
[email protected]b7bb44f2011-09-01 05:17:03679 "enable-autologin",
680 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
681 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
682 kOsMac | kOsWin | kOsLinux,
683 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
684 },
[email protected]b9841172011-09-26 23:36:09685 {
[email protected]903e63382013-06-01 00:40:58686 "enable-quic",
687 IDS_FLAGS_ENABLE_QUIC_NAME,
688 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
689 kOsAll,
690 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
691 switches::kDisableQuic)
692 },
693 {
[email protected]27b3fe92012-03-21 05:35:06694 "enable-async-dns",
695 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
696 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46697 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44698 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
699 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06700 },
[email protected]85dd7ca2013-05-30 23:53:00701#if defined(ANDROID) && !defined(GOOGLE_TV)
702 {
703 "enable-media-source",
704 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
705 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
706 kOsAll,
707 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
708 },
709#else
[email protected]27b3fe92012-03-21 05:35:06710 {
[email protected]1eb93802012-09-11 18:57:56711 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31712 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
713 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32714 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31715 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44716 },
[email protected]85dd7ca2013-05-30 23:53:00717#endif
[email protected]e4e68dbb2011-11-18 01:50:22718 {
[email protected]16c242d2013-05-31 23:56:47719 "enable-encrypted-media",
720 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
721 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56722 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47723 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
724 },
725 {
726 "disable-encrypted-media",
727 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
728 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
729 kOsDesktop,
730 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03731 },
[email protected]f88628792012-12-18 07:07:50732 {
733 "enable-opus-playback",
734 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
735 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56736 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50737 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
738 },
[email protected]ca6eaa5a2013-01-24 16:16:04739 {
[email protected]c54e1aa2013-01-25 09:26:17740 "enable-vp9-playback",
741 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
742 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
743 kOsDesktop,
744 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
745 },
746 {
[email protected]6ac955b2013-04-19 23:43:32747 "enable-vp8-alpha-playback",
748 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
749 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
750 kOsDesktop,
751 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
752 },
753 {
[email protected]ca6eaa5a2013-01-24 16:16:04754 "enable-managed-users",
755 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
756 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58757 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04758 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
759 },
[email protected]dc04be7c2012-03-15 23:57:49760#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50761 {
[email protected]2a13a9a2013-04-19 04:00:21762 "ash-disable-auto-maximizing",
763 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
764 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
765 kOsWin | kOsLinux | kOsCrOS,
766 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
767 },
768 {
[email protected]cda278d2012-10-30 20:31:40769 "ash-disable-auto-window-placement",
770 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
771 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
772 kOsWin | kOsLinux | kOsCrOS,
773 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
774 },
[email protected]b4e4ec42012-11-29 21:42:40775 {
[email protected]16f55a22013-02-13 23:47:34776 "ash-disable-per-app-launcher",
777 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
778 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40779 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34780 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40781 },
[email protected]dc04be7c2012-03-15 23:57:49782#endif
[email protected]eaae8b462012-01-20 22:20:39783 {
[email protected]db543d322011-12-15 20:40:15784 "per-tile-painting",
785 IDS_FLAGS_PER_TILE_PAINTING_NAME,
786 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37787 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37788 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15789 },
[email protected]bf88c032011-12-22 19:05:47790 {
791 "enable-javascript-harmony",
792 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
793 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
794 kOsAll,
795 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
796 },
[email protected]7e7f378a2012-01-05 14:35:37797 {
[email protected]85646172012-01-09 22:45:54798 "enable-tab-browser-dragging",
799 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
800 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
801 kOsWin,
802 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
803 },
804 {
[email protected]068b7b52012-02-27 12:41:44805 "disable-restore-session-state",
806 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
807 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37808 kOsAll,
[email protected]068b7b52012-02-27 12:41:44809 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37810 },
[email protected]88864db2012-01-18 20:56:35811 {
812 "disable-software-rasterizer",
813 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
814 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
815#if defined(ENABLE_SWIFTSHADER)
816 kOsAll,
817#else
818 0,
819#endif
820 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
821 },
[email protected]15a5d722012-01-23 09:11:14822 {
[email protected]ff7b6dd2012-09-15 20:20:03823 "enable-experimental-webkit-features",
824 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
825 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16826 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03827 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49828 },
829 {
[email protected]0f95a252012-09-13 22:30:04830 "enable-css-shaders",
831 IDS_FLAGS_CSS_SHADERS_NAME,
832 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
833 kOsAll,
834 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
835 },
836 {
[email protected]3e8befc2012-03-13 01:17:03837 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16838 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
839 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56840 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03841 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16842 },
[email protected]dc04be7c2012-03-15 23:57:49843#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01844 {
[email protected]3cd198a22012-03-12 20:38:01845 "enable-ash-oak",
846 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
847 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
848 kOsAll,
849 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
850 },
[email protected]31cf1c52012-02-29 20:55:01851#endif
[email protected]184ec592012-03-01 11:54:28852 {
853 "enable-devtools-experiments",
854 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
855 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56856 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28857 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
858 },
[email protected]76d1854e2012-03-02 23:57:44859 {
[email protected]2fefdb32013-02-26 14:28:10860 "silent-debugger-extension-api",
861 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
862 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
863 kOsDesktop,
864 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
865 },
866 {
[email protected]76d1854e2012-03-02 23:57:44867 "enable-suggestions-ntp",
868 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
869 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56870 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44871 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
872 },
[email protected]a3d54252012-04-05 20:04:13873 {
[email protected]1dbaf5e2012-11-30 05:51:32874 "spellcheck-autocorrect",
875 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
876 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
877 kOsWin | kOsLinux | kOsCrOS,
878 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
879 },
880 {
[email protected]d7932532012-11-21 21:10:31881 "touch-events",
882 IDS_TOUCH_EVENTS_NAME,
883 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56884 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31885 MULTI_VALUE_TYPE(kTouchEventsChoices)
886 },
887 {
[email protected]c9c73ad42012-04-18 03:35:59888 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06889 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
890 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55891 kOsWin,
[email protected]347a0c72012-05-14 20:28:06892 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59893 },
[email protected]8a6aaa72012-04-20 20:53:58894 {
[email protected]b9c96ff2012-11-26 22:24:40895 "disable-touch-adjustment",
896 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
897 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
898 kOsWin | kOsLinux | kOsCrOS,
899 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
900 },
901 {
[email protected]0b9383a2012-10-26 00:58:16902 "enable-tab-capture",
903 IDS_ENABLE_TAB_CAPTURE_NAME,
904 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25905 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44906 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
907 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16908 },
[email protected]0b60afa2012-04-19 17:36:39909#if defined(OS_CHROMEOS)
910 {
[email protected]7c4a9bc2012-09-11 22:10:05911 "enable-background-loader",
912 IDS_ENABLE_BACKLOADER_NAME,
913 IDS_ENABLE_BACKLOADER_DESCRIPTION,
914 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24915 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05916 },
917 {
[email protected]c5667b282012-08-31 00:32:50918 "enable-bezel-touch",
919 IDS_ENABLE_BEZEL_TOUCH_NAME,
920 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47921 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50922 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47923 },
924 {
[email protected]3f4181a2013-02-01 21:31:07925 "enable-screensaver-extension",
926 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
927 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
928 kOsCrOS,
929 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
930 },
931 {
[email protected]0b60afa2012-04-19 17:36:39932 "no-discard-tabs",
933 IDS_FLAGS_NO_DISCARD_TABS_NAME,
934 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
935 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24936 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39937 },
938#endif
[email protected]79be6d32012-04-24 20:47:44939 {
[email protected]8d68a3e02013-01-12 15:57:10940 "enable-download-resumption",
941 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
942 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56943 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10944 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
945 },
946 {
[email protected]9a5940d2012-04-27 19:16:23947 "allow-nacl-socket-api",
948 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
949 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56950 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23951 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
952 },
[email protected]85333732012-05-01 19:02:24953 {
[email protected]60673ad72012-05-02 06:16:33954 "stacked-tab-strip",
955 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
956 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
957 kOsWin,
958 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
959 },
960 {
[email protected]4bd20202012-06-14 17:35:01961 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24962 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
963 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
964 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01965 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24966 },
[email protected]190349fd2012-05-02 00:10:47967#if defined(OS_CHROMEOS)
968 {
969 "allow-touchpad-three-finger-click",
970 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
971 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
972 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24973 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47974 },
[email protected]fbc176b62012-10-27 02:19:58975 {
976 "allow-touchpad-three-finger-swipe",
977 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
978 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
979 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24980 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:58981 },
[email protected]190349fd2012-05-02 00:10:47982#endif
[email protected]1992a2f42012-10-23 18:32:21983 {
[email protected]a585e462013-01-26 00:37:15984 "use-client-login-signin-flow",
985 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
986 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21987 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15988 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21989 },
[email protected]8ee02242012-12-04 15:23:32990 {
991 "enable-desktop-guest-mode",
992 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
993 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
994 kOsMac | kOsWin | kOsLinux,
995 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
996 },
[email protected]53520b1b2012-05-07 21:43:37997#if defined(USE_ASH)
998 {
[email protected]8257d382013-03-26 13:08:42999 "show-launcher-alignment-menu",
1000 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1001 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421002 kOsAll,
[email protected]8257d382013-03-26 13:08:421003 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421004 },
1005 {
[email protected]2ddf37b2013-04-20 01:15:581006 "disable-minimize-on-second-launcher-item-click",
1007 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1008 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1009 kOsAll,
1010 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1011 },
1012 {
[email protected]73074742012-05-17 01:44:411013 "show-touch-hud",
1014 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1015 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1016 kOsAll,
1017 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1018 },
1019 {
[email protected]9f0940b62012-05-23 22:56:351020 "enable-pinch",
1021 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1022 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061023 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381024 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1025 },
1026 {
[email protected]de0aaed2013-05-27 18:16:431027 "enable-pinch-virtual-viewport",
1028 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1029 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1030 kOsLinux | kOsWin | kOsCrOS,
1031 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1032 },
1033 {
[email protected]a4016f12013-05-02 07:53:471034 "forced-maximize-mode",
1035 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1036 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1037 kOsLinux | kOsWin | kOsCrOS,
1038 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1039 },
[email protected]73074742012-05-17 01:44:411040#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281041#if defined(OS_CHROMEOS)
1042 {
[email protected]8b04a1652012-08-04 02:59:491043 "disable-boot-animation",
1044 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1045 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581046 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241047 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491048 },
[email protected]95058572012-08-20 14:57:291049 {
[email protected]d96aef22012-10-30 11:47:021050 "captive-portal-detector",
1051 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1052 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581053 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021054 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1055 },
1056 {
[email protected]c11aa8f12012-12-18 18:43:141057 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571058 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1059 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1060 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141061 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571062 },
[email protected]f0280952012-11-06 20:30:501063 {
[email protected]ea2fab32013-04-16 06:55:021064 "file-manager-legacy",
1065 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1066 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231067 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241068 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231069 },
[email protected]3e035e82012-11-27 20:54:321070 {
[email protected]828d99052013-04-22 08:15:031071 "file-manager-legacy-ui",
1072 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1073 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101074 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241075 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101076 },
1077 {
[email protected]c64d7732013-03-25 18:09:501078 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521079 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1080 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581081 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241082 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471083 },
[email protected]6ad015c2013-03-06 00:49:511084 {
[email protected]c64d7732013-03-25 18:09:501085 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521086 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1087 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511088 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521089 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511090 },
[email protected]099b890c2013-04-25 19:16:261091 {
1092 "disable-quickoffice-component-app",
1093 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1094 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1095 kOsCrOS,
1096 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1097 },
[email protected]62018dc2012-12-13 00:37:351098#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391099 {
[email protected]6247aba2013-03-04 22:57:181100 "views-textfield",
1101 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1102 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391103 kOsWin,
[email protected]6247aba2013-03-04 22:57:181104 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1105 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391106 },
[email protected]bd0cd3bb2012-06-14 03:03:381107 {
[email protected]ffbe5782013-05-09 23:22:081108 "new-dialog-style",
1109 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1110 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321111 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081112 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1113 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321114 },
[email protected]7db8893a2012-07-26 00:49:401115 { "disable-accelerated-video-decode",
1116 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1117 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191118 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401119 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151120 },
[email protected]66ae9fc2012-06-19 21:33:521121#if defined(USE_ASH)
1122 {
1123 "ash-debug-shortcuts",
1124 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1125 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1126 kOsAll,
1127 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1128 },
1129#endif
[email protected]37fee0942012-08-07 21:07:451130 {
[email protected]ad3f6d22012-08-29 02:34:191131 "enable-contacts",
1132 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1133 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1134 kOsCrOS,
1135 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1136 },
[email protected]1d9bb9cd2012-08-28 22:02:501137#if defined(USE_ASH)
1138 { "ash-enable-advanced-gestures",
1139 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1140 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1141 kOsCrOS,
1142 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1143 },
[email protected]cfa24e62013-02-13 21:19:111144 { "ash-disable-tab-scrubbing",
1145 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1146 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161147 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111148 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161149 },
[email protected]ad6fcc32013-05-30 03:46:481150 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081151 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1152 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1153 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481154 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081155 },
[email protected]83eef802012-12-02 07:43:521156 { "ash-enable-workspace-scrubbing",
1157 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1158 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1161 },
[email protected]cf2b1a82013-04-20 01:05:431162 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111163 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1164 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241165 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431166 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1167 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241168 },
[email protected]316708a2012-11-05 22:57:021169#if defined(OS_LINUX)
1170 { "ash-enable-memory-monitor",
1171 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1172 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1173 kOsCrOS,
1174 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1175 },
1176#endif
[email protected]1d9bb9cd2012-08-28 22:02:501177#endif
[email protected]9b7ab882012-09-10 23:46:361178#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131179 { "use-new-network-configuration-handlers",
1180 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1181 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1182 kOsCrOS,
1183 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1184 },
[email protected]ce98ef82013-05-31 22:43:241185 { "use-new-network-connection-handler",
1186 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1187 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1188 kOsCrOS,
1189 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1190 },
[email protected]9b7ab882012-09-10 23:46:361191 {
[email protected]354ff2d2013-05-01 17:06:311192 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121193 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1194 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1195 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311196 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1197 },
1198 {
1199 "ash-audio-device-menu",
1200 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1201 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1202 kOsCrOS,
1203 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121204 },
1205 {
[email protected]205f07892012-10-16 20:26:221206 "enable-carrier-switching",
1207 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1208 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1209 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241210 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221211 },
1212 {
[email protected]9b7ab882012-09-10 23:46:361213 "enable-request-tablet-site",
1214 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1215 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1216 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241217 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361218 },
1219#endif
[email protected]dab49c0b2012-10-04 05:55:351220 {
1221 "debug-packed-apps",
1222 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1223 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561224 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351225 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1226 },
[email protected]d1459ed2012-10-10 01:29:331227 {
1228 "enable-password-generation",
1229 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1230 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561231 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331232 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1233 },
[email protected]26d045f2012-10-18 21:18:431234 {
[email protected]76f7d4882012-10-26 21:09:221235 "enable-deferred-image-decoding",
1236 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1237 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221238 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221239 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1240 },
1241 {
[email protected]075543d2012-10-24 01:29:141242 "performance-monitor-gathering",
1243 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1244 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1245 kOsAll,
1246 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1247 },
[email protected]783d5bb2012-10-24 03:47:141248 {
[email protected]90b482d2013-04-04 10:45:581249 "disable-native-autofill-ui",
1250 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1251 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431252 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581253 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431254 },
1255 {
[email protected]a7259fb2012-11-08 06:22:231256 "enable-experimental-form-filling",
1257 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1258 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1259 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481260 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231261 },
[email protected]6e6efe42013-01-30 00:04:501262 {
[email protected]db3178c2013-03-21 14:54:541263 "wallet-service-use-prod",
1264 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1265 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1266 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481267 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541268 },
1269 {
[email protected]6e6efe42013-01-30 00:04:501270 "enable-interactive-autocomplete",
1271 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1272 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]dc1cb7d82013-05-22 18:00:001273 kOsWin | kOsCrOS | kOsAndroid,
[email protected]000f3ad2013-05-16 02:19:171274 ENABLE_DISABLE_VALUE_TYPE(
1275 autofill::switches::kEnableInteractiveAutocomplete,
1276 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501277 },
[email protected]177260c2013-04-24 01:47:381278#if defined(USE_AURA)
1279 {
1280 "overscroll-history-navigation",
1281 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1282 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1283 kOsAll,
1284 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1285 switches::kOverscrollHistoryNavigation, "1",
1286 switches::kOverscrollHistoryNavigation, "0")
1287 },
1288#endif
[email protected]edbea622012-11-28 20:39:381289 {
1290 "enable-touch-drag-drop",
1291 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1292 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1293 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271294 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1295 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381296 },
[email protected]0e2f43b62013-02-21 00:47:151297 {
1298 "enable-touch-editing",
1299 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1300 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1301 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271302 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1303 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151304 },
[email protected]92e12dd92012-12-11 03:33:201305 {
1306 "enable-rich-notifications",
1307 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1308 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001309 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231310 ENABLE_DISABLE_VALUE_TYPE(
1311 message_center::switches::kEnableRichNotifications,
1312 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201313 },
[email protected]4d51c682012-12-11 11:34:551314 {
[email protected]ddec1aa2013-04-28 23:22:451315 "enable-sync-synced-notifications",
1316 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1317 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181318 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451319 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1320 switches::kDisableSyncSyncedNotifications)
1321 },
1322 {
[email protected]a50e16a2013-04-25 14:07:171323 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551324 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1325 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1326 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171327 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551328 },
[email protected]628a69a92012-12-23 04:09:341329 {
[email protected]fd030142013-02-08 02:04:381330 "enable-usermedia-screen-capture",
1331 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1332 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1333 kOsDesktop,
1334 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1335 },
[email protected]5b93e162013-02-19 06:33:091336 {
1337 "enable-apps-devtool-app",
1338 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1339 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1340 kOsDesktop,
1341 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1342 },
[email protected]9323fdd12013-02-23 00:31:361343 {
1344 "impl-side-painting",
1345 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1346 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041347 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361348 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1349 },
[email protected]a42c85f2013-04-04 18:15:121350 {
[email protected]1c92d3e2013-04-18 05:31:391351 "enable-websocket-experimental-implementation",
1352 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1353 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1354 kOsAll,
1355 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1356 },
1357 {
[email protected]a42c85f2013-04-04 18:15:121358 "max-tiles-for-interest-area",
1359 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1360 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1361 kOsAndroid | kOsLinux | kOsCrOS,
1362 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1363 },
[email protected]7cf7ccb2013-04-20 02:53:081364 {
1365 "enable-offline-mode",
1366 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1367 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1368 kOsAll,
1369 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1370 },
[email protected]a3618122013-04-26 21:15:341371 {
1372 "default-tile-width",
1373 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1374 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1375 kOsAll,
1376 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1377 },
1378 {
1379 "default-tile-height",
1380 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1381 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1382 kOsAll,
1383 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1384 },
[email protected]2f2f72b2013-03-08 22:37:311385 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1386#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371387 {
1388 "track-active-visit-time",
1389 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1390 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1391 kOsWin,
1392 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1393 },
[email protected]2f2f72b2013-03-08 22:37:311394#endif
[email protected]8cc71d42013-03-02 17:26:081395#if defined(OS_ANDROID)
1396 {
1397 "disable-gesture-requirement-for-media-playback",
1398 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1399 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1400 kOsAndroid,
1401 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1402 },
1403#endif
[email protected]6077cab2013-03-11 19:36:141404#if defined(ENABLE_GOOGLE_NOW)
1405 {
1406 "enable-google-now",
1407 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1408 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1409 kOsWin | kOsCrOS,
1410 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1411 },
1412#endif
[email protected]4a9e2e02013-04-08 16:19:491413 {
1414 "enable-translate-alpha-languages",
1415 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1416 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1417 kOsAll,
1418 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1419 },
[email protected]86459e2c2013-04-10 13:39:241420#if defined(OS_CHROMEOS)
1421 {
1422 "enable-virtual-keyboard",
1423 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1424 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1425 kOsCrOS,
1426 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1427 },
1428#endif
[email protected]38484df12013-04-10 16:42:031429 {
1430 "enable-simple-cache-backend",
1431 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1432 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1433 kOsAndroid,
1434 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1435 },
[email protected]717e4e22013-04-10 20:52:231436 {
1437 "enable-tcp-fast-open",
1438 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1439 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111440 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231441 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1442 },
[email protected]8027acd2013-04-18 08:35:151443 {
1444 "enable-webp-in-accept-header",
1445 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1446 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1447 kOsAll,
1448 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1449 },
[email protected]58c740f2013-05-06 05:25:441450 {
1451 "apps-use-native-frame",
1452 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1453 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1454 kOsWin,
1455 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1456 },
[email protected]896d86b32013-05-09 19:36:441457 {
1458 "enable-syncfs-directory-operation",
1459 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1460 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1461 kOsAll,
1462 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1463 },
[email protected]a4ed7e12013-05-24 01:00:281464 {
1465 "enable-draggable-menu-button",
1466 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1467 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1468 kOsAndroid,
1469 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1470 },
[email protected]380532aa2013-05-24 11:59:351471 {
1472 "enable-reset-profile-settings",
1473 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1474 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1475 kOsAll,
1476 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1477 },
[email protected]289704062013-05-31 01:49:401478 {
1479 "enable-device-discovery",
1480 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1481 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1482 kOsDesktop,
1483 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1484 },
[email protected]56d3c6e42013-05-29 11:28:011485#if defined(OS_MACOSX)
1486 {
1487 "enable-app-list-shim",
1488 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1489 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1490 kOsMac,
1491 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1492 },
[email protected]cb29e162013-05-31 07:47:021493 {
1494 "enable-app-shims",
1495 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1496 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1497 kOsMac,
1498 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1499 },
[email protected]56d3c6e42013-05-29 11:28:011500#endif
[email protected]13177832013-05-31 07:46:051501#if defined(OS_CHROMEOS) || defined(OS_WIN)
1502 {
1503 "enable-omnibox-auto-completion-for-ime",
1504 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1505 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1506 kOsCrOS,
1507 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1508 },
1509#endif
[email protected]910ecfe2013-06-03 23:38:141510#if defined(USE_AURA)
1511 {
1512 "tab-capture-upscale-quality",
1513 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1514 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1515 kOsAll,
1516 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1517 },
1518 {
1519 "tab-capture-downscale-quality",
1520 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1521 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1522 kOsAll,
1523 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1524 },
1525#endif
[email protected]a0e4b072011-08-17 01:47:071526};
[email protected]ad2a3ded2010-08-27 13:19:051527
[email protected]a314ee5a2010-10-26 21:23:281528const Experiment* experiments = kExperiments;
1529size_t num_experiments = arraysize(kExperiments);
1530
[email protected]e2ddbc92010-10-15 20:02:071531// Stores and encapsulates the little state that about:flags has.
1532class FlagsState {
1533 public:
1534 FlagsState() : needs_restart_(false) {}
1535 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1536 bool IsRestartNeededToCommitChanges();
1537 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281538 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071539 void RemoveFlagsSwitches(
1540 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001541 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071542 void reset();
1543
1544 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551545 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071546 return Singleton<FlagsState>::get();
1547 }
1548
1549 private:
1550 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531551 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071552
1553 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1554};
1555
[email protected]c7b7800a2010-10-07 18:51:351556// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491557// in a set.
[email protected]1a47d7e2010-10-15 00:37:241558void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051559 const ListValue* enabled_experiments = prefs->GetList(
1560 prefs::kEnabledLabsExperiments);
1561 if (!enabled_experiments)
1562 return;
1563
1564 for (ListValue::const_iterator it = enabled_experiments->begin();
1565 it != enabled_experiments->end();
1566 ++it) {
1567 std::string experiment_name;
1568 if (!(*it)->GetAsString(&experiment_name)) {
1569 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1570 continue;
1571 }
1572 result->insert(experiment_name);
1573 }
1574}
1575
[email protected]c6343372013-03-13 17:05:491576// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241577void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051578 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381579 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1580 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051581
1582 experiments_list->Clear();
1583 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1584 it != enabled_experiments.end();
1585 ++it) {
1586 experiments_list->Append(new StringValue(*it));
1587 }
1588}
1589
[email protected]8a6ff28d2010-12-02 16:35:191590// Adds the internal names for the specified experiment to |names|.
1591void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1592 if (e.type == Experiment::SINGLE_VALUE) {
1593 names->insert(e.internal_name);
1594 } else {
[email protected]83e9fa702013-02-25 19:30:441595 DCHECK(e.type == Experiment::MULTI_VALUE ||
1596 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191597 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441598 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191599 }
1600}
1601
[email protected]28e35af2011-02-09 12:56:221602// Confirms that an experiment is valid, used in a DCHECK in
1603// SanitizeList below.
1604bool ValidateExperiment(const Experiment& e) {
1605 switch (e.type) {
1606 case Experiment::SINGLE_VALUE:
1607 DCHECK_EQ(0, e.num_choices);
1608 DCHECK(!e.choices);
1609 break;
1610 case Experiment::MULTI_VALUE:
1611 DCHECK_GT(e.num_choices, 0);
1612 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531613 DCHECK(e.choices[0].command_line_switch);
1614 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221615 break;
[email protected]83e9fa702013-02-25 19:30:441616 case Experiment::ENABLE_DISABLE_VALUE:
1617 DCHECK_EQ(3, e.num_choices);
1618 DCHECK(!e.choices);
1619 DCHECK(e.command_line_switch);
1620 DCHECK(e.command_line_value);
1621 DCHECK(e.disable_command_line_switch);
1622 DCHECK(e.disable_command_line_value);
1623 break;
[email protected]28e35af2011-02-09 12:56:221624 default:
1625 NOTREACHED();
1626 }
1627 return true;
1628}
1629
[email protected]ad2a3ded2010-08-27 13:19:051630// Removes all experiments from prefs::kEnabledLabsExperiments that are
1631// unknown, to prevent this list to become very long as experiments are added
1632// and removed.
1633void SanitizeList(PrefService* prefs) {
1634 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221635 for (size_t i = 0; i < num_experiments; ++i) {
1636 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191637 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221638 }
[email protected]ad2a3ded2010-08-27 13:19:051639
1640 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241641 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051642
1643 std::set<std::string> new_enabled_experiments;
1644 std::set_intersection(
1645 known_experiments.begin(), known_experiments.end(),
1646 enabled_experiments.begin(), enabled_experiments.end(),
1647 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1648
[email protected]4c8853f2012-07-23 01:29:161649 if (new_enabled_experiments != enabled_experiments)
1650 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051651}
1652
[email protected]1a47d7e2010-10-15 00:37:241653void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051654 PrefService* prefs, std::set<std::string>* result) {
1655 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241656 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051657}
1658
[email protected]a314ee5a2010-10-26 21:23:281659// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1660// enabled on the current platform.
1661void GetSanitizedEnabledFlagsForCurrentPlatform(
1662 PrefService* prefs, std::set<std::string>* result) {
1663 GetSanitizedEnabledFlags(prefs, result);
1664
1665 // Filter out any experiments that aren't enabled on the current platform. We
1666 // don't remove these from prefs else syncing to a platform with a different
1667 // set of experiments would be lossy.
1668 std::set<std::string> platform_experiments;
1669 int current_platform = GetCurrentPlatform();
1670 for (size_t i = 0; i < num_experiments; ++i) {
1671 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191672 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581673#if defined(OS_CHROMEOS)
1674 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1675 AddInternalName(experiments[i], &platform_experiments);
1676#endif
[email protected]a314ee5a2010-10-26 21:23:281677 }
1678
1679 std::set<std::string> new_enabled_experiments;
1680 std::set_intersection(
1681 platform_experiments.begin(), platform_experiments.end(),
1682 result->begin(), result->end(),
1683 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1684
1685 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051686}
1687
[email protected]8a6ff28d2010-12-02 16:35:191688// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191689Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221690 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441691 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1692 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191693 ListValue* result = new ListValue;
1694 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191695 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441696 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191697 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441698 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221699 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191700 result->Append(value);
1701 }
1702 return result;
1703}
1704
[email protected]e2ddbc92010-10-15 20:02:071705} // namespace
1706
[email protected]83e9fa702013-02-25 19:30:441707std::string Experiment::NameForChoice(int index) const {
1708 DCHECK(type == Experiment::MULTI_VALUE ||
1709 type == Experiment::ENABLE_DISABLE_VALUE);
1710 DCHECK_LT(index, num_choices);
1711 return std::string(internal_name) + testing::kMultiSeparator +
1712 base::IntToString(index);
1713}
1714
1715string16 Experiment::DescriptionForChoice(int index) const {
1716 DCHECK(type == Experiment::MULTI_VALUE ||
1717 type == Experiment::ENABLE_DISABLE_VALUE);
1718 DCHECK_LT(index, num_choices);
1719 int description_id;
1720 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1721 const int kEnableDisableDescriptionIds[] = {
1722 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1723 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1724 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1725 };
1726 description_id = kEnableDisableDescriptionIds[index];
1727 } else {
1728 description_id = choices[index].description_id;
1729 }
1730 return l10n_util::GetStringUTF16(description_id);
1731}
1732
[email protected]1a47d7e2010-10-15 00:37:241733void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551734 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051735}
1736
[email protected]ee28495a2013-05-20 04:10:521737void GetFlagsExperimentsData(PrefService* prefs,
1738 FlagAccess access,
1739 base::ListValue* supported_experiments,
1740 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051741 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241742 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051743
1744 int current_platform = GetCurrentPlatform();
1745
[email protected]a314ee5a2010-10-26 21:23:281746 for (size_t i = 0; i < num_experiments; ++i) {
1747 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051748
1749 DictionaryValue* data = new DictionaryValue();
1750 data->SetString("internal_name", experiment.internal_name);
1751 data->SetString("name",
1752 l10n_util::GetStringUTF16(experiment.visible_name_id));
1753 data->SetString("description",
1754 l10n_util::GetStringUTF16(
1755 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401756
1757 ListValue* supported_platforms = new ListValue();
1758 AddOsStrings(experiment.supported_platforms, supported_platforms);
1759 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051760
[email protected]28e35af2011-02-09 12:56:221761 switch (experiment.type) {
1762 case Experiment::SINGLE_VALUE:
1763 data->SetBoolean(
1764 "enabled",
1765 enabled_experiments.count(experiment.internal_name) > 0);
1766 break;
1767 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441768 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221769 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1770 break;
1771 default:
1772 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191773 }
1774
[email protected]ee28495a2013-05-20 04:10:521775 bool supported = (experiment.supported_platforms & current_platform) != 0;
1776#if defined(OS_CHROMEOS)
1777 if (access == kOwnerAccessToFlags &&
1778 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1779 supported = true;
1780 }
1781#endif
1782 if (supported)
1783 supported_experiments->Append(data);
1784 else
1785 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051786 }
[email protected]ad2a3ded2010-08-27 13:19:051787}
1788
[email protected]ad2a3ded2010-08-27 13:19:051789bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551790 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051791}
1792
1793void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351794 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551795 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071796}
1797
1798void RemoveFlagsSwitches(
1799 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551800 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071801}
1802
[email protected]cb93bf52013-02-20 01:20:001803void ResetAllFlags(PrefService* prefs) {
1804 FlagsState::GetInstance()->ResetAllFlags(prefs);
1805}
1806
[email protected]a314ee5a2010-10-26 21:23:281807int GetCurrentPlatform() {
1808#if defined(OS_MACOSX)
1809 return kOsMac;
1810#elif defined(OS_WIN)
1811 return kOsWin;
1812#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1813 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211814#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281815 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401816#elif defined(OS_ANDROID)
1817 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281818#else
1819#error Unknown platform
1820#endif
1821}
1822
[email protected]4bc5050c2010-11-18 17:55:541823void RecordUMAStatistics(const PrefService* prefs) {
1824 std::set<std::string> flags;
1825 GetEnabledFlags(prefs, &flags);
1826 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1827 ++it) {
1828 std::string action("AboutFlags_");
1829 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381830 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541831 }
1832 // Since flag metrics are recorded every startup, add a tick so that the
1833 // stats can be made meaningful.
1834 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381835 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1836 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541837}
1838
[email protected]e2ddbc92010-10-15 20:02:071839//////////////////////////////////////////////////////////////////////////////
1840// FlagsState implementation.
1841
1842namespace {
1843
[email protected]83e9fa702013-02-25 19:30:441844typedef std::map<std::string, std::pair<std::string, std::string> >
1845 NameToSwitchAndValueMap;
1846
1847void SetFlagToSwitchMapping(const std::string& key,
1848 const std::string& switch_name,
1849 const std::string& switch_value,
1850 NameToSwitchAndValueMap* name_to_switch_map) {
1851 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1852 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1853}
1854
[email protected]e2ddbc92010-10-15 20:02:071855void FlagsState::ConvertFlagsToSwitches(
1856 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071857 if (command_line->HasSwitch(switches::kNoExperiments))
1858 return;
1859
1860 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001861
[email protected]a314ee5a2010-10-26 21:23:281862 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071863
[email protected]a82744532011-02-11 16:15:531864 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191865 for (size_t i = 0; i < num_experiments; ++i) {
1866 const Experiment& e = experiments[i];
1867 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441868 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1869 e.command_line_value, &name_to_switch_map);
1870 } else if (e.type == Experiment::MULTI_VALUE) {
1871 for (int j = 0; j < e.num_choices; ++j) {
1872 SetFlagToSwitchMapping(e.NameForChoice(j),
1873 e.choices[j].command_line_switch,
1874 e.choices[j].command_line_value,
1875 &name_to_switch_map);
1876 }
[email protected]8a6ff28d2010-12-02 16:35:191877 } else {
[email protected]83e9fa702013-02-25 19:30:441878 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1879 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1880 &name_to_switch_map);
1881 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1882 e.command_line_value, &name_to_switch_map);
1883 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1884 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191885 }
1886 }
[email protected]e2ddbc92010-10-15 20:02:071887
1888 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531889 flags_switches_.insert(
1890 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1891 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071892 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1893 it != enabled_experiments.end();
1894 ++it) {
1895 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531896 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191897 name_to_switch_map.find(experiment_name);
1898 if (name_to_switch_it == name_to_switch_map.end()) {
1899 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071900 continue;
[email protected]8a6ff28d2010-12-02 16:35:191901 }
[email protected]e2ddbc92010-10-15 20:02:071902
[email protected]a82744532011-02-11 16:15:531903 const std::pair<std::string, std::string>&
1904 switch_and_value_pair = name_to_switch_it->second;
1905
1906 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1907 switch_and_value_pair.second);
1908 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071909 }
1910 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531911 flags_switches_.insert(
1912 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1913 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071914}
1915
1916bool FlagsState::IsRestartNeededToCommitChanges() {
1917 return needs_restart_;
1918}
1919
1920void FlagsState::SetExperimentEnabled(
1921 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441922 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191923 if (at_index != std::string::npos) {
1924 DCHECK(enable);
1925 // We're being asked to enable a multi-choice experiment. Disable the
1926 // currently selected choice.
1927 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221928 const std::string experiment_name = internal_name.substr(0, at_index);
1929 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191930
[email protected]28e35af2011-02-09 12:56:221931 // And enable the new choice, if it is not the default first choice.
1932 if (internal_name != experiment_name + "@0") {
1933 std::set<std::string> enabled_experiments;
1934 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081935 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221936 SetEnabledFlags(prefs, enabled_experiments);
1937 }
[email protected]8a6ff28d2010-12-02 16:35:191938 return;
1939 }
1940
[email protected]ad2a3ded2010-08-27 13:19:051941 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241942 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051943
[email protected]8a6ff28d2010-12-02 16:35:191944 const Experiment* e = NULL;
1945 for (size_t i = 0; i < num_experiments; ++i) {
1946 if (experiments[i].internal_name == internal_name) {
1947 e = experiments + i;
1948 break;
1949 }
1950 }
1951 DCHECK(e);
1952
1953 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591954 if (enable)
[email protected]147492b2013-03-19 23:52:081955 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591956 else
[email protected]147492b2013-03-19 23:52:081957 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191958 } else {
1959 if (enable) {
1960 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081961 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191962 } else {
1963 // Find the currently enabled choice and disable it.
1964 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441965 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191966 if (enabled_experiments.find(choice_name) !=
1967 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081968 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191969 enabled_experiments.erase(choice_name);
1970 // Continue on just in case there's a bug and more than one
1971 // experiment for this choice was enabled.
1972 }
1973 }
1974 }
1975 }
[email protected]ad2a3ded2010-08-27 13:19:051976
[email protected]1a47d7e2010-10-15 00:37:241977 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051978}
1979
[email protected]e2ddbc92010-10-15 20:02:071980void FlagsState::RemoveFlagsSwitches(
1981 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531982 for (std::map<std::string, std::string>::const_iterator
1983 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1984 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071985 }
1986}
1987
[email protected]cb93bf52013-02-20 01:20:001988void FlagsState::ResetAllFlags(PrefService* prefs) {
1989 needs_restart_ = true;
1990
1991 std::set<std::string> no_experiments;
1992 SetEnabledFlags(prefs, no_experiments);
1993}
1994
[email protected]e2ddbc92010-10-15 20:02:071995void FlagsState::reset() {
1996 needs_restart_ = false;
1997 flags_switches_.clear();
1998}
1999
[email protected]38e46812011-05-09 20:49:222000} // namespace
[email protected]e2ddbc92010-10-15 20:02:072001
2002namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192003
2004// WARNING: '@' is also used in the html file. If you update this constant you
2005// also need to update the html file.
2006const char kMultiSeparator[] = "@";
2007
[email protected]e2ddbc92010-10-15 20:02:072008void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552009 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072010}
[email protected]a314ee5a2010-10-26 21:23:282011
2012void SetExperiments(const Experiment* e, size_t count) {
2013 if (!e) {
2014 experiments = kExperiments;
2015 num_experiments = arraysize(kExperiments);
2016 } else {
2017 experiments = e;
2018 num_experiments = count;
2019 }
2020}
2021
[email protected]8a6ff28d2010-12-02 16:35:192022const Experiment* GetExperiments(size_t* count) {
2023 *count = num_experiments;
2024 return experiments;
2025}
2026
[email protected]e2ddbc92010-10-15 20:02:072027} // namespace testing
2028
[email protected]1a47d7e2010-10-15 00:37:242029} // namespace about_flags