blob: 7d80a2d9edad952db4cf0a49fef96b8dbfef0c51 [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
[email protected]1fd1f292013-03-23 23:08:407#include <string.h>
8
[email protected]ad2a3ded2010-08-27 13:19:059#include <algorithm>
10#include <iterator>
11#include <map>
12#include <set>
[email protected]83e9fa702013-02-25 19:30:4413#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0514
[email protected]7d1d2092013-03-04 04:12:4315#include "apps/switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0516#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1517#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5718#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4119#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5222#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3823#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0324#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "chrome/common/chrome_switches.h"
[email protected]1fd1f292013-03-23 23:08:4026#include "chrome/common/chrome_version_info.h"
[email protected]ad2a3ded2010-08-27 13:19:0527#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3828#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0229#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0530#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0231#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0232#include "media/base/media_switches.h"
[email protected]0bc6c272012-07-17 03:32:0333#include "ui/app_list/app_list_switches.h"
[email protected]c051a1b2011-01-21 23:30:1734#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5935#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4836#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2737#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2438#include "ui/keyboard/keyboard_switches.h"
[email protected]8b1c3c72013-01-25 01:48:4339#include "ui/surface/surface_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0540
[email protected]f1c39242013-01-29 16:13:0141#if defined(ENABLE_MESSAGE_CENTER)
42#include "ui/message_center/message_center_switches.h"
43#endif
44
[email protected]dc04be7c2012-03-15 23:57:4945#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3146#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4947#endif
48
[email protected]badba1ad2012-11-16 17:21:4649#if defined(OS_CHROMEOS)
50#include "chromeos/chromeos_switches.h"
51#endif
52
[email protected]7f6f44c2011-12-14 13:23:3853using content::UserMetricsAction;
54
[email protected]1a47d7e2010-10-15 00:37:2455namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0556
[email protected]8a6ff28d2010-12-02 16:35:1957// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5358#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4459 Experiment::SINGLE_VALUE, \
60 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5361#define SINGLE_VALUE_TYPE(command_line_switch) \
62 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4463#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
64 disable_switch, disable_value) \
65 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
66 disable_switch, disable_value, NULL, 3
67#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
68 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5369#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4470 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1971
[email protected]e2ddbc92010-10-15 20:02:0772namespace {
73
[email protected]9c7453d2012-01-21 00:45:4074const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5675const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0576
[email protected]cc3e2052011-12-20 01:01:4077// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
78// whether the experiment is available on that platform.
79void AddOsStrings(unsigned bitmask, ListValue* list) {
80 struct {
81 unsigned bit;
82 const char* const name;
83 } kBitsToOs[] = {
84 {kOsMac, "Mac"},
85 {kOsWin, "Windows"},
86 {kOsLinux, "Linux"},
87 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0188 {kOsAndroid, "Android"},
[email protected]cc3e2052011-12-20 01:01:4089 };
90 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
91 if (bitmask & kBitsToOs[i].bit)
92 list->Append(new StringValue(kBitsToOs[i].name));
93}
94
[email protected]68317802012-06-07 19:13:2395const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = {
96 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" },
97 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED,
98 switches::kOmniboxHistoryQuickProviderNewScoring,
99 switches::kOmniboxHistoryQuickProviderNewScoringEnabled },
100 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED,
101 switches::kOmniboxHistoryQuickProviderNewScoring,
102 switches::kOmniboxHistoryQuickProviderNewScoringDisabled }
103};
104
[email protected]128dc6c2012-06-22 20:30:35105const Experiment::Choice
106 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
107 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
108 "",
109 "" },
110 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
111 switches::kOmniboxHistoryQuickProviderReorderForInlining,
112 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
113 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
114 switches::kOmniboxHistoryQuickProviderReorderForInlining,
115 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
116};
117
[email protected]032d5e6c2012-02-17 17:53:55118const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
119 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
120 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
121 switches::kOmniboxInlineHistoryQuickProvider,
122 switches::kOmniboxInlineHistoryQuickProviderAllowed },
123 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
124 switches::kOmniboxInlineHistoryQuickProvider,
125 switches::kOmniboxInlineHistoryQuickProviderProhibited }
126};
127
[email protected]fb854192013-02-06 01:30:04128const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
129 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
130 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
131 switches::kEnableCompositingForFixedPosition, ""},
132 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
133 switches::kDisableCompositingForFixedPosition, ""},
134 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
135 switches::kEnableHighDpiCompositingForFixedPosition, ""}
136};
137
[email protected]8b1c3c72013-01-25 01:48:43138const Experiment::Choice kGDIPresentChoices[] = {
139 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
140 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
141 switches::kDoFirstShowPresentWithGDI, ""},
142 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
143 switches::kDoAllShowPresentWithGDI, ""}
144};
145
[email protected]d7932532012-11-21 21:10:31146const Experiment::Choice kTouchEventsChoices[] = {
147 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
148 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
149 switches::kTouchEvents,
150 switches::kTouchEventsEnabled },
151 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
152 switches::kTouchEvents,
153 switches::kTouchEventsDisabled }
154};
155
[email protected]347a0c72012-05-14 20:28:06156const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31157 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20158 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06159 switches::kTouchOptimizedUI,
160 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20161 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06162 switches::kTouchOptimizedUI,
163 switches::kTouchOptimizedUIDisabled }
164};
165
[email protected]66f409c2012-10-04 20:59:04166const Experiment::Choice kNaClDebugMaskChoices[] = {
167 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
168 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
169 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
170 // an option to switch off its debugging.
171 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
172 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
173 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
174 switches::kNaClDebugMask, "*://*/*debug.nmf" }
175};
176
[email protected]ea2f3342012-09-21 21:13:36177#if defined(OS_CHROMEOS)
178const Experiment::Choice kAshBootAnimationFunction[] = {
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
180 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
181 ash::switches::kAshBootAnimationFunction2, ""},
182 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
183 ash::switches::kAshBootAnimationFunction3, ""}
184};
[email protected]d96aef22012-10-30 11:47:02185
186const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]ad2fe9f2012-11-15 11:03:19187 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
[email protected]d96aef22012-10-30 11:47:02188 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]ad2fe9f2012-11-15 11:03:19189 switches::kEnableChromeCaptivePortalDetector, ""},
190 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
191 switches::kDisableChromeCaptivePortalDetector, ""}
[email protected]d96aef22012-10-30 11:47:02192};
[email protected]a78c7432013-03-13 06:22:43193
[email protected]ea2f3342012-09-21 21:13:36194#endif
195
[email protected]9323fdd12013-02-23 00:31:36196const Experiment::Choice kImplSidePaintingChoices[] = {
197 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
198 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
199 cc::switches::kEnableImplSidePainting, ""},
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
201 cc::switches::kDisableImplSidePainting, ""}
202};
203
[email protected]a42c85f2013-04-04 18:15:12204const Experiment::Choice kMaxPrepaintTileDistanceChoices[] = {
205 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
206 { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_SHORT,
207 cc::switches::kMaxPrepaintTileDistance, "2048"},
208 { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_TALL,
209 cc::switches::kMaxPrepaintTileDistance, "4096"},
210 { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_GRANDE,
211 cc::switches::kMaxPrepaintTileDistance, "8192"},
212 { IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_VENTI,
213 cc::switches::kMaxPrepaintTileDistance, "16384"}
214};
215
216const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
218 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
219 cc::switches::kMaxTilesForInterestArea, "64"},
220 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
221 cc::switches::kMaxTilesForInterestArea, "128"},
222 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
223 cc::switches::kMaxTilesForInterestArea, "256"},
224 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
225 cc::switches::kMaxTilesForInterestArea, "512"}
226};
227
[email protected]38484df12013-04-10 16:42:03228const Experiment::Choice kSimpleCacheBackendChoices[] = {
229 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", "off" },
230 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
231 switches::kUseSimpleCacheBackend, "on"}
232};
233
[email protected]4bc5050c2010-11-18 17:55:54234// RECORDING USER METRICS FOR FLAGS:
235// -----------------------------------------------------------------------------
236// The first line of the experiment is the internal name. If you'd like to
237// gather statistics about the usage of your flag, you should append a marker
238// comment to the end of the feature name, like so:
239// "my-special-feature", // FLAGS:RECORD_UMA
240//
241// After doing that, run //chrome/tools/extract_actions.py (see instructions at
242// the top of that file for details) to update the chromeactions.txt file, which
243// will enable UMA to record your feature flag.
244//
[email protected]783d5bb2012-10-24 03:47:14245// After your feature has shipped under a flag, you can locate the metrics under
246// the action name AboutFlags_internal-action-name. Actions are recorded once
247// per startup, so you should divide this number by AboutFlags_StartupTick to
248// get a sense of usage. Note that this will not be the same as number of users
249// with a given feature enabled because users can quit and relaunch the
250// application multiple times over a given time interval. The dashboard also
251// shows you how many (metrics reporting) users have enabled the flag over the
252// last seven days. However, note that this is not the same as the number of
253// users who have the flag enabled, since enabling the flag happens once,
254// whereas running with the flag enabled happens until the user flips the flag
255// again.
[email protected]4bc5050c2010-11-18 17:55:54256
[email protected]8a6ff28d2010-12-02 16:35:19257// To add a new experiment add to the end of kExperiments. There are two
258// distinct types of experiments:
259// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
260// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22261// . MULTI_VALUE: a list of choices, the first of which should correspond to a
262// deactivated state for this lab (i.e. no command line option). To specify
263// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
264// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19265// See the documentation of Experiment for details on the fields.
266//
267// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05268const Experiment kExperiments[] = {
[email protected]270f0342013-02-20 01:19:44269#if defined(OS_ANDROID)
270 {
[email protected]199def22013-02-21 17:52:29271 "enable-spdy-proxy-auth",
272 IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME,
273 IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION,
[email protected]270f0342013-02-20 01:19:44274 kOsAndroid,
[email protected]199def22013-02-21 17:52:29275 SINGLE_VALUE_TYPE(switches::kEnableSpdyProxyAuth)
[email protected]270f0342013-02-20 01:19:44276 },
277#endif
[email protected]ad2a3ded2010-08-27 13:19:05278 {
[email protected]aac169d2011-03-18 19:53:03279 "expose-for-tabs", // FLAGS:RECORD_UMA
280 IDS_FLAGS_TABPOSE_NAME,
281 IDS_FLAGS_TABPOSE_DESCRIPTION,
282 kOsMac,
283#if defined(OS_MACOSX)
284 // The switch exists only on OS X.
285 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
286#else
287 SINGLE_VALUE_TYPE("")
288#endif
289 },
290 {
[email protected]4bc5050c2010-11-18 17:55:54291 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05292 IDS_FLAGS_CONFLICTS_CHECK_NAME,
293 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
294 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19295 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05296 },
297 {
[email protected]4bc5050c2010-11-18 17:55:54298 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54299 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
300 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45301 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22302 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31303 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22304 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
305 // always have PDF rasterization available, so no flag needed there.
306#if !defined(GOOGLE_CHROME_BUILD)
307 kOsWin,
308#else
309 0,
[email protected]fa6d2a2f2010-11-30 21:47:19310#endif
[email protected]8a6ff28d2010-12-02 16:35:19311 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42312 },
[email protected]60d77bd2012-08-22 00:10:07313#if defined(OS_WIN)
314 {
315 "print-raster",
316 IDS_FLAGS_PRINT_RASTER_NAME,
317 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
318 kOsWin,
319 SINGLE_VALUE_TYPE(switches::kPrintRaster)
320 },
321#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05322 {
[email protected]96c6f4c2011-05-18 19:36:22323 "ignore-gpu-blacklist",
324 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
325 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
326 kOsAll,
327 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
328 },
329 {
[email protected]0110cf112011-07-02 00:39:43330 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22331 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
332 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23333 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44334 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
335 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22336 },
337 {
[email protected]72787e392012-03-23 05:55:43338 "threaded-compositing-mode",
339 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
340 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56341 kOsDesktop & ~kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44342 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
343 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59344 },
345 {
[email protected]17e27692013-02-06 17:02:09346 "force-accelerated-composited-scrolling",
347 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
348 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
349 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44350 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
351 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09352 },
353 {
[email protected]8b1c3c72013-01-25 01:48:43354 "present-with-GDI",
355 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
356 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
357 kOsWin,
358 MULTI_VALUE_TYPE(kGDIPresentChoices)
359 },
360 {
[email protected]81c64af62012-06-06 20:15:52361 "disable-accelerated-2d-canvas",
362 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
363 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
364 kOsAll,
365 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
366 },
367 {
[email protected]efcde132012-05-30 01:05:18368 "disable-threaded-animation",
369 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
370 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59371 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37372 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59373 },
374 {
[email protected]5963b772011-02-09 22:55:38375 "composited-layer-borders",
376 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
377 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
378 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57379 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38380 },
381 {
[email protected]a8f1eaa2011-03-07 19:00:58382 "show-fps-counter",
383 IDS_FLAGS_SHOW_FPS_COUNTER,
384 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
385 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57386 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58387 },
[email protected]8ff7f342011-05-25 01:49:47388 {
[email protected]70c98a332011-12-21 20:51:52389 "accelerated-filters",
390 IDS_FLAGS_ACCELERATED_FILTERS,
391 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
392 kOsAll,
393 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
394 },
395 {
[email protected]8ff7f342011-05-25 01:49:47396 "disable-gpu-vsync",
397 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
398 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56399 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47400 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
401 },
[email protected]deaba6d52011-09-23 14:47:12402 {
[email protected]4052d832013-01-16 05:31:01403 "enable-webgl",
404 IDS_FLAGS_ENABLE_WEBGL_NAME,
405 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
406 kOsAndroid,
407#if defined(OS_ANDROID)
408 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
409#else
410 SINGLE_VALUE_TYPE("")
411#endif
412 },
413 {
[email protected]deaba6d52011-09-23 14:47:12414 "disable-webgl",
415 IDS_FLAGS_DISABLE_WEBGL_NAME,
416 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56417 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01418#if defined(OS_ANDROID)
419 SINGLE_VALUE_TYPE("")
420#else
[email protected]deaba6d52011-09-23 14:47:12421 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01422#endif
[email protected]deaba6d52011-09-23 14:47:12423 },
[email protected]09096e02012-05-24 11:12:04424 {
[email protected]ce585bf2013-03-14 16:25:16425 "disable-webrtc",
426 IDS_FLAGS_DISABLE_WEBRTC_NAME,
427 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05428 kOsAndroid,
429#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16430 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05431#else
432 SINGLE_VALUE_TYPE("")
433#endif
434 },
435 {
[email protected]96bcdc102012-05-24 23:42:10436 "fixed-position-creates-stacking-context",
437 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
438 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
439 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44440 ENABLE_DISABLE_VALUE_TYPE(
441 switches::kEnableFixedPositionCreatesStackingContext,
442 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10443 },
[email protected]fb854192013-02-06 01:30:04444 {
445 "enable-compositing-for-fixed-position",
446 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
447 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
448 kOsAll,
449 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
450 },
[email protected]a7640ef22012-10-06 00:52:08451 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53452 {
[email protected]e3791ce92011-08-09 01:03:32453 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40454 IDS_FLAGS_ENABLE_NACL_NAME,
455 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56456 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19457 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40458 },
[email protected]b39c6d92012-01-31 16:38:41459 // TODO(halyavin): When exception handling is on by default, replace this
460 // flag with disable-nacl-exception-handling.
461 {
462 "enable-nacl-exception-handling", // FLAGS:RECORD_UMA
463 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_NAME,
464 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56465 kOsDesktop,
[email protected]b39c6d92012-01-31 16:38:41466 SINGLE_VALUE_TYPE(switches::kEnableNaClExceptionHandling)
467 },
[email protected]4ff87d202010-11-06 01:28:40468 {
[email protected]9addd1c2012-09-15 14:28:24469 "enable-nacl-debug", // FLAGS:RECORD_UMA
470 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
471 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56472 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24473 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13474 },
475 {
[email protected]66f409c2012-10-04 20:59:04476 "nacl-debug-mask", // FLAGS:RECORD_UMA
477 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
478 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56479 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04480 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
481 },
482 {
[email protected]7babd1c2012-08-08 20:35:29483 "enable-pnacl", // FLAGS:RECORD_UMA
484 IDS_FLAGS_ENABLE_PNACL_NAME,
485 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56486 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29487 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
488 },
489 {
[email protected]4bc5050c2010-11-18 17:55:54490 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32491 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
492 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56493 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19494 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32495 },
[email protected]3627b06d2010-11-12 16:36:16496 {
[email protected]ac2e2acd2013-03-21 12:57:29497 "extensions-on-chrome-urls",
498 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
499 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
500 kOsAll,
501 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
502 },
503 {
[email protected]e9cddd52013-03-23 17:37:53504 "enable-adview",
505 IDS_FLAGS_ENABLE_ADVIEW_NAME,
506 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
507 kOsDesktop,
508 SINGLE_VALUE_TYPE(switches::kEnableAdview)
509 },
510 {
511 "enable-adview-src-attribute",
512 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
513 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
514 kOsDesktop,
515 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
516 },
517 {
[email protected]544471a2012-10-13 05:27:09518 "action-box",
[email protected]cab18ef2012-04-27 07:22:03519 IDS_FLAGS_ACTION_BOX_NAME,
520 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56521 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44522 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
523 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03524 },
525 {
[email protected]3a362432012-06-18 20:39:51526 "script-badges",
527 IDS_FLAGS_SCRIPT_BADGES_NAME,
528 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56529 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09530 SINGLE_VALUE_TYPE(switches::kScriptBadges)
531 },
532 {
533 "script-bubble",
534 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
535 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56536 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44537 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
538 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51539 },
540 {
[email protected]cbe224d2011-08-04 22:12:49541 "apps-new-install-bubble",
542 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
543 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56544 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49545 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
546 },
547 {
[email protected]80bd24e2010-11-30 09:34:38548 "disable-hyperlink-auditing",
549 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
550 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
551 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19552 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51553 },
554 {
555 "experimental-location-features", // FLAGS:RECORD_UMA
556 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
557 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
558 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19559 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
560 },
561 {
[email protected]5aea1862011-03-23 23:55:39562 "tab-groups-context-menu",
563 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
564 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
565 kOsWin,
566 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
567 },
[email protected]c94cebd2012-06-21 00:55:28568 {
569 "enable-instant-extended-api",
570 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
571 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56572 kOsDesktop,
[email protected]73444382013-02-26 19:31:51573 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
574 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28575 },
[email protected]e9bf9d92011-03-31 20:57:15576 {
[email protected]354e33b2011-06-15 00:29:10577 "static-ip-config",
578 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
579 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
580 kOsCrOS,
581#if defined(OS_CHROMEOS)
582 // This switch exists only on Chrome OS.
583 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
584#else
585 SINGLE_VALUE_TYPE("")
586#endif
587 },
[email protected]3eb5728c2011-06-20 22:32:24588 {
589 "show-autofill-type-predictions",
590 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
591 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
592 kOsAll,
593 SINGLE_VALUE_TYPE(switches::kShowAutofillTypePredictions)
594 },
[email protected]bff4d3e2011-06-21 23:58:52595 {
[email protected]a5e9faa2013-03-19 09:58:38596 "enable-sync-favicons",
597 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
598 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55599 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38600 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55601 },
602 {
[email protected]5d90a0a2012-11-15 02:43:40603 "sync-keystore-encryption",
604 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
605 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
606 kOsAll,
607 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
608 },
609 {
[email protected]e755a382012-09-13 17:16:35610 "enable-gesture-tap-highlight",
611 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
612 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
613 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47614 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
615 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35616 },
617 {
[email protected]a22ebd812011-06-23 00:05:39618 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
619 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
620 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
621 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40622 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25623 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39624 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
625 },
[email protected]81a6b0b2011-06-24 17:55:40626 {
[email protected]68317802012-06-07 19:13:23627 "omnibox-history-quick-provider-new-scoring",
628 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME,
629 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION,
630 kOsAll,
631 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices)
632 },
633 {
[email protected]128dc6c2012-06-22 20:30:35634 "omnibox-history-quick-provider-reorder-for-inlining",
635 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
636 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
637 kOsAll,
638 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
639 },
640 {
[email protected]032d5e6c2012-02-17 17:53:55641 "omnibox-inline-history-quick-provider",
642 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
643 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
644 kOsAll,
645 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
646 },
647 {
[email protected]7e7a28092011-12-09 22:24:55648 "enable-panels",
649 IDS_FLAGS_ENABLE_PANELS_NAME,
650 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56651 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55652 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54653 },
[email protected]e3749d12011-07-25 22:22:12654 {
[email protected]27c14f02012-06-22 17:29:58655 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27656 "save-page-as-mhtml", // FLAGS:RECORD_UMA
657 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
658 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
659 kOsMac | kOsWin | kOsLinux,
660 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
661 },
662 {
[email protected]b7bb44f2011-09-01 05:17:03663 "enable-autologin",
664 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
665 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
666 kOsMac | kOsWin | kOsLinux,
667 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
668 },
[email protected]b9841172011-09-26 23:36:09669 {
[email protected]14371cb2013-03-21 07:46:12670 "enable-spdy31",
671 IDS_FLAGS_ENABLE_SPDY31_NAME,
672 IDS_FLAGS_ENABLE_SPDY31_DESCRIPTION,
[email protected]3231b612012-03-23 05:57:54673 kOsAll,
[email protected]14371cb2013-03-21 07:46:12674 SINGLE_VALUE_TYPE(switches::kEnableSpdy31)
[email protected]3231b612012-03-23 05:57:54675 },
676 {
[email protected]27b3fe92012-03-21 05:35:06677 "enable-async-dns",
678 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
679 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46680 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44681 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
682 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06683 },
684 {
[email protected]1eb93802012-09-11 18:57:56685 "disable-media-source",
[email protected]da43c082012-09-07 18:56:11686 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
687 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32688 kOsAll,
[email protected]da43c082012-09-07 18:56:11689 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]6aa03b32011-10-27 21:44:44690 },
[email protected]e4e68dbb2011-11-18 01:50:22691 {
[email protected]36d98412013-01-31 20:28:53692 "disable-encrypted-media",
693 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
694 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56695 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53696 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03697 },
[email protected]f88628792012-12-18 07:07:50698 {
699 "enable-opus-playback",
700 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
701 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56702 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50703 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
704 },
[email protected]ca6eaa5a2013-01-24 16:16:04705 {
[email protected]c54e1aa2013-01-25 09:26:17706 "enable-vp9-playback",
707 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
708 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
709 kOsDesktop,
710 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
711 },
712 {
[email protected]ca6eaa5a2013-01-24 16:16:04713 "enable-managed-users",
714 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
715 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
716 kOsAll,
717 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
718 },
[email protected]dc04be7c2012-03-15 23:57:49719#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50720 {
[email protected]cda278d2012-10-30 20:31:40721 "ash-disable-auto-window-placement",
722 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
723 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
724 kOsWin | kOsLinux | kOsCrOS,
725 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
726 },
[email protected]b4e4ec42012-11-29 21:42:40727 {
[email protected]16f55a22013-02-13 23:47:34728 "ash-disable-per-app-launcher",
729 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
730 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40731 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34732 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40733 },
[email protected]dc04be7c2012-03-15 23:57:49734#endif
[email protected]eaae8b462012-01-20 22:20:39735 {
[email protected]db543d322011-12-15 20:40:15736 "per-tile-painting",
737 IDS_FLAGS_PER_TILE_PAINTING_NAME,
738 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37739 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37740 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15741 },
[email protected]bf88c032011-12-22 19:05:47742 {
743 "enable-javascript-harmony",
744 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
745 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
746 kOsAll,
747 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
748 },
[email protected]7e7f378a2012-01-05 14:35:37749 {
[email protected]85646172012-01-09 22:45:54750 "enable-tab-browser-dragging",
751 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
752 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
753 kOsWin,
754 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
755 },
756 {
[email protected]068b7b52012-02-27 12:41:44757 "disable-restore-session-state",
758 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
759 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37760 kOsAll,
[email protected]068b7b52012-02-27 12:41:44761 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37762 },
[email protected]88864db2012-01-18 20:56:35763 {
764 "disable-software-rasterizer",
765 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
766 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
767#if defined(ENABLE_SWIFTSHADER)
768 kOsAll,
769#else
770 0,
771#endif
772 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
773 },
[email protected]15a5d722012-01-23 09:11:14774 {
[email protected]ff7b6dd2012-09-15 20:20:03775 "enable-experimental-webkit-features",
776 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
777 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16778 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03779 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49780 },
781 {
[email protected]0f95a252012-09-13 22:30:04782 "enable-css-shaders",
783 IDS_FLAGS_CSS_SHADERS_NAME,
784 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
785 kOsAll,
786 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
787 },
788 {
[email protected]9860c68b2012-02-02 01:58:09789 "enable-extension-activity-ui",
790 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
791 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56792 kOsDesktop,
[email protected]9860c68b2012-02-02 01:58:09793 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00794 },
[email protected]54ae4e92012-02-16 15:19:05795 {
[email protected]3e8befc2012-03-13 01:17:03796 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16797 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
798 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56799 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03800 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16801 },
[email protected]dc04be7c2012-03-15 23:57:49802#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01803 {
[email protected]3cd198a22012-03-12 20:38:01804 "enable-ash-oak",
805 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
806 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
807 kOsAll,
808 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
809 },
[email protected]31cf1c52012-02-29 20:55:01810#endif
[email protected]184ec592012-03-01 11:54:28811 {
812 "enable-devtools-experiments",
813 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
814 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56815 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28816 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
817 },
[email protected]76d1854e2012-03-02 23:57:44818 {
[email protected]2fefdb32013-02-26 14:28:10819 "silent-debugger-extension-api",
820 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
821 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
822 kOsDesktop,
823 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
824 },
825 {
[email protected]76d1854e2012-03-02 23:57:44826 "enable-suggestions-ntp",
827 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
828 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56829 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44830 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
831 },
[email protected]a3d54252012-04-05 20:04:13832 {
[email protected]1dbaf5e2012-11-30 05:51:32833 "spellcheck-autocorrect",
834 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
835 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
836 kOsWin | kOsLinux | kOsCrOS,
837 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
838 },
839 {
[email protected]d7932532012-11-21 21:10:31840 "touch-events",
841 IDS_TOUCH_EVENTS_NAME,
842 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56843 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31844 MULTI_VALUE_TYPE(kTouchEventsChoices)
845 },
846 {
[email protected]c9c73ad42012-04-18 03:35:59847 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06848 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
849 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55850 kOsWin,
[email protected]347a0c72012-05-14 20:28:06851 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59852 },
[email protected]8a6aaa72012-04-20 20:53:58853 {
[email protected]b9c96ff2012-11-26 22:24:40854 "disable-touch-adjustment",
855 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
856 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
857 kOsWin | kOsLinux | kOsCrOS,
858 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
859 },
860 {
[email protected]0b9383a2012-10-26 00:58:16861 "enable-tab-capture",
862 IDS_ENABLE_TAB_CAPTURE_NAME,
863 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25864 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44865 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
866 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16867 },
[email protected]0b60afa2012-04-19 17:36:39868#if defined(OS_CHROMEOS)
869 {
[email protected]7c4a9bc2012-09-11 22:10:05870 "enable-background-loader",
871 IDS_ENABLE_BACKLOADER_NAME,
872 IDS_ENABLE_BACKLOADER_DESCRIPTION,
873 kOsCrOS,
874 SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader)
875 },
876 {
[email protected]c5667b282012-08-31 00:32:50877 "enable-bezel-touch",
878 IDS_ENABLE_BEZEL_TOUCH_NAME,
879 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47880 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50881 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47882 },
883 {
[email protected]3f4181a2013-02-01 21:31:07884 "enable-screensaver-extension",
885 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
886 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
887 kOsCrOS,
888 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
889 },
890 {
[email protected]0b60afa2012-04-19 17:36:39891 "no-discard-tabs",
892 IDS_FLAGS_NO_DISCARD_TABS_NAME,
893 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
894 kOsCrOS,
895 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
896 },
897#endif
[email protected]79be6d32012-04-24 20:47:44898 {
[email protected]8d68a3e02013-01-12 15:57:10899 "enable-download-resumption",
900 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
901 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56902 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10903 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
904 },
905 {
[email protected]9a5940d2012-04-27 19:16:23906 "allow-nacl-socket-api",
907 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
908 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56909 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23910 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
911 },
[email protected]85333732012-05-01 19:02:24912 {
[email protected]60673ad72012-05-02 06:16:33913 "stacked-tab-strip",
914 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
915 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
916 kOsWin,
917 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
918 },
919 {
[email protected]4bd20202012-06-14 17:35:01920 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24921 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
922 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
923 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01924 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24925 },
[email protected]190349fd2012-05-02 00:10:47926#if defined(OS_CHROMEOS)
927 {
928 "allow-touchpad-three-finger-click",
929 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
930 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
931 kOsCrOS,
932 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
933 },
[email protected]fbc176b62012-10-27 02:19:58934 {
935 "allow-touchpad-three-finger-swipe",
936 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
937 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
938 kOsCrOS,
939 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe)
940 },
[email protected]190349fd2012-05-02 00:10:47941#endif
[email protected]1992a2f42012-10-23 18:32:21942 {
[email protected]a585e462013-01-26 00:37:15943 "use-client-login-signin-flow",
944 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
945 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21946 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15947 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21948 },
[email protected]8ee02242012-12-04 15:23:32949 {
950 "enable-desktop-guest-mode",
951 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
952 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
953 kOsMac | kOsWin | kOsLinux,
954 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
955 },
[email protected]53520b1b2012-05-07 21:43:37956#if defined(USE_ASH)
957 {
[email protected]8257d382013-03-26 13:08:42958 "show-launcher-alignment-menu",
959 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
960 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42961 kOsAll,
[email protected]8257d382013-03-26 13:08:42962 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42963 },
964 {
[email protected]73074742012-05-17 01:44:41965 "show-touch-hud",
966 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
967 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
968 kOsAll,
969 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
970 },
971 {
[email protected]9f0940b62012-05-23 22:56:35972 "enable-pinch",
973 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
974 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:06975 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:38976 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
977 },
978 {
979 "pinch-zoom-scrollbars",
980 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_NAME,
981 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_DESCRIPTION,
982 kOsCrOS,
983 ENABLE_DISABLE_VALUE_TYPE(cc::switches::kEnablePinchZoomScrollbars,
984 cc::switches::kDisablePinchZoomScrollbars)
[email protected]9f0940b62012-05-23 22:56:35985 },
[email protected]a8379312012-06-15 00:20:43986 {
987 "app-list-show-apps-only",
988 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME,
989 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION,
990 kOsAll,
[email protected]0bc6c272012-07-17 03:32:03991 SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly),
[email protected]a8379312012-06-15 00:20:43992 },
[email protected]73074742012-05-17 01:44:41993#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:28994#if defined(OS_CHROMEOS)
995 {
[email protected]8b04a1652012-08-04 02:59:49996 "disable-boot-animation",
997 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
998 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
999 kOsCrOS,
1000 SINGLE_VALUE_TYPE(switches::kDisableBootAnimation),
1001 },
[email protected]95058572012-08-20 14:57:291002 {
[email protected]b4557192012-09-19 11:29:581003 "disable-boot-animation2",
1004 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
1005 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
1006 kOsCrOS,
1007 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
1008 },
1009 {
[email protected]ea2f3342012-09-21 21:13:361010 "boot-animation-fucntion",
1011 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
1012 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
1013 kOsCrOS,
1014 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
1015 },
[email protected]839667d62012-10-23 19:38:571016 {
[email protected]d96aef22012-10-30 11:47:021017 "captive-portal-detector",
1018 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1019 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
1020 kOsCrOS,
1021 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1022 },
1023 {
[email protected]c11aa8f12012-12-18 18:43:141024 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571025 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1026 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1027 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141028 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571029 },
[email protected]f0280952012-11-06 20:30:501030 {
[email protected]0fb5c4852012-11-08 20:33:231031 "file-manager-packaged",
1032 IDS_FLAGS_FILE_MANAGER_PACKAGED_NAME,
1033 IDS_FLAGS_FILE_MANAGER_PACKAGED_DESCRIPTION,
1034 kOsCrOS,
1035 SINGLE_VALUE_TYPE(switches::kFileManagerPackaged),
1036 },
[email protected]3e035e82012-11-27 20:54:321037 {
[email protected]8039e06c2013-01-17 23:34:501038 "disable-launcher-per-display",
1039 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME,
1040 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION,
[email protected]62018dc2012-12-13 00:37:351041 kOsCrOS,
[email protected]8039e06c2013-01-17 23:34:501042 SINGLE_VALUE_TYPE(ash::switches::kAshDisableLauncherPerDisplay),
[email protected]62018dc2012-12-13 00:37:351043 },
[email protected]06b146d2013-02-07 06:06:471044 {
[email protected]c64d7732013-03-25 18:09:501045 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521046 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1047 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]06b146d2013-02-07 06:06:471048 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521049 SINGLE_VALUE_TYPE(switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471050 },
[email protected]6ad015c2013-03-06 00:49:511051 {
[email protected]c64d7732013-03-25 18:09:501052 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521053 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1054 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511055 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521056 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511057 },
[email protected]62018dc2012-12-13 00:37:351058#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391059 {
[email protected]6247aba2013-03-04 22:57:181060 "views-textfield",
1061 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1062 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391063 kOsWin,
[email protected]6247aba2013-03-04 22:57:181064 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1065 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391066 },
[email protected]bd0cd3bb2012-06-14 03:03:381067 {
[email protected]2d4817742012-12-17 20:16:181068 "enable-new-dialog-style",
1069 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME,
1070 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321071 kOsWin | kOsCrOS,
[email protected]2d4817742012-12-17 20:16:181072 SINGLE_VALUE_TYPE(switches::kEnableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321073 },
[email protected]7db8893a2012-07-26 00:49:401074 { "disable-accelerated-video-decode",
1075 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1076 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561077 kOsDesktop,
[email protected]7db8893a2012-07-26 00:49:401078 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151079 },
[email protected]66ae9fc2012-06-19 21:33:521080#if defined(USE_ASH)
1081 {
1082 "ash-debug-shortcuts",
1083 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1084 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1085 kOsAll,
1086 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1087 },
1088#endif
[email protected]37fee0942012-08-07 21:07:451089 {
[email protected]ad3f6d22012-08-29 02:34:191090 "enable-contacts",
1091 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1092 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1093 kOsCrOS,
1094 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1095 },
[email protected]1d9bb9cd2012-08-28 22:02:501096#if defined(USE_ASH)
1097 { "ash-enable-advanced-gestures",
1098 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1099 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1100 kOsCrOS,
1101 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1102 },
[email protected]cfa24e62013-02-13 21:19:111103 { "ash-disable-tab-scrubbing",
1104 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1105 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161106 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111107 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161108 },
[email protected]83eef802012-12-02 07:43:521109 { "ash-enable-workspace-scrubbing",
1110 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1111 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1112 kOsCrOS,
1113 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1114 },
[email protected]819e58d22013-03-20 00:16:111115 { "ash-immersive-fullscreen",
1116 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1117 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241118 kOsCrOS,
[email protected]819e58d22013-03-20 00:16:111119 SINGLE_VALUE_TYPE(ash::switches::kAshImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241120 },
[email protected]316708a2012-11-05 22:57:021121#if defined(OS_LINUX)
1122 { "ash-enable-memory-monitor",
1123 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1124 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1125 kOsCrOS,
1126 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1127 },
1128#endif
[email protected]1d9bb9cd2012-08-28 22:02:501129#endif
[email protected]9b7ab882012-09-10 23:46:361130#if defined(OS_CHROMEOS)
[email protected]9475ee6f2013-03-08 18:20:091131 { "ash-disable-new-network-status-area",
1132 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME,
1133 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION,
[email protected]badba1ad2012-11-16 17:21:461134 kOsCrOS,
[email protected]9475ee6f2013-03-08 18:20:091135 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea),
[email protected]badba1ad2012-11-16 17:21:461136 },
[email protected]9b7ab882012-09-10 23:46:361137 {
[email protected]205f07892012-10-16 20:26:221138 "enable-carrier-switching",
1139 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1140 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1141 kOsCrOS,
1142 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1143 },
1144 {
[email protected]9b7ab882012-09-10 23:46:361145 "enable-request-tablet-site",
1146 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1147 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1148 kOsCrOS,
1149 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1150 },
1151#endif
[email protected]dab49c0b2012-10-04 05:55:351152 {
1153 "debug-packed-apps",
1154 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1155 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561156 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351157 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1158 },
[email protected]d1459ed2012-10-10 01:29:331159 {
1160 "enable-password-generation",
1161 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1162 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561163 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331164 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1165 },
[email protected]26d045f2012-10-18 21:18:431166 {
[email protected]76f7d4882012-10-26 21:09:221167 "enable-deferred-image-decoding",
1168 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1169 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221170 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221171 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1172 },
1173 {
[email protected]075543d2012-10-24 01:29:141174 "performance-monitor-gathering",
1175 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1176 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1177 kOsAll,
1178 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1179 },
[email protected]783d5bb2012-10-24 03:47:141180 {
[email protected]90b482d2013-04-04 10:45:581181 "disable-native-autofill-ui",
1182 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1183 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431184 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581185 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431186 },
1187 {
[email protected]99002fd2012-11-06 04:35:521188 "show-app-list-shortcut",
1189 IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_NAME,
1190 IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_DESCRIPTION,
1191 kOsWin,
[email protected]7d1d2092013-03-04 04:12:431192 SINGLE_VALUE_TYPE(apps::switches::kShowAppListShortcut)
[email protected]99002fd2012-11-06 04:35:521193 },
[email protected]a7259fb2012-11-08 06:22:231194 {
1195 "enable-experimental-form-filling",
1196 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1197 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1198 kOsWin | kOsCrOS,
1199 SINGLE_VALUE_TYPE(switches::kEnableExperimentalFormFilling)
1200 },
[email protected]6e6efe42013-01-30 00:04:501201 {
[email protected]db3178c2013-03-21 14:54:541202 "wallet-service-use-prod",
1203 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1204 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1205 kOsCrOS | kOsWin,
1206 SINGLE_VALUE_TYPE(switches::kWalletServiceUseProd)
1207 },
1208 {
[email protected]6e6efe42013-01-30 00:04:501209 "enable-interactive-autocomplete",
1210 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1211 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]57e67ac2013-02-22 03:37:221212 kOsWin | kOsCrOS | kOsAndroid,
[email protected]6e6efe42013-01-30 00:04:501213 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1214 },
[email protected]edbea622012-11-28 20:39:381215 {
1216 "enable-touch-drag-drop",
1217 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1218 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1219 kOsWin | kOsCrOS,
1220 SINGLE_VALUE_TYPE(switches::kEnableTouchDragDrop)
1221 },
[email protected]0e2f43b62013-02-21 00:47:151222 {
1223 "enable-touch-editing",
1224 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1225 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1226 kOsCrOS,
1227 SINGLE_VALUE_TYPE(switches::kEnableTouchEditing)
1228 },
[email protected]f1c39242013-01-29 16:13:011229#if defined(ENABLE_MESSAGE_CENTER)
[email protected]92e12dd92012-12-11 03:33:201230 {
1231 "enable-rich-notifications",
1232 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1233 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1234 kOsWin | kOsCrOS,
[email protected]aee412aa2013-04-02 20:01:231235 ENABLE_DISABLE_VALUE_TYPE(
1236 message_center::switches::kEnableRichNotifications,
1237 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201238 },
[email protected]f1c39242013-01-29 16:13:011239#endif
[email protected]4d51c682012-12-11 11:34:551240 {
1241 "full-history-sync",
1242 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1243 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1244 kOsAll,
1245 SINGLE_VALUE_TYPE(switches::kHistoryEnableFullHistorySync)
1246 },
[email protected]628a69a92012-12-23 04:09:341247 {
[email protected]fd030142013-02-08 02:04:381248 "enable-usermedia-screen-capture",
1249 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1250 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1251 kOsDesktop,
1252 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1253 },
[email protected]5b93e162013-02-19 06:33:091254 {
1255 "enable-apps-devtool-app",
1256 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1257 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1258 kOsDesktop,
1259 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1260 },
[email protected]9323fdd12013-02-23 00:31:361261 {
1262 "impl-side-painting",
1263 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1264 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041265 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361266 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1267 },
[email protected]a42c85f2013-04-04 18:15:121268 {
1269 "max-prepaint-tile-distance",
1270 IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_NAME,
1271 IDS_FLAGS_MAX_PREPAINT_TILE_DISTANCE_DESCRIPTION,
1272 kOsAndroid | kOsLinux | kOsCrOS,
1273 MULTI_VALUE_TYPE(kMaxPrepaintTileDistanceChoices)
1274 },
1275 {
1276 "max-tiles-for-interest-area",
1277 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1278 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1279 kOsAndroid | kOsLinux | kOsCrOS,
1280 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1281 },
[email protected]2f2f72b2013-03-08 22:37:311282 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1283#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371284 {
1285 "track-active-visit-time",
1286 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1287 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1288 kOsWin,
1289 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1290 },
[email protected]2f2f72b2013-03-08 22:37:311291#endif
[email protected]8cc71d42013-03-02 17:26:081292#if defined(OS_ANDROID)
1293 {
1294 "disable-gesture-requirement-for-media-playback",
1295 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1296 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1297 kOsAndroid,
1298 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1299 },
1300#endif
[email protected]e79f2fd52013-03-08 23:52:471301#if defined(OS_CHROMEOS)
1302 {
1303 "enable-experimental-bluetooth",
1304 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME,
1305 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION,
1306 kOsCrOS,
1307 SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth)
1308 },
1309#endif
[email protected]6077cab2013-03-11 19:36:141310#if defined(ENABLE_GOOGLE_NOW)
1311 {
1312 "enable-google-now",
1313 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1314 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1315 kOsWin | kOsCrOS,
1316 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1317 },
1318#endif
[email protected]4a9e2e02013-04-08 16:19:491319 {
1320 "enable-translate-alpha-languages",
1321 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1322 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1323 kOsAll,
1324 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1325 },
[email protected]86459e2c2013-04-10 13:39:241326#if defined(OS_CHROMEOS)
1327 {
1328 "enable-virtual-keyboard",
1329 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1330 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1331 kOsCrOS,
1332 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1333 },
1334#endif
[email protected]38484df12013-04-10 16:42:031335 {
1336 "enable-simple-cache-backend",
1337 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1338 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1339 kOsAndroid,
1340 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1341 },
[email protected]a0e4b072011-08-17 01:47:071342};
[email protected]ad2a3ded2010-08-27 13:19:051343
[email protected]a314ee5a2010-10-26 21:23:281344const Experiment* experiments = kExperiments;
1345size_t num_experiments = arraysize(kExperiments);
1346
[email protected]e2ddbc92010-10-15 20:02:071347// Stores and encapsulates the little state that about:flags has.
1348class FlagsState {
1349 public:
1350 FlagsState() : needs_restart_(false) {}
1351 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1352 bool IsRestartNeededToCommitChanges();
1353 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281354 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071355 void RemoveFlagsSwitches(
1356 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001357 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071358 void reset();
1359
1360 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551361 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071362 return Singleton<FlagsState>::get();
1363 }
1364
1365 private:
1366 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531367 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071368
1369 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1370};
1371
[email protected]c7b7800a2010-10-07 18:51:351372// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491373// in a set.
[email protected]1a47d7e2010-10-15 00:37:241374void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051375 const ListValue* enabled_experiments = prefs->GetList(
1376 prefs::kEnabledLabsExperiments);
1377 if (!enabled_experiments)
1378 return;
1379
1380 for (ListValue::const_iterator it = enabled_experiments->begin();
1381 it != enabled_experiments->end();
1382 ++it) {
1383 std::string experiment_name;
1384 if (!(*it)->GetAsString(&experiment_name)) {
1385 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1386 continue;
1387 }
1388 result->insert(experiment_name);
1389 }
1390}
1391
[email protected]c6343372013-03-13 17:05:491392// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241393void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051394 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381395 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1396 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051397
1398 experiments_list->Clear();
1399 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1400 it != enabled_experiments.end();
1401 ++it) {
1402 experiments_list->Append(new StringValue(*it));
1403 }
1404}
1405
[email protected]8a6ff28d2010-12-02 16:35:191406// Adds the internal names for the specified experiment to |names|.
1407void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1408 if (e.type == Experiment::SINGLE_VALUE) {
1409 names->insert(e.internal_name);
1410 } else {
[email protected]83e9fa702013-02-25 19:30:441411 DCHECK(e.type == Experiment::MULTI_VALUE ||
1412 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191413 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441414 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191415 }
1416}
1417
[email protected]28e35af2011-02-09 12:56:221418// Confirms that an experiment is valid, used in a DCHECK in
1419// SanitizeList below.
1420bool ValidateExperiment(const Experiment& e) {
1421 switch (e.type) {
1422 case Experiment::SINGLE_VALUE:
1423 DCHECK_EQ(0, e.num_choices);
1424 DCHECK(!e.choices);
1425 break;
1426 case Experiment::MULTI_VALUE:
1427 DCHECK_GT(e.num_choices, 0);
1428 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531429 DCHECK(e.choices[0].command_line_switch);
1430 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221431 break;
[email protected]83e9fa702013-02-25 19:30:441432 case Experiment::ENABLE_DISABLE_VALUE:
1433 DCHECK_EQ(3, e.num_choices);
1434 DCHECK(!e.choices);
1435 DCHECK(e.command_line_switch);
1436 DCHECK(e.command_line_value);
1437 DCHECK(e.disable_command_line_switch);
1438 DCHECK(e.disable_command_line_value);
1439 break;
[email protected]28e35af2011-02-09 12:56:221440 default:
1441 NOTREACHED();
1442 }
1443 return true;
1444}
1445
[email protected]ad2a3ded2010-08-27 13:19:051446// Removes all experiments from prefs::kEnabledLabsExperiments that are
1447// unknown, to prevent this list to become very long as experiments are added
1448// and removed.
1449void SanitizeList(PrefService* prefs) {
1450 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221451 for (size_t i = 0; i < num_experiments; ++i) {
1452 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191453 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221454 }
[email protected]ad2a3ded2010-08-27 13:19:051455
1456 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241457 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051458
1459 std::set<std::string> new_enabled_experiments;
1460 std::set_intersection(
1461 known_experiments.begin(), known_experiments.end(),
1462 enabled_experiments.begin(), enabled_experiments.end(),
1463 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1464
[email protected]4c8853f2012-07-23 01:29:161465 if (new_enabled_experiments != enabled_experiments)
1466 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051467}
1468
[email protected]1a47d7e2010-10-15 00:37:241469void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051470 PrefService* prefs, std::set<std::string>* result) {
1471 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241472 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051473}
1474
[email protected]a314ee5a2010-10-26 21:23:281475// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1476// enabled on the current platform.
1477void GetSanitizedEnabledFlagsForCurrentPlatform(
1478 PrefService* prefs, std::set<std::string>* result) {
1479 GetSanitizedEnabledFlags(prefs, result);
1480
1481 // Filter out any experiments that aren't enabled on the current platform. We
1482 // don't remove these from prefs else syncing to a platform with a different
1483 // set of experiments would be lossy.
1484 std::set<std::string> platform_experiments;
1485 int current_platform = GetCurrentPlatform();
1486 for (size_t i = 0; i < num_experiments; ++i) {
1487 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191488 AddInternalName(experiments[i], &platform_experiments);
[email protected]a314ee5a2010-10-26 21:23:281489 }
1490
1491 std::set<std::string> new_enabled_experiments;
1492 std::set_intersection(
1493 platform_experiments.begin(), platform_experiments.end(),
1494 result->begin(), result->end(),
1495 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1496
1497 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051498}
1499
[email protected]8a6ff28d2010-12-02 16:35:191500// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191501Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221502 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441503 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1504 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191505 ListValue* result = new ListValue;
1506 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191507 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441508 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191509 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441510 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221511 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191512 result->Append(value);
1513 }
1514 return result;
1515}
1516
[email protected]e2ddbc92010-10-15 20:02:071517} // namespace
1518
[email protected]83e9fa702013-02-25 19:30:441519std::string Experiment::NameForChoice(int index) const {
1520 DCHECK(type == Experiment::MULTI_VALUE ||
1521 type == Experiment::ENABLE_DISABLE_VALUE);
1522 DCHECK_LT(index, num_choices);
1523 return std::string(internal_name) + testing::kMultiSeparator +
1524 base::IntToString(index);
1525}
1526
1527string16 Experiment::DescriptionForChoice(int index) const {
1528 DCHECK(type == Experiment::MULTI_VALUE ||
1529 type == Experiment::ENABLE_DISABLE_VALUE);
1530 DCHECK_LT(index, num_choices);
1531 int description_id;
1532 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1533 const int kEnableDisableDescriptionIds[] = {
1534 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1535 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1536 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1537 };
1538 description_id = kEnableDisableDescriptionIds[index];
1539 } else {
1540 description_id = choices[index].description_id;
1541 }
1542 return l10n_util::GetStringUTF16(description_id);
1543}
1544
[email protected]1a47d7e2010-10-15 00:37:241545void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551546 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051547}
1548
[email protected]1a47d7e2010-10-15 00:37:241549ListValue* GetFlagsExperimentsData(PrefService* prefs) {
[email protected]ad2a3ded2010-08-27 13:19:051550 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241551 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051552
1553 int current_platform = GetCurrentPlatform();
1554
1555 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281556 for (size_t i = 0; i < num_experiments; ++i) {
1557 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051558
[email protected]1fd1f292013-03-23 23:08:401559#if defined(OS_ANDROID)
1560 // Special case enable-spdy-proxy-auth, because it should only
1561 // be available on Dev and Beta channels.
1562 if (!strcmp("enable-spdy-proxy-auth", experiment.internal_name) &&
1563 chrome::VersionInfo::GetChannel() ==
1564 chrome::VersionInfo::CHANNEL_STABLE)
1565 continue;
1566#endif
1567
[email protected]ad2a3ded2010-08-27 13:19:051568 DictionaryValue* data = new DictionaryValue();
1569 data->SetString("internal_name", experiment.internal_name);
1570 data->SetString("name",
1571 l10n_util::GetStringUTF16(experiment.visible_name_id));
1572 data->SetString("description",
1573 l10n_util::GetStringUTF16(
1574 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401575 bool supported = !!(experiment.supported_platforms & current_platform);
1576 data->SetBoolean("supported", supported);
1577
1578 ListValue* supported_platforms = new ListValue();
1579 AddOsStrings(experiment.supported_platforms, supported_platforms);
1580 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051581
[email protected]28e35af2011-02-09 12:56:221582 switch (experiment.type) {
1583 case Experiment::SINGLE_VALUE:
1584 data->SetBoolean(
1585 "enabled",
1586 enabled_experiments.count(experiment.internal_name) > 0);
1587 break;
1588 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441589 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221590 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1591 break;
1592 default:
1593 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191594 }
1595
[email protected]ad2a3ded2010-08-27 13:19:051596 experiments_data->Append(data);
1597 }
1598 return experiments_data;
1599}
1600
[email protected]ad2a3ded2010-08-27 13:19:051601bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551602 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051603}
1604
1605void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351606 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551607 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071608}
1609
1610void RemoveFlagsSwitches(
1611 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551612 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071613}
1614
[email protected]cb93bf52013-02-20 01:20:001615void ResetAllFlags(PrefService* prefs) {
1616 FlagsState::GetInstance()->ResetAllFlags(prefs);
1617}
1618
[email protected]a314ee5a2010-10-26 21:23:281619int GetCurrentPlatform() {
1620#if defined(OS_MACOSX)
1621 return kOsMac;
1622#elif defined(OS_WIN)
1623 return kOsWin;
1624#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1625 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211626#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281627 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401628#elif defined(OS_ANDROID)
1629 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281630#else
1631#error Unknown platform
1632#endif
1633}
1634
[email protected]4bc5050c2010-11-18 17:55:541635void RecordUMAStatistics(const PrefService* prefs) {
1636 std::set<std::string> flags;
1637 GetEnabledFlags(prefs, &flags);
1638 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1639 ++it) {
1640 std::string action("AboutFlags_");
1641 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381642 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541643 }
1644 // Since flag metrics are recorded every startup, add a tick so that the
1645 // stats can be made meaningful.
1646 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381647 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1648 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541649}
1650
[email protected]e2ddbc92010-10-15 20:02:071651//////////////////////////////////////////////////////////////////////////////
1652// FlagsState implementation.
1653
1654namespace {
1655
[email protected]83e9fa702013-02-25 19:30:441656typedef std::map<std::string, std::pair<std::string, std::string> >
1657 NameToSwitchAndValueMap;
1658
1659void SetFlagToSwitchMapping(const std::string& key,
1660 const std::string& switch_name,
1661 const std::string& switch_value,
1662 NameToSwitchAndValueMap* name_to_switch_map) {
1663 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1664 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1665}
1666
[email protected]e2ddbc92010-10-15 20:02:071667void FlagsState::ConvertFlagsToSwitches(
1668 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071669 if (command_line->HasSwitch(switches::kNoExperiments))
1670 return;
1671
1672 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001673
[email protected]a314ee5a2010-10-26 21:23:281674 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071675
[email protected]a82744532011-02-11 16:15:531676 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191677 for (size_t i = 0; i < num_experiments; ++i) {
1678 const Experiment& e = experiments[i];
1679 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441680 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1681 e.command_line_value, &name_to_switch_map);
1682 } else if (e.type == Experiment::MULTI_VALUE) {
1683 for (int j = 0; j < e.num_choices; ++j) {
1684 SetFlagToSwitchMapping(e.NameForChoice(j),
1685 e.choices[j].command_line_switch,
1686 e.choices[j].command_line_value,
1687 &name_to_switch_map);
1688 }
[email protected]8a6ff28d2010-12-02 16:35:191689 } else {
[email protected]83e9fa702013-02-25 19:30:441690 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1691 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1692 &name_to_switch_map);
1693 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1694 e.command_line_value, &name_to_switch_map);
1695 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1696 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191697 }
1698 }
[email protected]e2ddbc92010-10-15 20:02:071699
1700 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531701 flags_switches_.insert(
1702 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1703 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071704 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1705 it != enabled_experiments.end();
1706 ++it) {
1707 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531708 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191709 name_to_switch_map.find(experiment_name);
1710 if (name_to_switch_it == name_to_switch_map.end()) {
1711 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071712 continue;
[email protected]8a6ff28d2010-12-02 16:35:191713 }
[email protected]e2ddbc92010-10-15 20:02:071714
[email protected]a82744532011-02-11 16:15:531715 const std::pair<std::string, std::string>&
1716 switch_and_value_pair = name_to_switch_it->second;
1717
1718 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1719 switch_and_value_pair.second);
1720 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071721 }
1722 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531723 flags_switches_.insert(
1724 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1725 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071726}
1727
1728bool FlagsState::IsRestartNeededToCommitChanges() {
1729 return needs_restart_;
1730}
1731
1732void FlagsState::SetExperimentEnabled(
1733 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441734 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191735 if (at_index != std::string::npos) {
1736 DCHECK(enable);
1737 // We're being asked to enable a multi-choice experiment. Disable the
1738 // currently selected choice.
1739 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221740 const std::string experiment_name = internal_name.substr(0, at_index);
1741 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191742
[email protected]28e35af2011-02-09 12:56:221743 // And enable the new choice, if it is not the default first choice.
1744 if (internal_name != experiment_name + "@0") {
1745 std::set<std::string> enabled_experiments;
1746 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081747 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221748 SetEnabledFlags(prefs, enabled_experiments);
1749 }
[email protected]8a6ff28d2010-12-02 16:35:191750 return;
1751 }
1752
[email protected]ad2a3ded2010-08-27 13:19:051753 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241754 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051755
[email protected]8a6ff28d2010-12-02 16:35:191756 const Experiment* e = NULL;
1757 for (size_t i = 0; i < num_experiments; ++i) {
1758 if (experiments[i].internal_name == internal_name) {
1759 e = experiments + i;
1760 break;
1761 }
1762 }
1763 DCHECK(e);
1764
1765 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591766 if (enable)
[email protected]147492b2013-03-19 23:52:081767 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591768 else
[email protected]147492b2013-03-19 23:52:081769 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191770 } else {
1771 if (enable) {
1772 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081773 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191774 } else {
1775 // Find the currently enabled choice and disable it.
1776 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441777 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191778 if (enabled_experiments.find(choice_name) !=
1779 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081780 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191781 enabled_experiments.erase(choice_name);
1782 // Continue on just in case there's a bug and more than one
1783 // experiment for this choice was enabled.
1784 }
1785 }
1786 }
1787 }
[email protected]ad2a3ded2010-08-27 13:19:051788
[email protected]1a47d7e2010-10-15 00:37:241789 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051790}
1791
[email protected]e2ddbc92010-10-15 20:02:071792void FlagsState::RemoveFlagsSwitches(
1793 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531794 for (std::map<std::string, std::string>::const_iterator
1795 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1796 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071797 }
1798}
1799
[email protected]cb93bf52013-02-20 01:20:001800void FlagsState::ResetAllFlags(PrefService* prefs) {
1801 needs_restart_ = true;
1802
1803 std::set<std::string> no_experiments;
1804 SetEnabledFlags(prefs, no_experiments);
1805}
1806
[email protected]e2ddbc92010-10-15 20:02:071807void FlagsState::reset() {
1808 needs_restart_ = false;
1809 flags_switches_.clear();
1810}
1811
[email protected]38e46812011-05-09 20:49:221812} // namespace
[email protected]e2ddbc92010-10-15 20:02:071813
1814namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191815
1816// WARNING: '@' is also used in the html file. If you update this constant you
1817// also need to update the html file.
1818const char kMultiSeparator[] = "@";
1819
[email protected]e2ddbc92010-10-15 20:02:071820void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551821 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071822}
[email protected]a314ee5a2010-10-26 21:23:281823
1824void SetExperiments(const Experiment* e, size_t count) {
1825 if (!e) {
1826 experiments = kExperiments;
1827 num_experiments = arraysize(kExperiments);
1828 } else {
1829 experiments = e;
1830 num_experiments = count;
1831 }
1832}
1833
[email protected]8a6ff28d2010-12-02 16:35:191834const Experiment* GetExperiments(size_t* count) {
1835 *count = num_experiments;
1836 return experiments;
1837}
1838
[email protected]e2ddbc92010-10-15 20:02:071839} // namespace testing
1840
[email protected]1a47d7e2010-10-15 00:37:241841} // namespace about_flags