blob: 3b115b0e6c7ea741c537965c921e2f2da6ff5738 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5715#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0317#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3820#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0321#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0522#include "chrome/common/chrome_switches.h"
23#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3824#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0225#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0526#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0227#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0228#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1729#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5930#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4831#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2732#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2433#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5634#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2435#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5636
[email protected]dc04be7c2012-03-15 23:57:4937#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3138#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4939#endif
40
[email protected]badba1ad2012-11-16 17:21:4641#if defined(OS_CHROMEOS)
42#include "chromeos/chromeos_switches.h"
43#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]128dc6c2012-06-22 20:30:3588const Experiment::Choice
89 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
90 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
91 "",
92 "" },
93 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
94 switches::kOmniboxHistoryQuickProviderReorderForInlining,
95 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
96 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
97 switches::kOmniboxHistoryQuickProviderReorderForInlining,
98 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
99};
100
[email protected]032d5e6c2012-02-17 17:53:55101const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
102 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
103 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
104 switches::kOmniboxInlineHistoryQuickProvider,
105 switches::kOmniboxInlineHistoryQuickProviderAllowed },
106 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
107 switches::kOmniboxInlineHistoryQuickProvider,
108 switches::kOmniboxInlineHistoryQuickProviderProhibited }
109};
110
[email protected]fb854192013-02-06 01:30:04111const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
112 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
113 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
114 switches::kEnableCompositingForFixedPosition, ""},
115 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
116 switches::kDisableCompositingForFixedPosition, ""},
117 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
118 switches::kEnableHighDpiCompositingForFixedPosition, ""}
119};
120
[email protected]d8221b22013-05-23 05:35:43121const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
122 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
123 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
124 switches::kEnableCompositingForTransition, ""},
125 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
126 switches::kDisableCompositingForTransition, ""},
127};
128
[email protected]8b1c3c72013-01-25 01:48:43129const Experiment::Choice kGDIPresentChoices[] = {
130 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
131 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
132 switches::kDoFirstShowPresentWithGDI, ""},
133 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
134 switches::kDoAllShowPresentWithGDI, ""}
135};
136
[email protected]d7932532012-11-21 21:10:31137const Experiment::Choice kTouchEventsChoices[] = {
138 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
139 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
140 switches::kTouchEvents,
141 switches::kTouchEventsEnabled },
142 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
143 switches::kTouchEvents,
144 switches::kTouchEventsDisabled }
145};
146
[email protected]347a0c72012-05-14 20:28:06147const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31148 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20149 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06150 switches::kTouchOptimizedUI,
151 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20152 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06153 switches::kTouchOptimizedUI,
154 switches::kTouchOptimizedUIDisabled }
155};
156
[email protected]66f409c2012-10-04 20:59:04157const Experiment::Choice kNaClDebugMaskChoices[] = {
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
159 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
160 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
161 // an option to switch off its debugging.
162 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
163 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
164 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
165 switches::kNaClDebugMask, "*://*/*debug.nmf" }
166};
167
[email protected]ea2f3342012-09-21 21:13:36168#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02169
170const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24171 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02172 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24173 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19174 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24175 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02176};
[email protected]a78c7432013-03-13 06:22:43177
[email protected]ea2f3342012-09-21 21:13:36178#endif
179
[email protected]9323fdd12013-02-23 00:31:36180const Experiment::Choice kImplSidePaintingChoices[] = {
181 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
182 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
183 cc::switches::kEnableImplSidePainting, ""},
184 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
185 cc::switches::kDisableImplSidePainting, ""}
186};
187
[email protected]a42c85f2013-04-04 18:15:12188const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
190 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
191 cc::switches::kMaxTilesForInterestArea, "64"},
192 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
193 cc::switches::kMaxTilesForInterestArea, "128"},
194 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
195 cc::switches::kMaxTilesForInterestArea, "256"},
196 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
197 cc::switches::kMaxTilesForInterestArea, "512"}
198};
199
[email protected]a3618122013-04-26 21:15:34200const Experiment::Choice kDefaultTileWidthChoices[] = {
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
202 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
203 switches::kDefaultTileWidth, "128"},
204 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
205 switches::kDefaultTileWidth, "256"},
206 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
207 switches::kDefaultTileWidth, "512"},
208 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
209 switches::kDefaultTileWidth, "1024"}
210};
211
212const Experiment::Choice kDefaultTileHeightChoices[] = {
213 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
214 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
215 switches::kDefaultTileHeight, "128"},
216 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
217 switches::kDefaultTileHeight, "256"},
218 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
219 switches::kDefaultTileHeight, "512"},
220 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
221 switches::kDefaultTileHeight, "1024"}
222};
223
[email protected]38484df12013-04-10 16:42:03224const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21225 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
226 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
227 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03228 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
229 switches::kUseSimpleCacheBackend, "on"}
230};
231
[email protected]4bc5050c2010-11-18 17:55:54232// RECORDING USER METRICS FOR FLAGS:
233// -----------------------------------------------------------------------------
234// The first line of the experiment is the internal name. If you'd like to
235// gather statistics about the usage of your flag, you should append a marker
236// comment to the end of the feature name, like so:
237// "my-special-feature", // FLAGS:RECORD_UMA
238//
239// After doing that, run //chrome/tools/extract_actions.py (see instructions at
240// the top of that file for details) to update the chromeactions.txt file, which
241// will enable UMA to record your feature flag.
242//
[email protected]783d5bb2012-10-24 03:47:14243// After your feature has shipped under a flag, you can locate the metrics under
244// the action name AboutFlags_internal-action-name. Actions are recorded once
245// per startup, so you should divide this number by AboutFlags_StartupTick to
246// get a sense of usage. Note that this will not be the same as number of users
247// with a given feature enabled because users can quit and relaunch the
248// application multiple times over a given time interval. The dashboard also
249// shows you how many (metrics reporting) users have enabled the flag over the
250// last seven days. However, note that this is not the same as the number of
251// users who have the flag enabled, since enabling the flag happens once,
252// whereas running with the flag enabled happens until the user flips the flag
253// again.
[email protected]4bc5050c2010-11-18 17:55:54254
[email protected]8a6ff28d2010-12-02 16:35:19255// To add a new experiment add to the end of kExperiments. There are two
256// distinct types of experiments:
257// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
258// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22259// . MULTI_VALUE: a list of choices, the first of which should correspond to a
260// deactivated state for this lab (i.e. no command line option). To specify
261// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
262// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19263// See the documentation of Experiment for details on the fields.
264//
265// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05266const Experiment kExperiments[] = {
267 {
[email protected]aac169d2011-03-18 19:53:03268 "expose-for-tabs", // FLAGS:RECORD_UMA
269 IDS_FLAGS_TABPOSE_NAME,
270 IDS_FLAGS_TABPOSE_DESCRIPTION,
271 kOsMac,
272#if defined(OS_MACOSX)
273 // The switch exists only on OS X.
274 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
275#else
276 SINGLE_VALUE_TYPE("")
277#endif
278 },
279 {
[email protected]4bc5050c2010-11-18 17:55:54280 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05281 IDS_FLAGS_CONFLICTS_CHECK_NAME,
282 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
283 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19284 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05285 },
286 {
[email protected]4bc5050c2010-11-18 17:55:54287 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54288 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
289 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45290 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22291 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31292 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22293 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
294 // always have PDF rasterization available, so no flag needed there.
295#if !defined(GOOGLE_CHROME_BUILD)
296 kOsWin,
297#else
298 0,
[email protected]fa6d2a2f2010-11-30 21:47:19299#endif
[email protected]8a6ff28d2010-12-02 16:35:19300 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42301 },
[email protected]60d77bd2012-08-22 00:10:07302#if defined(OS_WIN)
303 {
304 "print-raster",
305 IDS_FLAGS_PRINT_RASTER_NAME,
306 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
307 kOsWin,
308 SINGLE_VALUE_TYPE(switches::kPrintRaster)
309 },
310#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05311 {
[email protected]96c6f4c2011-05-18 19:36:22312 "ignore-gpu-blacklist",
313 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
314 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
315 kOsAll,
316 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
317 },
318 {
[email protected]0110cf112011-07-02 00:39:43319 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22320 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
321 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23322 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44323 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
324 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22325 },
326 {
[email protected]72787e392012-03-23 05:55:43327 "threaded-compositing-mode",
328 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
329 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58330 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44331 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
332 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59333 },
334 {
[email protected]17e27692013-02-06 17:02:09335 "force-accelerated-composited-scrolling",
336 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
337 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
338 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44339 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
340 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09341 },
342 {
[email protected]8b1c3c72013-01-25 01:48:43343 "present-with-GDI",
344 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
345 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
346 kOsWin,
347 MULTI_VALUE_TYPE(kGDIPresentChoices)
348 },
349 {
[email protected]2b608752013-05-01 03:34:36350 "enable-experimental-canvas-features",
351 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
352 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
353 kOsAll,
354 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
355 },
356 {
[email protected]81c64af62012-06-06 20:15:52357 "disable-accelerated-2d-canvas",
358 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
359 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
360 kOsAll,
361 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
362 },
363 {
[email protected]efcde132012-05-30 01:05:18364 "disable-threaded-animation",
365 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
366 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59367 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37368 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59369 },
370 {
[email protected]5963b772011-02-09 22:55:38371 "composited-layer-borders",
372 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
373 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
374 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57375 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38376 },
377 {
[email protected]a8f1eaa2011-03-07 19:00:58378 "show-fps-counter",
379 IDS_FLAGS_SHOW_FPS_COUNTER,
380 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
381 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57382 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58383 },
[email protected]8ff7f342011-05-25 01:49:47384 {
[email protected]70c98a332011-12-21 20:51:52385 "accelerated-filters",
386 IDS_FLAGS_ACCELERATED_FILTERS,
387 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
388 kOsAll,
389 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
390 },
391 {
[email protected]8ff7f342011-05-25 01:49:47392 "disable-gpu-vsync",
393 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
394 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56395 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47396 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
397 },
[email protected]deaba6d52011-09-23 14:47:12398 {
[email protected]4052d832013-01-16 05:31:01399 "enable-webgl",
400 IDS_FLAGS_ENABLE_WEBGL_NAME,
401 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
402 kOsAndroid,
403#if defined(OS_ANDROID)
404 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
405#else
406 SINGLE_VALUE_TYPE("")
407#endif
408 },
409 {
[email protected]deaba6d52011-09-23 14:47:12410 "disable-webgl",
411 IDS_FLAGS_DISABLE_WEBGL_NAME,
412 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56413 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01414#if defined(OS_ANDROID)
415 SINGLE_VALUE_TYPE("")
416#else
[email protected]deaba6d52011-09-23 14:47:12417 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01418#endif
[email protected]deaba6d52011-09-23 14:47:12419 },
[email protected]09096e02012-05-24 11:12:04420 {
[email protected]ce585bf2013-03-14 16:25:16421 "disable-webrtc",
422 IDS_FLAGS_DISABLE_WEBRTC_NAME,
423 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05424 kOsAndroid,
425#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16426 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05427#else
428 SINGLE_VALUE_TYPE("")
429#endif
430 },
[email protected]5e2bc8c2013-05-28 22:59:57431#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30432 {
433 "enable-sctp-data-channels",
434 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
435 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
436 kOsAll,
437 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
438 },
[email protected]5e2bc8c2013-05-28 22:59:57439#endif
[email protected]34cb5292013-04-15 06:06:31440#if defined(OS_ANDROID)
441 {
442 "enable-webaudio",
443 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
444 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
445 kOsAndroid,
446 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
447 },
448#endif
[email protected]d9da9582013-01-31 04:59:05449 {
[email protected]96bcdc102012-05-24 23:42:10450 "fixed-position-creates-stacking-context",
451 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
452 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
453 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44454 ENABLE_DISABLE_VALUE_TYPE(
455 switches::kEnableFixedPositionCreatesStackingContext,
456 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10457 },
[email protected]fb854192013-02-06 01:30:04458 {
459 "enable-compositing-for-fixed-position",
460 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
461 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
462 kOsAll,
463 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
464 },
[email protected]d8221b22013-05-23 05:35:43465 {
466 "enable-compositing-for-transition",
467 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
468 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
469 kOsAll,
470 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
471 },
[email protected]a7640ef22012-10-06 00:52:08472 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53473 {
[email protected]e3791ce92011-08-09 01:03:32474 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40475 IDS_FLAGS_ENABLE_NACL_NAME,
476 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56477 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19478 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40479 },
480 {
[email protected]9addd1c2012-09-15 14:28:24481 "enable-nacl-debug", // FLAGS:RECORD_UMA
482 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
483 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56484 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24485 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13486 },
487 {
[email protected]66f409c2012-10-04 20:59:04488 "nacl-debug-mask", // FLAGS:RECORD_UMA
489 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
490 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56491 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04492 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
493 },
494 {
[email protected]7babd1c2012-08-08 20:35:29495 "enable-pnacl", // FLAGS:RECORD_UMA
496 IDS_FLAGS_ENABLE_PNACL_NAME,
497 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56498 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29499 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
500 },
501 {
[email protected]4bc5050c2010-11-18 17:55:54502 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32503 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
504 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56505 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19506 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32507 },
[email protected]3627b06d2010-11-12 16:36:16508 {
[email protected]ac2e2acd2013-03-21 12:57:29509 "extensions-on-chrome-urls",
510 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
511 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
512 kOsAll,
513 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
514 },
515 {
[email protected]e9cddd52013-03-23 17:37:53516 "enable-adview",
517 IDS_FLAGS_ENABLE_ADVIEW_NAME,
518 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
519 kOsDesktop,
520 SINGLE_VALUE_TYPE(switches::kEnableAdview)
521 },
522 {
523 "enable-adview-src-attribute",
524 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
525 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
526 kOsDesktop,
527 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
528 },
529 {
[email protected]544471a2012-10-13 05:27:09530 "action-box",
[email protected]cab18ef2012-04-27 07:22:03531 IDS_FLAGS_ACTION_BOX_NAME,
532 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56533 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44534 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
535 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03536 },
537 {
[email protected]3a362432012-06-18 20:39:51538 "script-badges",
539 IDS_FLAGS_SCRIPT_BADGES_NAME,
540 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56541 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09542 SINGLE_VALUE_TYPE(switches::kScriptBadges)
543 },
544 {
545 "script-bubble",
546 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
547 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56548 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44549 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
550 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51551 },
552 {
[email protected]cbe224d2011-08-04 22:12:49553 "apps-new-install-bubble",
554 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
555 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56556 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49557 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
558 },
559 {
[email protected]80bd24e2010-11-30 09:34:38560 "disable-hyperlink-auditing",
561 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
562 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
563 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19564 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51565 },
566 {
567 "experimental-location-features", // FLAGS:RECORD_UMA
568 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
569 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
570 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19571 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
572 },
573 {
[email protected]5aea1862011-03-23 23:55:39574 "tab-groups-context-menu",
575 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
576 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
577 kOsWin,
578 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
579 },
[email protected]c94cebd2012-06-21 00:55:28580 {
581 "enable-instant-extended-api",
582 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
583 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56584 kOsDesktop,
[email protected]73444382013-02-26 19:31:51585 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
586 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28587 },
[email protected]e9bf9d92011-03-31 20:57:15588 {
[email protected]8cc9e532013-05-06 21:01:47589 "enable-local-first-load-ntp",
590 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
591 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
592 kOsDesktop,
593 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
594 switches::kDisableLocalFirstLoadNTP)
595 },
596 {
[email protected]07fd48a2013-04-13 02:53:27597 "enable-local-only-instant-extended-api",
598 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
599 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
600 kOsDesktop,
601 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
602 switches::kDisableLocalOnlyInstantExtendedAPI)
603 },
604 {
[email protected]354e33b2011-06-15 00:29:10605 "static-ip-config",
606 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
607 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
608 kOsCrOS,
609#if defined(OS_CHROMEOS)
610 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24611 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10612#else
613 SINGLE_VALUE_TYPE("")
614#endif
615 },
[email protected]3eb5728c2011-06-20 22:32:24616 {
617 "show-autofill-type-predictions",
618 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
619 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
620 kOsAll,
[email protected]e217c5632013-04-12 19:11:48621 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24622 },
[email protected]bff4d3e2011-06-21 23:58:52623 {
[email protected]a5e9faa2013-03-19 09:58:38624 "enable-sync-favicons",
625 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
626 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55627 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38628 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55629 },
630 {
[email protected]5d90a0a2012-11-15 02:43:40631 "sync-keystore-encryption",
632 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
633 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
634 kOsAll,
635 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
636 },
637 {
[email protected]e755a382012-09-13 17:16:35638 "enable-gesture-tap-highlight",
639 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
640 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
641 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47642 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
643 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35644 },
645 {
[email protected]a22ebd812011-06-23 00:05:39646 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
647 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
648 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
649 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40650 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25651 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39652 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
653 },
[email protected]81a6b0b2011-06-24 17:55:40654 {
[email protected]128dc6c2012-06-22 20:30:35655 "omnibox-history-quick-provider-reorder-for-inlining",
656 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
657 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
658 kOsAll,
659 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
660 },
661 {
[email protected]032d5e6c2012-02-17 17:53:55662 "omnibox-inline-history-quick-provider",
663 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
664 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
665 kOsAll,
666 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
667 },
668 {
[email protected]7e7a28092011-12-09 22:24:55669 "enable-panels",
670 IDS_FLAGS_ENABLE_PANELS_NAME,
671 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56672 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55673 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54674 },
[email protected]e3749d12011-07-25 22:22:12675 {
[email protected]27c14f02012-06-22 17:29:58676 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27677 "save-page-as-mhtml", // FLAGS:RECORD_UMA
678 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
679 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
680 kOsMac | kOsWin | kOsLinux,
681 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
682 },
683 {
[email protected]b7bb44f2011-09-01 05:17:03684 "enable-autologin",
685 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
686 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
687 kOsMac | kOsWin | kOsLinux,
688 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
689 },
[email protected]b9841172011-09-26 23:36:09690 {
[email protected]27b3fe92012-03-21 05:35:06691 "enable-async-dns",
692 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
693 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46694 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44695 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
696 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06697 },
[email protected]85dd7ca2013-05-30 23:53:00698#if defined(ANDROID) && !defined(GOOGLE_TV)
699 {
700 "enable-media-source",
701 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
702 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
703 kOsAll,
704 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
705 },
706#else
[email protected]27b3fe92012-03-21 05:35:06707 {
[email protected]1eb93802012-09-11 18:57:56708 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31709 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
710 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32711 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31712 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44713 },
[email protected]85dd7ca2013-05-30 23:53:00714#endif
[email protected]e4e68dbb2011-11-18 01:50:22715 {
[email protected]36d98412013-01-31 20:28:53716 "disable-encrypted-media",
717 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
718 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56719 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53720 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03721 },
[email protected]f88628792012-12-18 07:07:50722 {
723 "enable-opus-playback",
724 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
725 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56726 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50727 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
728 },
[email protected]ca6eaa5a2013-01-24 16:16:04729 {
[email protected]c54e1aa2013-01-25 09:26:17730 "enable-vp9-playback",
731 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
732 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
733 kOsDesktop,
734 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
735 },
736 {
[email protected]6ac955b2013-04-19 23:43:32737 "enable-vp8-alpha-playback",
738 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
739 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
740 kOsDesktop,
741 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
742 },
743 {
[email protected]ca6eaa5a2013-01-24 16:16:04744 "enable-managed-users",
745 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
746 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58747 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04748 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
749 },
[email protected]dc04be7c2012-03-15 23:57:49750#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50751 {
[email protected]2a13a9a2013-04-19 04:00:21752 "ash-disable-auto-maximizing",
753 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
754 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
755 kOsWin | kOsLinux | kOsCrOS,
756 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
757 },
758 {
[email protected]cda278d2012-10-30 20:31:40759 "ash-disable-auto-window-placement",
760 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
761 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
762 kOsWin | kOsLinux | kOsCrOS,
763 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
764 },
[email protected]b4e4ec42012-11-29 21:42:40765 {
[email protected]16f55a22013-02-13 23:47:34766 "ash-disable-per-app-launcher",
767 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
768 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40769 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34770 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40771 },
[email protected]dc04be7c2012-03-15 23:57:49772#endif
[email protected]eaae8b462012-01-20 22:20:39773 {
[email protected]db543d322011-12-15 20:40:15774 "per-tile-painting",
775 IDS_FLAGS_PER_TILE_PAINTING_NAME,
776 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37777 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37778 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15779 },
[email protected]bf88c032011-12-22 19:05:47780 {
781 "enable-javascript-harmony",
782 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
783 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
784 kOsAll,
785 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
786 },
[email protected]7e7f378a2012-01-05 14:35:37787 {
[email protected]85646172012-01-09 22:45:54788 "enable-tab-browser-dragging",
789 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
790 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
791 kOsWin,
792 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
793 },
794 {
[email protected]068b7b52012-02-27 12:41:44795 "disable-restore-session-state",
796 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
797 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37798 kOsAll,
[email protected]068b7b52012-02-27 12:41:44799 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37800 },
[email protected]88864db2012-01-18 20:56:35801 {
802 "disable-software-rasterizer",
803 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
804 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
805#if defined(ENABLE_SWIFTSHADER)
806 kOsAll,
807#else
808 0,
809#endif
810 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
811 },
[email protected]15a5d722012-01-23 09:11:14812 {
[email protected]ff7b6dd2012-09-15 20:20:03813 "enable-experimental-webkit-features",
814 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
815 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16816 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03817 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49818 },
819 {
[email protected]0f95a252012-09-13 22:30:04820 "enable-css-shaders",
821 IDS_FLAGS_CSS_SHADERS_NAME,
822 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
823 kOsAll,
824 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
825 },
826 {
[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,
[email protected]2f2d6c32013-05-10 02:56:24905 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05906 },
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,
[email protected]2f2d6c32013-05-10 02:56:24926 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:39927 },
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,
[email protected]2f2d6c32013-05-10 02:56:24963 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:47964 },
[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,
[email protected]2f2d6c32013-05-10 02:56:24970 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerSwipe)
[email protected]fbc176b62012-10-27 02:19:58971 },
[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 {
[email protected]de0aaed2013-05-27 18:16:431017 "enable-pinch-virtual-viewport",
1018 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1019 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1020 kOsLinux | kOsWin | kOsCrOS,
1021 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1022 },
1023 {
[email protected]a4016f12013-05-02 07:53:471024 "forced-maximize-mode",
1025 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1026 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1027 kOsLinux | kOsWin | kOsCrOS,
1028 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1029 },
[email protected]73074742012-05-17 01:44:411030#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281031#if defined(OS_CHROMEOS)
1032 {
[email protected]8b04a1652012-08-04 02:59:491033 "disable-boot-animation",
1034 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1035 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581036 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241037 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491038 },
[email protected]95058572012-08-20 14:57:291039 {
[email protected]d96aef22012-10-30 11:47:021040 "captive-portal-detector",
1041 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1042 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581043 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021044 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1045 },
1046 {
[email protected]c11aa8f12012-12-18 18:43:141047 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571048 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1049 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1050 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141051 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571052 },
[email protected]f0280952012-11-06 20:30:501053 {
[email protected]ea2fab32013-04-16 06:55:021054 "file-manager-legacy",
1055 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1056 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231057 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241058 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231059 },
[email protected]3e035e82012-11-27 20:54:321060 {
[email protected]828d99052013-04-22 08:15:031061 "file-manager-legacy-ui",
1062 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1063 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101064 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241065 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101066 },
1067 {
[email protected]c64d7732013-03-25 18:09:501068 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521069 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1070 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581071 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241072 SINGLE_VALUE_TYPE(chromeos::switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471073 },
[email protected]6ad015c2013-03-06 00:49:511074 {
[email protected]c64d7732013-03-25 18:09:501075 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521076 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1077 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511078 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521079 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511080 },
[email protected]099b890c2013-04-25 19:16:261081 {
1082 "disable-quickoffice-component-app",
1083 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1084 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1085 kOsCrOS,
1086 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1087 },
[email protected]d918af92013-05-29 00:06:201088 {
1089 "enable-kiosk-app-settings",
1090 IDS_FLAGS_ENABLE_KIOSK_APP_SETTINGS_NAME,
1091 IDS_FLAGS_ENABLE_KIOSK_APP_SETTINGS_DESCRIPTION,
1092 kOsCrOSOwnerOnly,
1093 SINGLE_VALUE_TYPE(chromeos::switches::kEnableKioskAppSettings),
1094 },
[email protected]62018dc2012-12-13 00:37:351095#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391096 {
[email protected]6247aba2013-03-04 22:57:181097 "views-textfield",
1098 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1099 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391100 kOsWin,
[email protected]6247aba2013-03-04 22:57:181101 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1102 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391103 },
[email protected]bd0cd3bb2012-06-14 03:03:381104 {
[email protected]ffbe5782013-05-09 23:22:081105 "new-dialog-style",
1106 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1107 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321108 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081109 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1110 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321111 },
[email protected]7db8893a2012-07-26 00:49:401112 { "disable-accelerated-video-decode",
1113 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1114 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191115 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401116 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151117 },
[email protected]66ae9fc2012-06-19 21:33:521118#if defined(USE_ASH)
1119 {
1120 "ash-debug-shortcuts",
1121 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1122 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1123 kOsAll,
1124 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1125 },
1126#endif
[email protected]37fee0942012-08-07 21:07:451127 {
[email protected]ad3f6d22012-08-29 02:34:191128 "enable-contacts",
1129 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1130 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1131 kOsCrOS,
1132 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1133 },
[email protected]1d9bb9cd2012-08-28 22:02:501134#if defined(USE_ASH)
1135 { "ash-enable-advanced-gestures",
1136 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1137 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1138 kOsCrOS,
1139 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1140 },
[email protected]cfa24e62013-02-13 21:19:111141 { "ash-disable-tab-scrubbing",
1142 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1143 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161144 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111145 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161146 },
[email protected]ad6fcc32013-05-30 03:46:481147 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081148 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1149 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1150 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481151 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081152 },
[email protected]83eef802012-12-02 07:43:521153 { "ash-enable-workspace-scrubbing",
1154 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1155 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1156 kOsCrOS,
1157 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1158 },
[email protected]cf2b1a82013-04-20 01:05:431159 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111160 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1161 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241162 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431163 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1164 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241165 },
[email protected]316708a2012-11-05 22:57:021166#if defined(OS_LINUX)
1167 { "ash-enable-memory-monitor",
1168 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1169 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1170 kOsCrOS,
1171 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1172 },
1173#endif
[email protected]1d9bb9cd2012-08-28 22:02:501174#endif
[email protected]9b7ab882012-09-10 23:46:361175#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131176 { "use-new-network-configuration-handlers",
1177 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1178 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1179 kOsCrOS,
1180 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1181 },
[email protected]9b7ab882012-09-10 23:46:361182 {
[email protected]354ff2d2013-05-01 17:06:311183 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121184 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1185 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1186 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311187 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1188 },
1189 {
1190 "ash-audio-device-menu",
1191 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1192 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1193 kOsCrOS,
1194 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121195 },
1196 {
[email protected]205f07892012-10-16 20:26:221197 "enable-carrier-switching",
1198 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1199 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1200 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241201 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221202 },
1203 {
[email protected]9b7ab882012-09-10 23:46:361204 "enable-request-tablet-site",
1205 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1206 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1207 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241208 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361209 },
1210#endif
[email protected]dab49c0b2012-10-04 05:55:351211 {
1212 "debug-packed-apps",
1213 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1214 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561215 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351216 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1217 },
[email protected]d1459ed2012-10-10 01:29:331218 {
1219 "enable-password-generation",
1220 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1221 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561222 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331223 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1224 },
[email protected]26d045f2012-10-18 21:18:431225 {
[email protected]76f7d4882012-10-26 21:09:221226 "enable-deferred-image-decoding",
1227 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1228 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221229 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221230 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1231 },
1232 {
[email protected]075543d2012-10-24 01:29:141233 "performance-monitor-gathering",
1234 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1235 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1236 kOsAll,
1237 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1238 },
[email protected]783d5bb2012-10-24 03:47:141239 {
[email protected]90b482d2013-04-04 10:45:581240 "disable-native-autofill-ui",
1241 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1242 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431243 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581244 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431245 },
1246 {
[email protected]a7259fb2012-11-08 06:22:231247 "enable-experimental-form-filling",
1248 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1249 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1250 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481251 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231252 },
[email protected]6e6efe42013-01-30 00:04:501253 {
[email protected]db3178c2013-03-21 14:54:541254 "wallet-service-use-prod",
1255 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1256 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1257 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481258 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541259 },
1260 {
[email protected]6e6efe42013-01-30 00:04:501261 "enable-interactive-autocomplete",
1262 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1263 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]dc1cb7d82013-05-22 18:00:001264 kOsWin | kOsCrOS | kOsAndroid,
[email protected]000f3ad2013-05-16 02:19:171265 ENABLE_DISABLE_VALUE_TYPE(
1266 autofill::switches::kEnableInteractiveAutocomplete,
1267 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501268 },
[email protected]177260c2013-04-24 01:47:381269#if defined(USE_AURA)
1270 {
1271 "overscroll-history-navigation",
1272 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1273 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1274 kOsAll,
1275 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1276 switches::kOverscrollHistoryNavigation, "1",
1277 switches::kOverscrollHistoryNavigation, "0")
1278 },
1279#endif
[email protected]edbea622012-11-28 20:39:381280 {
1281 "enable-touch-drag-drop",
1282 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1283 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1284 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271285 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1286 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381287 },
[email protected]0e2f43b62013-02-21 00:47:151288 {
1289 "enable-touch-editing",
1290 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1291 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1292 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271293 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1294 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151295 },
[email protected]92e12dd92012-12-11 03:33:201296 {
1297 "enable-rich-notifications",
1298 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1299 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]ed4004b52013-05-07 13:25:001300 kOsWin | kOsCrOS | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231301 ENABLE_DISABLE_VALUE_TYPE(
1302 message_center::switches::kEnableRichNotifications,
1303 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201304 },
[email protected]4d51c682012-12-11 11:34:551305 {
[email protected]ddec1aa2013-04-28 23:22:451306 "enable-sync-synced-notifications",
1307 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1308 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181309 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451310 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1311 switches::kDisableSyncSyncedNotifications)
1312 },
1313 {
[email protected]a50e16a2013-04-25 14:07:171314 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551315 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1316 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1317 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171318 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551319 },
[email protected]628a69a92012-12-23 04:09:341320 {
[email protected]fd030142013-02-08 02:04:381321 "enable-usermedia-screen-capture",
1322 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1323 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1324 kOsDesktop,
1325 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1326 },
[email protected]5b93e162013-02-19 06:33:091327 {
1328 "enable-apps-devtool-app",
1329 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1330 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1331 kOsDesktop,
1332 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1333 },
[email protected]9323fdd12013-02-23 00:31:361334 {
1335 "impl-side-painting",
1336 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1337 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041338 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361339 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1340 },
[email protected]a42c85f2013-04-04 18:15:121341 {
[email protected]1c92d3e2013-04-18 05:31:391342 "enable-websocket-experimental-implementation",
1343 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1344 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1345 kOsAll,
1346 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1347 },
1348 {
[email protected]a42c85f2013-04-04 18:15:121349 "max-tiles-for-interest-area",
1350 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1351 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1352 kOsAndroid | kOsLinux | kOsCrOS,
1353 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1354 },
[email protected]7cf7ccb2013-04-20 02:53:081355 {
1356 "enable-offline-mode",
1357 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1358 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1359 kOsAll,
1360 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1361 },
[email protected]a3618122013-04-26 21:15:341362 {
1363 "default-tile-width",
1364 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1365 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1366 kOsAll,
1367 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1368 },
1369 {
1370 "default-tile-height",
1371 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1372 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1373 kOsAll,
1374 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1375 },
[email protected]2f2f72b2013-03-08 22:37:311376 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1377#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371378 {
1379 "track-active-visit-time",
1380 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1381 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1382 kOsWin,
1383 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1384 },
[email protected]2f2f72b2013-03-08 22:37:311385#endif
[email protected]8cc71d42013-03-02 17:26:081386#if defined(OS_ANDROID)
1387 {
1388 "disable-gesture-requirement-for-media-playback",
1389 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1390 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1391 kOsAndroid,
1392 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1393 },
1394#endif
[email protected]6077cab2013-03-11 19:36:141395#if defined(ENABLE_GOOGLE_NOW)
1396 {
1397 "enable-google-now",
1398 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1399 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1400 kOsWin | kOsCrOS,
1401 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1402 },
1403#endif
[email protected]4a9e2e02013-04-08 16:19:491404 {
1405 "enable-translate-alpha-languages",
1406 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1407 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1408 kOsAll,
1409 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1410 },
[email protected]86459e2c2013-04-10 13:39:241411#if defined(OS_CHROMEOS)
1412 {
1413 "enable-virtual-keyboard",
1414 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1415 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1416 kOsCrOS,
1417 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1418 },
1419#endif
[email protected]38484df12013-04-10 16:42:031420 {
1421 "enable-simple-cache-backend",
1422 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1423 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1424 kOsAndroid,
1425 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1426 },
[email protected]717e4e22013-04-10 20:52:231427 {
1428 "enable-tcp-fast-open",
1429 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1430 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111431 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231432 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1433 },
[email protected]8027acd2013-04-18 08:35:151434 {
1435 "enable-webp-in-accept-header",
1436 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1437 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1438 kOsAll,
1439 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1440 },
[email protected]58c740f2013-05-06 05:25:441441 {
1442 "apps-use-native-frame",
1443 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1444 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1445 kOsWin,
1446 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1447 },
[email protected]896d86b32013-05-09 19:36:441448 {
1449 "enable-syncfs-directory-operation",
1450 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1451 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1452 kOsAll,
1453 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1454 },
[email protected]a4ed7e12013-05-24 01:00:281455 {
1456 "enable-draggable-menu-button",
1457 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME,
1458 IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION,
1459 kOsAndroid,
1460 SINGLE_VALUE_TYPE(switches::kEnableDraggableMenuButton)
1461 },
[email protected]380532aa2013-05-24 11:59:351462 {
1463 "enable-reset-profile-settings",
1464 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1465 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1466 kOsAll,
1467 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1468 },
[email protected]289704062013-05-31 01:49:401469 {
1470 "enable-device-discovery",
1471 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1472 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1473 kOsDesktop,
1474 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1475 },
[email protected]56d3c6e42013-05-29 11:28:011476#if defined(OS_MACOSX)
1477 {
1478 "enable-app-list-shim",
1479 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1480 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1481 kOsMac,
1482 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1483 },
1484#endif
[email protected]a0e4b072011-08-17 01:47:071485};
[email protected]ad2a3ded2010-08-27 13:19:051486
[email protected]a314ee5a2010-10-26 21:23:281487const Experiment* experiments = kExperiments;
1488size_t num_experiments = arraysize(kExperiments);
1489
[email protected]e2ddbc92010-10-15 20:02:071490// Stores and encapsulates the little state that about:flags has.
1491class FlagsState {
1492 public:
1493 FlagsState() : needs_restart_(false) {}
1494 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1495 bool IsRestartNeededToCommitChanges();
1496 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281497 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071498 void RemoveFlagsSwitches(
1499 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001500 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071501 void reset();
1502
1503 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551504 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071505 return Singleton<FlagsState>::get();
1506 }
1507
1508 private:
1509 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531510 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071511
1512 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1513};
1514
[email protected]c7b7800a2010-10-07 18:51:351515// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491516// in a set.
[email protected]1a47d7e2010-10-15 00:37:241517void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051518 const ListValue* enabled_experiments = prefs->GetList(
1519 prefs::kEnabledLabsExperiments);
1520 if (!enabled_experiments)
1521 return;
1522
1523 for (ListValue::const_iterator it = enabled_experiments->begin();
1524 it != enabled_experiments->end();
1525 ++it) {
1526 std::string experiment_name;
1527 if (!(*it)->GetAsString(&experiment_name)) {
1528 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1529 continue;
1530 }
1531 result->insert(experiment_name);
1532 }
1533}
1534
[email protected]c6343372013-03-13 17:05:491535// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241536void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051537 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381538 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1539 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051540
1541 experiments_list->Clear();
1542 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1543 it != enabled_experiments.end();
1544 ++it) {
1545 experiments_list->Append(new StringValue(*it));
1546 }
1547}
1548
[email protected]8a6ff28d2010-12-02 16:35:191549// Adds the internal names for the specified experiment to |names|.
1550void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1551 if (e.type == Experiment::SINGLE_VALUE) {
1552 names->insert(e.internal_name);
1553 } else {
[email protected]83e9fa702013-02-25 19:30:441554 DCHECK(e.type == Experiment::MULTI_VALUE ||
1555 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191556 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441557 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191558 }
1559}
1560
[email protected]28e35af2011-02-09 12:56:221561// Confirms that an experiment is valid, used in a DCHECK in
1562// SanitizeList below.
1563bool ValidateExperiment(const Experiment& e) {
1564 switch (e.type) {
1565 case Experiment::SINGLE_VALUE:
1566 DCHECK_EQ(0, e.num_choices);
1567 DCHECK(!e.choices);
1568 break;
1569 case Experiment::MULTI_VALUE:
1570 DCHECK_GT(e.num_choices, 0);
1571 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531572 DCHECK(e.choices[0].command_line_switch);
1573 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221574 break;
[email protected]83e9fa702013-02-25 19:30:441575 case Experiment::ENABLE_DISABLE_VALUE:
1576 DCHECK_EQ(3, e.num_choices);
1577 DCHECK(!e.choices);
1578 DCHECK(e.command_line_switch);
1579 DCHECK(e.command_line_value);
1580 DCHECK(e.disable_command_line_switch);
1581 DCHECK(e.disable_command_line_value);
1582 break;
[email protected]28e35af2011-02-09 12:56:221583 default:
1584 NOTREACHED();
1585 }
1586 return true;
1587}
1588
[email protected]ad2a3ded2010-08-27 13:19:051589// Removes all experiments from prefs::kEnabledLabsExperiments that are
1590// unknown, to prevent this list to become very long as experiments are added
1591// and removed.
1592void SanitizeList(PrefService* prefs) {
1593 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221594 for (size_t i = 0; i < num_experiments; ++i) {
1595 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191596 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221597 }
[email protected]ad2a3ded2010-08-27 13:19:051598
1599 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241600 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051601
1602 std::set<std::string> new_enabled_experiments;
1603 std::set_intersection(
1604 known_experiments.begin(), known_experiments.end(),
1605 enabled_experiments.begin(), enabled_experiments.end(),
1606 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1607
[email protected]4c8853f2012-07-23 01:29:161608 if (new_enabled_experiments != enabled_experiments)
1609 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051610}
1611
[email protected]1a47d7e2010-10-15 00:37:241612void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051613 PrefService* prefs, std::set<std::string>* result) {
1614 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241615 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051616}
1617
[email protected]a314ee5a2010-10-26 21:23:281618// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1619// enabled on the current platform.
1620void GetSanitizedEnabledFlagsForCurrentPlatform(
1621 PrefService* prefs, std::set<std::string>* result) {
1622 GetSanitizedEnabledFlags(prefs, result);
1623
1624 // Filter out any experiments that aren't enabled on the current platform. We
1625 // don't remove these from prefs else syncing to a platform with a different
1626 // set of experiments would be lossy.
1627 std::set<std::string> platform_experiments;
1628 int current_platform = GetCurrentPlatform();
1629 for (size_t i = 0; i < num_experiments; ++i) {
1630 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191631 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581632#if defined(OS_CHROMEOS)
1633 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1634 AddInternalName(experiments[i], &platform_experiments);
1635#endif
[email protected]a314ee5a2010-10-26 21:23:281636 }
1637
1638 std::set<std::string> new_enabled_experiments;
1639 std::set_intersection(
1640 platform_experiments.begin(), platform_experiments.end(),
1641 result->begin(), result->end(),
1642 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1643
1644 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051645}
1646
[email protected]8a6ff28d2010-12-02 16:35:191647// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191648Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221649 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441650 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1651 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191652 ListValue* result = new ListValue;
1653 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191654 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441655 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191656 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441657 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221658 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191659 result->Append(value);
1660 }
1661 return result;
1662}
1663
[email protected]e2ddbc92010-10-15 20:02:071664} // namespace
1665
[email protected]83e9fa702013-02-25 19:30:441666std::string Experiment::NameForChoice(int index) const {
1667 DCHECK(type == Experiment::MULTI_VALUE ||
1668 type == Experiment::ENABLE_DISABLE_VALUE);
1669 DCHECK_LT(index, num_choices);
1670 return std::string(internal_name) + testing::kMultiSeparator +
1671 base::IntToString(index);
1672}
1673
1674string16 Experiment::DescriptionForChoice(int index) const {
1675 DCHECK(type == Experiment::MULTI_VALUE ||
1676 type == Experiment::ENABLE_DISABLE_VALUE);
1677 DCHECK_LT(index, num_choices);
1678 int description_id;
1679 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1680 const int kEnableDisableDescriptionIds[] = {
1681 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1682 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1683 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1684 };
1685 description_id = kEnableDisableDescriptionIds[index];
1686 } else {
1687 description_id = choices[index].description_id;
1688 }
1689 return l10n_util::GetStringUTF16(description_id);
1690}
1691
[email protected]1a47d7e2010-10-15 00:37:241692void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551693 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051694}
1695
[email protected]ee28495a2013-05-20 04:10:521696void GetFlagsExperimentsData(PrefService* prefs,
1697 FlagAccess access,
1698 base::ListValue* supported_experiments,
1699 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051700 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241701 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051702
1703 int current_platform = GetCurrentPlatform();
1704
[email protected]a314ee5a2010-10-26 21:23:281705 for (size_t i = 0; i < num_experiments; ++i) {
1706 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051707
1708 DictionaryValue* data = new DictionaryValue();
1709 data->SetString("internal_name", experiment.internal_name);
1710 data->SetString("name",
1711 l10n_util::GetStringUTF16(experiment.visible_name_id));
1712 data->SetString("description",
1713 l10n_util::GetStringUTF16(
1714 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401715
1716 ListValue* supported_platforms = new ListValue();
1717 AddOsStrings(experiment.supported_platforms, supported_platforms);
1718 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051719
[email protected]28e35af2011-02-09 12:56:221720 switch (experiment.type) {
1721 case Experiment::SINGLE_VALUE:
1722 data->SetBoolean(
1723 "enabled",
1724 enabled_experiments.count(experiment.internal_name) > 0);
1725 break;
1726 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441727 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221728 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1729 break;
1730 default:
1731 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191732 }
1733
[email protected]ee28495a2013-05-20 04:10:521734 bool supported = (experiment.supported_platforms & current_platform) != 0;
1735#if defined(OS_CHROMEOS)
1736 if (access == kOwnerAccessToFlags &&
1737 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1738 supported = true;
1739 }
1740#endif
1741 if (supported)
1742 supported_experiments->Append(data);
1743 else
1744 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051745 }
[email protected]ad2a3ded2010-08-27 13:19:051746}
1747
[email protected]ad2a3ded2010-08-27 13:19:051748bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551749 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051750}
1751
1752void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351753 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551754 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071755}
1756
1757void RemoveFlagsSwitches(
1758 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551759 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071760}
1761
[email protected]cb93bf52013-02-20 01:20:001762void ResetAllFlags(PrefService* prefs) {
1763 FlagsState::GetInstance()->ResetAllFlags(prefs);
1764}
1765
[email protected]a314ee5a2010-10-26 21:23:281766int GetCurrentPlatform() {
1767#if defined(OS_MACOSX)
1768 return kOsMac;
1769#elif defined(OS_WIN)
1770 return kOsWin;
1771#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1772 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211773#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281774 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401775#elif defined(OS_ANDROID)
1776 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281777#else
1778#error Unknown platform
1779#endif
1780}
1781
[email protected]4bc5050c2010-11-18 17:55:541782void RecordUMAStatistics(const PrefService* prefs) {
1783 std::set<std::string> flags;
1784 GetEnabledFlags(prefs, &flags);
1785 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1786 ++it) {
1787 std::string action("AboutFlags_");
1788 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381789 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541790 }
1791 // Since flag metrics are recorded every startup, add a tick so that the
1792 // stats can be made meaningful.
1793 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381794 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1795 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541796}
1797
[email protected]e2ddbc92010-10-15 20:02:071798//////////////////////////////////////////////////////////////////////////////
1799// FlagsState implementation.
1800
1801namespace {
1802
[email protected]83e9fa702013-02-25 19:30:441803typedef std::map<std::string, std::pair<std::string, std::string> >
1804 NameToSwitchAndValueMap;
1805
1806void SetFlagToSwitchMapping(const std::string& key,
1807 const std::string& switch_name,
1808 const std::string& switch_value,
1809 NameToSwitchAndValueMap* name_to_switch_map) {
1810 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1811 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1812}
1813
[email protected]e2ddbc92010-10-15 20:02:071814void FlagsState::ConvertFlagsToSwitches(
1815 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071816 if (command_line->HasSwitch(switches::kNoExperiments))
1817 return;
1818
1819 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001820
[email protected]a314ee5a2010-10-26 21:23:281821 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071822
[email protected]a82744532011-02-11 16:15:531823 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191824 for (size_t i = 0; i < num_experiments; ++i) {
1825 const Experiment& e = experiments[i];
1826 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441827 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1828 e.command_line_value, &name_to_switch_map);
1829 } else if (e.type == Experiment::MULTI_VALUE) {
1830 for (int j = 0; j < e.num_choices; ++j) {
1831 SetFlagToSwitchMapping(e.NameForChoice(j),
1832 e.choices[j].command_line_switch,
1833 e.choices[j].command_line_value,
1834 &name_to_switch_map);
1835 }
[email protected]8a6ff28d2010-12-02 16:35:191836 } else {
[email protected]83e9fa702013-02-25 19:30:441837 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1838 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1839 &name_to_switch_map);
1840 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1841 e.command_line_value, &name_to_switch_map);
1842 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1843 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191844 }
1845 }
[email protected]e2ddbc92010-10-15 20:02:071846
1847 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531848 flags_switches_.insert(
1849 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1850 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071851 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1852 it != enabled_experiments.end();
1853 ++it) {
1854 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531855 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191856 name_to_switch_map.find(experiment_name);
1857 if (name_to_switch_it == name_to_switch_map.end()) {
1858 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071859 continue;
[email protected]8a6ff28d2010-12-02 16:35:191860 }
[email protected]e2ddbc92010-10-15 20:02:071861
[email protected]a82744532011-02-11 16:15:531862 const std::pair<std::string, std::string>&
1863 switch_and_value_pair = name_to_switch_it->second;
1864
1865 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1866 switch_and_value_pair.second);
1867 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071868 }
1869 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531870 flags_switches_.insert(
1871 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1872 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071873}
1874
1875bool FlagsState::IsRestartNeededToCommitChanges() {
1876 return needs_restart_;
1877}
1878
1879void FlagsState::SetExperimentEnabled(
1880 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441881 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191882 if (at_index != std::string::npos) {
1883 DCHECK(enable);
1884 // We're being asked to enable a multi-choice experiment. Disable the
1885 // currently selected choice.
1886 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221887 const std::string experiment_name = internal_name.substr(0, at_index);
1888 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191889
[email protected]28e35af2011-02-09 12:56:221890 // And enable the new choice, if it is not the default first choice.
1891 if (internal_name != experiment_name + "@0") {
1892 std::set<std::string> enabled_experiments;
1893 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081894 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221895 SetEnabledFlags(prefs, enabled_experiments);
1896 }
[email protected]8a6ff28d2010-12-02 16:35:191897 return;
1898 }
1899
[email protected]ad2a3ded2010-08-27 13:19:051900 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241901 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051902
[email protected]8a6ff28d2010-12-02 16:35:191903 const Experiment* e = NULL;
1904 for (size_t i = 0; i < num_experiments; ++i) {
1905 if (experiments[i].internal_name == internal_name) {
1906 e = experiments + i;
1907 break;
1908 }
1909 }
1910 DCHECK(e);
1911
1912 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591913 if (enable)
[email protected]147492b2013-03-19 23:52:081914 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591915 else
[email protected]147492b2013-03-19 23:52:081916 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191917 } else {
1918 if (enable) {
1919 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081920 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191921 } else {
1922 // Find the currently enabled choice and disable it.
1923 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441924 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191925 if (enabled_experiments.find(choice_name) !=
1926 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081927 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191928 enabled_experiments.erase(choice_name);
1929 // Continue on just in case there's a bug and more than one
1930 // experiment for this choice was enabled.
1931 }
1932 }
1933 }
1934 }
[email protected]ad2a3ded2010-08-27 13:19:051935
[email protected]1a47d7e2010-10-15 00:37:241936 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051937}
1938
[email protected]e2ddbc92010-10-15 20:02:071939void FlagsState::RemoveFlagsSwitches(
1940 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531941 for (std::map<std::string, std::string>::const_iterator
1942 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1943 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071944 }
1945}
1946
[email protected]cb93bf52013-02-20 01:20:001947void FlagsState::ResetAllFlags(PrefService* prefs) {
1948 needs_restart_ = true;
1949
1950 std::set<std::string> no_experiments;
1951 SetEnabledFlags(prefs, no_experiments);
1952}
1953
[email protected]e2ddbc92010-10-15 20:02:071954void FlagsState::reset() {
1955 needs_restart_ = false;
1956 flags_switches_.clear();
1957}
1958
[email protected]38e46812011-05-09 20:49:221959} // namespace
[email protected]e2ddbc92010-10-15 20:02:071960
1961namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191962
1963// WARNING: '@' is also used in the html file. If you update this constant you
1964// also need to update the html file.
1965const char kMultiSeparator[] = "@";
1966
[email protected]e2ddbc92010-10-15 20:02:071967void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551968 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071969}
[email protected]a314ee5a2010-10-26 21:23:281970
1971void SetExperiments(const Experiment* e, size_t count) {
1972 if (!e) {
1973 experiments = kExperiments;
1974 num_experiments = arraysize(kExperiments);
1975 } else {
1976 experiments = e;
1977 num_experiments = count;
1978 }
1979}
1980
[email protected]8a6ff28d2010-12-02 16:35:191981const Experiment* GetExperiments(size_t* count) {
1982 *count = num_experiments;
1983 return experiments;
1984}
1985
[email protected]e2ddbc92010-10-15 20:02:071986} // namespace testing
1987
[email protected]1a47d7e2010-10-15 00:37:241988} // namespace about_flags