blob: 8fec2699d2f897ea133332a12d403bb05e4dc73c [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5715#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0317#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3820#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
23#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0526#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0227#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0228#include "media/base/media_switches.h"
[email protected]0bc6c272012-07-17 03:32:0329#include "ui/app_list/app_list_switches.h"
[email protected]c051a1b2011-01-21 23:30:1730#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5931#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4832#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2733#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2434#include "ui/keyboard/keyboard_switches.h"
[email protected]8b1c3c72013-01-25 01:48:4335#include "ui/surface/surface_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0536
[email protected]f1c39242013-01-29 16:13:0137#if defined(ENABLE_MESSAGE_CENTER)
38#include "ui/message_center/message_center_switches.h"
39#endif
40
[email protected]dc04be7c2012-03-15 23:57:4941#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3142#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4943#endif
44
[email protected]badba1ad2012-11-16 17:21:4645#if defined(OS_CHROMEOS)
46#include "chromeos/chromeos_switches.h"
47#endif
48
[email protected]7f6f44c2011-12-14 13:23:3849using content::UserMetricsAction;
50
[email protected]1a47d7e2010-10-15 00:37:2451namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0552
[email protected]8a6ff28d2010-12-02 16:35:1953// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5354#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4455 Experiment::SINGLE_VALUE, \
56 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5357#define SINGLE_VALUE_TYPE(command_line_switch) \
58 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4459#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
60 disable_switch, disable_value) \
61 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
62 disable_switch, disable_value, NULL, 3
63#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
64 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5365#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4466 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1967
[email protected]e2ddbc92010-10-15 20:02:0768namespace {
69
[email protected]9c7453d2012-01-21 00:45:4070const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5671const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0572
[email protected]cc3e2052011-12-20 01:01:4073// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
74// whether the experiment is available on that platform.
75void AddOsStrings(unsigned bitmask, ListValue* list) {
76 struct {
77 unsigned bit;
78 const char* const name;
79 } kBitsToOs[] = {
80 {kOsMac, "Mac"},
81 {kOsWin, "Windows"},
82 {kOsLinux, "Linux"},
83 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0184 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5885 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4086 };
87 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
88 if (bitmask & kBitsToOs[i].bit)
89 list->Append(new StringValue(kBitsToOs[i].name));
90}
91
[email protected]68317802012-06-07 19:13:2392const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = {
93 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" },
94 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED,
95 switches::kOmniboxHistoryQuickProviderNewScoring,
96 switches::kOmniboxHistoryQuickProviderNewScoringEnabled },
97 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED,
98 switches::kOmniboxHistoryQuickProviderNewScoring,
99 switches::kOmniboxHistoryQuickProviderNewScoringDisabled }
100};
101
[email protected]128dc6c2012-06-22 20:30:35102const Experiment::Choice
103 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
104 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
105 "",
106 "" },
107 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
108 switches::kOmniboxHistoryQuickProviderReorderForInlining,
109 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
110 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
111 switches::kOmniboxHistoryQuickProviderReorderForInlining,
112 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
113};
114
[email protected]032d5e6c2012-02-17 17:53:55115const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
116 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
117 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
118 switches::kOmniboxInlineHistoryQuickProvider,
119 switches::kOmniboxInlineHistoryQuickProviderAllowed },
120 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
121 switches::kOmniboxInlineHistoryQuickProvider,
122 switches::kOmniboxInlineHistoryQuickProviderProhibited }
123};
124
[email protected]fb854192013-02-06 01:30:04125const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
126 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
127 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
128 switches::kEnableCompositingForFixedPosition, ""},
129 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
130 switches::kDisableCompositingForFixedPosition, ""},
131 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
132 switches::kEnableHighDpiCompositingForFixedPosition, ""}
133};
134
[email protected]8b1c3c72013-01-25 01:48:43135const Experiment::Choice kGDIPresentChoices[] = {
136 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
137 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
138 switches::kDoFirstShowPresentWithGDI, ""},
139 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
140 switches::kDoAllShowPresentWithGDI, ""}
141};
142
[email protected]d7932532012-11-21 21:10:31143const Experiment::Choice kTouchEventsChoices[] = {
144 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
145 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
146 switches::kTouchEvents,
147 switches::kTouchEventsEnabled },
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
149 switches::kTouchEvents,
150 switches::kTouchEventsDisabled }
151};
152
[email protected]347a0c72012-05-14 20:28:06153const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31154 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20155 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06156 switches::kTouchOptimizedUI,
157 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20158 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06159 switches::kTouchOptimizedUI,
160 switches::kTouchOptimizedUIDisabled }
161};
162
[email protected]66f409c2012-10-04 20:59:04163const Experiment::Choice kNaClDebugMaskChoices[] = {
164 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
165 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
166 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
167 // an option to switch off its debugging.
168 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
169 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
170 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
171 switches::kNaClDebugMask, "*://*/*debug.nmf" }
172};
173
[email protected]ea2f3342012-09-21 21:13:36174#if defined(OS_CHROMEOS)
175const Experiment::Choice kAshBootAnimationFunction[] = {
176 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
177 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
178 ash::switches::kAshBootAnimationFunction2, ""},
179 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
180 ash::switches::kAshBootAnimationFunction3, ""}
181};
[email protected]d96aef22012-10-30 11:47:02182
183const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]ad2fe9f2012-11-15 11:03:19184 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
[email protected]d96aef22012-10-30 11:47:02185 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]ad2fe9f2012-11-15 11:03:19186 switches::kEnableChromeCaptivePortalDetector, ""},
187 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
188 switches::kDisableChromeCaptivePortalDetector, ""}
[email protected]d96aef22012-10-30 11:47:02189};
[email protected]a78c7432013-03-13 06:22:43190
[email protected]ea2f3342012-09-21 21:13:36191#endif
192
[email protected]9323fdd12013-02-23 00:31:36193const Experiment::Choice kImplSidePaintingChoices[] = {
194 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
195 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
196 cc::switches::kEnableImplSidePainting, ""},
197 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
198 cc::switches::kDisableImplSidePainting, ""}
199};
200
[email protected]a42c85f2013-04-04 18:15:12201const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
202 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
203 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
204 cc::switches::kMaxTilesForInterestArea, "64"},
205 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
206 cc::switches::kMaxTilesForInterestArea, "128"},
207 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
208 cc::switches::kMaxTilesForInterestArea, "256"},
209 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
210 cc::switches::kMaxTilesForInterestArea, "512"}
211};
212
[email protected]a3618122013-04-26 21:15:34213const Experiment::Choice kDefaultTileWidthChoices[] = {
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
215 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
216 switches::kDefaultTileWidth, "128"},
217 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
218 switches::kDefaultTileWidth, "256"},
219 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
220 switches::kDefaultTileWidth, "512"},
221 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
222 switches::kDefaultTileWidth, "1024"}
223};
224
225const Experiment::Choice kDefaultTileHeightChoices[] = {
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
227 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
228 switches::kDefaultTileHeight, "128"},
229 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
230 switches::kDefaultTileHeight, "256"},
231 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
232 switches::kDefaultTileHeight, "512"},
233 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
234 switches::kDefaultTileHeight, "1024"}
235};
236
[email protected]38484df12013-04-10 16:42:03237const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21238 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
239 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
240 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03241 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
242 switches::kUseSimpleCacheBackend, "on"}
243};
244
[email protected]4bc5050c2010-11-18 17:55:54245// RECORDING USER METRICS FOR FLAGS:
246// -----------------------------------------------------------------------------
247// The first line of the experiment is the internal name. If you'd like to
248// gather statistics about the usage of your flag, you should append a marker
249// comment to the end of the feature name, like so:
250// "my-special-feature", // FLAGS:RECORD_UMA
251//
252// After doing that, run //chrome/tools/extract_actions.py (see instructions at
253// the top of that file for details) to update the chromeactions.txt file, which
254// will enable UMA to record your feature flag.
255//
[email protected]783d5bb2012-10-24 03:47:14256// After your feature has shipped under a flag, you can locate the metrics under
257// the action name AboutFlags_internal-action-name. Actions are recorded once
258// per startup, so you should divide this number by AboutFlags_StartupTick to
259// get a sense of usage. Note that this will not be the same as number of users
260// with a given feature enabled because users can quit and relaunch the
261// application multiple times over a given time interval. The dashboard also
262// shows you how many (metrics reporting) users have enabled the flag over the
263// last seven days. However, note that this is not the same as the number of
264// users who have the flag enabled, since enabling the flag happens once,
265// whereas running with the flag enabled happens until the user flips the flag
266// again.
[email protected]4bc5050c2010-11-18 17:55:54267
[email protected]8a6ff28d2010-12-02 16:35:19268// To add a new experiment add to the end of kExperiments. There are two
269// distinct types of experiments:
270// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
271// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22272// . MULTI_VALUE: a list of choices, the first of which should correspond to a
273// deactivated state for this lab (i.e. no command line option). To specify
274// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
275// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19276// See the documentation of Experiment for details on the fields.
277//
278// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05279const Experiment kExperiments[] = {
280 {
[email protected]aac169d2011-03-18 19:53:03281 "expose-for-tabs", // FLAGS:RECORD_UMA
282 IDS_FLAGS_TABPOSE_NAME,
283 IDS_FLAGS_TABPOSE_DESCRIPTION,
284 kOsMac,
285#if defined(OS_MACOSX)
286 // The switch exists only on OS X.
287 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
288#else
289 SINGLE_VALUE_TYPE("")
290#endif
291 },
292 {
[email protected]4bc5050c2010-11-18 17:55:54293 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05294 IDS_FLAGS_CONFLICTS_CHECK_NAME,
295 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
296 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19297 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05298 },
299 {
[email protected]4bc5050c2010-11-18 17:55:54300 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54301 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
302 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45303 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22304 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31305 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22306 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
307 // always have PDF rasterization available, so no flag needed there.
308#if !defined(GOOGLE_CHROME_BUILD)
309 kOsWin,
310#else
311 0,
[email protected]fa6d2a2f2010-11-30 21:47:19312#endif
[email protected]8a6ff28d2010-12-02 16:35:19313 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42314 },
[email protected]60d77bd2012-08-22 00:10:07315#if defined(OS_WIN)
316 {
317 "print-raster",
318 IDS_FLAGS_PRINT_RASTER_NAME,
319 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
320 kOsWin,
321 SINGLE_VALUE_TYPE(switches::kPrintRaster)
322 },
323#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05324 {
[email protected]96c6f4c2011-05-18 19:36:22325 "ignore-gpu-blacklist",
326 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
327 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
328 kOsAll,
329 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
330 },
331 {
[email protected]0110cf112011-07-02 00:39:43332 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22333 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
334 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23335 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44336 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
337 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22338 },
339 {
[email protected]72787e392012-03-23 05:55:43340 "threaded-compositing-mode",
341 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
342 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58343 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44344 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
345 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59346 },
347 {
[email protected]17e27692013-02-06 17:02:09348 "force-accelerated-composited-scrolling",
349 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
350 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
351 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44352 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
353 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09354 },
355 {
[email protected]8b1c3c72013-01-25 01:48:43356 "present-with-GDI",
357 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
358 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
359 kOsWin,
360 MULTI_VALUE_TYPE(kGDIPresentChoices)
361 },
362 {
[email protected]2b608752013-05-01 03:34:36363 "enable-experimental-canvas-features",
364 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
365 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
366 kOsAll,
367 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
368 },
369 {
[email protected]81c64af62012-06-06 20:15:52370 "disable-accelerated-2d-canvas",
371 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
372 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
373 kOsAll,
374 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
375 },
376 {
[email protected]efcde132012-05-30 01:05:18377 "disable-threaded-animation",
378 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
379 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59380 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37381 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59382 },
383 {
[email protected]5963b772011-02-09 22:55:38384 "composited-layer-borders",
385 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
386 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
387 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57388 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38389 },
390 {
[email protected]a8f1eaa2011-03-07 19:00:58391 "show-fps-counter",
392 IDS_FLAGS_SHOW_FPS_COUNTER,
393 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
394 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57395 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58396 },
[email protected]8ff7f342011-05-25 01:49:47397 {
[email protected]70c98a332011-12-21 20:51:52398 "accelerated-filters",
399 IDS_FLAGS_ACCELERATED_FILTERS,
400 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
401 kOsAll,
402 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
403 },
404 {
[email protected]8ff7f342011-05-25 01:49:47405 "disable-gpu-vsync",
406 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
407 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56408 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47409 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
410 },
[email protected]deaba6d52011-09-23 14:47:12411 {
[email protected]4052d832013-01-16 05:31:01412 "enable-webgl",
413 IDS_FLAGS_ENABLE_WEBGL_NAME,
414 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
415 kOsAndroid,
416#if defined(OS_ANDROID)
417 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
418#else
419 SINGLE_VALUE_TYPE("")
420#endif
421 },
422 {
[email protected]deaba6d52011-09-23 14:47:12423 "disable-webgl",
424 IDS_FLAGS_DISABLE_WEBGL_NAME,
425 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56426 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01427#if defined(OS_ANDROID)
428 SINGLE_VALUE_TYPE("")
429#else
[email protected]deaba6d52011-09-23 14:47:12430 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01431#endif
[email protected]deaba6d52011-09-23 14:47:12432 },
[email protected]09096e02012-05-24 11:12:04433 {
[email protected]ce585bf2013-03-14 16:25:16434 "disable-webrtc",
435 IDS_FLAGS_DISABLE_WEBRTC_NAME,
436 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05437 kOsAndroid,
438#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16439 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05440#else
441 SINGLE_VALUE_TYPE("")
442#endif
443 },
[email protected]34cb5292013-04-15 06:06:31444#if defined(OS_ANDROID)
445 {
446 "enable-webaudio",
447 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
448 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
449 kOsAndroid,
450 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
451 },
452#endif
[email protected]d9da9582013-01-31 04:59:05453 {
[email protected]96bcdc102012-05-24 23:42:10454 "fixed-position-creates-stacking-context",
455 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
456 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
457 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44458 ENABLE_DISABLE_VALUE_TYPE(
459 switches::kEnableFixedPositionCreatesStackingContext,
460 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10461 },
[email protected]fb854192013-02-06 01:30:04462 {
463 "enable-compositing-for-fixed-position",
464 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
465 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
466 kOsAll,
467 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
468 },
[email protected]a7640ef22012-10-06 00:52:08469 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53470 {
[email protected]e3791ce92011-08-09 01:03:32471 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40472 IDS_FLAGS_ENABLE_NACL_NAME,
473 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56474 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19475 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40476 },
477 {
[email protected]9addd1c2012-09-15 14:28:24478 "enable-nacl-debug", // FLAGS:RECORD_UMA
479 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
480 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56481 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24482 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13483 },
484 {
[email protected]66f409c2012-10-04 20:59:04485 "nacl-debug-mask", // FLAGS:RECORD_UMA
486 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
487 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56488 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04489 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
490 },
491 {
[email protected]7babd1c2012-08-08 20:35:29492 "enable-pnacl", // FLAGS:RECORD_UMA
493 IDS_FLAGS_ENABLE_PNACL_NAME,
494 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56495 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29496 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
497 },
498 {
[email protected]4bc5050c2010-11-18 17:55:54499 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32500 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
501 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56502 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19503 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32504 },
[email protected]3627b06d2010-11-12 16:36:16505 {
[email protected]ac2e2acd2013-03-21 12:57:29506 "extensions-on-chrome-urls",
507 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
508 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
509 kOsAll,
510 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
511 },
512 {
[email protected]e9cddd52013-03-23 17:37:53513 "enable-adview",
514 IDS_FLAGS_ENABLE_ADVIEW_NAME,
515 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
516 kOsDesktop,
517 SINGLE_VALUE_TYPE(switches::kEnableAdview)
518 },
519 {
520 "enable-adview-src-attribute",
521 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
522 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
523 kOsDesktop,
524 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
525 },
526 {
[email protected]544471a2012-10-13 05:27:09527 "action-box",
[email protected]cab18ef2012-04-27 07:22:03528 IDS_FLAGS_ACTION_BOX_NAME,
529 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56530 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44531 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
532 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03533 },
534 {
[email protected]3a362432012-06-18 20:39:51535 "script-badges",
536 IDS_FLAGS_SCRIPT_BADGES_NAME,
537 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56538 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09539 SINGLE_VALUE_TYPE(switches::kScriptBadges)
540 },
541 {
542 "script-bubble",
543 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
544 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56545 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44546 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
547 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51548 },
549 {
[email protected]cbe224d2011-08-04 22:12:49550 "apps-new-install-bubble",
551 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
552 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56553 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49554 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
555 },
556 {
[email protected]80bd24e2010-11-30 09:34:38557 "disable-hyperlink-auditing",
558 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
559 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
560 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19561 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51562 },
563 {
564 "experimental-location-features", // FLAGS:RECORD_UMA
565 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
566 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
567 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19568 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
569 },
570 {
[email protected]5aea1862011-03-23 23:55:39571 "tab-groups-context-menu",
572 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
573 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
574 kOsWin,
575 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
576 },
[email protected]c94cebd2012-06-21 00:55:28577 {
578 "enable-instant-extended-api",
579 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
580 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56581 kOsDesktop,
[email protected]73444382013-02-26 19:31:51582 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
583 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28584 },
[email protected]e9bf9d92011-03-31 20:57:15585 {
[email protected]07fd48a2013-04-13 02:53:27586 "enable-local-only-instant-extended-api",
587 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
588 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
589 kOsDesktop,
590 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
591 switches::kDisableLocalOnlyInstantExtendedAPI)
592 },
593 {
[email protected]354e33b2011-06-15 00:29:10594 "static-ip-config",
595 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
596 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
597 kOsCrOS,
598#if defined(OS_CHROMEOS)
599 // This switch exists only on Chrome OS.
600 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
601#else
602 SINGLE_VALUE_TYPE("")
603#endif
604 },
[email protected]3eb5728c2011-06-20 22:32:24605 {
606 "show-autofill-type-predictions",
607 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
608 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
609 kOsAll,
[email protected]e217c5632013-04-12 19:11:48610 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24611 },
[email protected]bff4d3e2011-06-21 23:58:52612 {
[email protected]a5e9faa2013-03-19 09:58:38613 "enable-sync-favicons",
614 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
615 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55616 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38617 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55618 },
619 {
[email protected]5d90a0a2012-11-15 02:43:40620 "sync-keystore-encryption",
621 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
622 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
623 kOsAll,
624 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
625 },
626 {
[email protected]e755a382012-09-13 17:16:35627 "enable-gesture-tap-highlight",
628 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
629 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
630 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47631 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
632 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35633 },
634 {
[email protected]a22ebd812011-06-23 00:05:39635 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
636 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
637 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
638 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40639 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25640 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39641 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
642 },
[email protected]81a6b0b2011-06-24 17:55:40643 {
[email protected]68317802012-06-07 19:13:23644 "omnibox-history-quick-provider-new-scoring",
645 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME,
646 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION,
647 kOsAll,
648 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices)
649 },
650 {
[email protected]128dc6c2012-06-22 20:30:35651 "omnibox-history-quick-provider-reorder-for-inlining",
652 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
653 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
654 kOsAll,
655 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
656 },
657 {
[email protected]032d5e6c2012-02-17 17:53:55658 "omnibox-inline-history-quick-provider",
659 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
660 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
661 kOsAll,
662 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
663 },
664 {
[email protected]7e7a28092011-12-09 22:24:55665 "enable-panels",
666 IDS_FLAGS_ENABLE_PANELS_NAME,
667 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56668 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55669 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54670 },
[email protected]e3749d12011-07-25 22:22:12671 {
[email protected]27c14f02012-06-22 17:29:58672 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27673 "save-page-as-mhtml", // FLAGS:RECORD_UMA
674 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
675 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
676 kOsMac | kOsWin | kOsLinux,
677 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
678 },
679 {
[email protected]b7bb44f2011-09-01 05:17:03680 "enable-autologin",
681 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
682 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
683 kOsMac | kOsWin | kOsLinux,
684 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
685 },
[email protected]b9841172011-09-26 23:36:09686 {
[email protected]18cf89d2013-04-12 02:42:32687 "enable-spdy4a1",
688 IDS_FLAGS_ENABLE_SPDY4A1_NAME,
689 IDS_FLAGS_ENABLE_SPDY4A1_DESCRIPTION,
690 kOsAll,
691 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a1)
692 },
693 {
[email protected]27b3fe92012-03-21 05:35:06694 "enable-async-dns",
695 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
696 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46697 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44698 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
699 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06700 },
701 {
[email protected]1eb93802012-09-11 18:57:56702 "disable-media-source",
[email protected]da43c082012-09-07 18:56:11703 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
704 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32705 kOsAll,
[email protected]da43c082012-09-07 18:56:11706 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]6aa03b32011-10-27 21:44:44707 },
[email protected]e4e68dbb2011-11-18 01:50:22708 {
[email protected]36d98412013-01-31 20:28:53709 "disable-encrypted-media",
710 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
711 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56712 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53713 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03714 },
[email protected]f88628792012-12-18 07:07:50715 {
716 "enable-opus-playback",
717 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
718 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56719 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50720 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
721 },
[email protected]ca6eaa5a2013-01-24 16:16:04722 {
[email protected]c54e1aa2013-01-25 09:26:17723 "enable-vp9-playback",
724 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
725 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
726 kOsDesktop,
727 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
728 },
729 {
[email protected]6ac955b2013-04-19 23:43:32730 "enable-vp8-alpha-playback",
731 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
732 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
733 kOsDesktop,
734 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
735 },
736 {
[email protected]ca6eaa5a2013-01-24 16:16:04737 "enable-managed-users",
738 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
739 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58740 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04741 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
742 },
[email protected]dc04be7c2012-03-15 23:57:49743#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50744 {
[email protected]2a13a9a2013-04-19 04:00:21745 "ash-disable-auto-maximizing",
746 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
747 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
748 kOsWin | kOsLinux | kOsCrOS,
749 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
750 },
751 {
[email protected]cda278d2012-10-30 20:31:40752 "ash-disable-auto-window-placement",
753 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
754 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
755 kOsWin | kOsLinux | kOsCrOS,
756 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
757 },
[email protected]b4e4ec42012-11-29 21:42:40758 {
[email protected]16f55a22013-02-13 23:47:34759 "ash-disable-per-app-launcher",
760 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
761 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40762 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34763 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40764 },
[email protected]dc04be7c2012-03-15 23:57:49765#endif
[email protected]eaae8b462012-01-20 22:20:39766 {
[email protected]db543d322011-12-15 20:40:15767 "per-tile-painting",
768 IDS_FLAGS_PER_TILE_PAINTING_NAME,
769 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37770 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37771 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15772 },
[email protected]bf88c032011-12-22 19:05:47773 {
774 "enable-javascript-harmony",
775 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
776 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
777 kOsAll,
778 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
779 },
[email protected]7e7f378a2012-01-05 14:35:37780 {
[email protected]85646172012-01-09 22:45:54781 "enable-tab-browser-dragging",
782 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
783 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
784 kOsWin,
785 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
786 },
787 {
[email protected]068b7b52012-02-27 12:41:44788 "disable-restore-session-state",
789 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
790 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37791 kOsAll,
[email protected]068b7b52012-02-27 12:41:44792 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37793 },
[email protected]88864db2012-01-18 20:56:35794 {
795 "disable-software-rasterizer",
796 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
797 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
798#if defined(ENABLE_SWIFTSHADER)
799 kOsAll,
800#else
801 0,
802#endif
803 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
804 },
[email protected]15a5d722012-01-23 09:11:14805 {
[email protected]ff7b6dd2012-09-15 20:20:03806 "enable-experimental-webkit-features",
807 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
808 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16809 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03810 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49811 },
812 {
[email protected]0f95a252012-09-13 22:30:04813 "enable-css-shaders",
814 IDS_FLAGS_CSS_SHADERS_NAME,
815 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
816 kOsAll,
817 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
818 },
819 {
[email protected]9860c68b2012-02-02 01:58:09820 "enable-extension-activity-ui",
821 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
822 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56823 kOsDesktop,
[email protected]9860c68b2012-02-02 01:58:09824 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00825 },
[email protected]54ae4e92012-02-16 15:19:05826 {
[email protected]3e8befc2012-03-13 01:17:03827 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16828 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
829 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56830 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03831 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16832 },
[email protected]dc04be7c2012-03-15 23:57:49833#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01834 {
[email protected]3cd198a22012-03-12 20:38:01835 "enable-ash-oak",
836 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
837 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
838 kOsAll,
839 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
840 },
[email protected]31cf1c52012-02-29 20:55:01841#endif
[email protected]184ec592012-03-01 11:54:28842 {
843 "enable-devtools-experiments",
844 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
845 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56846 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28847 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
848 },
[email protected]76d1854e2012-03-02 23:57:44849 {
[email protected]2fefdb32013-02-26 14:28:10850 "silent-debugger-extension-api",
851 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
852 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
853 kOsDesktop,
854 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
855 },
856 {
[email protected]76d1854e2012-03-02 23:57:44857 "enable-suggestions-ntp",
858 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
859 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56860 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44861 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
862 },
[email protected]a3d54252012-04-05 20:04:13863 {
[email protected]1dbaf5e2012-11-30 05:51:32864 "spellcheck-autocorrect",
865 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
866 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
867 kOsWin | kOsLinux | kOsCrOS,
868 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
869 },
870 {
[email protected]d7932532012-11-21 21:10:31871 "touch-events",
872 IDS_TOUCH_EVENTS_NAME,
873 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56874 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31875 MULTI_VALUE_TYPE(kTouchEventsChoices)
876 },
877 {
[email protected]c9c73ad42012-04-18 03:35:59878 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06879 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
880 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55881 kOsWin,
[email protected]347a0c72012-05-14 20:28:06882 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59883 },
[email protected]8a6aaa72012-04-20 20:53:58884 {
[email protected]b9c96ff2012-11-26 22:24:40885 "disable-touch-adjustment",
886 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
887 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
888 kOsWin | kOsLinux | kOsCrOS,
889 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
890 },
891 {
[email protected]0b9383a2012-10-26 00:58:16892 "enable-tab-capture",
893 IDS_ENABLE_TAB_CAPTURE_NAME,
894 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25895 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44896 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
897 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16898 },
[email protected]0b60afa2012-04-19 17:36:39899#if defined(OS_CHROMEOS)
900 {
[email protected]7c4a9bc2012-09-11 22:10:05901 "enable-background-loader",
902 IDS_ENABLE_BACKLOADER_NAME,
903 IDS_ENABLE_BACKLOADER_DESCRIPTION,
904 kOsCrOS,
905 SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader)
906 },
907 {
[email protected]c5667b282012-08-31 00:32:50908 "enable-bezel-touch",
909 IDS_ENABLE_BEZEL_TOUCH_NAME,
910 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47911 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50912 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47913 },
914 {
[email protected]3f4181a2013-02-01 21:31:07915 "enable-screensaver-extension",
916 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
917 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
918 kOsCrOS,
919 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
920 },
921 {
[email protected]0b60afa2012-04-19 17:36:39922 "no-discard-tabs",
923 IDS_FLAGS_NO_DISCARD_TABS_NAME,
924 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
925 kOsCrOS,
926 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
927 },
928#endif
[email protected]79be6d32012-04-24 20:47:44929 {
[email protected]8d68a3e02013-01-12 15:57:10930 "enable-download-resumption",
931 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
932 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56933 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10934 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
935 },
936 {
[email protected]9a5940d2012-04-27 19:16:23937 "allow-nacl-socket-api",
938 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
939 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56940 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23941 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
942 },
[email protected]85333732012-05-01 19:02:24943 {
[email protected]60673ad72012-05-02 06:16:33944 "stacked-tab-strip",
945 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
946 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
947 kOsWin,
948 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
949 },
950 {
[email protected]4bd20202012-06-14 17:35:01951 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24952 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
953 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
954 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01955 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24956 },
[email protected]190349fd2012-05-02 00:10:47957#if defined(OS_CHROMEOS)
958 {
959 "allow-touchpad-three-finger-click",
960 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
961 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
962 kOsCrOS,
963 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
964 },
[email protected]fbc176b62012-10-27 02:19:58965 {
966 "allow-touchpad-three-finger-swipe",
967 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
968 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
969 kOsCrOS,
970 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe)
971 },
[email protected]190349fd2012-05-02 00:10:47972#endif
[email protected]1992a2f42012-10-23 18:32:21973 {
[email protected]a585e462013-01-26 00:37:15974 "use-client-login-signin-flow",
975 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
976 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21977 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15978 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21979 },
[email protected]8ee02242012-12-04 15:23:32980 {
981 "enable-desktop-guest-mode",
982 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
983 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
984 kOsMac | kOsWin | kOsLinux,
985 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
986 },
[email protected]53520b1b2012-05-07 21:43:37987#if defined(USE_ASH)
988 {
[email protected]8257d382013-03-26 13:08:42989 "show-launcher-alignment-menu",
990 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
991 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42992 kOsAll,
[email protected]8257d382013-03-26 13:08:42993 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42994 },
995 {
[email protected]2ddf37b2013-04-20 01:15:58996 "disable-minimize-on-second-launcher-item-click",
997 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
998 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
999 kOsAll,
1000 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1001 },
1002 {
[email protected]73074742012-05-17 01:44:411003 "show-touch-hud",
1004 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1005 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1006 kOsAll,
1007 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1008 },
1009 {
[email protected]9f0940b62012-05-23 22:56:351010 "enable-pinch",
1011 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1012 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061013 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381014 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1015 },
1016 {
1017 "pinch-zoom-scrollbars",
1018 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_NAME,
1019 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_DESCRIPTION,
1020 kOsCrOS,
1021 ENABLE_DISABLE_VALUE_TYPE(cc::switches::kEnablePinchZoomScrollbars,
1022 cc::switches::kDisablePinchZoomScrollbars)
[email protected]9f0940b62012-05-23 22:56:351023 },
[email protected]a8379312012-06-15 00:20:431024 {
1025 "app-list-show-apps-only",
1026 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME,
1027 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION,
1028 kOsAll,
[email protected]0bc6c272012-07-17 03:32:031029 SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly),
[email protected]a8379312012-06-15 00:20:431030 },
[email protected]a4016f12013-05-02 07:53:471031 {
1032 "forced-maximize-mode",
1033 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1034 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1035 kOsLinux | kOsWin | kOsCrOS,
1036 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1037 },
[email protected]73074742012-05-17 01:44:411038#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281039#if defined(OS_CHROMEOS)
1040 {
[email protected]8b04a1652012-08-04 02:59:491041 "disable-boot-animation",
1042 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1043 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581044 kOsCrOSOwnerOnly,
[email protected]8b04a1652012-08-04 02:59:491045 SINGLE_VALUE_TYPE(switches::kDisableBootAnimation),
1046 },
[email protected]95058572012-08-20 14:57:291047 {
[email protected]b4557192012-09-19 11:29:581048 "disable-boot-animation2",
1049 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
1050 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581051 kOsCrOSOwnerOnly,
[email protected]b4557192012-09-19 11:29:581052 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
1053 },
1054 {
[email protected]ea2f3342012-09-21 21:13:361055 "boot-animation-fucntion",
1056 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
1057 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581058 kOsCrOSOwnerOnly,
[email protected]ea2f3342012-09-21 21:13:361059 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
1060 },
[email protected]839667d62012-10-23 19:38:571061 {
[email protected]d96aef22012-10-30 11:47:021062 "captive-portal-detector",
1063 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1064 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581065 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021066 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1067 },
1068 {
[email protected]c11aa8f12012-12-18 18:43:141069 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571070 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1071 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1072 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141073 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571074 },
[email protected]f0280952012-11-06 20:30:501075 {
[email protected]ea2fab32013-04-16 06:55:021076 "file-manager-legacy",
1077 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1078 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231079 kOsCrOS,
[email protected]ea2fab32013-04-16 06:55:021080 SINGLE_VALUE_TYPE(switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231081 },
[email protected]3e035e82012-11-27 20:54:321082 {
[email protected]828d99052013-04-22 08:15:031083 "file-manager-legacy-ui",
1084 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1085 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101086 kOsCrOS,
[email protected]828d99052013-04-22 08:15:031087 SINGLE_VALUE_TYPE(switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101088 },
1089 {
[email protected]8039e06c2013-01-17 23:34:501090 "disable-launcher-per-display",
1091 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME,
1092 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION,
[email protected]62018dc2012-12-13 00:37:351093 kOsCrOS,
[email protected]8039e06c2013-01-17 23:34:501094 SINGLE_VALUE_TYPE(ash::switches::kAshDisableLauncherPerDisplay),
[email protected]62018dc2012-12-13 00:37:351095 },
[email protected]06b146d2013-02-07 06:06:471096 {
[email protected]c64d7732013-03-25 18:09:501097 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521098 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1099 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581100 kOsCrOSOwnerOnly,
[email protected]640aa2b2013-03-22 16:00:521101 SINGLE_VALUE_TYPE(switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471102 },
[email protected]6ad015c2013-03-06 00:49:511103 {
[email protected]c64d7732013-03-25 18:09:501104 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521105 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1106 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511107 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521108 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511109 },
[email protected]099b890c2013-04-25 19:16:261110 {
1111 "disable-quickoffice-component-app",
1112 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1113 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1114 kOsCrOS,
1115 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1116 },
[email protected]62018dc2012-12-13 00:37:351117#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391118 {
[email protected]6247aba2013-03-04 22:57:181119 "views-textfield",
1120 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1121 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391122 kOsWin,
[email protected]6247aba2013-03-04 22:57:181123 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1124 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391125 },
[email protected]bd0cd3bb2012-06-14 03:03:381126 {
[email protected]2d4817742012-12-17 20:16:181127 "enable-new-dialog-style",
1128 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME,
1129 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321130 kOsWin | kOsCrOS,
[email protected]2d4817742012-12-17 20:16:181131 SINGLE_VALUE_TYPE(switches::kEnableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321132 },
[email protected]7db8893a2012-07-26 00:49:401133 { "disable-accelerated-video-decode",
1134 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1135 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191136 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401137 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151138 },
[email protected]66ae9fc2012-06-19 21:33:521139#if defined(USE_ASH)
1140 {
1141 "ash-debug-shortcuts",
1142 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1143 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1144 kOsAll,
1145 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1146 },
1147#endif
[email protected]37fee0942012-08-07 21:07:451148 {
[email protected]ad3f6d22012-08-29 02:34:191149 "enable-contacts",
1150 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1151 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1154 },
[email protected]1d9bb9cd2012-08-28 22:02:501155#if defined(USE_ASH)
1156 { "ash-enable-advanced-gestures",
1157 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1158 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1159 kOsCrOS,
1160 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1161 },
[email protected]cfa24e62013-02-13 21:19:111162 { "ash-disable-tab-scrubbing",
1163 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1164 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161165 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111166 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161167 },
[email protected]83eef802012-12-02 07:43:521168 { "ash-enable-workspace-scrubbing",
1169 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1170 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1171 kOsCrOS,
1172 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1173 },
[email protected]cf2b1a82013-04-20 01:05:431174 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111175 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1176 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241177 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431178 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1179 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241180 },
[email protected]316708a2012-11-05 22:57:021181#if defined(OS_LINUX)
1182 { "ash-enable-memory-monitor",
1183 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1184 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1185 kOsCrOS,
1186 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1187 },
1188#endif
[email protected]1d9bb9cd2012-08-28 22:02:501189#endif
[email protected]9b7ab882012-09-10 23:46:361190#if defined(OS_CHROMEOS)
[email protected]9475ee6f2013-03-08 18:20:091191 { "ash-disable-new-network-status-area",
1192 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME,
1193 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION,
[email protected]badba1ad2012-11-16 17:21:461194 kOsCrOS,
[email protected]9475ee6f2013-03-08 18:20:091195 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea),
[email protected]badba1ad2012-11-16 17:21:461196 },
[email protected]9b7ab882012-09-10 23:46:361197 {
[email protected]354ff2d2013-05-01 17:06:311198 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121199 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1200 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1201 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311202 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1203 },
1204 {
1205 "ash-audio-device-menu",
1206 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1207 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1208 kOsCrOS,
1209 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121210 },
1211 {
[email protected]205f07892012-10-16 20:26:221212 "enable-carrier-switching",
1213 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1214 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1215 kOsCrOS,
1216 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1217 },
1218 {
[email protected]9b7ab882012-09-10 23:46:361219 "enable-request-tablet-site",
1220 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1221 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1222 kOsCrOS,
1223 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1224 },
1225#endif
[email protected]dab49c0b2012-10-04 05:55:351226 {
1227 "debug-packed-apps",
1228 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1229 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561230 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351231 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1232 },
[email protected]d1459ed2012-10-10 01:29:331233 {
1234 "enable-password-generation",
1235 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1236 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561237 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331238 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1239 },
[email protected]26d045f2012-10-18 21:18:431240 {
[email protected]76f7d4882012-10-26 21:09:221241 "enable-deferred-image-decoding",
1242 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1243 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221244 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221245 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1246 },
1247 {
[email protected]075543d2012-10-24 01:29:141248 "performance-monitor-gathering",
1249 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1250 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1251 kOsAll,
1252 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1253 },
[email protected]783d5bb2012-10-24 03:47:141254 {
[email protected]90b482d2013-04-04 10:45:581255 "disable-native-autofill-ui",
1256 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1257 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431258 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581259 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431260 },
1261 {
[email protected]a7259fb2012-11-08 06:22:231262 "enable-experimental-form-filling",
1263 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1264 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1265 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481266 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231267 },
[email protected]6e6efe42013-01-30 00:04:501268 {
[email protected]db3178c2013-03-21 14:54:541269 "wallet-service-use-prod",
1270 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1271 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1272 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481273 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541274 },
1275 {
[email protected]6e6efe42013-01-30 00:04:501276 "enable-interactive-autocomplete",
1277 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1278 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]57e67ac2013-02-22 03:37:221279 kOsWin | kOsCrOS | kOsAndroid,
[email protected]6e6efe42013-01-30 00:04:501280 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1281 },
[email protected]177260c2013-04-24 01:47:381282#if defined(USE_AURA)
1283 {
1284 "overscroll-history-navigation",
1285 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1286 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1287 kOsAll,
1288 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1289 switches::kOverscrollHistoryNavigation, "1",
1290 switches::kOverscrollHistoryNavigation, "0")
1291 },
1292#endif
[email protected]edbea622012-11-28 20:39:381293 {
1294 "enable-touch-drag-drop",
1295 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1296 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1297 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271298 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1299 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381300 },
[email protected]0e2f43b62013-02-21 00:47:151301 {
1302 "enable-touch-editing",
1303 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1304 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1305 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271306 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1307 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151308 },
[email protected]f1c39242013-01-29 16:13:011309#if defined(ENABLE_MESSAGE_CENTER)
[email protected]92e12dd92012-12-11 03:33:201310 {
1311 "enable-rich-notifications",
1312 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1313 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1314 kOsWin | kOsCrOS,
[email protected]aee412aa2013-04-02 20:01:231315 ENABLE_DISABLE_VALUE_TYPE(
1316 message_center::switches::kEnableRichNotifications,
1317 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201318 },
[email protected]f1c39242013-01-29 16:13:011319#endif
[email protected]4d51c682012-12-11 11:34:551320 {
[email protected]ddec1aa2013-04-28 23:22:451321 "enable-sync-synced-notifications",
1322 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1323 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
1324 kOsWin | kOsCrOS,
1325 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1326 switches::kDisableSyncSyncedNotifications)
1327 },
1328 {
[email protected]a50e16a2013-04-25 14:07:171329 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551330 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1331 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1332 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171333 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551334 },
[email protected]628a69a92012-12-23 04:09:341335 {
[email protected]fd030142013-02-08 02:04:381336 "enable-usermedia-screen-capture",
1337 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1338 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1339 kOsDesktop,
1340 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1341 },
[email protected]5b93e162013-02-19 06:33:091342 {
1343 "enable-apps-devtool-app",
1344 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1345 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1346 kOsDesktop,
1347 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1348 },
[email protected]9323fdd12013-02-23 00:31:361349 {
1350 "impl-side-painting",
1351 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1352 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041353 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361354 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1355 },
[email protected]a42c85f2013-04-04 18:15:121356 {
[email protected]1c92d3e2013-04-18 05:31:391357 "enable-websocket-experimental-implementation",
1358 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1359 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1360 kOsAll,
1361 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1362 },
1363 {
[email protected]a42c85f2013-04-04 18:15:121364 "max-tiles-for-interest-area",
1365 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1366 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1367 kOsAndroid | kOsLinux | kOsCrOS,
1368 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1369 },
[email protected]7cf7ccb2013-04-20 02:53:081370 {
1371 "enable-offline-mode",
1372 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1373 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1374 kOsAll,
1375 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1376 },
[email protected]a3618122013-04-26 21:15:341377 {
1378 "default-tile-width",
1379 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1380 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1381 kOsAll,
1382 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1383 },
1384 {
1385 "default-tile-height",
1386 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1387 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1388 kOsAll,
1389 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1390 },
[email protected]2f2f72b2013-03-08 22:37:311391 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1392#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371393 {
1394 "track-active-visit-time",
1395 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1396 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1397 kOsWin,
1398 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1399 },
[email protected]2f2f72b2013-03-08 22:37:311400#endif
[email protected]8cc71d42013-03-02 17:26:081401#if defined(OS_ANDROID)
1402 {
1403 "disable-gesture-requirement-for-media-playback",
1404 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1405 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1406 kOsAndroid,
1407 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1408 },
1409#endif
[email protected]e79f2fd52013-03-08 23:52:471410#if defined(OS_CHROMEOS)
1411 {
1412 "enable-experimental-bluetooth",
1413 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME,
1414 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION,
1415 kOsCrOS,
1416 SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth)
1417 },
1418#endif
[email protected]6077cab2013-03-11 19:36:141419#if defined(ENABLE_GOOGLE_NOW)
1420 {
1421 "enable-google-now",
1422 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1423 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1424 kOsWin | kOsCrOS,
1425 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1426 },
1427#endif
[email protected]4a9e2e02013-04-08 16:19:491428 {
1429 "enable-translate-alpha-languages",
1430 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1431 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1432 kOsAll,
1433 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1434 },
[email protected]86459e2c2013-04-10 13:39:241435#if defined(OS_CHROMEOS)
1436 {
1437 "enable-virtual-keyboard",
1438 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1439 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1440 kOsCrOS,
1441 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1442 },
1443#endif
[email protected]38484df12013-04-10 16:42:031444 {
1445 "enable-simple-cache-backend",
1446 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1447 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1448 kOsAndroid,
1449 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1450 },
[email protected]717e4e22013-04-10 20:52:231451 {
1452 "enable-tcp-fast-open",
1453 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1454 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111455 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231456 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1457 },
[email protected]8027acd2013-04-18 08:35:151458 {
1459 "enable-webp-in-accept-header",
1460 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1461 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1462 kOsAll,
1463 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1464 },
[email protected]a0e4b072011-08-17 01:47:071465};
[email protected]ad2a3ded2010-08-27 13:19:051466
[email protected]a314ee5a2010-10-26 21:23:281467const Experiment* experiments = kExperiments;
1468size_t num_experiments = arraysize(kExperiments);
1469
[email protected]e2ddbc92010-10-15 20:02:071470// Stores and encapsulates the little state that about:flags has.
1471class FlagsState {
1472 public:
1473 FlagsState() : needs_restart_(false) {}
1474 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1475 bool IsRestartNeededToCommitChanges();
1476 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281477 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071478 void RemoveFlagsSwitches(
1479 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001480 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071481 void reset();
1482
1483 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551484 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071485 return Singleton<FlagsState>::get();
1486 }
1487
1488 private:
1489 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531490 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071491
1492 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1493};
1494
[email protected]c7b7800a2010-10-07 18:51:351495// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491496// in a set.
[email protected]1a47d7e2010-10-15 00:37:241497void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051498 const ListValue* enabled_experiments = prefs->GetList(
1499 prefs::kEnabledLabsExperiments);
1500 if (!enabled_experiments)
1501 return;
1502
1503 for (ListValue::const_iterator it = enabled_experiments->begin();
1504 it != enabled_experiments->end();
1505 ++it) {
1506 std::string experiment_name;
1507 if (!(*it)->GetAsString(&experiment_name)) {
1508 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1509 continue;
1510 }
1511 result->insert(experiment_name);
1512 }
1513}
1514
[email protected]c6343372013-03-13 17:05:491515// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241516void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051517 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381518 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1519 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051520
1521 experiments_list->Clear();
1522 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1523 it != enabled_experiments.end();
1524 ++it) {
1525 experiments_list->Append(new StringValue(*it));
1526 }
1527}
1528
[email protected]8a6ff28d2010-12-02 16:35:191529// Adds the internal names for the specified experiment to |names|.
1530void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1531 if (e.type == Experiment::SINGLE_VALUE) {
1532 names->insert(e.internal_name);
1533 } else {
[email protected]83e9fa702013-02-25 19:30:441534 DCHECK(e.type == Experiment::MULTI_VALUE ||
1535 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191536 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441537 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191538 }
1539}
1540
[email protected]28e35af2011-02-09 12:56:221541// Confirms that an experiment is valid, used in a DCHECK in
1542// SanitizeList below.
1543bool ValidateExperiment(const Experiment& e) {
1544 switch (e.type) {
1545 case Experiment::SINGLE_VALUE:
1546 DCHECK_EQ(0, e.num_choices);
1547 DCHECK(!e.choices);
1548 break;
1549 case Experiment::MULTI_VALUE:
1550 DCHECK_GT(e.num_choices, 0);
1551 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531552 DCHECK(e.choices[0].command_line_switch);
1553 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221554 break;
[email protected]83e9fa702013-02-25 19:30:441555 case Experiment::ENABLE_DISABLE_VALUE:
1556 DCHECK_EQ(3, e.num_choices);
1557 DCHECK(!e.choices);
1558 DCHECK(e.command_line_switch);
1559 DCHECK(e.command_line_value);
1560 DCHECK(e.disable_command_line_switch);
1561 DCHECK(e.disable_command_line_value);
1562 break;
[email protected]28e35af2011-02-09 12:56:221563 default:
1564 NOTREACHED();
1565 }
1566 return true;
1567}
1568
[email protected]ad2a3ded2010-08-27 13:19:051569// Removes all experiments from prefs::kEnabledLabsExperiments that are
1570// unknown, to prevent this list to become very long as experiments are added
1571// and removed.
1572void SanitizeList(PrefService* prefs) {
1573 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221574 for (size_t i = 0; i < num_experiments; ++i) {
1575 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191576 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221577 }
[email protected]ad2a3ded2010-08-27 13:19:051578
1579 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241580 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051581
1582 std::set<std::string> new_enabled_experiments;
1583 std::set_intersection(
1584 known_experiments.begin(), known_experiments.end(),
1585 enabled_experiments.begin(), enabled_experiments.end(),
1586 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1587
[email protected]4c8853f2012-07-23 01:29:161588 if (new_enabled_experiments != enabled_experiments)
1589 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051590}
1591
[email protected]1a47d7e2010-10-15 00:37:241592void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051593 PrefService* prefs, std::set<std::string>* result) {
1594 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241595 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051596}
1597
[email protected]a314ee5a2010-10-26 21:23:281598// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1599// enabled on the current platform.
1600void GetSanitizedEnabledFlagsForCurrentPlatform(
1601 PrefService* prefs, std::set<std::string>* result) {
1602 GetSanitizedEnabledFlags(prefs, result);
1603
1604 // Filter out any experiments that aren't enabled on the current platform. We
1605 // don't remove these from prefs else syncing to a platform with a different
1606 // set of experiments would be lossy.
1607 std::set<std::string> platform_experiments;
1608 int current_platform = GetCurrentPlatform();
1609 for (size_t i = 0; i < num_experiments; ++i) {
1610 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191611 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581612#if defined(OS_CHROMEOS)
1613 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1614 AddInternalName(experiments[i], &platform_experiments);
1615#endif
[email protected]a314ee5a2010-10-26 21:23:281616 }
1617
1618 std::set<std::string> new_enabled_experiments;
1619 std::set_intersection(
1620 platform_experiments.begin(), platform_experiments.end(),
1621 result->begin(), result->end(),
1622 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1623
1624 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051625}
1626
[email protected]8a6ff28d2010-12-02 16:35:191627// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191628Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221629 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441630 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1631 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191632 ListValue* result = new ListValue;
1633 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191634 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441635 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191636 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441637 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221638 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191639 result->Append(value);
1640 }
1641 return result;
1642}
1643
[email protected]e2ddbc92010-10-15 20:02:071644} // namespace
1645
[email protected]83e9fa702013-02-25 19:30:441646std::string Experiment::NameForChoice(int index) const {
1647 DCHECK(type == Experiment::MULTI_VALUE ||
1648 type == Experiment::ENABLE_DISABLE_VALUE);
1649 DCHECK_LT(index, num_choices);
1650 return std::string(internal_name) + testing::kMultiSeparator +
1651 base::IntToString(index);
1652}
1653
1654string16 Experiment::DescriptionForChoice(int index) const {
1655 DCHECK(type == Experiment::MULTI_VALUE ||
1656 type == Experiment::ENABLE_DISABLE_VALUE);
1657 DCHECK_LT(index, num_choices);
1658 int description_id;
1659 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1660 const int kEnableDisableDescriptionIds[] = {
1661 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1662 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1663 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1664 };
1665 description_id = kEnableDisableDescriptionIds[index];
1666 } else {
1667 description_id = choices[index].description_id;
1668 }
1669 return l10n_util::GetStringUTF16(description_id);
1670}
1671
[email protected]1a47d7e2010-10-15 00:37:241672void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551673 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051674}
1675
[email protected]37736bd2013-04-18 11:53:581676ListValue* GetFlagsExperimentsData(PrefService* prefs, FlagAccess access) {
[email protected]ad2a3ded2010-08-27 13:19:051677 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241678 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051679
1680 int current_platform = GetCurrentPlatform();
1681
1682 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281683 for (size_t i = 0; i < num_experiments; ++i) {
1684 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051685
1686 DictionaryValue* data = new DictionaryValue();
1687 data->SetString("internal_name", experiment.internal_name);
1688 data->SetString("name",
1689 l10n_util::GetStringUTF16(experiment.visible_name_id));
1690 data->SetString("description",
1691 l10n_util::GetStringUTF16(
1692 experiment.visible_description_id));
[email protected]37736bd2013-04-18 11:53:581693 bool supported = (experiment.supported_platforms & current_platform) != 0;
1694#if defined(OS_CHROMEOS)
1695 if (access == kOwnerAccessToFlags &&
1696 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0)
1697 supported = true;
1698#endif
[email protected]cc3e2052011-12-20 01:01:401699 data->SetBoolean("supported", supported);
1700
1701 ListValue* supported_platforms = new ListValue();
1702 AddOsStrings(experiment.supported_platforms, supported_platforms);
1703 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051704
[email protected]28e35af2011-02-09 12:56:221705 switch (experiment.type) {
1706 case Experiment::SINGLE_VALUE:
1707 data->SetBoolean(
1708 "enabled",
1709 enabled_experiments.count(experiment.internal_name) > 0);
1710 break;
1711 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441712 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221713 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1714 break;
1715 default:
1716 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191717 }
1718
[email protected]ad2a3ded2010-08-27 13:19:051719 experiments_data->Append(data);
1720 }
1721 return experiments_data;
1722}
1723
[email protected]ad2a3ded2010-08-27 13:19:051724bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551725 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051726}
1727
1728void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351729 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551730 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071731}
1732
1733void RemoveFlagsSwitches(
1734 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551735 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071736}
1737
[email protected]cb93bf52013-02-20 01:20:001738void ResetAllFlags(PrefService* prefs) {
1739 FlagsState::GetInstance()->ResetAllFlags(prefs);
1740}
1741
[email protected]a314ee5a2010-10-26 21:23:281742int GetCurrentPlatform() {
1743#if defined(OS_MACOSX)
1744 return kOsMac;
1745#elif defined(OS_WIN)
1746 return kOsWin;
1747#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1748 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211749#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281750 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401751#elif defined(OS_ANDROID)
1752 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281753#else
1754#error Unknown platform
1755#endif
1756}
1757
[email protected]4bc5050c2010-11-18 17:55:541758void RecordUMAStatistics(const PrefService* prefs) {
1759 std::set<std::string> flags;
1760 GetEnabledFlags(prefs, &flags);
1761 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1762 ++it) {
1763 std::string action("AboutFlags_");
1764 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381765 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541766 }
1767 // Since flag metrics are recorded every startup, add a tick so that the
1768 // stats can be made meaningful.
1769 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381770 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1771 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541772}
1773
[email protected]e2ddbc92010-10-15 20:02:071774//////////////////////////////////////////////////////////////////////////////
1775// FlagsState implementation.
1776
1777namespace {
1778
[email protected]83e9fa702013-02-25 19:30:441779typedef std::map<std::string, std::pair<std::string, std::string> >
1780 NameToSwitchAndValueMap;
1781
1782void SetFlagToSwitchMapping(const std::string& key,
1783 const std::string& switch_name,
1784 const std::string& switch_value,
1785 NameToSwitchAndValueMap* name_to_switch_map) {
1786 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1787 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1788}
1789
[email protected]e2ddbc92010-10-15 20:02:071790void FlagsState::ConvertFlagsToSwitches(
1791 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071792 if (command_line->HasSwitch(switches::kNoExperiments))
1793 return;
1794
1795 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001796
[email protected]a314ee5a2010-10-26 21:23:281797 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071798
[email protected]a82744532011-02-11 16:15:531799 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191800 for (size_t i = 0; i < num_experiments; ++i) {
1801 const Experiment& e = experiments[i];
1802 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441803 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1804 e.command_line_value, &name_to_switch_map);
1805 } else if (e.type == Experiment::MULTI_VALUE) {
1806 for (int j = 0; j < e.num_choices; ++j) {
1807 SetFlagToSwitchMapping(e.NameForChoice(j),
1808 e.choices[j].command_line_switch,
1809 e.choices[j].command_line_value,
1810 &name_to_switch_map);
1811 }
[email protected]8a6ff28d2010-12-02 16:35:191812 } else {
[email protected]83e9fa702013-02-25 19:30:441813 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1814 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1815 &name_to_switch_map);
1816 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1817 e.command_line_value, &name_to_switch_map);
1818 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1819 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191820 }
1821 }
[email protected]e2ddbc92010-10-15 20:02:071822
1823 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531824 flags_switches_.insert(
1825 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1826 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071827 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1828 it != enabled_experiments.end();
1829 ++it) {
1830 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531831 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191832 name_to_switch_map.find(experiment_name);
1833 if (name_to_switch_it == name_to_switch_map.end()) {
1834 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071835 continue;
[email protected]8a6ff28d2010-12-02 16:35:191836 }
[email protected]e2ddbc92010-10-15 20:02:071837
[email protected]a82744532011-02-11 16:15:531838 const std::pair<std::string, std::string>&
1839 switch_and_value_pair = name_to_switch_it->second;
1840
1841 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1842 switch_and_value_pair.second);
1843 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071844 }
1845 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531846 flags_switches_.insert(
1847 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1848 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071849}
1850
1851bool FlagsState::IsRestartNeededToCommitChanges() {
1852 return needs_restart_;
1853}
1854
1855void FlagsState::SetExperimentEnabled(
1856 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441857 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191858 if (at_index != std::string::npos) {
1859 DCHECK(enable);
1860 // We're being asked to enable a multi-choice experiment. Disable the
1861 // currently selected choice.
1862 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221863 const std::string experiment_name = internal_name.substr(0, at_index);
1864 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191865
[email protected]28e35af2011-02-09 12:56:221866 // And enable the new choice, if it is not the default first choice.
1867 if (internal_name != experiment_name + "@0") {
1868 std::set<std::string> enabled_experiments;
1869 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081870 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221871 SetEnabledFlags(prefs, enabled_experiments);
1872 }
[email protected]8a6ff28d2010-12-02 16:35:191873 return;
1874 }
1875
[email protected]ad2a3ded2010-08-27 13:19:051876 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241877 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051878
[email protected]8a6ff28d2010-12-02 16:35:191879 const Experiment* e = NULL;
1880 for (size_t i = 0; i < num_experiments; ++i) {
1881 if (experiments[i].internal_name == internal_name) {
1882 e = experiments + i;
1883 break;
1884 }
1885 }
1886 DCHECK(e);
1887
1888 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591889 if (enable)
[email protected]147492b2013-03-19 23:52:081890 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591891 else
[email protected]147492b2013-03-19 23:52:081892 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191893 } else {
1894 if (enable) {
1895 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081896 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191897 } else {
1898 // Find the currently enabled choice and disable it.
1899 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441900 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191901 if (enabled_experiments.find(choice_name) !=
1902 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081903 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191904 enabled_experiments.erase(choice_name);
1905 // Continue on just in case there's a bug and more than one
1906 // experiment for this choice was enabled.
1907 }
1908 }
1909 }
1910 }
[email protected]ad2a3ded2010-08-27 13:19:051911
[email protected]1a47d7e2010-10-15 00:37:241912 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051913}
1914
[email protected]e2ddbc92010-10-15 20:02:071915void FlagsState::RemoveFlagsSwitches(
1916 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531917 for (std::map<std::string, std::string>::const_iterator
1918 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1919 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071920 }
1921}
1922
[email protected]cb93bf52013-02-20 01:20:001923void FlagsState::ResetAllFlags(PrefService* prefs) {
1924 needs_restart_ = true;
1925
1926 std::set<std::string> no_experiments;
1927 SetEnabledFlags(prefs, no_experiments);
1928}
1929
[email protected]e2ddbc92010-10-15 20:02:071930void FlagsState::reset() {
1931 needs_restart_ = false;
1932 flags_switches_.clear();
1933}
1934
[email protected]38e46812011-05-09 20:49:221935} // namespace
[email protected]e2ddbc92010-10-15 20:02:071936
1937namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191938
1939// WARNING: '@' is also used in the html file. If you update this constant you
1940// also need to update the html file.
1941const char kMultiSeparator[] = "@";
1942
[email protected]e2ddbc92010-10-15 20:02:071943void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551944 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071945}
[email protected]a314ee5a2010-10-26 21:23:281946
1947void SetExperiments(const Experiment* e, size_t count) {
1948 if (!e) {
1949 experiments = kExperiments;
1950 num_experiments = arraysize(kExperiments);
1951 } else {
1952 experiments = e;
1953 num_experiments = count;
1954 }
1955}
1956
[email protected]8a6ff28d2010-12-02 16:35:191957const Experiment* GetExperiments(size_t* count) {
1958 *count = num_experiments;
1959 return experiments;
1960}
1961
[email protected]e2ddbc92010-10-15 20:02:071962} // namespace testing
1963
[email protected]1a47d7e2010-10-15 00:37:241964} // namespace about_flags