blob: 834073d9bebb9d6d4f70b67fcb8cb5b73b067f8a [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4115#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2016#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5218#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4019#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3822#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0223#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0524#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0226#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1727#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5928#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4829#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2730#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2431#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5632#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2433#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5634
[email protected]dc04be7c2012-03-15 23:57:4935#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3136#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4937#endif
38
[email protected]badba1ad2012-11-16 17:21:4639#if defined(OS_CHROMEOS)
40#include "chromeos/chromeos_switches.h"
41#endif
42
[email protected]7f6f44c2011-12-14 13:23:3843using content::UserMetricsAction;
44
[email protected]1a47d7e2010-10-15 00:37:2445namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0546
[email protected]8a6ff28d2010-12-02 16:35:1947// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5348#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4449 Experiment::SINGLE_VALUE, \
50 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5351#define SINGLE_VALUE_TYPE(command_line_switch) \
52 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4453#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
54 disable_switch, disable_value) \
55 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
56 disable_switch, disable_value, NULL, 3
57#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
58 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5359#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4460 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1961
[email protected]e2ddbc92010-10-15 20:02:0762namespace {
63
[email protected]9c7453d2012-01-21 00:45:4064const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5665const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0566
[email protected]cc3e2052011-12-20 01:01:4067// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
68// whether the experiment is available on that platform.
69void AddOsStrings(unsigned bitmask, ListValue* list) {
70 struct {
71 unsigned bit;
72 const char* const name;
73 } kBitsToOs[] = {
74 {kOsMac, "Mac"},
75 {kOsWin, "Windows"},
76 {kOsLinux, "Linux"},
77 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0178 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5879 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4080 };
81 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
82 if (bitmask & kBitsToOs[i].bit)
83 list->Append(new StringValue(kBitsToOs[i].name));
84}
85
[email protected]128dc6c2012-06-22 20:30:3586const Experiment::Choice
87 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
88 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
89 "",
90 "" },
91 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
92 switches::kOmniboxHistoryQuickProviderReorderForInlining,
93 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
94 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
95 switches::kOmniboxHistoryQuickProviderReorderForInlining,
96 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
97};
98
[email protected]032d5e6c2012-02-17 17:53:5599const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
100 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
101 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
102 switches::kOmniboxInlineHistoryQuickProvider,
103 switches::kOmniboxInlineHistoryQuickProviderAllowed },
104 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
105 switches::kOmniboxInlineHistoryQuickProvider,
106 switches::kOmniboxInlineHistoryQuickProviderProhibited }
107};
108
[email protected]fb854192013-02-06 01:30:04109const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
110 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
111 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
112 switches::kEnableCompositingForFixedPosition, ""},
113 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
114 switches::kDisableCompositingForFixedPosition, ""},
115 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
116 switches::kEnableHighDpiCompositingForFixedPosition, ""}
117};
118
[email protected]d8221b22013-05-23 05:35:43119const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
120 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
121 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
122 switches::kEnableCompositingForTransition, ""},
123 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
124 switches::kDisableCompositingForTransition, ""},
125};
126
[email protected]8b1c3c72013-01-25 01:48:43127const Experiment::Choice kGDIPresentChoices[] = {
128 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
129 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
130 switches::kDoFirstShowPresentWithGDI, ""},
131 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
132 switches::kDoAllShowPresentWithGDI, ""}
133};
134
[email protected]d7932532012-11-21 21:10:31135const Experiment::Choice kTouchEventsChoices[] = {
136 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
137 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
138 switches::kTouchEvents,
139 switches::kTouchEventsEnabled },
140 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
141 switches::kTouchEvents,
142 switches::kTouchEventsDisabled }
143};
144
[email protected]347a0c72012-05-14 20:28:06145const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31146 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20147 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06148 switches::kTouchOptimizedUI,
149 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20150 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06151 switches::kTouchOptimizedUI,
152 switches::kTouchOptimizedUIDisabled }
153};
154
[email protected]66f409c2012-10-04 20:59:04155const Experiment::Choice kNaClDebugMaskChoices[] = {
156 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
157 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
158 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
159 // an option to switch off its debugging.
160 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
161 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
162 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
163 switches::kNaClDebugMask, "*://*/*debug.nmf" }
164};
165
[email protected]ea2f3342012-09-21 21:13:36166#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02167
168const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24169 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02170 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24171 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19172 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24173 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02174};
[email protected]a78c7432013-03-13 06:22:43175
[email protected]ea2f3342012-09-21 21:13:36176#endif
177
[email protected]9323fdd12013-02-23 00:31:36178const Experiment::Choice kImplSidePaintingChoices[] = {
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
180 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
181 cc::switches::kEnableImplSidePainting, ""},
182 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
183 cc::switches::kDisableImplSidePainting, ""}
184};
185
[email protected]a42c85f2013-04-04 18:15:12186const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
187 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
188 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
189 cc::switches::kMaxTilesForInterestArea, "64"},
190 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
191 cc::switches::kMaxTilesForInterestArea, "128"},
192 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
193 cc::switches::kMaxTilesForInterestArea, "256"},
194 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
195 cc::switches::kMaxTilesForInterestArea, "512"}
196};
197
[email protected]a3618122013-04-26 21:15:34198const Experiment::Choice kDefaultTileWidthChoices[] = {
199 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
200 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
201 switches::kDefaultTileWidth, "128"},
202 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
203 switches::kDefaultTileWidth, "256"},
204 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
205 switches::kDefaultTileWidth, "512"},
206 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
207 switches::kDefaultTileWidth, "1024"}
208};
209
210const Experiment::Choice kDefaultTileHeightChoices[] = {
211 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
212 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
213 switches::kDefaultTileHeight, "128"},
214 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
215 switches::kDefaultTileHeight, "256"},
216 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
217 switches::kDefaultTileHeight, "512"},
218 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
219 switches::kDefaultTileHeight, "1024"}
220};
221
[email protected]38484df12013-04-10 16:42:03222const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21223 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
224 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
225 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03226 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
227 switches::kUseSimpleCacheBackend, "on"}
228};
229
[email protected]910ecfe2013-06-03 23:38:14230const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
231 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
232 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
233 switches::kTabCaptureUpscaleQuality, "fast" },
234 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
235 switches::kTabCaptureUpscaleQuality, "good" },
236 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
237 switches::kTabCaptureUpscaleQuality, "best" },
238};
239
240const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
241 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
242 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
243 switches::kTabCaptureDownscaleQuality, "fast" },
244 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
245 switches::kTabCaptureDownscaleQuality, "good" },
246 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
247 switches::kTabCaptureDownscaleQuality, "best" },
248};
249
[email protected]4bc5050c2010-11-18 17:55:54250// RECORDING USER METRICS FOR FLAGS:
251// -----------------------------------------------------------------------------
252// The first line of the experiment is the internal name. If you'd like to
253// gather statistics about the usage of your flag, you should append a marker
254// comment to the end of the feature name, like so:
255// "my-special-feature", // FLAGS:RECORD_UMA
256//
257// After doing that, run //chrome/tools/extract_actions.py (see instructions at
258// the top of that file for details) to update the chromeactions.txt file, which
259// will enable UMA to record your feature flag.
260//
[email protected]783d5bb2012-10-24 03:47:14261// After your feature has shipped under a flag, you can locate the metrics under
262// the action name AboutFlags_internal-action-name. Actions are recorded once
263// per startup, so you should divide this number by AboutFlags_StartupTick to
264// get a sense of usage. Note that this will not be the same as number of users
265// with a given feature enabled because users can quit and relaunch the
266// application multiple times over a given time interval. The dashboard also
267// shows you how many (metrics reporting) users have enabled the flag over the
268// last seven days. However, note that this is not the same as the number of
269// users who have the flag enabled, since enabling the flag happens once,
270// whereas running with the flag enabled happens until the user flips the flag
271// again.
[email protected]4bc5050c2010-11-18 17:55:54272
[email protected]8a6ff28d2010-12-02 16:35:19273// To add a new experiment add to the end of kExperiments. There are two
274// distinct types of experiments:
275// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
276// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22277// . MULTI_VALUE: a list of choices, the first of which should correspond to a
278// deactivated state for this lab (i.e. no command line option). To specify
279// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
280// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19281// See the documentation of Experiment for details on the fields.
282//
283// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05284const Experiment kExperiments[] = {
285 {
[email protected]aac169d2011-03-18 19:53:03286 "expose-for-tabs", // FLAGS:RECORD_UMA
287 IDS_FLAGS_TABPOSE_NAME,
288 IDS_FLAGS_TABPOSE_DESCRIPTION,
289 kOsMac,
290#if defined(OS_MACOSX)
291 // The switch exists only on OS X.
292 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
293#else
294 SINGLE_VALUE_TYPE("")
295#endif
296 },
297 {
[email protected]4bc5050c2010-11-18 17:55:54298 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05299 IDS_FLAGS_CONFLICTS_CHECK_NAME,
300 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
301 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19302 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05303 },
304 {
[email protected]96c6f4c2011-05-18 19:36:22305 "ignore-gpu-blacklist",
306 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
307 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
308 kOsAll,
309 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
310 },
311 {
[email protected]0110cf112011-07-02 00:39:43312 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22313 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
314 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23315 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44316 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
317 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22318 },
319 {
[email protected]72787e392012-03-23 05:55:43320 "threaded-compositing-mode",
321 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
322 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58323 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44324 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
325 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59326 },
327 {
[email protected]17e27692013-02-06 17:02:09328 "force-accelerated-composited-scrolling",
329 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
330 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
331 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44332 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
333 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09334 },
335 {
[email protected]8b1c3c72013-01-25 01:48:43336 "present-with-GDI",
337 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
338 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
339 kOsWin,
340 MULTI_VALUE_TYPE(kGDIPresentChoices)
341 },
342 {
[email protected]2b608752013-05-01 03:34:36343 "enable-experimental-canvas-features",
344 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
345 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
346 kOsAll,
347 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
348 },
349 {
[email protected]81c64af62012-06-06 20:15:52350 "disable-accelerated-2d-canvas",
351 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
352 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
353 kOsAll,
354 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
355 },
356 {
[email protected]efcde132012-05-30 01:05:18357 "disable-threaded-animation",
358 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
359 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59360 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37361 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59362 },
363 {
[email protected]5963b772011-02-09 22:55:38364 "composited-layer-borders",
365 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
366 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
367 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57368 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38369 },
370 {
[email protected]a8f1eaa2011-03-07 19:00:58371 "show-fps-counter",
372 IDS_FLAGS_SHOW_FPS_COUNTER,
373 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
374 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57375 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58376 },
[email protected]8ff7f342011-05-25 01:49:47377 {
[email protected]70c98a332011-12-21 20:51:52378 "accelerated-filters",
379 IDS_FLAGS_ACCELERATED_FILTERS,
380 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
381 kOsAll,
382 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
383 },
384 {
[email protected]8ff7f342011-05-25 01:49:47385 "disable-gpu-vsync",
386 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
387 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56388 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47389 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
390 },
[email protected]deaba6d52011-09-23 14:47:12391 {
[email protected]4052d832013-01-16 05:31:01392 "enable-webgl",
393 IDS_FLAGS_ENABLE_WEBGL_NAME,
394 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
395 kOsAndroid,
396#if defined(OS_ANDROID)
397 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
398#else
399 SINGLE_VALUE_TYPE("")
400#endif
401 },
402 {
[email protected]deaba6d52011-09-23 14:47:12403 "disable-webgl",
404 IDS_FLAGS_DISABLE_WEBGL_NAME,
405 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56406 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01407#if defined(OS_ANDROID)
408 SINGLE_VALUE_TYPE("")
409#else
[email protected]deaba6d52011-09-23 14:47:12410 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01411#endif
[email protected]deaba6d52011-09-23 14:47:12412 },
[email protected]09096e02012-05-24 11:12:04413 {
[email protected]ce585bf2013-03-14 16:25:16414 "disable-webrtc",
415 IDS_FLAGS_DISABLE_WEBRTC_NAME,
416 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05417 kOsAndroid,
418#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16419 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05420#else
421 SINGLE_VALUE_TYPE("")
422#endif
423 },
[email protected]5e2bc8c2013-05-28 22:59:57424#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30425 {
426 "enable-sctp-data-channels",
427 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
428 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
429 kOsAll,
430 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
431 },
[email protected]5e2bc8c2013-05-28 22:59:57432#endif
[email protected]34cb5292013-04-15 06:06:31433#if defined(OS_ANDROID)
434 {
435 "enable-webaudio",
436 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
437 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
438 kOsAndroid,
439 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
440 },
441#endif
[email protected]d9da9582013-01-31 04:59:05442 {
[email protected]96bcdc102012-05-24 23:42:10443 "fixed-position-creates-stacking-context",
444 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
445 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
446 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44447 ENABLE_DISABLE_VALUE_TYPE(
448 switches::kEnableFixedPositionCreatesStackingContext,
449 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10450 },
[email protected]fb854192013-02-06 01:30:04451 {
452 "enable-compositing-for-fixed-position",
453 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
454 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
455 kOsAll,
456 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
457 },
[email protected]d8221b22013-05-23 05:35:43458 {
459 "enable-compositing-for-transition",
460 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
461 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
462 kOsAll,
463 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
464 },
[email protected]a7640ef22012-10-06 00:52:08465 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53466 {
[email protected]e3791ce92011-08-09 01:03:32467 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40468 IDS_FLAGS_ENABLE_NACL_NAME,
469 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56470 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19471 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40472 },
473 {
[email protected]9addd1c2012-09-15 14:28:24474 "enable-nacl-debug", // FLAGS:RECORD_UMA
475 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
476 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56477 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24478 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13479 },
480 {
[email protected]66f409c2012-10-04 20:59:04481 "nacl-debug-mask", // FLAGS:RECORD_UMA
482 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
483 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56484 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04485 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
486 },
487 {
[email protected]7babd1c2012-08-08 20:35:29488 "enable-pnacl", // FLAGS:RECORD_UMA
489 IDS_FLAGS_ENABLE_PNACL_NAME,
490 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56491 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29492 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
493 },
494 {
[email protected]4bc5050c2010-11-18 17:55:54495 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32496 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
497 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56498 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19499 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32500 },
[email protected]3627b06d2010-11-12 16:36:16501 {
[email protected]ac2e2acd2013-03-21 12:57:29502 "extensions-on-chrome-urls",
503 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
504 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
505 kOsAll,
506 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
507 },
508 {
[email protected]e9cddd52013-03-23 17:37:53509 "enable-adview",
510 IDS_FLAGS_ENABLE_ADVIEW_NAME,
511 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
512 kOsDesktop,
513 SINGLE_VALUE_TYPE(switches::kEnableAdview)
514 },
515 {
516 "enable-adview-src-attribute",
517 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
518 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
519 kOsDesktop,
520 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
521 },
522 {
[email protected]544471a2012-10-13 05:27:09523 "action-box",
[email protected]cab18ef2012-04-27 07:22:03524 IDS_FLAGS_ACTION_BOX_NAME,
525 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56526 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44527 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
528 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03529 },
530 {
[email protected]3a362432012-06-18 20:39:51531 "script-badges",
532 IDS_FLAGS_SCRIPT_BADGES_NAME,
533 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56534 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09535 SINGLE_VALUE_TYPE(switches::kScriptBadges)
536 },
537 {
538 "script-bubble",
539 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
540 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56541 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44542 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
543 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51544 },
545 {
[email protected]cbe224d2011-08-04 22:12:49546 "apps-new-install-bubble",
547 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
548 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56549 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49550 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
551 },
552 {
[email protected]80bd24e2010-11-30 09:34:38553 "disable-hyperlink-auditing",
554 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
555 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
556 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19557 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51558 },
559 {
560 "experimental-location-features", // FLAGS:RECORD_UMA
561 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
562 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
563 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19564 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
565 },
566 {
[email protected]5aea1862011-03-23 23:55:39567 "tab-groups-context-menu",
568 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
569 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
570 kOsWin,
571 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
572 },
[email protected]c94cebd2012-06-21 00:55:28573 {
574 "enable-instant-extended-api",
575 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
576 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56577 kOsDesktop,
[email protected]73444382013-02-26 19:31:51578 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
579 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28580 },
[email protected]e9bf9d92011-03-31 20:57:15581 {
[email protected]8cc9e532013-05-06 21:01:47582 "enable-local-first-load-ntp",
583 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
584 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
585 kOsDesktop,
586 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
587 switches::kDisableLocalFirstLoadNTP)
588 },
589 {
[email protected]07fd48a2013-04-13 02:53:27590 "enable-local-only-instant-extended-api",
591 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
592 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
593 kOsDesktop,
594 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
595 switches::kDisableLocalOnlyInstantExtendedAPI)
596 },
597 {
[email protected]354e33b2011-06-15 00:29:10598 "static-ip-config",
599 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
600 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
601 kOsCrOS,
602#if defined(OS_CHROMEOS)
603 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24604 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10605#else
606 SINGLE_VALUE_TYPE("")
607#endif
608 },
[email protected]3eb5728c2011-06-20 22:32:24609 {
610 "show-autofill-type-predictions",
611 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
612 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
613 kOsAll,
[email protected]e217c5632013-04-12 19:11:48614 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24615 },
[email protected]bff4d3e2011-06-21 23:58:52616 {
[email protected]a5e9faa2013-03-19 09:58:38617 "enable-sync-favicons",
618 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
619 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55620 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38621 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55622 },
623 {
[email protected]5d90a0a2012-11-15 02:43:40624 "sync-keystore-encryption",
625 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
626 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
627 kOsAll,
628 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
629 },
630 {
[email protected]e755a382012-09-13 17:16:35631 "enable-gesture-tap-highlight",
632 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
633 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
634 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47635 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
636 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35637 },
638 {
[email protected]a22ebd812011-06-23 00:05:39639 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
640 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
641 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
642 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40643 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25644 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39645 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
646 },
[email protected]81a6b0b2011-06-24 17:55:40647 {
[email protected]128dc6c2012-06-22 20:30:35648 "omnibox-history-quick-provider-reorder-for-inlining",
649 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
650 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
651 kOsAll,
652 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
653 },
654 {
[email protected]032d5e6c2012-02-17 17:53:55655 "omnibox-inline-history-quick-provider",
656 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
657 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
658 kOsAll,
659 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
660 },
661 {
[email protected]7e7a28092011-12-09 22:24:55662 "enable-panels",
663 IDS_FLAGS_ENABLE_PANELS_NAME,
664 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56665 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55666 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54667 },
[email protected]e3749d12011-07-25 22:22:12668 {
[email protected]27c14f02012-06-22 17:29:58669 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27670 "save-page-as-mhtml", // FLAGS:RECORD_UMA
671 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
672 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
673 kOsMac | kOsWin | kOsLinux,
674 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
675 },
676 {
[email protected]b7bb44f2011-09-01 05:17:03677 "enable-autologin",
678 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
679 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
680 kOsMac | kOsWin | kOsLinux,
681 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
682 },
[email protected]b9841172011-09-26 23:36:09683 {
[email protected]903e63382013-06-01 00:40:58684 "enable-quic",
685 IDS_FLAGS_ENABLE_QUIC_NAME,
686 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
687 kOsAll,
688 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
689 switches::kDisableQuic)
690 },
691 {
[email protected]27b3fe92012-03-21 05:35:06692 "enable-async-dns",
693 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
694 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46695 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44696 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
697 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06698 },
[email protected]85dd7ca2013-05-30 23:53:00699#if defined(ANDROID) && !defined(GOOGLE_TV)
700 {
701 "enable-media-source",
702 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
703 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
704 kOsAll,
705 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
706 },
707#else
[email protected]27b3fe92012-03-21 05:35:06708 {
[email protected]1eb93802012-09-11 18:57:56709 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31710 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
711 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32712 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31713 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44714 },
[email protected]85dd7ca2013-05-30 23:53:00715#endif
[email protected]e4e68dbb2011-11-18 01:50:22716 {
[email protected]16c242d2013-05-31 23:56:47717 "enable-encrypted-media",
718 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
719 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56720 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47721 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
722 },
723 {
724 "disable-encrypted-media",
725 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
726 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
727 kOsDesktop,
728 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03729 },
[email protected]f88628792012-12-18 07:07:50730 {
731 "enable-opus-playback",
732 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
733 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56734 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50735 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
736 },
[email protected]ca6eaa5a2013-01-24 16:16:04737 {
[email protected]c54e1aa2013-01-25 09:26:17738 "enable-vp9-playback",
739 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
740 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
741 kOsDesktop,
742 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
743 },
744 {
[email protected]6ac955b2013-04-19 23:43:32745 "enable-vp8-alpha-playback",
746 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
747 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
748 kOsDesktop,
749 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
750 },
751 {
[email protected]ca6eaa5a2013-01-24 16:16:04752 "enable-managed-users",
753 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
754 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58755 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04756 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
757 },
[email protected]dc04be7c2012-03-15 23:57:49758#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50759 {
[email protected]2a13a9a2013-04-19 04:00:21760 "ash-disable-auto-maximizing",
761 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
762 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
763 kOsWin | kOsLinux | kOsCrOS,
764 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
765 },
766 {
[email protected]cda278d2012-10-30 20:31:40767 "ash-disable-auto-window-placement",
768 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
769 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
770 kOsWin | kOsLinux | kOsCrOS,
771 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
772 },
[email protected]b4e4ec42012-11-29 21:42:40773 {
[email protected]16f55a22013-02-13 23:47:34774 "ash-disable-per-app-launcher",
775 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
776 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40777 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34778 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40779 },
[email protected]dc04be7c2012-03-15 23:57:49780#endif
[email protected]eaae8b462012-01-20 22:20:39781 {
[email protected]db543d322011-12-15 20:40:15782 "per-tile-painting",
783 IDS_FLAGS_PER_TILE_PAINTING_NAME,
784 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37785 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37786 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15787 },
[email protected]bf88c032011-12-22 19:05:47788 {
789 "enable-javascript-harmony",
790 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
791 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
792 kOsAll,
793 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
794 },
[email protected]7e7f378a2012-01-05 14:35:37795 {
[email protected]85646172012-01-09 22:45:54796 "enable-tab-browser-dragging",
797 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
798 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
799 kOsWin,
800 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
801 },
802 {
[email protected]068b7b52012-02-27 12:41:44803 "disable-restore-session-state",
804 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
805 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37806 kOsAll,
[email protected]068b7b52012-02-27 12:41:44807 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37808 },
[email protected]88864db2012-01-18 20:56:35809 {
810 "disable-software-rasterizer",
811 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
812 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
813#if defined(ENABLE_SWIFTSHADER)
814 kOsAll,
815#else
816 0,
817#endif
818 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
819 },
[email protected]15a5d722012-01-23 09:11:14820 {
[email protected]ff7b6dd2012-09-15 20:20:03821 "enable-experimental-webkit-features",
822 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
823 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16824 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03825 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49826 },
827 {
[email protected]0f95a252012-09-13 22:30:04828 "enable-css-shaders",
829 IDS_FLAGS_CSS_SHADERS_NAME,
830 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
831 kOsAll,
832 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
833 },
834 {
[email protected]3e8befc2012-03-13 01:17:03835 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16836 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
837 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56838 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03839 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16840 },
[email protected]dc04be7c2012-03-15 23:57:49841#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01842 {
[email protected]3cd198a22012-03-12 20:38:01843 "enable-ash-oak",
844 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
845 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
846 kOsAll,
847 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
848 },
[email protected]31cf1c52012-02-29 20:55:01849#endif
[email protected]184ec592012-03-01 11:54:28850 {
851 "enable-devtools-experiments",
852 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
853 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56854 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28855 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
856 },
[email protected]76d1854e2012-03-02 23:57:44857 {
[email protected]2fefdb32013-02-26 14:28:10858 "silent-debugger-extension-api",
859 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
860 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
861 kOsDesktop,
862 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
863 },
864 {
[email protected]76d1854e2012-03-02 23:57:44865 "enable-suggestions-ntp",
866 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
867 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56868 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44869 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
870 },
[email protected]a3d54252012-04-05 20:04:13871 {
[email protected]1dbaf5e2012-11-30 05:51:32872 "spellcheck-autocorrect",
873 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
874 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
875 kOsWin | kOsLinux | kOsCrOS,
876 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
877 },
878 {
[email protected]d7932532012-11-21 21:10:31879 "touch-events",
880 IDS_TOUCH_EVENTS_NAME,
881 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56882 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31883 MULTI_VALUE_TYPE(kTouchEventsChoices)
884 },
885 {
[email protected]c9c73ad42012-04-18 03:35:59886 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06887 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
888 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55889 kOsWin,
[email protected]347a0c72012-05-14 20:28:06890 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59891 },
[email protected]8a6aaa72012-04-20 20:53:58892 {
[email protected]b9c96ff2012-11-26 22:24:40893 "disable-touch-adjustment",
894 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
895 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
896 kOsWin | kOsLinux | kOsCrOS,
897 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
898 },
899 {
[email protected]0b9383a2012-10-26 00:58:16900 "enable-tab-capture",
901 IDS_ENABLE_TAB_CAPTURE_NAME,
902 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25903 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44904 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
905 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16906 },
[email protected]0b60afa2012-04-19 17:36:39907#if defined(OS_CHROMEOS)
908 {
[email protected]7c4a9bc2012-09-11 22:10:05909 "enable-background-loader",
910 IDS_ENABLE_BACKLOADER_NAME,
911 IDS_ENABLE_BACKLOADER_DESCRIPTION,
912 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24913 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05914 },
915 {
[email protected]c5667b282012-08-31 00:32:50916 "enable-bezel-touch",
917 IDS_ENABLE_BEZEL_TOUCH_NAME,
918 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47919 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50920 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47921 },
922 {
[email protected]3f4181a2013-02-01 21:31:07923 "enable-screensaver-extension",
924 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
925 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
926 kOsCrOS,
927 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
928 },
929 {
[email protected]0b60afa2012-04-19 17:36:39930 "no-discard-tabs",
931 IDS_FLAGS_NO_DISCARD_TABS_NAME,
932 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
933 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24934 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39935 },
936#endif
[email protected]79be6d32012-04-24 20:47:44937 {
[email protected]8d68a3e02013-01-12 15:57:10938 "enable-download-resumption",
939 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
940 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56941 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10942 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
943 },
944 {
[email protected]9a5940d2012-04-27 19:16:23945 "allow-nacl-socket-api",
946 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
947 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56948 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23949 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
950 },
[email protected]85333732012-05-01 19:02:24951 {
[email protected]60673ad72012-05-02 06:16:33952 "stacked-tab-strip",
953 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
954 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
955 kOsWin,
956 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
957 },
958 {
[email protected]4bd20202012-06-14 17:35:01959 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24960 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
961 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
962 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01963 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24964 },
[email protected]190349fd2012-05-02 00:10:47965#if defined(OS_CHROMEOS)
966 {
967 "allow-touchpad-three-finger-click",
968 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
969 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
970 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24971 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47972 },
[email protected]fbc176b62012-10-27 02:19:58973 {
974 "allow-touchpad-three-finger-swipe",
975 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
976 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
977 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24978 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:58979 },
[email protected]190349fd2012-05-02 00:10:47980#endif
[email protected]1992a2f42012-10-23 18:32:21981 {
[email protected]8ee02242012-12-04 15:23:32982 "enable-desktop-guest-mode",
983 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
984 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
985 kOsMac | kOsWin | kOsLinux,
986 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
987 },
[email protected]53520b1b2012-05-07 21:43:37988#if defined(USE_ASH)
989 {
[email protected]8257d382013-03-26 13:08:42990 "show-launcher-alignment-menu",
991 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
992 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42993 kOsAll,
[email protected]8257d382013-03-26 13:08:42994 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42995 },
996 {
[email protected]2ddf37b2013-04-20 01:15:58997 "disable-minimize-on-second-launcher-item-click",
998 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
999 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1000 kOsAll,
1001 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1002 },
1003 {
[email protected]73074742012-05-17 01:44:411004 "show-touch-hud",
1005 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1006 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1007 kOsAll,
1008 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1009 },
1010 {
[email protected]9f0940b62012-05-23 22:56:351011 "enable-pinch",
1012 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1013 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061014 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381015 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1016 },
1017 {
[email protected]de0aaed2013-05-27 18:16:431018 "enable-pinch-virtual-viewport",
1019 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1020 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1021 kOsLinux | kOsWin | kOsCrOS,
1022 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1023 },
1024 {
[email protected]a4016f12013-05-02 07:53:471025 "forced-maximize-mode",
1026 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1027 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1028 kOsLinux | kOsWin | kOsCrOS,
1029 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1030 },
[email protected]73074742012-05-17 01:44:411031#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281032#if defined(OS_CHROMEOS)
1033 {
[email protected]8b04a1652012-08-04 02:59:491034 "disable-boot-animation",
1035 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1036 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581037 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241038 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491039 },
[email protected]95058572012-08-20 14:57:291040 {
[email protected]d96aef22012-10-30 11:47:021041 "captive-portal-detector",
1042 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1043 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581044 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021045 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1046 },
1047 {
[email protected]c11aa8f12012-12-18 18:43:141048 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571049 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1050 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1051 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141052 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571053 },
[email protected]f0280952012-11-06 20:30:501054 {
[email protected]ea2fab32013-04-16 06:55:021055 "file-manager-legacy",
1056 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1057 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231058 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241059 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231060 },
[email protected]3e035e82012-11-27 20:54:321061 {
[email protected]828d99052013-04-22 08:15:031062 "file-manager-legacy-ui",
1063 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1064 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101065 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241066 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101067 },
1068 {
[email protected]c64d7732013-03-25 18:09:501069 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521070 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1071 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581072 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241073 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471074 },
[email protected]6ad015c2013-03-06 00:49:511075 {
[email protected]c64d7732013-03-25 18:09:501076 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521077 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1078 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511079 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521080 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511081 },
[email protected]099b890c2013-04-25 19:16:261082 {
1083 "disable-quickoffice-component-app",
1084 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1085 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1086 kOsCrOS,
1087 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1088 },
[email protected]62018dc2012-12-13 00:37:351089#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391090 {
[email protected]6247aba2013-03-04 22:57:181091 "views-textfield",
1092 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1093 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391094 kOsWin,
[email protected]6247aba2013-03-04 22:57:181095 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1096 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391097 },
[email protected]bd0cd3bb2012-06-14 03:03:381098 {
[email protected]ffbe5782013-05-09 23:22:081099 "new-dialog-style",
1100 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1101 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321102 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081103 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1104 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321105 },
[email protected]7db8893a2012-07-26 00:49:401106 { "disable-accelerated-video-decode",
1107 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1108 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191109 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401110 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151111 },
[email protected]66ae9fc2012-06-19 21:33:521112#if defined(USE_ASH)
1113 {
1114 "ash-debug-shortcuts",
1115 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1116 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1117 kOsAll,
1118 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1119 },
1120#endif
[email protected]37fee0942012-08-07 21:07:451121 {
[email protected]ad3f6d22012-08-29 02:34:191122 "enable-contacts",
1123 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1124 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1125 kOsCrOS,
1126 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1127 },
[email protected]1d9bb9cd2012-08-28 22:02:501128#if defined(USE_ASH)
1129 { "ash-enable-advanced-gestures",
1130 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1131 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1132 kOsCrOS,
1133 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1134 },
[email protected]cfa24e62013-02-13 21:19:111135 { "ash-disable-tab-scrubbing",
1136 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1137 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161138 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111139 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161140 },
[email protected]ad6fcc32013-05-30 03:46:481141 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081142 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1143 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1144 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481145 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081146 },
[email protected]83eef802012-12-02 07:43:521147 { "ash-enable-workspace-scrubbing",
1148 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1149 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1150 kOsCrOS,
1151 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1152 },
[email protected]cf2b1a82013-04-20 01:05:431153 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111154 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1155 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241156 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431157 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1158 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241159 },
[email protected]316708a2012-11-05 22:57:021160#if defined(OS_LINUX)
1161 { "ash-enable-memory-monitor",
1162 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1163 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1164 kOsCrOS,
1165 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1166 },
1167#endif
[email protected]1d9bb9cd2012-08-28 22:02:501168#endif
[email protected]9b7ab882012-09-10 23:46:361169#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131170 { "use-new-network-configuration-handlers",
1171 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1172 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1173 kOsCrOS,
1174 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1175 },
[email protected]ce98ef82013-05-31 22:43:241176 { "use-new-network-connection-handler",
1177 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1178 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1179 kOsCrOS,
1180 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1181 },
[email protected]9b7ab882012-09-10 23:46:361182 {
[email protected]354ff2d2013-05-01 17:06:311183 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121184 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1185 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1186 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311187 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1188 },
1189 {
1190 "ash-audio-device-menu",
1191 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1192 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1193 kOsCrOS,
1194 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121195 },
1196 {
[email protected]205f07892012-10-16 20:26:221197 "enable-carrier-switching",
1198 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1199 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1200 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241201 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221202 },
1203 {
[email protected]9b7ab882012-09-10 23:46:361204 "enable-request-tablet-site",
1205 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1206 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1207 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241208 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361209 },
1210#endif
[email protected]dab49c0b2012-10-04 05:55:351211 {
1212 "debug-packed-apps",
1213 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1214 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561215 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351216 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1217 },
[email protected]d1459ed2012-10-10 01:29:331218 {
1219 "enable-password-generation",
1220 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1221 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561222 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331223 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1224 },
[email protected]26d045f2012-10-18 21:18:431225 {
[email protected]76f7d4882012-10-26 21:09:221226 "enable-deferred-image-decoding",
1227 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1228 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221229 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221230 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1231 },
1232 {
[email protected]075543d2012-10-24 01:29:141233 "performance-monitor-gathering",
1234 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1235 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1236 kOsAll,
1237 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1238 },
[email protected]783d5bb2012-10-24 03:47:141239 {
[email protected]90b482d2013-04-04 10:45:581240 "disable-native-autofill-ui",
1241 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1242 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431243 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581244 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431245 },
1246 {
[email protected]a7259fb2012-11-08 06:22:231247 "enable-experimental-form-filling",
1248 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1249 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1250 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481251 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231252 },
[email protected]6e6efe42013-01-30 00:04:501253 {
[email protected]db3178c2013-03-21 14:54:541254 "wallet-service-use-prod",
1255 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1256 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1257 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481258 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541259 },
1260 {
[email protected]6e6efe42013-01-30 00:04:501261 "enable-interactive-autocomplete",
1262 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1263 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061264 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171265 ENABLE_DISABLE_VALUE_TYPE(
1266 autofill::switches::kEnableInteractiveAutocomplete,
1267 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501268 },
[email protected]177260c2013-04-24 01:47:381269#if defined(USE_AURA)
1270 {
1271 "overscroll-history-navigation",
1272 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1273 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1274 kOsAll,
1275 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1276 switches::kOverscrollHistoryNavigation, "1",
1277 switches::kOverscrollHistoryNavigation, "0")
1278 },
1279#endif
[email protected]edbea622012-11-28 20:39:381280 {
1281 "enable-touch-drag-drop",
1282 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1283 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1284 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271285 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1286 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381287 },
[email protected]0e2f43b62013-02-21 00:47:151288 {
1289 "enable-touch-editing",
1290 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1291 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1292 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271293 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1294 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151295 },
[email protected]92e12dd92012-12-11 03:33:201296 {
1297 "enable-rich-notifications",
1298 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1299 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001300 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231301 ENABLE_DISABLE_VALUE_TYPE(
1302 message_center::switches::kEnableRichNotifications,
1303 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201304 },
[email protected]4d51c682012-12-11 11:34:551305 {
[email protected]ddec1aa2013-04-28 23:22:451306 "enable-sync-synced-notifications",
1307 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1308 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181309 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451310 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1311 switches::kDisableSyncSyncedNotifications)
1312 },
1313 {
[email protected]a50e16a2013-04-25 14:07:171314 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551315 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1316 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1317 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171318 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551319 },
[email protected]628a69a92012-12-23 04:09:341320 {
[email protected]fd030142013-02-08 02:04:381321 "enable-usermedia-screen-capture",
1322 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1323 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1324 kOsDesktop,
1325 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1326 },
[email protected]5b93e162013-02-19 06:33:091327 {
1328 "enable-apps-devtool-app",
1329 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1330 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1331 kOsDesktop,
1332 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1333 },
[email protected]9323fdd12013-02-23 00:31:361334 {
1335 "impl-side-painting",
1336 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1337 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041338 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361339 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1340 },
[email protected]a42c85f2013-04-04 18:15:121341 {
[email protected]1c92d3e2013-04-18 05:31:391342 "enable-websocket-experimental-implementation",
1343 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1344 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1345 kOsAll,
1346 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1347 },
1348 {
[email protected]a42c85f2013-04-04 18:15:121349 "max-tiles-for-interest-area",
1350 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1351 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1352 kOsAndroid | kOsLinux | kOsCrOS,
1353 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1354 },
[email protected]7cf7ccb2013-04-20 02:53:081355 {
1356 "enable-offline-mode",
1357 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1358 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1359 kOsAll,
1360 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1361 },
[email protected]a3618122013-04-26 21:15:341362 {
1363 "default-tile-width",
1364 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1365 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1366 kOsAll,
1367 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1368 },
1369 {
1370 "default-tile-height",
1371 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1372 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1373 kOsAll,
1374 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1375 },
[email protected]2f2f72b2013-03-08 22:37:311376 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1377#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371378 {
1379 "track-active-visit-time",
1380 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1381 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1382 kOsWin,
1383 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1384 },
[email protected]2f2f72b2013-03-08 22:37:311385#endif
[email protected]8cc71d42013-03-02 17:26:081386#if defined(OS_ANDROID)
1387 {
1388 "disable-gesture-requirement-for-media-playback",
1389 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1390 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1391 kOsAndroid,
1392 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1393 },
1394#endif
[email protected]6077cab2013-03-11 19:36:141395#if defined(ENABLE_GOOGLE_NOW)
1396 {
1397 "enable-google-now",
1398 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1399 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361400 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141401 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1402 },
1403#endif
[email protected]86459e2c2013-04-10 13:39:241404#if defined(OS_CHROMEOS)
1405 {
1406 "enable-virtual-keyboard",
1407 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1408 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1409 kOsCrOS,
1410 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1411 },
1412#endif
[email protected]38484df12013-04-10 16:42:031413 {
1414 "enable-simple-cache-backend",
1415 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1416 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251417 kOsAll,
[email protected]38484df12013-04-10 16:42:031418 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1419 },
[email protected]717e4e22013-04-10 20:52:231420 {
1421 "enable-tcp-fast-open",
1422 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1423 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111424 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231425 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1426 },
[email protected]8027acd2013-04-18 08:35:151427 {
1428 "enable-webp-in-accept-header",
1429 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1430 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1431 kOsAll,
1432 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1433 },
[email protected]58c740f2013-05-06 05:25:441434 {
1435 "apps-use-native-frame",
1436 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1437 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1438 kOsWin,
1439 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1440 },
[email protected]896d86b32013-05-09 19:36:441441 {
1442 "enable-syncfs-directory-operation",
1443 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1444 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1445 kOsAll,
1446 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1447 },
[email protected]a4ed7e12013-05-24 01:00:281448 {
1449 "enable-draggable-menu-button",
1450 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1451 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1452 kOsAndroid,
1453 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1454 },
[email protected]380532aa2013-05-24 11:59:351455 {
1456 "enable-reset-profile-settings",
1457 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1458 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1459 kOsAll,
1460 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1461 },
[email protected]289704062013-05-31 01:49:401462 {
1463 "enable-device-discovery",
1464 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1465 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1466 kOsDesktop,
1467 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1468 },
[email protected]56d3c6e42013-05-29 11:28:011469#if defined(OS_MACOSX)
1470 {
1471 "enable-app-list-shim",
1472 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1473 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1474 kOsMac,
1475 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1476 },
[email protected]cb29e162013-05-31 07:47:021477 {
1478 "enable-app-shims",
1479 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1480 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1481 kOsMac,
1482 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1483 },
[email protected]56d3c6e42013-05-29 11:28:011484#endif
[email protected]13177832013-05-31 07:46:051485#if defined(OS_CHROMEOS) || defined(OS_WIN)
1486 {
1487 "enable-omnibox-auto-completion-for-ime",
1488 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1489 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1490 kOsCrOS,
1491 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1492 },
1493#endif
[email protected]910ecfe2013-06-03 23:38:141494#if defined(USE_AURA)
1495 {
1496 "tab-capture-upscale-quality",
1497 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1498 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1499 kOsAll,
1500 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1501 },
1502 {
1503 "tab-capture-downscale-quality",
1504 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1505 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1506 kOsAll,
1507 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1508 },
1509#endif
[email protected]71d4f602013-06-04 23:21:101510 {
[email protected]5e099c62013-06-08 05:46:231511 "enable-spelling-service-feedback",
1512 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1513 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1514 kOsAll,
1515 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1516 },
1517 {
[email protected]71d4f602013-06-04 23:21:101518 "enable-webgl-draft-extensions",
1519 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1520 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1521 kOsAll,
1522 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1523 },
[email protected]deadc492013-06-07 21:39:281524 {
1525 "high-dpi-support",
1526 IDS_FLAGS_HIDPI_NAME,
1527 IDS_FLAGS_HIDPI_DESCRIPTION,
1528 kOsWin,
1529 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1530 switches::kHighDPISupport,"0")
1531 },
[email protected]77e69a512013-06-08 05:56:451532#if defined(OS_CHROMEOS)
1533 {
1534 "enable-quickoffice-editing",
1535 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1536 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1537 kOsCrOS,
1538 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1539 },
1540#endif
[email protected]82ca4212013-06-11 12:09:171541 {
1542 "enable-translate-settings",
1543 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1544 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1545 kOsAll,
1546 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1547 },
[email protected]a0e4b072011-08-17 01:47:071548};
[email protected]ad2a3ded2010-08-27 13:19:051549
[email protected]a314ee5a2010-10-26 21:23:281550const Experiment* experiments = kExperiments;
1551size_t num_experiments = arraysize(kExperiments);
1552
[email protected]e2ddbc92010-10-15 20:02:071553// Stores and encapsulates the little state that about:flags has.
1554class FlagsState {
1555 public:
1556 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401557 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1558 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071559 bool IsRestartNeededToCommitChanges();
1560 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401561 FlagsStorage* flags_storage,
1562 const std::string& internal_name,
1563 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071564 void RemoveFlagsSwitches(
1565 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401566 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071567 void reset();
1568
1569 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551570 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071571 return Singleton<FlagsState>::get();
1572 }
1573
1574 private:
1575 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531576 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071577
1578 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1579};
1580
[email protected]8a6ff28d2010-12-02 16:35:191581// Adds the internal names for the specified experiment to |names|.
1582void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1583 if (e.type == Experiment::SINGLE_VALUE) {
1584 names->insert(e.internal_name);
1585 } else {
[email protected]83e9fa702013-02-25 19:30:441586 DCHECK(e.type == Experiment::MULTI_VALUE ||
1587 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191588 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441589 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191590 }
1591}
1592
[email protected]28e35af2011-02-09 12:56:221593// Confirms that an experiment is valid, used in a DCHECK in
1594// SanitizeList below.
1595bool ValidateExperiment(const Experiment& e) {
1596 switch (e.type) {
1597 case Experiment::SINGLE_VALUE:
1598 DCHECK_EQ(0, e.num_choices);
1599 DCHECK(!e.choices);
1600 break;
1601 case Experiment::MULTI_VALUE:
1602 DCHECK_GT(e.num_choices, 0);
1603 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531604 DCHECK(e.choices[0].command_line_switch);
1605 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221606 break;
[email protected]83e9fa702013-02-25 19:30:441607 case Experiment::ENABLE_DISABLE_VALUE:
1608 DCHECK_EQ(3, e.num_choices);
1609 DCHECK(!e.choices);
1610 DCHECK(e.command_line_switch);
1611 DCHECK(e.command_line_value);
1612 DCHECK(e.disable_command_line_switch);
1613 DCHECK(e.disable_command_line_value);
1614 break;
[email protected]28e35af2011-02-09 12:56:221615 default:
1616 NOTREACHED();
1617 }
1618 return true;
1619}
1620
[email protected]ad2a3ded2010-08-27 13:19:051621// Removes all experiments from prefs::kEnabledLabsExperiments that are
1622// unknown, to prevent this list to become very long as experiments are added
1623// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401624void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051625 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221626 for (size_t i = 0; i < num_experiments; ++i) {
1627 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191628 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221629 }
[email protected]ad2a3ded2010-08-27 13:19:051630
[email protected]e6d1c4f2013-06-12 17:37:401631 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051632
1633 std::set<std::string> new_enabled_experiments;
1634 std::set_intersection(
1635 known_experiments.begin(), known_experiments.end(),
1636 enabled_experiments.begin(), enabled_experiments.end(),
1637 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1638
[email protected]4c8853f2012-07-23 01:29:161639 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401640 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051641}
1642
[email protected]1a47d7e2010-10-15 00:37:241643void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401644 FlagsStorage* flags_storage, std::set<std::string>* result) {
1645 SanitizeList(flags_storage);
1646 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051647}
1648
[email protected]a314ee5a2010-10-26 21:23:281649// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1650// enabled on the current platform.
1651void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401652 FlagsStorage* flags_storage, std::set<std::string>* result) {
1653 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281654
1655 // Filter out any experiments that aren't enabled on the current platform. We
1656 // don't remove these from prefs else syncing to a platform with a different
1657 // set of experiments would be lossy.
1658 std::set<std::string> platform_experiments;
1659 int current_platform = GetCurrentPlatform();
1660 for (size_t i = 0; i < num_experiments; ++i) {
1661 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191662 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581663#if defined(OS_CHROMEOS)
1664 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1665 AddInternalName(experiments[i], &platform_experiments);
1666#endif
[email protected]a314ee5a2010-10-26 21:23:281667 }
1668
1669 std::set<std::string> new_enabled_experiments;
1670 std::set_intersection(
1671 platform_experiments.begin(), platform_experiments.end(),
1672 result->begin(), result->end(),
1673 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1674
1675 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051676}
1677
[email protected]8a6ff28d2010-12-02 16:35:191678// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191679Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221680 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441681 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1682 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191683 ListValue* result = new ListValue;
1684 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191685 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441686 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191687 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441688 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221689 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191690 result->Append(value);
1691 }
1692 return result;
1693}
1694
[email protected]e2ddbc92010-10-15 20:02:071695} // namespace
1696
[email protected]83e9fa702013-02-25 19:30:441697std::string Experiment::NameForChoice(int index) const {
1698 DCHECK(type == Experiment::MULTI_VALUE ||
1699 type == Experiment::ENABLE_DISABLE_VALUE);
1700 DCHECK_LT(index, num_choices);
1701 return std::string(internal_name) + testing::kMultiSeparator +
1702 base::IntToString(index);
1703}
1704
1705string16 Experiment::DescriptionForChoice(int index) const {
1706 DCHECK(type == Experiment::MULTI_VALUE ||
1707 type == Experiment::ENABLE_DISABLE_VALUE);
1708 DCHECK_LT(index, num_choices);
1709 int description_id;
1710 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1711 const int kEnableDisableDescriptionIds[] = {
1712 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1713 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1714 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1715 };
1716 description_id = kEnableDisableDescriptionIds[index];
1717 } else {
1718 description_id = choices[index].description_id;
1719 }
1720 return l10n_util::GetStringUTF16(description_id);
1721}
1722
[email protected]e6d1c4f2013-06-12 17:37:401723void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1724 CommandLine* command_line) {
1725 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1726 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051727}
1728
[email protected]e6d1c4f2013-06-12 17:37:401729void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521730 FlagAccess access,
1731 base::ListValue* supported_experiments,
1732 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051733 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401734 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051735
1736 int current_platform = GetCurrentPlatform();
1737
[email protected]a314ee5a2010-10-26 21:23:281738 for (size_t i = 0; i < num_experiments; ++i) {
1739 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051740
1741 DictionaryValue* data = new DictionaryValue();
1742 data->SetString("internal_name", experiment.internal_name);
1743 data->SetString("name",
1744 l10n_util::GetStringUTF16(experiment.visible_name_id));
1745 data->SetString("description",
1746 l10n_util::GetStringUTF16(
1747 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401748
1749 ListValue* supported_platforms = new ListValue();
1750 AddOsStrings(experiment.supported_platforms, supported_platforms);
1751 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051752
[email protected]28e35af2011-02-09 12:56:221753 switch (experiment.type) {
1754 case Experiment::SINGLE_VALUE:
1755 data->SetBoolean(
1756 "enabled",
1757 enabled_experiments.count(experiment.internal_name) > 0);
1758 break;
1759 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441760 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221761 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1762 break;
1763 default:
1764 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191765 }
1766
[email protected]ee28495a2013-05-20 04:10:521767 bool supported = (experiment.supported_platforms & current_platform) != 0;
1768#if defined(OS_CHROMEOS)
1769 if (access == kOwnerAccessToFlags &&
1770 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1771 supported = true;
1772 }
1773#endif
1774 if (supported)
1775 supported_experiments->Append(data);
1776 else
1777 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051778 }
[email protected]ad2a3ded2010-08-27 13:19:051779}
1780
[email protected]ad2a3ded2010-08-27 13:19:051781bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551782 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051783}
1784
[email protected]e6d1c4f2013-06-12 17:37:401785void SetExperimentEnabled(FlagsStorage* flags_storage,
1786 const std::string& internal_name,
1787 bool enable) {
1788 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1789 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071790}
1791
1792void RemoveFlagsSwitches(
1793 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551794 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071795}
1796
[email protected]e6d1c4f2013-06-12 17:37:401797void ResetAllFlags(FlagsStorage* flags_storage) {
1798 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001799}
1800
[email protected]a314ee5a2010-10-26 21:23:281801int GetCurrentPlatform() {
1802#if defined(OS_MACOSX)
1803 return kOsMac;
1804#elif defined(OS_WIN)
1805 return kOsWin;
1806#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1807 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211808#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281809 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401810#elif defined(OS_ANDROID)
1811 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281812#else
1813#error Unknown platform
1814#endif
1815}
1816
[email protected]e6d1c4f2013-06-12 17:37:401817void RecordUMAStatistics(FlagsStorage* flags_storage) {
1818 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541819 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1820 ++it) {
1821 std::string action("AboutFlags_");
1822 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381823 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541824 }
1825 // Since flag metrics are recorded every startup, add a tick so that the
1826 // stats can be made meaningful.
1827 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381828 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1829 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541830}
1831
[email protected]e2ddbc92010-10-15 20:02:071832//////////////////////////////////////////////////////////////////////////////
1833// FlagsState implementation.
1834
1835namespace {
1836
[email protected]83e9fa702013-02-25 19:30:441837typedef std::map<std::string, std::pair<std::string, std::string> >
1838 NameToSwitchAndValueMap;
1839
1840void SetFlagToSwitchMapping(const std::string& key,
1841 const std::string& switch_name,
1842 const std::string& switch_value,
1843 NameToSwitchAndValueMap* name_to_switch_map) {
1844 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1845 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1846}
1847
[email protected]e2ddbc92010-10-15 20:02:071848void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401849 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071850 if (command_line->HasSwitch(switches::kNoExperiments))
1851 return;
1852
1853 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001854
[email protected]e6d1c4f2013-06-12 17:37:401855 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1856 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071857
[email protected]a82744532011-02-11 16:15:531858 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191859 for (size_t i = 0; i < num_experiments; ++i) {
1860 const Experiment& e = experiments[i];
1861 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441862 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1863 e.command_line_value, &name_to_switch_map);
1864 } else if (e.type == Experiment::MULTI_VALUE) {
1865 for (int j = 0; j < e.num_choices; ++j) {
1866 SetFlagToSwitchMapping(e.NameForChoice(j),
1867 e.choices[j].command_line_switch,
1868 e.choices[j].command_line_value,
1869 &name_to_switch_map);
1870 }
[email protected]8a6ff28d2010-12-02 16:35:191871 } else {
[email protected]83e9fa702013-02-25 19:30:441872 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1873 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1874 &name_to_switch_map);
1875 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1876 e.command_line_value, &name_to_switch_map);
1877 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1878 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191879 }
1880 }
[email protected]e2ddbc92010-10-15 20:02:071881
1882 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531883 flags_switches_.insert(
1884 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1885 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071886 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1887 it != enabled_experiments.end();
1888 ++it) {
1889 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531890 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191891 name_to_switch_map.find(experiment_name);
1892 if (name_to_switch_it == name_to_switch_map.end()) {
1893 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071894 continue;
[email protected]8a6ff28d2010-12-02 16:35:191895 }
[email protected]e2ddbc92010-10-15 20:02:071896
[email protected]a82744532011-02-11 16:15:531897 const std::pair<std::string, std::string>&
1898 switch_and_value_pair = name_to_switch_it->second;
1899
1900 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1901 switch_and_value_pair.second);
1902 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071903 }
1904 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531905 flags_switches_.insert(
1906 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1907 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071908}
1909
1910bool FlagsState::IsRestartNeededToCommitChanges() {
1911 return needs_restart_;
1912}
1913
[email protected]e6d1c4f2013-06-12 17:37:401914void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
1915 const std::string& internal_name,
1916 bool enable) {
[email protected]83e9fa702013-02-25 19:30:441917 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191918 if (at_index != std::string::npos) {
1919 DCHECK(enable);
1920 // We're being asked to enable a multi-choice experiment. Disable the
1921 // currently selected choice.
1922 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221923 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:401924 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191925
[email protected]28e35af2011-02-09 12:56:221926 // And enable the new choice, if it is not the default first choice.
1927 if (internal_name != experiment_name + "@0") {
1928 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401929 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081930 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:401931 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:221932 }
[email protected]8a6ff28d2010-12-02 16:35:191933 return;
1934 }
1935
[email protected]ad2a3ded2010-08-27 13:19:051936 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401937 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051938
[email protected]8a6ff28d2010-12-02 16:35:191939 const Experiment* e = NULL;
1940 for (size_t i = 0; i < num_experiments; ++i) {
1941 if (experiments[i].internal_name == internal_name) {
1942 e = experiments + i;
1943 break;
1944 }
1945 }
1946 DCHECK(e);
1947
1948 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591949 if (enable)
[email protected]147492b2013-03-19 23:52:081950 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591951 else
[email protected]147492b2013-03-19 23:52:081952 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191953 } else {
1954 if (enable) {
1955 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081956 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191957 } else {
1958 // Find the currently enabled choice and disable it.
1959 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441960 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191961 if (enabled_experiments.find(choice_name) !=
1962 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081963 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191964 enabled_experiments.erase(choice_name);
1965 // Continue on just in case there's a bug and more than one
1966 // experiment for this choice was enabled.
1967 }
1968 }
1969 }
1970 }
[email protected]ad2a3ded2010-08-27 13:19:051971
[email protected]e6d1c4f2013-06-12 17:37:401972 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051973}
1974
[email protected]e2ddbc92010-10-15 20:02:071975void FlagsState::RemoveFlagsSwitches(
1976 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531977 for (std::map<std::string, std::string>::const_iterator
1978 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1979 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071980 }
1981}
1982
[email protected]e6d1c4f2013-06-12 17:37:401983void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:001984 needs_restart_ = true;
1985
1986 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401987 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:001988}
1989
[email protected]e2ddbc92010-10-15 20:02:071990void FlagsState::reset() {
1991 needs_restart_ = false;
1992 flags_switches_.clear();
1993}
1994
[email protected]38e46812011-05-09 20:49:221995} // namespace
[email protected]e2ddbc92010-10-15 20:02:071996
1997namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191998
1999// WARNING: '@' is also used in the html file. If you update this constant you
2000// also need to update the html file.
2001const char kMultiSeparator[] = "@";
2002
[email protected]e2ddbc92010-10-15 20:02:072003void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552004 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072005}
[email protected]a314ee5a2010-10-26 21:23:282006
2007void SetExperiments(const Experiment* e, size_t count) {
2008 if (!e) {
2009 experiments = kExperiments;
2010 num_experiments = arraysize(kExperiments);
2011 } else {
2012 experiments = e;
2013 num_experiments = count;
2014 }
2015}
2016
[email protected]8a6ff28d2010-12-02 16:35:192017const Experiment* GetExperiments(size_t* count) {
2018 *count = num_experiments;
2019 return experiments;
2020}
2021
[email protected]e2ddbc92010-10-15 20:02:072022} // namespace testing
2023
[email protected]1a47d7e2010-10-15 00:37:242024} // namespace about_flags