blob: 6b1722964435bc04eef3cfc3218aed8d619e98f3 [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>
11
[email protected]ad2a3ded2010-08-27 13:19:0512#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1513#include "base/memory/singleton.h"
[email protected]8a6ff28d2010-12-02 16:35:1914#include "base/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0315#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0516#include "base/values.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "chrome/browser/prefs/pref_service.h"
[email protected]1bc78422011-03-31 08:41:3818#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0319#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0520#include "chrome/common/chrome_switches.h"
21#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3822#include "content/public/browser/user_metrics.h"
[email protected]ad2a3ded2010-08-27 13:19:0523#include "grit/generated_resources.h"
[email protected]c051a1b2011-01-21 23:30:1724#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5925#include "ui/base/ui_base_switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2726#include "ui/gl/gl_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0527
[email protected]dc04be7c2012-03-15 23:57:4928#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3129#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4930#endif
31
32#if defined(USE_AURA)
[email protected]308aaa32012-03-12 13:14:5033#include "ui/aura/aura_switches.h"
[email protected]8cc10df2011-11-03 23:57:5034#endif
35
[email protected]7f6f44c2011-12-14 13:23:3836using content::UserMetricsAction;
37
[email protected]1a47d7e2010-10-15 00:37:2438namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0539
[email protected]8a6ff28d2010-12-02 16:35:1940// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5341#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
42 Experiment::SINGLE_VALUE, command_line_switch, switch_value, NULL, 0
43#define SINGLE_VALUE_TYPE(command_line_switch) \
44 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
45#define MULTI_VALUE_TYPE(choices) \
[email protected]0e6f56d2011-02-12 23:45:1546 Experiment::MULTI_VALUE, "", "", choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1947
[email protected]e2ddbc92010-10-15 20:02:0748namespace {
49
[email protected]9c7453d2012-01-21 00:45:4050const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]ad2a3ded2010-08-27 13:19:0551
[email protected]cc3e2052011-12-20 01:01:4052// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
53// whether the experiment is available on that platform.
54void AddOsStrings(unsigned bitmask, ListValue* list) {
55 struct {
56 unsigned bit;
57 const char* const name;
58 } kBitsToOs[] = {
59 {kOsMac, "Mac"},
60 {kOsWin, "Windows"},
61 {kOsLinux, "Linux"},
62 {kOsCrOS, "Chrome OS"},
63 };
64 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
65 if (bitmask & kBitsToOs[i].bit)
66 list->Append(new StringValue(kBitsToOs[i].name));
67}
68
[email protected]ba8164242010-11-16 21:31:0069// Names for former Chrome OS Labs experiments, shared with prefs migration
70// code.
71const char kMediaPlayerExperimentName[] = "media-player";
72const char kAdvancedFileSystemExperimentName[] = "advanced-file-system";
73const char kVerticalTabsExperimentName[] = "vertical-tabs";
74
[email protected]68317802012-06-07 19:13:2375const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = {
76 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" },
77 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED,
78 switches::kOmniboxHistoryQuickProviderNewScoring,
79 switches::kOmniboxHistoryQuickProviderNewScoringEnabled },
80 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED,
81 switches::kOmniboxHistoryQuickProviderNewScoring,
82 switches::kOmniboxHistoryQuickProviderNewScoringDisabled }
83};
84
[email protected]b1c4de4c2012-06-08 00:04:5685const Experiment::Choice kBrowserPluginChoices[] = {
86 { IDS_FLAGS_BROWSER_PLUGIN_DISABLED, "", "" },
87 { IDS_FLAGS_BROWSER_PLUGIN_PLATFORM_APPS,
88 switches::kBrowserPlugin,
89 switches::kBrowserPluginPlatformApps },
90 { IDS_FLAGS_BROWSER_PLUGIN_ENABLED,
91 switches::kBrowserPlugin,
92 switches::kBrowserPluginEnabled },
93};
94
[email protected]032d5e6c2012-02-17 17:53:5595const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
96 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
97 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
98 switches::kOmniboxInlineHistoryQuickProvider,
99 switches::kOmniboxInlineHistoryQuickProviderAllowed },
100 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
101 switches::kOmniboxInlineHistoryQuickProvider,
102 switches::kOmniboxInlineHistoryQuickProviderProhibited }
103};
104
[email protected]72787e392012-03-23 05:55:43105const Experiment::Choice kThreadedCompositingModeChoices[] = {
106 { IDS_FLAGS_THREADED_COMPOSITING_MODE_DEFAULT, "", "" },
107 { IDS_FLAGS_THREADED_COMPOSITING_MODE_DISABLED,
108 switches::kDisableThreadedCompositing, ""},
109 { IDS_FLAGS_THREADED_COMPOSITING_MODE_ENABLED,
110 switches::kEnableThreadedCompositing, ""}
111};
112
[email protected]347a0c72012-05-14 20:28:06113const Experiment::Choice kTouchOptimizedUIChoices[] = {
114 { IDS_FLAGS_TOUCH_OPTIMIZED_UI_AUTOMATIC, "", "" },
115 { IDS_FLAGS_TOUCH_OPTIMIZED_UI_ENABLED,
116 switches::kTouchOptimizedUI,
117 switches::kTouchOptimizedUIEnabled },
118 { IDS_FLAGS_TOUCH_OPTIMIZED_UI_DISABLED,
119 switches::kTouchOptimizedUI,
120 switches::kTouchOptimizedUIDisabled }
121};
122
123
[email protected]4bc5050c2010-11-18 17:55:54124// RECORDING USER METRICS FOR FLAGS:
125// -----------------------------------------------------------------------------
126// The first line of the experiment is the internal name. If you'd like to
127// gather statistics about the usage of your flag, you should append a marker
128// comment to the end of the feature name, like so:
129// "my-special-feature", // FLAGS:RECORD_UMA
130//
131// After doing that, run //chrome/tools/extract_actions.py (see instructions at
132// the top of that file for details) to update the chromeactions.txt file, which
133// will enable UMA to record your feature flag.
134//
135// After your feature has shipped under a flag, you can locate the metrics
136// under the action name AboutFlags_internal-action-name. Actions are recorded
137// once per startup, so you should divide this number by AboutFlags_StartupTick
138// to get a sense of usage. Note that this will not be the same as number of
139// users with a given feature enabled because users can quit and relaunch
140// the application multiple times over a given time interval.
141// TODO(rsesek): See if there's a way to count per-user, rather than
142// per-startup.
143
[email protected]8a6ff28d2010-12-02 16:35:19144// To add a new experiment add to the end of kExperiments. There are two
145// distinct types of experiments:
146// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
147// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22148// . MULTI_VALUE: a list of choices, the first of which should correspond to a
149// deactivated state for this lab (i.e. no command line option). To specify
150// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
151// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19152// See the documentation of Experiment for details on the fields.
153//
154// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05155const Experiment kExperiments[] = {
156 {
[email protected]aac169d2011-03-18 19:53:03157 "expose-for-tabs", // FLAGS:RECORD_UMA
158 IDS_FLAGS_TABPOSE_NAME,
159 IDS_FLAGS_TABPOSE_DESCRIPTION,
160 kOsMac,
161#if defined(OS_MACOSX)
162 // The switch exists only on OS X.
163 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
164#else
165 SINGLE_VALUE_TYPE("")
166#endif
167 },
168 {
[email protected]4bc5050c2010-11-18 17:55:54169 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05170 IDS_FLAGS_CONFLICTS_CHECK_NAME,
171 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
172 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19173 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05174 },
175 {
[email protected]4bc5050c2010-11-18 17:55:54176 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54177 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
178 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45179 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22180 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31181 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22182 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
183 // always have PDF rasterization available, so no flag needed there.
184#if !defined(GOOGLE_CHROME_BUILD)
185 kOsWin,
186#else
187 0,
[email protected]fa6d2a2f2010-11-30 21:47:19188#endif
[email protected]8a6ff28d2010-12-02 16:35:19189 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42190 },
[email protected]580939a2010-10-12 18:54:37191 {
[email protected]bb461532010-11-26 21:50:23192 "crxless-web-apps",
193 IDS_FLAGS_CRXLESS_WEB_APPS_NAME,
194 IDS_FLAGS_CRXLESS_WEB_APPS_DESCRIPTION,
195 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19196 SINGLE_VALUE_TYPE(switches::kEnableCrxlessWebApps)
[email protected]bb461532010-11-26 21:50:23197 },
198 {
[email protected]96c6f4c2011-05-18 19:36:22199 "ignore-gpu-blacklist",
200 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
201 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
202 kOsAll,
203 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
204 },
205 {
[email protected]0110cf112011-07-02 00:39:43206 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22207 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
208 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
209 kOsAll,
210 SINGLE_VALUE_TYPE(switches::kForceCompositingMode)
211 },
212 {
[email protected]72787e392012-03-23 05:55:43213 "threaded-compositing-mode",
214 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
215 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59216 kOsAll,
[email protected]72787e392012-03-23 05:55:43217 MULTI_VALUE_TYPE(kThreadedCompositingModeChoices)
[email protected]644a1072012-03-16 09:29:59218 },
219 {
[email protected]81c64af62012-06-06 20:15:52220 "disable-accelerated-2d-canvas",
221 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
222 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
223 kOsAll,
224 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
225 },
226 {
[email protected]2cd73322012-05-30 13:15:49227 "disable-deferred-2d-canvas",
228 IDS_FLAGS_DISABLE_DEFERRED_2D_CANVAS_NAME,
229 IDS_FLAGS_DISABLE_DEFERRED_2D_CANVAS_DESCRIPTION,
230 kOsAll,
231 SINGLE_VALUE_TYPE(switches::kDisableDeferred2dCanvas)
232 },
233 {
[email protected]efcde132012-05-30 01:05:18234 "disable-threaded-animation",
235 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
236 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59237 kOsAll,
[email protected]efcde132012-05-30 01:05:18238 SINGLE_VALUE_TYPE(switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59239 },
240 {
[email protected]5963b772011-02-09 22:55:38241 "composited-layer-borders",
242 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
243 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
244 kOsAll,
245 SINGLE_VALUE_TYPE(switches::kShowCompositedLayerBorders)
246 },
247 {
[email protected]a8f1eaa2011-03-07 19:00:58248 "show-fps-counter",
249 IDS_FLAGS_SHOW_FPS_COUNTER,
250 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
251 kOsAll,
252 SINGLE_VALUE_TYPE(switches::kShowFPSCounter)
253 },
[email protected]8ff7f342011-05-25 01:49:47254 {
[email protected]70c98a332011-12-21 20:51:52255 "accelerated-filters",
256 IDS_FLAGS_ACCELERATED_FILTERS,
257 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
258 kOsAll,
259 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
260 },
261 {
[email protected]8ff7f342011-05-25 01:49:47262 "disable-gpu-vsync",
263 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
264 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
265 kOsAll,
266 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
267 },
[email protected]deaba6d52011-09-23 14:47:12268 {
269 "disable-webgl",
270 IDS_FLAGS_DISABLE_WEBGL_NAME,
271 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
272 kOsAll,
273 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
274 },
[email protected]09096e02012-05-24 11:12:04275 {
276 "enable-browser-plugin",
277 IDS_FLAGS_ENABLE_BROWSER_PLUGIN_NAME,
278 IDS_FLAGS_ENABLE_BROWSER_PLUGIN_DESCRIPTION,
279 kOsAll,
[email protected]b1c4de4c2012-06-08 00:04:56280 MULTI_VALUE_TYPE(kBrowserPluginChoices)
[email protected]09096e02012-05-24 11:12:04281 },
[email protected]96bcdc102012-05-24 23:42:10282 {
283 "fixed-position-creates-stacking-context",
284 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
285 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
286 kOsAll,
287 SINGLE_VALUE_TYPE(switches::kFixedPositionCreatesStackingContext)
288 },
[email protected]d208f4d82011-05-23 21:52:03289 // TODO(dspringer): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53290 {
[email protected]e3791ce92011-08-09 01:03:32291 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40292 IDS_FLAGS_ENABLE_NACL_NAME,
293 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
294 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19295 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40296 },
[email protected]b39c6d92012-01-31 16:38:41297 // TODO(halyavin): When exception handling is on by default, replace this
298 // flag with disable-nacl-exception-handling.
299 {
300 "enable-nacl-exception-handling", // FLAGS:RECORD_UMA
301 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_NAME,
302 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION,
303 kOsWin,
304 SINGLE_VALUE_TYPE(switches::kEnableNaClExceptionHandling)
305 },
[email protected]4ff87d202010-11-06 01:28:40306 {
[email protected]31a665e72012-03-11 12:37:46307 "nacl-gdb", // FLAGS:RECORD_UMA
308 IDS_FLAGS_NACL_GDB_NAME,
309 IDS_FLAGS_NACL_GDB_DESCRIPTION,
310 kOsWin,
311 SINGLE_VALUE_TYPE(switches::kNaClGdb)
312 },
313 {
[email protected]401b90792012-05-30 11:41:13314 "nacl-gdb-script", // FLAGS:RECORD_UMA
315 IDS_FLAGS_NACL_GDB_SCRIPT_NAME,
316 IDS_FLAGS_NACL_GDB_SCRIPT_DESCRIPTION,
317 kOsAll,
318 SINGLE_VALUE_TYPE(switches::kNaClGdbScript)
319 },
320 {
[email protected]4bc5050c2010-11-18 17:55:54321 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32322 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
323 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
324 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19325 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32326 },
[email protected]3627b06d2010-11-12 16:36:16327 {
[email protected]cab18ef2012-04-27 07:22:03328 "action-box",
329 IDS_FLAGS_ACTION_BOX_NAME,
330 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
331 kOsAll,
332 SINGLE_VALUE_TYPE(switches::kEnableActionBox),
333 },
334 {
[email protected]cbe224d2011-08-04 22:12:49335 "apps-new-install-bubble",
336 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
337 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
338 kOsAll,
339 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
340 },
341 {
[email protected]80bd24e2010-11-30 09:34:38342 "disable-hyperlink-auditing",
343 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
344 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
345 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19346 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51347 },
348 {
349 "experimental-location-features", // FLAGS:RECORD_UMA
350 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
351 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
352 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19353 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
354 },
355 {
[email protected]04227962011-01-20 02:03:09356 "disable-interactive-form-validation",
357 IDS_FLAGS_DISABLE_INTERACTIVE_FORM_VALIDATION_NAME,
358 IDS_FLAGS_DISABLE_INTERACTIVE_FORM_VALIDATION_DESCRIPTION,
359 kOsAll,
360 SINGLE_VALUE_TYPE(switches::kDisableInteractiveFormValidation)
361 },
[email protected]8df51192011-01-22 20:05:03362 {
[email protected]07d490bc2011-03-07 17:05:26363 "focus-existing-tab-on-open", // FLAGS:RECORD_UMA
364 IDS_FLAGS_FOCUS_EXISTING_TAB_ON_OPEN_NAME,
365 IDS_FLAGS_FOCUS_EXISTING_TAB_ON_OPEN_DESCRIPTION,
366 kOsAll,
367 SINGLE_VALUE_TYPE(switches::kFocusExistingTabOnOpen)
368 },
[email protected]d5dcfb32011-03-19 00:49:24369 {
[email protected]5aea1862011-03-23 23:55:39370 "tab-groups-context-menu",
371 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
372 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
373 kOsWin,
374 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
375 },
[email protected]e9bf9d92011-03-31 20:57:15376 {
[email protected]354e33b2011-06-15 00:29:10377 "static-ip-config",
378 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
379 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
380 kOsCrOS,
381#if defined(OS_CHROMEOS)
382 // This switch exists only on Chrome OS.
383 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
384#else
385 SINGLE_VALUE_TYPE("")
386#endif
387 },
[email protected]3eb5728c2011-06-20 22:32:24388 {
389 "show-autofill-type-predictions",
390 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
391 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
392 kOsAll,
393 SINGLE_VALUE_TYPE(switches::kShowAutofillTypePredictions)
394 },
[email protected]bff4d3e2011-06-21 23:58:52395 {
[email protected]fdf4e252012-04-27 00:26:55396 "sync-tab-favicons",
397 IDS_FLAGS_SYNC_TAB_FAVICONS_NAME,
398 IDS_FLAGS_SYNC_TAB_FAVICONS_DESCRIPTION,
399 kOsAll,
400 SINGLE_VALUE_TYPE(switches::kSyncTabFavicons)
401 },
402 {
[email protected]aae9eeb12011-10-21 21:59:26403 "sync-app-notifications",
404 IDS_FLAGS_SYNC_APP_NOTIFICATIONS_NAME,
405 IDS_FLAGS_SYNC_APP_NOTIFICATIONS_DESCRIPTION,
406 kOsAll,
[email protected]0b6fba82011-11-18 01:31:11407 SINGLE_VALUE_TYPE(switches::kDisableSyncAppNotifications)
[email protected]aae9eeb12011-10-21 21:59:26408 },
409 {
[email protected]a22ebd812011-06-23 00:05:39410 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
411 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
412 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
413 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40414 // On by default for the Mac (different implementation in WebKit).
[email protected]554b7062011-09-03 03:09:40415 kOsWin | kOsLinux | kOsCrOS,
[email protected]a22ebd812011-06-23 00:05:39416 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
417 },
[email protected]81a6b0b2011-06-24 17:55:40418 {
[email protected]68317802012-06-07 19:13:23419 "omnibox-history-quick-provider-new-scoring",
420 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME,
421 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION,
422 kOsAll,
423 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices)
424 },
425 {
[email protected]032d5e6c2012-02-17 17:53:55426 "omnibox-inline-history-quick-provider",
427 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
428 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
429 kOsAll,
430 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
431 },
432 {
[email protected]7e7a28092011-12-09 22:24:55433 "enable-panels",
434 IDS_FLAGS_ENABLE_PANELS_NAME,
435 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]73fb1fc52011-07-09 00:06:54436 kOsAll,
[email protected]7e7a28092011-12-09 22:24:55437 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54438 },
[email protected]e3749d12011-07-25 22:22:12439 {
[email protected]9931875b2011-11-02 00:19:48440 "disable-shortcuts-provider",
441 IDS_FLAGS_DISABLE_SHORTCUTS_PROVIDER,
442 IDS_FLAGS_DISABLE_SHORTCUTS_PROVIDER_DESCRIPTION,
[email protected]e3749d12011-07-25 22:22:12443 kOsAll,
[email protected]9931875b2011-11-02 00:19:48444 SINGLE_VALUE_TYPE(switches::kDisableShortcutsProvider)
[email protected]e3749d12011-07-25 22:22:12445 },
[email protected]80eb4262011-08-03 16:10:41446 {
[email protected]a0e4b072011-08-17 01:47:07447 "downloads-new-ui", // FLAGS:RECORD_UMA
448 IDS_FLAGS_DOWNLOADS_NEW_UI_NAME,
449 IDS_FLAGS_DOWNLOADS_NEW_UI_DESCRIPTION,
450 kOsAll,
451 SINGLE_VALUE_TYPE(switches::kDownloadsNewUI)
452 },
[email protected]b7bb44f2011-09-01 05:17:03453 {
[email protected]6474b112012-05-04 19:35:27454 "save-page-as-mhtml", // FLAGS:RECORD_UMA
455 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
456 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
457 kOsMac | kOsWin | kOsLinux,
458 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
459 },
460 {
[email protected]b7bb44f2011-09-01 05:17:03461 "enable-autologin",
462 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
463 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
464 kOsMac | kOsWin | kOsLinux,
465 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
466 },
[email protected]b9841172011-09-26 23:36:09467 {
[email protected]bbadb112011-12-12 16:55:28468 "enable-http-pipelining",
469 IDS_FLAGS_ENABLE_HTTP_PIPELINING_NAME,
470 IDS_FLAGS_ENABLE_HTTP_PIPELINING_DESCRIPTION,
471 kOsAll,
472 SINGLE_VALUE_TYPE(switches::kEnableHttpPipelining)
473 },
[email protected]d411c01d2011-10-18 16:00:27474 {
[email protected]3231b612012-03-23 05:57:54475 "enable-spdy3",
476 IDS_FLAGS_ENABLE_SPDY3_NAME,
477 IDS_FLAGS_ENABLE_SPDY3_DESCRIPTION,
478 kOsAll,
479 SINGLE_VALUE_TYPE(switches::kEnableSpdy3)
480 },
481 {
[email protected]27b3fe92012-03-21 05:35:06482 "enable-async-dns",
483 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
484 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32485 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]27b3fe92012-03-21 05:35:06486 SINGLE_VALUE_TYPE(switches::kEnableAsyncDns)
487 },
488 {
[email protected]f5da41d2011-10-08 17:40:07489 "enable-video-track",
490 IDS_FLAGS_ENABLE_VIDEO_TRACK_NAME,
491 IDS_FLAGS_ENABLE_VIDEO_TRACK_DESCRIPTION,
492 kOsAll,
493 SINGLE_VALUE_TYPE(switches::kEnableVideoTrack)
494 },
[email protected]08b83362011-10-19 05:23:17495 {
[email protected]6aa03b32011-10-27 21:44:44496 "enable-media-source",
497 IDS_FLAGS_ENABLE_MEDIA_SOURCE_NAME,
498 IDS_FLAGS_ENABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32499 kOsAll,
[email protected]6aa03b32011-10-27 21:44:44500 SINGLE_VALUE_TYPE(switches::kEnableMediaSource)
501 },
[email protected]e4e68dbb2011-11-18 01:50:22502 {
[email protected]9f5b7822012-04-18 23:39:03503 "enable-encrypted-media",
504 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
505 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
506 kOsAll,
507 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
508 },
509 {
[email protected]e4e68dbb2011-11-18 01:50:22510 "enable-pointer-lock",
511 IDS_FLAGS_ENABLE_POINTER_LOCK_NAME,
512 IDS_FLAGS_ENABLE_POINTER_LOCK_DESCRIPTION,
513 kOsAll,
514 SINGLE_VALUE_TYPE(switches::kEnablePointerLock)
515 },
[email protected]dc04be7c2012-03-15 23:57:49516#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50517 {
[email protected]57b8bb352012-01-11 05:11:46518 "aura-google-dialog-frames",
519 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_NAME,
520 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_DESCRIPTION,
521 kOsWin | kOsLinux | kOsCrOS,
522 SINGLE_VALUE_TYPE(ash::switches::kAuraGoogleDialogFrames)
523 },
[email protected]dc04be7c2012-03-15 23:57:49524#endif
[email protected]eaae8b462012-01-20 22:20:39525 {
526 "enable-gamepad",
527 IDS_FLAGS_ENABLE_GAMEPAD_NAME,
528 IDS_FLAGS_ENABLE_GAMEPAD_DESCRIPTION,
529 kOsAll,
530 SINGLE_VALUE_TYPE(switches::kEnableGamepad)
531 },
[email protected]db543d322011-12-15 20:40:15532 {
533 "per-tile-painting",
534 IDS_FLAGS_PER_TILE_PAINTING_NAME,
535 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
536#if defined(USE_SKIA)
[email protected]a5b1b272012-01-06 20:44:37537 kOsMac | kOsLinux | kOsCrOS,
[email protected]db543d322011-12-15 20:40:15538#else
539 0,
540#endif
541 SINGLE_VALUE_TYPE(switches::kEnablePerTilePainting)
542 },
[email protected]bf88c032011-12-22 19:05:47543 {
544 "enable-javascript-harmony",
545 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
546 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
547 kOsAll,
548 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
549 },
[email protected]7e7f378a2012-01-05 14:35:37550 {
[email protected]85646172012-01-09 22:45:54551 "enable-tab-browser-dragging",
552 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
553 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
554 kOsWin,
555 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
556 },
557 {
[email protected]068b7b52012-02-27 12:41:44558 "disable-restore-session-state",
559 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
560 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37561 kOsAll,
[email protected]068b7b52012-02-27 12:41:44562 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37563 },
[email protected]88864db2012-01-18 20:56:35564 {
565 "disable-software-rasterizer",
566 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
567 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
568#if defined(ENABLE_SWIFTSHADER)
569 kOsAll,
570#else
571 0,
572#endif
573 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
574 },
[email protected]15a5d722012-01-23 09:11:14575 {
[email protected]8ea05a12012-05-02 09:17:47576 "enable-peer-connection",
577 IDS_FLAGS_PEER_CONNECTION_NAME,
578 IDS_FLAGS_PEER_CONNECTION_DESCRIPTION,
579 kOsAll,
580 SINGLE_VALUE_TYPE(switches::kEnablePeerConnection)
581 },
582 {
[email protected]d2edc6702012-01-30 09:13:16583 "enable-shadow-dom",
584 IDS_FLAGS_SHADOW_DOM_NAME,
585 IDS_FLAGS_SHADOW_DOM_DESCRIPTION,
586 kOsAll,
587 SINGLE_VALUE_TYPE(switches::kEnableShadowDOM)
588 },
[email protected]9860c68b2012-02-02 01:58:09589 {
[email protected]4961218f2012-02-23 10:11:07590 "enable-style-scoped",
591 IDS_FLAGS_STYLE_SCOPED_NAME,
592 IDS_FLAGS_STYLE_SCOPED_DESCRIPTION,
593 kOsAll,
594 SINGLE_VALUE_TYPE(switches::kEnableStyleScoped)
595 },
596 {
[email protected]ca7a3d792012-03-02 15:55:49597 "enable-css-regions",
598 IDS_FLAGS_CSS_REGIONS_NAME,
599 IDS_FLAGS_CSS_REGIONS_DESCRIPTION,
600 kOsAll,
601 SINGLE_VALUE_TYPE(switches::kEnableCssRegions)
602 },
603 {
[email protected]9860c68b2012-02-02 01:58:09604 "enable-extension-activity-ui",
605 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
606 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
607 kOsAll,
608 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00609 },
[email protected]54ae4e92012-02-16 15:19:05610 {
[email protected]3e8befc2012-03-13 01:17:03611 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16612 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
613 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
614 kOsAll,
[email protected]3e8befc2012-03-13 01:17:03615 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16616 },
[email protected]dc04be7c2012-03-15 23:57:49617#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01618 {
[email protected]3cd198a22012-03-12 20:38:01619 "enable-ash-oak",
620 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
621 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
622 kOsAll,
623 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
624 },
[email protected]31cf1c52012-02-29 20:55:01625#endif
[email protected]184ec592012-03-01 11:54:28626 {
627 "enable-devtools-experiments",
628 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
629 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
630 kOsAll,
631 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
632 },
[email protected]76d1854e2012-03-02 23:57:44633 {
634 "enable-suggestions-ntp",
635 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
636 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
637 kOsAll,
638 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
639 },
[email protected]a78ef9e2012-03-21 02:49:55640 {
[email protected]326be0e2012-05-08 16:06:59641 "disable-chrome-to-mobile", // FLAGS:RECORD_UMA
642 IDS_FLAGS_DISABLE_CHROME_TO_MOBILE_NAME,
643 IDS_FLAGS_DISABLE_CHROME_TO_MOBILE_DESCRIPTION,
[email protected]a78ef9e2012-03-21 02:49:55644 kOsAll,
[email protected]326be0e2012-05-08 16:06:59645 SINGLE_VALUE_TYPE(switches::kDisableChromeToMobile)
[email protected]a78ef9e2012-03-21 02:49:55646 },
[email protected]db92eeb2012-05-11 18:59:20647 {
648 "enable-captive-portal-detection",
649 IDS_FLAGS_CAPTIVE_PORTAL_CHECK_ON_ERROR_NAME,
650 IDS_FLAGS_CAPTIVE_PORTAL_CHECK_ON_ERROR_DESCRIPTION,
651 kOsMac | kOsWin | kOsLinux | kOsCrOS,
652 SINGLE_VALUE_TYPE(switches::kCaptivePortalDetection)
653 },
[email protected]8e466dd2012-05-04 19:16:05654#if defined(GOOGLE_CHROME_BUILD)
[email protected]a3d54252012-04-05 20:04:13655 {
[email protected]37b928e2012-05-30 09:01:10656 "disable-asynchronous-spellchecking",
657 IDS_FLAGS_DISABLE_ASYNCHRONOUS_SPELLCHECKING,
658 IDS_FLAGS_DISABLE_ASYNCHRONOUS_SPELLCHECKING_DESCRIPTION,
659 kOsWin | kOsLinux | kOsCrOS,
660 SINGLE_VALUE_TYPE(switches::kDisableAsynchronousSpellChecking)
[email protected]a3d54252012-04-05 20:04:13661 },
[email protected]8e466dd2012-05-04 19:16:05662#endif
[email protected]c9c73ad42012-04-18 03:35:59663 {
664 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06665 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
666 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]f5364d22012-05-31 18:57:29667 kOsWin | kOsCrOS,
[email protected]347a0c72012-05-14 20:28:06668 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59669 },
[email protected]8a6aaa72012-04-20 20:53:58670 {
671 "enable-touch-events",
672 IDS_ENABLE_TOUCH_EVENTS_NAME,
673 IDS_ENABLE_TOUCH_EVENTS_DESCRIPTION,
674 kOsAll,
675 SINGLE_VALUE_TYPE(switches::kEnableTouchEvents)
676 },
[email protected]0b60afa2012-04-19 17:36:39677#if defined(OS_CHROMEOS)
678 {
679 "no-discard-tabs",
680 IDS_FLAGS_NO_DISCARD_TABS_NAME,
681 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
682 kOsCrOS,
683 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
684 },
685#endif
[email protected]79be6d32012-04-24 20:47:44686 {
[email protected]6d947a602012-04-24 23:12:11687 "enable-platform-apps",
688 IDS_FLAGS_ENABLE_PLATFORM_APPS_NAME,
689 IDS_FLAGS_ENABLE_PLATFORM_APPS_DESCRIPTION,
690 kOsAll,
691 SINGLE_VALUE_TYPE(switches::kEnablePlatformApps)
[email protected]9a5940d2012-04-27 19:16:23692 },
693 {
694 "allow-nacl-socket-api",
695 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
696 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
697 kOsAll,
698 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
699 },
[email protected]85333732012-05-01 19:02:24700 {
[email protected]60673ad72012-05-02 06:16:33701 "stacked-tab-strip",
702 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
703 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
704 kOsWin,
705 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
706 },
707 {
[email protected]85333732012-05-01 19:02:24708 "default-device-scale-factor",
709 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
710 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
711 kOsCrOS,
712 SINGLE_VALUE_TYPE_AND_VALUE(switches::kDefaultDeviceScaleFactor, "2")
713 },
[email protected]190349fd2012-05-02 00:10:47714#if defined(OS_CHROMEOS)
715 {
716 "allow-touchpad-three-finger-click",
717 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
718 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
719 kOsCrOS,
720 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
721 },
722#endif
[email protected]aab64e02012-05-03 19:24:16723 {
[email protected]816385ee2012-06-05 00:17:52724 "disable-client-oauth-signin",
725 IDS_FLAGS_DISABLE_CLIENT_OAUTH_SIGNIN_NAME,
726 IDS_FLAGS_DISABLE_CLIENT_OAUTH_SIGNIN_DESCRIPTION,
[email protected]aab64e02012-05-03 19:24:16727 kOsMac | kOsWin | kOsLinux,
[email protected]816385ee2012-06-05 00:17:52728 SINGLE_VALUE_TYPE(switches::kDisableClientOAuthSignin)
[email protected]aab64e02012-05-03 19:24:16729 },
[email protected]53520b1b2012-05-07 21:43:37730#if defined(USE_ASH)
731 {
[email protected]55444502012-05-10 15:43:53732 "show-launcher-alignment-menu",
733 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
734 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
735 kOsAll,
736 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
737 },
[email protected]817ecd12012-05-16 18:36:53738 {
[email protected]73074742012-05-17 01:44:41739 "show-touch-hud",
740 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
741 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
742 kOsAll,
743 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
744 },
745 {
[email protected]817ecd12012-05-16 18:36:53746 "ash-notify",
747 IDS_FLAGS_ENABLE_ASH_NOTIFY_NAME,
748 IDS_FLAGS_ENABLE_ASH_NOTIFY_DESCRIPTION,
749 kOsAll,
750 SINGLE_VALUE_TYPE(ash::switches::kAshNotify),
751 },
[email protected]9f0940b62012-05-23 22:56:35752 {
753 "enable-pinch",
754 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
755 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
756 kOsAll,
757 SINGLE_VALUE_TYPE(switches::kEnablePinch),
758 },
[email protected]73074742012-05-17 01:44:41759#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:28760#if defined(OS_CHROMEOS)
761 {
[email protected]a7668a12012-05-28 22:23:48762 "experimental-wallpaper-ui",
763 IDS_FLAGS_EXPERIMENTAL_WALLPAPER_UI_NAME,
764 IDS_FLAGS_EXPERIMENTAL_WALLPAPER_UI_DESCRIPTION,
765 kOsCrOS,
766 SINGLE_VALUE_TYPE(switches::kExperimentalWallpaperUI)
767 },
768 {
[email protected]ed7b67f32012-05-28 10:12:28769 "enable-new-oobe",
770 IDS_FLAGS_ENABLE_NEW_OOBE,
771 IDS_FLAGS_ENABLE_NEW_OOBE_DESCRIPTION,
772 kOsCrOS,
773 SINGLE_VALUE_TYPE(switches::kEnableNewOobe),
774 },
775#endif
[email protected]fc7a93c2012-06-08 20:25:39776 {
777 "enable-views-textfield",
778 IDS_FLAGS_ENABLE_VIEWS_TEXTFIELD_NAME,
779 IDS_FLAGS_ENABLE_VIEWS_TEXTFIELD_DESCRIPTION,
780 kOsWin,
781 SINGLE_VALUE_TYPE(switches::kEnableViewsTextfield),
782 },
[email protected]a0e4b072011-08-17 01:47:07783};
[email protected]ad2a3ded2010-08-27 13:19:05784
[email protected]a314ee5a2010-10-26 21:23:28785const Experiment* experiments = kExperiments;
786size_t num_experiments = arraysize(kExperiments);
787
[email protected]e2ddbc92010-10-15 20:02:07788// Stores and encapsulates the little state that about:flags has.
789class FlagsState {
790 public:
791 FlagsState() : needs_restart_(false) {}
792 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
793 bool IsRestartNeededToCommitChanges();
794 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:28795 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:07796 void RemoveFlagsSwitches(
797 std::map<std::string, CommandLine::StringType>* switch_list);
798 void reset();
799
800 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:55801 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:07802 return Singleton<FlagsState>::get();
803 }
804
805 private:
806 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:53807 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:07808
809 DISALLOW_COPY_AND_ASSIGN(FlagsState);
810};
811
[email protected]c7b7800a2010-10-07 18:51:35812// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]ad2a3ded2010-08-27 13:19:05813// in a set.
[email protected]1a47d7e2010-10-15 00:37:24814void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:05815 const ListValue* enabled_experiments = prefs->GetList(
816 prefs::kEnabledLabsExperiments);
817 if (!enabled_experiments)
818 return;
819
820 for (ListValue::const_iterator it = enabled_experiments->begin();
821 it != enabled_experiments->end();
822 ++it) {
823 std::string experiment_name;
824 if (!(*it)->GetAsString(&experiment_name)) {
825 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
826 continue;
827 }
828 result->insert(experiment_name);
829 }
830}
831
832// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:24833void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:05834 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:38835 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
836 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:05837
838 experiments_list->Clear();
839 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
840 it != enabled_experiments.end();
841 ++it) {
842 experiments_list->Append(new StringValue(*it));
843 }
844}
845
[email protected]8a6ff28d2010-12-02 16:35:19846// Returns the name used in prefs for the choice at the specified index.
847std::string NameForChoice(const Experiment& e, int index) {
[email protected]2ce9c89752011-02-25 18:24:34848 DCHECK_EQ(Experiment::MULTI_VALUE, e.type);
849 DCHECK_LT(index, e.num_choices);
[email protected]8a6ff28d2010-12-02 16:35:19850 return std::string(e.internal_name) + about_flags::testing::kMultiSeparator +
851 base::IntToString(index);
852}
853
854// Adds the internal names for the specified experiment to |names|.
855void AddInternalName(const Experiment& e, std::set<std::string>* names) {
856 if (e.type == Experiment::SINGLE_VALUE) {
857 names->insert(e.internal_name);
858 } else {
[email protected]2ce9c89752011-02-25 18:24:34859 DCHECK_EQ(Experiment::MULTI_VALUE, e.type);
[email protected]8a6ff28d2010-12-02 16:35:19860 for (int i = 0; i < e.num_choices; ++i)
861 names->insert(NameForChoice(e, i));
862 }
863}
864
[email protected]28e35af2011-02-09 12:56:22865// Confirms that an experiment is valid, used in a DCHECK in
866// SanitizeList below.
867bool ValidateExperiment(const Experiment& e) {
868 switch (e.type) {
869 case Experiment::SINGLE_VALUE:
870 DCHECK_EQ(0, e.num_choices);
871 DCHECK(!e.choices);
872 break;
873 case Experiment::MULTI_VALUE:
874 DCHECK_GT(e.num_choices, 0);
875 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:53876 DCHECK(e.choices[0].command_line_switch);
877 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:22878 break;
879 default:
880 NOTREACHED();
881 }
882 return true;
883}
884
[email protected]ad2a3ded2010-08-27 13:19:05885// Removes all experiments from prefs::kEnabledLabsExperiments that are
886// unknown, to prevent this list to become very long as experiments are added
887// and removed.
888void SanitizeList(PrefService* prefs) {
889 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:22890 for (size_t i = 0; i < num_experiments; ++i) {
891 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:19892 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:22893 }
[email protected]ad2a3ded2010-08-27 13:19:05894
895 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:24896 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:05897
898 std::set<std::string> new_enabled_experiments;
899 std::set_intersection(
900 known_experiments.begin(), known_experiments.end(),
901 enabled_experiments.begin(), enabled_experiments.end(),
902 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
903
[email protected]1a47d7e2010-10-15 00:37:24904 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:05905}
906
[email protected]1a47d7e2010-10-15 00:37:24907void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:05908 PrefService* prefs, std::set<std::string>* result) {
909 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:24910 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:05911}
912
[email protected]a314ee5a2010-10-26 21:23:28913// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
914// enabled on the current platform.
915void GetSanitizedEnabledFlagsForCurrentPlatform(
916 PrefService* prefs, std::set<std::string>* result) {
917 GetSanitizedEnabledFlags(prefs, result);
918
919 // Filter out any experiments that aren't enabled on the current platform. We
920 // don't remove these from prefs else syncing to a platform with a different
921 // set of experiments would be lossy.
922 std::set<std::string> platform_experiments;
923 int current_platform = GetCurrentPlatform();
924 for (size_t i = 0; i < num_experiments; ++i) {
925 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:19926 AddInternalName(experiments[i], &platform_experiments);
[email protected]a314ee5a2010-10-26 21:23:28927 }
928
929 std::set<std::string> new_enabled_experiments;
930 std::set_intersection(
931 platform_experiments.begin(), platform_experiments.end(),
932 result->begin(), result->end(),
933 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
934
935 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:05936}
937
[email protected]8a6ff28d2010-12-02 16:35:19938// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:19939Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:22940 const std::set<std::string>& enabled_experiments) {
[email protected]2ce9c89752011-02-25 18:24:34941 DCHECK_EQ(Experiment::MULTI_VALUE, experiment.type);
[email protected]8a6ff28d2010-12-02 16:35:19942 ListValue* result = new ListValue;
943 for (int i = 0; i < experiment.num_choices; ++i) {
944 const Experiment::Choice& choice = experiment.choices[i];
945 DictionaryValue* value = new DictionaryValue;
946 std::string name = NameForChoice(experiment, i);
947 value->SetString("description",
948 l10n_util::GetStringUTF16(choice.description_id));
949 value->SetString("internal_name", name);
[email protected]28e35af2011-02-09 12:56:22950 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:19951 result->Append(value);
952 }
953 return result;
954}
955
[email protected]e2ddbc92010-10-15 20:02:07956} // namespace
957
[email protected]1a47d7e2010-10-15 00:37:24958void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:55959 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:05960}
961
[email protected]1a47d7e2010-10-15 00:37:24962ListValue* GetFlagsExperimentsData(PrefService* prefs) {
[email protected]ad2a3ded2010-08-27 13:19:05963 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:24964 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:05965
966 int current_platform = GetCurrentPlatform();
967
968 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:28969 for (size_t i = 0; i < num_experiments; ++i) {
970 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:05971
972 DictionaryValue* data = new DictionaryValue();
973 data->SetString("internal_name", experiment.internal_name);
974 data->SetString("name",
975 l10n_util::GetStringUTF16(experiment.visible_name_id));
976 data->SetString("description",
977 l10n_util::GetStringUTF16(
978 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:40979 bool supported = !!(experiment.supported_platforms & current_platform);
980 data->SetBoolean("supported", supported);
981
982 ListValue* supported_platforms = new ListValue();
983 AddOsStrings(experiment.supported_platforms, supported_platforms);
984 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:05985
[email protected]28e35af2011-02-09 12:56:22986 switch (experiment.type) {
987 case Experiment::SINGLE_VALUE:
988 data->SetBoolean(
989 "enabled",
990 enabled_experiments.count(experiment.internal_name) > 0);
991 break;
992 case Experiment::MULTI_VALUE:
993 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
994 break;
995 default:
996 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:19997 }
998
[email protected]ad2a3ded2010-08-27 13:19:05999 experiments_data->Append(data);
1000 }
1001 return experiments_data;
1002}
1003
[email protected]ad2a3ded2010-08-27 13:19:051004bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551005 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051006}
1007
1008void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351009 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551010 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071011}
1012
1013void RemoveFlagsSwitches(
1014 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551015 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071016}
1017
[email protected]a314ee5a2010-10-26 21:23:281018int GetCurrentPlatform() {
1019#if defined(OS_MACOSX)
1020 return kOsMac;
1021#elif defined(OS_WIN)
1022 return kOsWin;
1023#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1024 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211025#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281026 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401027#elif defined(OS_ANDROID)
1028 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281029#else
1030#error Unknown platform
1031#endif
1032}
1033
[email protected]4bc5050c2010-11-18 17:55:541034void RecordUMAStatistics(const PrefService* prefs) {
1035 std::set<std::string> flags;
1036 GetEnabledFlags(prefs, &flags);
1037 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1038 ++it) {
1039 std::string action("AboutFlags_");
1040 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381041 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541042 }
1043 // Since flag metrics are recorded every startup, add a tick so that the
1044 // stats can be made meaningful.
1045 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381046 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1047 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541048}
1049
[email protected]e2ddbc92010-10-15 20:02:071050//////////////////////////////////////////////////////////////////////////////
1051// FlagsState implementation.
1052
1053namespace {
1054
1055void FlagsState::ConvertFlagsToSwitches(
1056 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071057 if (command_line->HasSwitch(switches::kNoExperiments))
1058 return;
1059
1060 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001061
[email protected]a314ee5a2010-10-26 21:23:281062 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071063
[email protected]a82744532011-02-11 16:15:531064 typedef std::map<std::string, std::pair<std::string, std::string> >
1065 NameToSwitchAndValueMap;
1066 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191067 for (size_t i = 0; i < num_experiments; ++i) {
1068 const Experiment& e = experiments[i];
1069 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]a82744532011-02-11 16:15:531070 name_to_switch_map[e.internal_name] =
1071 std::pair<std::string, std::string>(e.command_line_switch,
1072 e.command_line_value);
[email protected]8a6ff28d2010-12-02 16:35:191073 } else {
1074 for (int j = 0; j < e.num_choices; ++j)
[email protected]a82744532011-02-11 16:15:531075 name_to_switch_map[NameForChoice(e, j)] =
1076 std::pair<std::string, std::string>(
1077 e.choices[j].command_line_switch,
1078 e.choices[j].command_line_value);
[email protected]8a6ff28d2010-12-02 16:35:191079 }
1080 }
[email protected]e2ddbc92010-10-15 20:02:071081
1082 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531083 flags_switches_.insert(
1084 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1085 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071086 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1087 it != enabled_experiments.end();
1088 ++it) {
1089 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531090 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191091 name_to_switch_map.find(experiment_name);
1092 if (name_to_switch_it == name_to_switch_map.end()) {
1093 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071094 continue;
[email protected]8a6ff28d2010-12-02 16:35:191095 }
[email protected]e2ddbc92010-10-15 20:02:071096
[email protected]a82744532011-02-11 16:15:531097 const std::pair<std::string, std::string>&
1098 switch_and_value_pair = name_to_switch_it->second;
1099
1100 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1101 switch_and_value_pair.second);
1102 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071103 }
1104 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531105 flags_switches_.insert(
1106 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1107 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071108}
1109
1110bool FlagsState::IsRestartNeededToCommitChanges() {
1111 return needs_restart_;
1112}
1113
1114void FlagsState::SetExperimentEnabled(
1115 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]ad2a3ded2010-08-27 13:19:051116 needs_restart_ = true;
1117
[email protected]8a6ff28d2010-12-02 16:35:191118 size_t at_index = internal_name.find(about_flags::testing::kMultiSeparator);
1119 if (at_index != std::string::npos) {
1120 DCHECK(enable);
1121 // We're being asked to enable a multi-choice experiment. Disable the
1122 // currently selected choice.
1123 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221124 const std::string experiment_name = internal_name.substr(0, at_index);
1125 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191126
[email protected]28e35af2011-02-09 12:56:221127 // And enable the new choice, if it is not the default first choice.
1128 if (internal_name != experiment_name + "@0") {
1129 std::set<std::string> enabled_experiments;
1130 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
1131 enabled_experiments.insert(internal_name);
1132 SetEnabledFlags(prefs, enabled_experiments);
1133 }
[email protected]8a6ff28d2010-12-02 16:35:191134 return;
1135 }
1136
[email protected]ad2a3ded2010-08-27 13:19:051137 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241138 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051139
[email protected]8a6ff28d2010-12-02 16:35:191140 const Experiment* e = NULL;
1141 for (size_t i = 0; i < num_experiments; ++i) {
1142 if (experiments[i].internal_name == internal_name) {
1143 e = experiments + i;
1144 break;
1145 }
1146 }
1147 DCHECK(e);
1148
1149 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591150 if (enable)
[email protected]8a6ff28d2010-12-02 16:35:191151 enabled_experiments.insert(internal_name);
[email protected]8a2713682011-08-19 10:36:591152 else
[email protected]8a6ff28d2010-12-02 16:35:191153 enabled_experiments.erase(internal_name);
1154 } else {
1155 if (enable) {
1156 // Enable the first choice.
1157 enabled_experiments.insert(NameForChoice(*e, 0));
1158 } else {
1159 // Find the currently enabled choice and disable it.
1160 for (int i = 0; i < e->num_choices; ++i) {
1161 std::string choice_name = NameForChoice(*e, i);
1162 if (enabled_experiments.find(choice_name) !=
1163 enabled_experiments.end()) {
1164 enabled_experiments.erase(choice_name);
1165 // Continue on just in case there's a bug and more than one
1166 // experiment for this choice was enabled.
1167 }
1168 }
1169 }
1170 }
[email protected]ad2a3ded2010-08-27 13:19:051171
[email protected]1a47d7e2010-10-15 00:37:241172 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051173}
1174
[email protected]e2ddbc92010-10-15 20:02:071175void FlagsState::RemoveFlagsSwitches(
1176 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531177 for (std::map<std::string, std::string>::const_iterator
1178 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1179 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071180 }
1181}
1182
1183void FlagsState::reset() {
1184 needs_restart_ = false;
1185 flags_switches_.clear();
1186}
1187
[email protected]38e46812011-05-09 20:49:221188} // namespace
[email protected]e2ddbc92010-10-15 20:02:071189
1190namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191191
1192// WARNING: '@' is also used in the html file. If you update this constant you
1193// also need to update the html file.
1194const char kMultiSeparator[] = "@";
1195
[email protected]e2ddbc92010-10-15 20:02:071196void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551197 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071198}
[email protected]a314ee5a2010-10-26 21:23:281199
1200void SetExperiments(const Experiment* e, size_t count) {
1201 if (!e) {
1202 experiments = kExperiments;
1203 num_experiments = arraysize(kExperiments);
1204 } else {
1205 experiments = e;
1206 num_experiments = count;
1207 }
1208}
1209
[email protected]8a6ff28d2010-12-02 16:35:191210const Experiment* GetExperiments(size_t* count) {
1211 *count = num_experiments;
1212 return experiments;
1213}
1214
[email protected]e2ddbc92010-10-15 20:02:071215} // namespace testing
1216
[email protected]1a47d7e2010-10-15 00:37:241217} // namespace about_flags