blob: 2fe7ca8642d35258ccc3115777dea335c90e9c89 [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]65bfd9972012-10-19 03:39:3717#include "cc/switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "chrome/browser/prefs/pref_service.h"
[email protected]1bc78422011-03-31 08:41:3819#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
22#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3823#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0224#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0227#include "media/base/media_switches.h"
[email protected]0bc6c272012-07-17 03:32:0328#include "ui/app_list/app_list_switches.h"
[email protected]c051a1b2011-01-21 23:30:1729#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5930#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4831#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2732#include "ui/gl/gl_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0533
[email protected]dc04be7c2012-03-15 23:57:4934#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3135#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4936#endif
37
38#if defined(USE_AURA)
[email protected]308aaa32012-03-12 13:14:5039#include "ui/aura/aura_switches.h"
[email protected]8cc10df2011-11-03 23:57:5040#endif
41
[email protected]badba1ad2012-11-16 17:21:4642#if defined(OS_CHROMEOS)
43#include "chromeos/chromeos_switches.h"
44#endif
45
[email protected]7f6f44c2011-12-14 13:23:3846using content::UserMetricsAction;
47
[email protected]1a47d7e2010-10-15 00:37:2448namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0549
[email protected]8a6ff28d2010-12-02 16:35:1950// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5351#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
52 Experiment::SINGLE_VALUE, command_line_switch, switch_value, NULL, 0
53#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
55#define MULTI_VALUE_TYPE(choices) \
[email protected]0e6f56d2011-02-12 23:45:1556 Experiment::MULTI_VALUE, "", "", choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1957
[email protected]e2ddbc92010-10-15 20:02:0758namespace {
59
[email protected]9c7453d2012-01-21 00:45:4060const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]ad2a3ded2010-08-27 13:19:0561
[email protected]cc3e2052011-12-20 01:01:4062// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
63// whether the experiment is available on that platform.
64void AddOsStrings(unsigned bitmask, ListValue* list) {
65 struct {
66 unsigned bit;
67 const char* const name;
68 } kBitsToOs[] = {
69 {kOsMac, "Mac"},
70 {kOsWin, "Windows"},
71 {kOsLinux, "Linux"},
72 {kOsCrOS, "Chrome OS"},
73 };
74 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
75 if (bitmask & kBitsToOs[i].bit)
76 list->Append(new StringValue(kBitsToOs[i].name));
77}
78
[email protected]ba8164242010-11-16 21:31:0079// Names for former Chrome OS Labs experiments, shared with prefs migration
80// code.
81const char kMediaPlayerExperimentName[] = "media-player";
82const char kAdvancedFileSystemExperimentName[] = "advanced-file-system";
83const char kVerticalTabsExperimentName[] = "vertical-tabs";
84
[email protected]68317802012-06-07 19:13:2385const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = {
86 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" },
87 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED,
88 switches::kOmniboxHistoryQuickProviderNewScoring,
89 switches::kOmniboxHistoryQuickProviderNewScoringEnabled },
90 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED,
91 switches::kOmniboxHistoryQuickProviderNewScoring,
92 switches::kOmniboxHistoryQuickProviderNewScoringDisabled }
93};
94
[email protected]128dc6c2012-06-22 20:30:3595const Experiment::Choice
96 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
97 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
98 "",
99 "" },
100 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
101 switches::kOmniboxHistoryQuickProviderReorderForInlining,
102 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
103 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
104 switches::kOmniboxHistoryQuickProviderReorderForInlining,
105 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
106};
107
[email protected]032d5e6c2012-02-17 17:53:55108const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
109 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
110 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
111 switches::kOmniboxInlineHistoryQuickProvider,
112 switches::kOmniboxInlineHistoryQuickProviderAllowed },
113 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
114 switches::kOmniboxInlineHistoryQuickProvider,
115 switches::kOmniboxInlineHistoryQuickProviderProhibited }
116};
117
[email protected]de023762012-07-26 17:10:17118const Experiment::Choice kFixedPositionCreatesStackingContextChoices[] = {
119 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
120 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
121 switches::kEnableFixedPositionCreatesStackingContext, ""},
122 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
123 switches::kDisableFixedPositionCreatesStackingContext, ""}
124};
125
[email protected]9b19cf82012-06-13 06:23:23126const Experiment::Choice kForceCompositingModeChoices[] = {
[email protected]a45c69402012-06-24 16:32:20127 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
128 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]9b19cf82012-06-13 06:23:23129 switches::kForceCompositingMode, ""},
[email protected]a45c69402012-06-24 16:32:20130 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]9b19cf82012-06-13 06:23:23131 switches::kDisableForceCompositingMode, ""}
132};
133
[email protected]72787e392012-03-23 05:55:43134const Experiment::Choice kThreadedCompositingModeChoices[] = {
[email protected]a45c69402012-06-24 16:32:20135 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
136 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]72787e392012-03-23 05:55:43137 switches::kDisableThreadedCompositing, ""},
[email protected]a45c69402012-06-24 16:32:20138 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]72787e392012-03-23 05:55:43139 switches::kEnableThreadedCompositing, ""}
140};
141
[email protected]347a0c72012-05-14 20:28:06142const Experiment::Choice kTouchOptimizedUIChoices[] = {
143 { IDS_FLAGS_TOUCH_OPTIMIZED_UI_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20144 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06145 switches::kTouchOptimizedUI,
146 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20147 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06148 switches::kTouchOptimizedUI,
149 switches::kTouchOptimizedUIDisabled }
150};
151
[email protected]026876f32012-08-22 23:53:40152const Experiment::Choice kAsyncDnsChoices[] = {
153 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
154 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
155 switches::kDisableAsyncDns, ""},
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
157 switches::kEnableAsyncDns, ""}
158};
159
[email protected]66f409c2012-10-04 20:59:04160const Experiment::Choice kNaClDebugMaskChoices[] = {
161 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
162 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
163 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
164 // an option to switch off its debugging.
165 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
166 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
167 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
168 switches::kNaClDebugMask, "*://*/*debug.nmf" }
169};
170
[email protected]544471a2012-10-13 05:27:09171const Experiment::Choice kActionBoxChoices[] = {
172 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
173 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
174 switches::kActionBox, "0"},
175 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
176 switches::kActionBox, "1"}
177};
178
179const Experiment::Choice kScriptBubbleChoices[] = {
180 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
181 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
182 switches::kScriptBubble, "0"},
183 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
184 switches::kScriptBubble, "1"}
185};
186
[email protected]0b9383a2012-10-26 00:58:16187const Experiment::Choice kTabCaptureChoices[] = {
188 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
189 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
190 switches::kTabCapture, "0"},
191 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
192 switches::kTabCapture, "1"}
193};
194
[email protected]ea2f3342012-09-21 21:13:36195#if defined(OS_CHROMEOS)
196const Experiment::Choice kAshBootAnimationFunction[] = {
197 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
198 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
199 ash::switches::kAshBootAnimationFunction2, ""},
200 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
201 ash::switches::kAshBootAnimationFunction3, ""}
202};
[email protected]d96aef22012-10-30 11:47:02203
204const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]ad2fe9f2012-11-15 11:03:19205 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
[email protected]d96aef22012-10-30 11:47:02206 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]ad2fe9f2012-11-15 11:03:19207 switches::kEnableChromeCaptivePortalDetector, ""},
208 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
209 switches::kDisableChromeCaptivePortalDetector, ""}
[email protected]d96aef22012-10-30 11:47:02210};
[email protected]ea2f3342012-09-21 21:13:36211#endif
212
[email protected]347a0c72012-05-14 20:28:06213
[email protected]4bc5050c2010-11-18 17:55:54214// RECORDING USER METRICS FOR FLAGS:
215// -----------------------------------------------------------------------------
216// The first line of the experiment is the internal name. If you'd like to
217// gather statistics about the usage of your flag, you should append a marker
218// comment to the end of the feature name, like so:
219// "my-special-feature", // FLAGS:RECORD_UMA
220//
221// After doing that, run //chrome/tools/extract_actions.py (see instructions at
222// the top of that file for details) to update the chromeactions.txt file, which
223// will enable UMA to record your feature flag.
224//
[email protected]783d5bb2012-10-24 03:47:14225// After your feature has shipped under a flag, you can locate the metrics under
226// the action name AboutFlags_internal-action-name. Actions are recorded once
227// per startup, so you should divide this number by AboutFlags_StartupTick to
228// get a sense of usage. Note that this will not be the same as number of users
229// with a given feature enabled because users can quit and relaunch the
230// application multiple times over a given time interval. The dashboard also
231// shows you how many (metrics reporting) users have enabled the flag over the
232// last seven days. However, note that this is not the same as the number of
233// users who have the flag enabled, since enabling the flag happens once,
234// whereas running with the flag enabled happens until the user flips the flag
235// again.
[email protected]4bc5050c2010-11-18 17:55:54236
[email protected]8a6ff28d2010-12-02 16:35:19237// To add a new experiment add to the end of kExperiments. There are two
238// distinct types of experiments:
239// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
240// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22241// . MULTI_VALUE: a list of choices, the first of which should correspond to a
242// deactivated state for this lab (i.e. no command line option). To specify
243// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
244// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19245// See the documentation of Experiment for details on the fields.
246//
247// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05248const Experiment kExperiments[] = {
249 {
[email protected]aac169d2011-03-18 19:53:03250 "expose-for-tabs", // FLAGS:RECORD_UMA
251 IDS_FLAGS_TABPOSE_NAME,
252 IDS_FLAGS_TABPOSE_DESCRIPTION,
253 kOsMac,
254#if defined(OS_MACOSX)
255 // The switch exists only on OS X.
256 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
257#else
258 SINGLE_VALUE_TYPE("")
259#endif
260 },
261 {
[email protected]4bc5050c2010-11-18 17:55:54262 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05263 IDS_FLAGS_CONFLICTS_CHECK_NAME,
264 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
265 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19266 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05267 },
268 {
[email protected]4bc5050c2010-11-18 17:55:54269 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54270 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
271 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45272 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22273 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31274 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22275 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
276 // always have PDF rasterization available, so no flag needed there.
277#if !defined(GOOGLE_CHROME_BUILD)
278 kOsWin,
279#else
280 0,
[email protected]fa6d2a2f2010-11-30 21:47:19281#endif
[email protected]8a6ff28d2010-12-02 16:35:19282 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42283 },
[email protected]60d77bd2012-08-22 00:10:07284#if defined(OS_WIN)
285 {
286 "print-raster",
287 IDS_FLAGS_PRINT_RASTER_NAME,
288 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
289 kOsWin,
290 SINGLE_VALUE_TYPE(switches::kPrintRaster)
291 },
292#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05293 {
[email protected]bb461532010-11-26 21:50:23294 "crxless-web-apps",
295 IDS_FLAGS_CRXLESS_WEB_APPS_NAME,
296 IDS_FLAGS_CRXLESS_WEB_APPS_DESCRIPTION,
297 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19298 SINGLE_VALUE_TYPE(switches::kEnableCrxlessWebApps)
[email protected]bb461532010-11-26 21:50:23299 },
300 {
[email protected]96c6f4c2011-05-18 19:36:22301 "ignore-gpu-blacklist",
302 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
303 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
304 kOsAll,
305 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
306 },
307 {
[email protected]0110cf112011-07-02 00:39:43308 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22309 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
310 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23311 kOsMac | kOsWin | kOsLinux,
312 MULTI_VALUE_TYPE(kForceCompositingModeChoices)
[email protected]96c6f4c2011-05-18 19:36:22313 },
314 {
[email protected]72787e392012-03-23 05:55:43315 "threaded-compositing-mode",
316 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
317 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59318 kOsAll,
[email protected]72787e392012-03-23 05:55:43319 MULTI_VALUE_TYPE(kThreadedCompositingModeChoices)
[email protected]644a1072012-03-16 09:29:59320 },
321 {
[email protected]81c64af62012-06-06 20:15:52322 "disable-accelerated-2d-canvas",
323 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
324 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
325 kOsAll,
326 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
327 },
328 {
[email protected]69cffc82012-08-10 13:27:27329 "disable-deferred-2d-canvas",
330 IDS_FLAGS_DISABLE_DEFERRED_2D_CANVAS_NAME,
331 IDS_FLAGS_DISABLE_DEFERRED_2D_CANVAS_DESCRIPTION,
332 kOsAll,
333 SINGLE_VALUE_TYPE(switches::kDisableDeferred2dCanvas)
334 },
335 {
[email protected]efcde132012-05-30 01:05:18336 "disable-threaded-animation",
337 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
338 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59339 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37340 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59341 },
342 {
[email protected]5963b772011-02-09 22:55:38343 "composited-layer-borders",
344 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
345 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
346 kOsAll,
347 SINGLE_VALUE_TYPE(switches::kShowCompositedLayerBorders)
348 },
349 {
[email protected]a8f1eaa2011-03-07 19:00:58350 "show-fps-counter",
351 IDS_FLAGS_SHOW_FPS_COUNTER,
352 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
353 kOsAll,
354 SINGLE_VALUE_TYPE(switches::kShowFPSCounter)
355 },
[email protected]8ff7f342011-05-25 01:49:47356 {
[email protected]70c98a332011-12-21 20:51:52357 "accelerated-filters",
358 IDS_FLAGS_ACCELERATED_FILTERS,
359 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
360 kOsAll,
361 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
362 },
363 {
[email protected]8ff7f342011-05-25 01:49:47364 "disable-gpu-vsync",
365 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
366 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
367 kOsAll,
368 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
369 },
[email protected]deaba6d52011-09-23 14:47:12370 {
371 "disable-webgl",
372 IDS_FLAGS_DISABLE_WEBGL_NAME,
373 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
374 kOsAll,
375 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
376 },
[email protected]09096e02012-05-24 11:12:04377 {
[email protected]96bcdc102012-05-24 23:42:10378 "fixed-position-creates-stacking-context",
379 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
380 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
381 kOsAll,
[email protected]de023762012-07-26 17:10:17382 MULTI_VALUE_TYPE(kFixedPositionCreatesStackingContextChoices)
[email protected]96bcdc102012-05-24 23:42:10383 },
[email protected]a7640ef22012-10-06 00:52:08384 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53385 {
[email protected]e3791ce92011-08-09 01:03:32386 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40387 IDS_FLAGS_ENABLE_NACL_NAME,
388 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
389 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19390 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40391 },
[email protected]b39c6d92012-01-31 16:38:41392 // TODO(halyavin): When exception handling is on by default, replace this
393 // flag with disable-nacl-exception-handling.
394 {
395 "enable-nacl-exception-handling", // FLAGS:RECORD_UMA
396 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_NAME,
397 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION,
[email protected]bf2c61b2012-08-30 16:37:04398 kOsAll,
[email protected]b39c6d92012-01-31 16:38:41399 SINGLE_VALUE_TYPE(switches::kEnableNaClExceptionHandling)
400 },
[email protected]4ff87d202010-11-06 01:28:40401 {
[email protected]9addd1c2012-09-15 14:28:24402 "enable-nacl-debug", // FLAGS:RECORD_UMA
403 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
404 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]401b90792012-05-30 11:41:13405 kOsAll,
[email protected]9addd1c2012-09-15 14:28:24406 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13407 },
408 {
[email protected]66f409c2012-10-04 20:59:04409 "nacl-debug-mask", // FLAGS:RECORD_UMA
410 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
411 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
412 kOsAll,
413 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
414 },
415 {
[email protected]7babd1c2012-08-08 20:35:29416 "enable-pnacl", // FLAGS:RECORD_UMA
417 IDS_FLAGS_ENABLE_PNACL_NAME,
418 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
419 kOsAll,
420 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
421 },
[email protected]a7640ef22012-10-06 00:52:08422 // TODO(bbudge): When NaCl switches to the IPC-based proxy, remove this
423 // flag entry.
424 {
[email protected]45a9c0a2012-11-08 21:00:29425 "enable-nacl-srpc-proxy", // FLAGS:RECORD_UMA
426 IDS_FLAGS_ENABLE_NACL_SRPC_PROXY_NAME,
427 IDS_FLAGS_ENABLE_NACL_SRPC_PROXY_DESCRIPTION,
[email protected]a7640ef22012-10-06 00:52:08428 kOsAll,
[email protected]45a9c0a2012-11-08 21:00:29429 SINGLE_VALUE_TYPE(switches::kEnableNaClSRPCProxy)
[email protected]a7640ef22012-10-06 00:52:08430 },
[email protected]7babd1c2012-08-08 20:35:29431 {
[email protected]d3a8cfc2012-09-14 18:31:38432 "enable-scripted-speech", // FLAGS:RECORD_UMA
433 IDS_FLAGS_ENABLE_SCRIPTED_SPEECH_NAME,
434 IDS_FLAGS_ENABLE_SCRIPTED_SPEECH_DESCRIPTION,
435 kOsAll,
436 SINGLE_VALUE_TYPE(switches::kEnableScriptedSpeech)
437 },
438 {
[email protected]4bc5050c2010-11-18 17:55:54439 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32440 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
441 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
442 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19443 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32444 },
[email protected]3627b06d2010-11-12 16:36:16445 {
[email protected]544471a2012-10-13 05:27:09446 "action-box",
[email protected]cab18ef2012-04-27 07:22:03447 IDS_FLAGS_ACTION_BOX_NAME,
448 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
449 kOsAll,
[email protected]544471a2012-10-13 05:27:09450 MULTI_VALUE_TYPE(kActionBoxChoices),
[email protected]cab18ef2012-04-27 07:22:03451 },
452 {
[email protected]3a362432012-06-18 20:39:51453 "script-badges",
454 IDS_FLAGS_SCRIPT_BADGES_NAME,
455 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
456 kOsAll,
[email protected]544471a2012-10-13 05:27:09457 SINGLE_VALUE_TYPE(switches::kScriptBadges)
458 },
459 {
460 "script-bubble",
461 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
462 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
463 kOsAll,
464 MULTI_VALUE_TYPE(kScriptBubbleChoices),
[email protected]3a362432012-06-18 20:39:51465 },
466 {
[email protected]cbe224d2011-08-04 22:12:49467 "apps-new-install-bubble",
468 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
469 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
470 kOsAll,
471 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
472 },
473 {
[email protected]80bd24e2010-11-30 09:34:38474 "disable-hyperlink-auditing",
475 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
476 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
477 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19478 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51479 },
480 {
481 "experimental-location-features", // FLAGS:RECORD_UMA
482 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
483 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
484 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19485 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
486 },
487 {
[email protected]5aea1862011-03-23 23:55:39488 "tab-groups-context-menu",
489 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
490 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
491 kOsWin,
492 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
493 },
[email protected]c94cebd2012-06-21 00:55:28494#if defined(OS_CHROMEOS)
495 {
496 "enable-instant-extended-api",
497 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
498 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
499 kOsAll,
500 SINGLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI)
501 },
502#endif
[email protected]e9bf9d92011-03-31 20:57:15503 {
[email protected]354e33b2011-06-15 00:29:10504 "static-ip-config",
505 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
506 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
507 kOsCrOS,
508#if defined(OS_CHROMEOS)
509 // This switch exists only on Chrome OS.
510 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
511#else
512 SINGLE_VALUE_TYPE("")
513#endif
514 },
[email protected]3eb5728c2011-06-20 22:32:24515 {
516 "show-autofill-type-predictions",
517 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
518 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
519 kOsAll,
520 SINGLE_VALUE_TYPE(switches::kShowAutofillTypePredictions)
521 },
[email protected]bff4d3e2011-06-21 23:58:52522 {
[email protected]fdf4e252012-04-27 00:26:55523 "sync-tab-favicons",
524 IDS_FLAGS_SYNC_TAB_FAVICONS_NAME,
525 IDS_FLAGS_SYNC_TAB_FAVICONS_DESCRIPTION,
526 kOsAll,
527 SINGLE_VALUE_TYPE(switches::kSyncTabFavicons)
528 },
529 {
[email protected]aae9eeb12011-10-21 21:59:26530 "sync-app-notifications",
531 IDS_FLAGS_SYNC_APP_NOTIFICATIONS_NAME,
532 IDS_FLAGS_SYNC_APP_NOTIFICATIONS_DESCRIPTION,
533 kOsAll,
[email protected]0b6fba82011-11-18 01:31:11534 SINGLE_VALUE_TYPE(switches::kDisableSyncAppNotifications)
[email protected]aae9eeb12011-10-21 21:59:26535 },
536 {
[email protected]5d90a0a2012-11-15 02:43:40537 "sync-keystore-encryption",
538 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
539 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
540 kOsAll,
541 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
542 },
543 {
[email protected]e755a382012-09-13 17:16:35544 "enable-gesture-tap-highlight",
545 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
546 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
547 kOsLinux | kOsCrOS,
548 SINGLE_VALUE_TYPE(switches::kEnableGestureTapHighlight)
549 },
550 {
[email protected]a22ebd812011-06-23 00:05:39551 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
552 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
553 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
554 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40555 // On by default for the Mac (different implementation in WebKit).
[email protected]554b7062011-09-03 03:09:40556 kOsWin | kOsLinux | kOsCrOS,
[email protected]a22ebd812011-06-23 00:05:39557 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
558 },
[email protected]81a6b0b2011-06-24 17:55:40559 {
[email protected]68317802012-06-07 19:13:23560 "omnibox-history-quick-provider-new-scoring",
561 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME,
562 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION,
563 kOsAll,
564 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices)
565 },
566 {
[email protected]128dc6c2012-06-22 20:30:35567 "omnibox-history-quick-provider-reorder-for-inlining",
568 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
569 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
570 kOsAll,
571 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
572 },
573 {
[email protected]032d5e6c2012-02-17 17:53:55574 "omnibox-inline-history-quick-provider",
575 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
576 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
577 kOsAll,
578 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
579 },
580 {
[email protected]7e7a28092011-12-09 22:24:55581 "enable-panels",
582 IDS_FLAGS_ENABLE_PANELS_NAME,
583 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]73fb1fc52011-07-09 00:06:54584 kOsAll,
[email protected]7e7a28092011-12-09 22:24:55585 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54586 },
[email protected]e3749d12011-07-25 22:22:12587 {
[email protected]27c14f02012-06-22 17:29:58588 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27589 "save-page-as-mhtml", // FLAGS:RECORD_UMA
590 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
591 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
592 kOsMac | kOsWin | kOsLinux,
593 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
594 },
595 {
[email protected]b7bb44f2011-09-01 05:17:03596 "enable-autologin",
597 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
598 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
599 kOsMac | kOsWin | kOsLinux,
600 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
601 },
[email protected]b9841172011-09-26 23:36:09602 {
[email protected]bbadb112011-12-12 16:55:28603 "enable-http-pipelining",
604 IDS_FLAGS_ENABLE_HTTP_PIPELINING_NAME,
605 IDS_FLAGS_ENABLE_HTTP_PIPELINING_DESCRIPTION,
606 kOsAll,
607 SINGLE_VALUE_TYPE(switches::kEnableHttpPipelining)
608 },
[email protected]d411c01d2011-10-18 16:00:27609 {
[email protected]3231b612012-03-23 05:57:54610 "enable-spdy3",
611 IDS_FLAGS_ENABLE_SPDY3_NAME,
612 IDS_FLAGS_ENABLE_SPDY3_DESCRIPTION,
613 kOsAll,
614 SINGLE_VALUE_TYPE(switches::kEnableSpdy3)
615 },
616 {
[email protected]27b3fe92012-03-21 05:35:06617 "enable-async-dns",
618 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
619 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46620 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]026876f32012-08-22 23:53:40621 MULTI_VALUE_TYPE(kAsyncDnsChoices)
[email protected]27b3fe92012-03-21 05:35:06622 },
623 {
[email protected]1eb93802012-09-11 18:57:56624 "disable-media-source",
[email protected]da43c082012-09-07 18:56:11625 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
626 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32627 kOsAll,
[email protected]da43c082012-09-07 18:56:11628 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]6aa03b32011-10-27 21:44:44629 },
[email protected]e4e68dbb2011-11-18 01:50:22630 {
[email protected]9f5b7822012-04-18 23:39:03631 "enable-encrypted-media",
632 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
633 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
634 kOsAll,
635 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
636 },
[email protected]dc04be7c2012-03-15 23:57:49637#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50638 {
[email protected]57b8bb352012-01-11 05:11:46639 "aura-google-dialog-frames",
640 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_NAME,
641 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_DESCRIPTION,
642 kOsWin | kOsLinux | kOsCrOS,
643 SINGLE_VALUE_TYPE(ash::switches::kAuraGoogleDialogFrames)
644 },
[email protected]cda278d2012-10-30 20:31:40645 {
646 "ash-disable-auto-window-placement",
647 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
648 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
649 kOsWin | kOsLinux | kOsCrOS,
650 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
651 },
[email protected]dc04be7c2012-03-15 23:57:49652#endif
[email protected]eaae8b462012-01-20 22:20:39653 {
[email protected]db543d322011-12-15 20:40:15654 "per-tile-painting",
655 IDS_FLAGS_PER_TILE_PAINTING_NAME,
656 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
657#if defined(USE_SKIA)
[email protected]a5b1b272012-01-06 20:44:37658 kOsMac | kOsLinux | kOsCrOS,
[email protected]db543d322011-12-15 20:40:15659#else
660 0,
661#endif
[email protected]65bfd9972012-10-19 03:39:37662 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15663 },
[email protected]bf88c032011-12-22 19:05:47664 {
665 "enable-javascript-harmony",
666 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
667 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
668 kOsAll,
669 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
670 },
[email protected]7e7f378a2012-01-05 14:35:37671 {
[email protected]85646172012-01-09 22:45:54672 "enable-tab-browser-dragging",
673 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
674 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
675 kOsWin,
676 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
677 },
678 {
[email protected]068b7b52012-02-27 12:41:44679 "disable-restore-session-state",
680 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
681 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37682 kOsAll,
[email protected]068b7b52012-02-27 12:41:44683 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37684 },
[email protected]88864db2012-01-18 20:56:35685 {
686 "disable-software-rasterizer",
687 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
688 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
689#if defined(ENABLE_SWIFTSHADER)
690 kOsAll,
691#else
692 0,
693#endif
694 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
695 },
[email protected]15a5d722012-01-23 09:11:14696 {
[email protected]ff7b6dd2012-09-15 20:20:03697 "enable-experimental-webkit-features",
698 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
699 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16700 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03701 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49702 },
703 {
[email protected]0f95a252012-09-13 22:30:04704 "enable-css-shaders",
705 IDS_FLAGS_CSS_SHADERS_NAME,
706 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
707 kOsAll,
708 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
709 },
710 {
[email protected]9860c68b2012-02-02 01:58:09711 "enable-extension-activity-ui",
712 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
713 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
714 kOsAll,
715 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00716 },
[email protected]54ae4e92012-02-16 15:19:05717 {
[email protected]3e8befc2012-03-13 01:17:03718 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16719 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
720 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
721 kOsAll,
[email protected]3e8befc2012-03-13 01:17:03722 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16723 },
[email protected]dc04be7c2012-03-15 23:57:49724#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01725 {
[email protected]3cd198a22012-03-12 20:38:01726 "enable-ash-oak",
727 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
728 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
729 kOsAll,
730 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
731 },
[email protected]31cf1c52012-02-29 20:55:01732#endif
[email protected]184ec592012-03-01 11:54:28733 {
734 "enable-devtools-experiments",
735 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
736 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
737 kOsAll,
738 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
739 },
[email protected]76d1854e2012-03-02 23:57:44740 {
741 "enable-suggestions-ntp",
742 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
743 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
744 kOsAll,
745 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
746 },
[email protected]a3d54252012-04-05 20:04:13747 {
[email protected]57890242012-10-23 17:46:52748 "force-sync-spellcheck",
749 IDS_FLAGS_FORCE_SYNC_SPELLCHECK,
750 IDS_FLAGS_FORCE_SYNC_SPELLCHECK_DESCRIPTION,
[email protected]37b928e2012-05-30 09:01:10751 kOsWin | kOsLinux | kOsCrOS,
[email protected]57890242012-10-23 17:46:52752 SINGLE_VALUE_TYPE(switches::kForceSyncSpellCheck)
[email protected]a3d54252012-04-05 20:04:13753 },
[email protected]c9c73ad42012-04-18 03:35:59754 {
755 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06756 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
757 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55758 kOsWin,
[email protected]347a0c72012-05-14 20:28:06759 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59760 },
[email protected]8a6aaa72012-04-20 20:53:58761 {
[email protected]f6f82832012-09-04 17:12:04762 "enable-webkit-text-subpixel-positioning",
763 IDS_FLAGS_ENABLE_WEBKIT_TEXT_SUBPIXEL_POSITIONING_NAME,
764 IDS_FLAGS_ENABLE_WEBKIT_TEXT_SUBPIXEL_POSITIONING_DESCRIPTION,
765 kOsCrOS,
[email protected]0d3b9dd2012-11-14 04:14:48766 SINGLE_VALUE_TYPE(gfx::switches::kEnableWebkitTextSubpixelPositioning)
[email protected]f6f82832012-09-04 17:12:04767 },
768 {
[email protected]8a6aaa72012-04-20 20:53:58769 "enable-touch-events",
770 IDS_ENABLE_TOUCH_EVENTS_NAME,
771 IDS_ENABLE_TOUCH_EVENTS_DESCRIPTION,
[email protected]223a31e42012-10-04 01:12:18772 kOsWin | kOsMac | kOsLinux,
[email protected]8a6aaa72012-04-20 20:53:58773 SINGLE_VALUE_TYPE(switches::kEnableTouchEvents)
774 },
[email protected]0b9383a2012-10-26 00:58:16775 {
776 "enable-tab-capture",
777 IDS_ENABLE_TAB_CAPTURE_NAME,
778 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25779 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]0b9383a2012-10-26 00:58:16780 MULTI_VALUE_TYPE(kTabCaptureChoices)
781 },
[email protected]0b60afa2012-04-19 17:36:39782#if defined(OS_CHROMEOS)
783 {
[email protected]7c4a9bc2012-09-11 22:10:05784 "enable-background-loader",
785 IDS_ENABLE_BACKLOADER_NAME,
786 IDS_ENABLE_BACKLOADER_DESCRIPTION,
787 kOsCrOS,
788 SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader)
789 },
790 {
[email protected]c5667b282012-08-31 00:32:50791 "enable-bezel-touch",
792 IDS_ENABLE_BEZEL_TOUCH_NAME,
793 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47794 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50795 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47796 },
797 {
[email protected]0b60afa2012-04-19 17:36:39798 "no-discard-tabs",
799 IDS_FLAGS_NO_DISCARD_TABS_NAME,
800 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
801 kOsCrOS,
802 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
803 },
804#endif
[email protected]79be6d32012-04-24 20:47:44805 {
[email protected]9a5940d2012-04-27 19:16:23806 "allow-nacl-socket-api",
807 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
808 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
809 kOsAll,
810 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
811 },
[email protected]85333732012-05-01 19:02:24812 {
[email protected]60673ad72012-05-02 06:16:33813 "stacked-tab-strip",
814 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
815 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
816 kOsWin,
817 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
818 },
819 {
[email protected]4bd20202012-06-14 17:35:01820 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24821 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
822 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
823 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01824 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24825 },
[email protected]190349fd2012-05-02 00:10:47826#if defined(OS_CHROMEOS)
827 {
828 "allow-touchpad-three-finger-click",
829 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
830 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
831 kOsCrOS,
832 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
833 },
[email protected]fbc176b62012-10-27 02:19:58834 {
835 "allow-touchpad-three-finger-swipe",
836 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
837 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
838 kOsCrOS,
839 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe)
840 },
[email protected]190349fd2012-05-02 00:10:47841#endif
[email protected]1992a2f42012-10-23 18:32:21842 {
843 "use-web-based-signin-flow",
844 IDS_FLAGS_USE_WEB_BASED_SIGNIN_FLOW_NAME,
845 IDS_FLAGS_USE_WEB_BASED_SIGNIN_FLOW_DESCRIPTION,
846 kOsMac | kOsWin | kOsLinux,
847 SINGLE_VALUE_TYPE(switches::kUseWebBasedSigninFlow)
848 },
[email protected]53520b1b2012-05-07 21:43:37849#if defined(USE_ASH)
850 {
[email protected]55444502012-05-10 15:43:53851 "show-launcher-alignment-menu",
852 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
853 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
854 kOsAll,
855 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
856 },
[email protected]817ecd12012-05-16 18:36:53857 {
[email protected]73074742012-05-17 01:44:41858 "show-touch-hud",
859 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
860 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
861 kOsAll,
862 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
863 },
864 {
[email protected]9f0940b62012-05-23 22:56:35865 "enable-pinch",
866 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
867 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
868 kOsAll,
869 SINGLE_VALUE_TYPE(switches::kEnablePinch),
870 },
[email protected]a8379312012-06-15 00:20:43871 {
872 "app-list-show-apps-only",
873 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME,
874 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION,
875 kOsAll,
[email protected]0bc6c272012-07-17 03:32:03876 SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly),
[email protected]a8379312012-06-15 00:20:43877 },
[email protected]73074742012-05-17 01:44:41878#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:28879#if defined(OS_CHROMEOS)
880 {
[email protected]e03dc78d2012-07-24 08:21:43881 "disable-new-oobe",
882 IDS_FLAGS_DISABLE_NEW_OOBE,
883 IDS_FLAGS_DISABLE_NEW_OOBE_DESCRIPTION,
[email protected]ed7b67f32012-05-28 10:12:28884 kOsCrOS,
[email protected]e03dc78d2012-07-24 08:21:43885 SINGLE_VALUE_TYPE(switches::kDisableNewOobe),
[email protected]ed7b67f32012-05-28 10:12:28886 },
[email protected]8b04a1652012-08-04 02:59:49887 {
[email protected]f59324d2012-09-17 19:41:47888 "disable-factory-reset",
889 IDS_FLAGS_DISABLE_FACTORY_RESET,
890 IDS_FLAGS_DISABLE_FACTORY_RESET_DESCRIPTION,
891 kOsCrOS,
892 SINGLE_VALUE_TYPE(switches::kDisableFactoryReset),
893 },
894 {
[email protected]8b04a1652012-08-04 02:59:49895 "disable-boot-animation",
896 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
897 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
898 kOsCrOS,
899 SINGLE_VALUE_TYPE(switches::kDisableBootAnimation),
900 },
[email protected]95058572012-08-20 14:57:29901 {
[email protected]b4557192012-09-19 11:29:58902 "disable-boot-animation2",
903 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
904 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
905 kOsCrOS,
906 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
907 },
908 {
[email protected]ea2f3342012-09-21 21:13:36909 "boot-animation-fucntion",
910 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
911 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
912 kOsCrOS,
913 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
914 },
[email protected]839667d62012-10-23 19:38:57915 {
[email protected]d96aef22012-10-30 11:47:02916 "captive-portal-detector",
917 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
918 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
919 kOsCrOS,
920 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
921 },
922 {
[email protected]839667d62012-10-23 19:38:57923 "new-lock-animations",
924 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
925 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
926 kOsCrOS,
927 SINGLE_VALUE_TYPE(ash::switches::kAshNewLockAnimationsEnabled),
928 },
[email protected]f0280952012-11-06 20:30:50929 {
[email protected]0fb5c4852012-11-08 20:33:23930 "file-manager-packaged",
931 IDS_FLAGS_FILE_MANAGER_PACKAGED_NAME,
932 IDS_FLAGS_FILE_MANAGER_PACKAGED_DESCRIPTION,
933 kOsCrOS,
934 SINGLE_VALUE_TYPE(switches::kFileManagerPackaged),
935 },
[email protected]ed7b67f32012-05-28 10:12:28936#endif
[email protected]fc7a93c2012-06-08 20:25:39937 {
938 "enable-views-textfield",
939 IDS_FLAGS_ENABLE_VIEWS_TEXTFIELD_NAME,
940 IDS_FLAGS_ENABLE_VIEWS_TEXTFIELD_DESCRIPTION,
941 kOsWin,
942 SINGLE_VALUE_TYPE(switches::kEnableViewsTextfield),
943 },
[email protected]bd0cd3bb2012-06-14 03:03:38944 {
[email protected]ef41b7ee2012-07-24 19:10:41945 "old-checkbox-style",
946 IDS_FLAGS_OLD_CHECKBOX_STYLE,
947 IDS_FLAGS_OLD_CHECKBOX_STYLE_DESCRIPTION,
948 kOsLinux | kOsCrOS,
949 SINGLE_VALUE_TYPE(switches::kOldCheckboxStyle),
950 },
951 {
[email protected]4e7d1a22012-11-06 13:57:03952 "enable-chrome-style-dialogs",
[email protected]fcb88de2012-07-12 22:25:32953 IDS_FLAGS_ENABLE_FRAMELESS_DIALOG_NAME,
954 IDS_FLAGS_ENABLE_FRAMELESS_DIALOG_DESCRIPTION,
955 kOsWin | kOsCrOS,
[email protected]4e7d1a22012-11-06 13:57:03956 SINGLE_VALUE_TYPE(switches::kEnableChromeStyleDialogs),
[email protected]fcb88de2012-07-12 22:25:32957 },
[email protected]7db8893a2012-07-26 00:49:40958 { "disable-accelerated-video-decode",
959 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
960 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]66dcb0492012-06-18 22:32:15961 kOsAll,
[email protected]7db8893a2012-07-26 00:49:40962 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:15963 },
[email protected]66ae9fc2012-06-19 21:33:52964#if defined(USE_ASH)
965 {
966 "ash-debug-shortcuts",
967 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
968 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
969 kOsAll,
970 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
971 },
972#endif
[email protected]37fee0942012-08-07 21:07:45973 {
[email protected]9a8e9352012-08-24 00:45:17974 "disable-website-settings", // FLAGS:RECORD_UMA
975 IDS_FLAGS_DISABLE_WEBSITE_SETTINGS_NAME,
976 IDS_FLAGS_DISABLE_WEBSITE_SETTINGS_DESCRIPTION,
[email protected]37fee0942012-08-07 21:07:45977 kOsAll,
[email protected]9a8e9352012-08-24 00:45:17978 SINGLE_VALUE_TYPE(switches::kDisableWebsiteSettings),
[email protected]37fee0942012-08-07 21:07:45979 },
[email protected]ad3f6d22012-08-29 02:34:19980 {
[email protected]e2e8e322012-09-12 04:37:02981 "enable-webaudio-input",
982 IDS_FLAGS_ENABLE_WEBAUDIO_INPUT_NAME,
983 IDS_FLAGS_ENABLE_WEBAUDIO_INPUT_DESCRIPTION,
984 kOsAll,
985 SINGLE_VALUE_TYPE(switches::kEnableWebAudioInput),
986 },
987 {
[email protected]ad3f6d22012-08-29 02:34:19988 "enable-contacts",
989 IDS_FLAGS_ENABLE_CONTACTS_NAME,
990 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
991 kOsCrOS,
992 SINGLE_VALUE_TYPE(switches::kEnableContacts)
993 },
[email protected]1d9bb9cd2012-08-28 22:02:50994#if defined(USE_ASH)
995 { "ash-enable-advanced-gestures",
996 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
997 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
998 kOsCrOS,
999 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1000 },
[email protected]51075f8c2012-11-13 01:48:161001 { "ash-enable-tab-scrubbing",
1002 IDS_FLAGS_ENABLE_TAB_SCRUBBING_NAME,
1003 IDS_FLAGS_ENABLE_TAB_SCRUBBING_DESCRIPTION,
1004 kOsCrOS,
1005 SINGLE_VALUE_TYPE(switches::kAshEnableTabScrubbing),
1006 },
[email protected]316708a2012-11-05 22:57:021007#if defined(OS_LINUX)
1008 { "ash-enable-memory-monitor",
1009 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1010 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1011 kOsCrOS,
1012 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1013 },
1014#endif
[email protected]1d9bb9cd2012-08-28 22:02:501015#endif
[email protected]9b7ab882012-09-10 23:46:361016#if defined(OS_CHROMEOS)
[email protected]badba1ad2012-11-16 17:21:461017 { "enable-new-network-handlers",
1018 IDS_FLAGS_ENABLE_NEW_NETWORK_HANDLERS_NAME,
1019 IDS_FLAGS_ENABLE_NEW_NETWORK_HANDLERS_DESCRIPTION,
1020 kOsCrOS,
1021 SINGLE_VALUE_TYPE(chromeos::switches::kEnableNewNetworkHandlers),
1022 },
[email protected]9b7ab882012-09-10 23:46:361023 {
[email protected]205f07892012-10-16 20:26:221024 "enable-carrier-switching",
1025 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1026 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1027 kOsCrOS,
1028 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1029 },
1030 {
[email protected]9b7ab882012-09-10 23:46:361031 "enable-request-tablet-site",
1032 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1033 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1034 kOsCrOS,
1035 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1036 },
1037#endif
[email protected]dab49c0b2012-10-04 05:55:351038 {
1039 "debug-packed-apps",
1040 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1041 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
1042 kOsAll,
1043 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1044 },
[email protected]d1459ed2012-10-10 01:29:331045 {
1046 "enable-password-generation",
1047 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1048 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
1049 kOsWin | kOsLinux | kOsCrOS,
1050 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1051 },
[email protected]26d045f2012-10-18 21:18:431052 {
1053 "crash-on-gpu-hang",
1054 IDS_FLAGS_CRASH_ON_GPU_HANG_NAME,
1055 IDS_FLAGS_CRASH_ON_GPU_HANG_DESCRIPTION,
1056 kOsAll,
1057 SINGLE_VALUE_TYPE(switches::kCrashOnGpuHang)
1058 },
[email protected]075543d2012-10-24 01:29:141059 {
[email protected]76f7d4882012-10-26 21:09:221060 "enable-deferred-image-decoding",
1061 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1062 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
1063#if defined(USE_SKIA)
1064 kOsMac | kOsLinux | kOsCrOS,
1065#else
1066 0,
1067#endif
1068 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1069 },
1070 {
[email protected]075543d2012-10-24 01:29:141071 "performance-monitor-gathering",
1072 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1073 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1074 kOsAll,
1075 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1076 },
[email protected]783d5bb2012-10-24 03:47:141077 {
[email protected]0572fb2e2012-11-03 00:38:591078 "enable-new-autofill-ui",
1079 IDS_FLAGS_ENABLE_NEW_AUTOFILL_UI_NAME,
1080 IDS_FLAGS_ENABLE_NEW_AUTOFILL_UI_DESCRIPTION,
1081 kOsWin | kOsLinux,
1082 SINGLE_VALUE_TYPE(switches::kEnableNewAutofillUi)
1083 },
1084 {
[email protected]783d5bb2012-10-24 03:47:141085 "enable-new-autofill-heuristics",
1086 IDS_FLAGS_ENABLE_NEW_AUTOFILL_HEURISTICS_NAME,
1087 IDS_FLAGS_ENABLE_NEW_AUTOFILL_HEURISTICS_DESCRIPTION,
1088 kOsAll,
1089 SINGLE_VALUE_TYPE(switches::kEnableNewAutofillHeuristics)
1090 },
[email protected]2c273bd2012-10-25 18:55:031091 {
1092 "enable-web-intents-invocation",
1093 IDS_FLAGS_WEB_INTENTS_INVOCATION_ENABLED_NAME,
1094 IDS_FLAGS_WEB_INTENTS_INVOCATION_ENABLED_DESCRIPTION,
1095 kOsAll,
1096 SINGLE_VALUE_TYPE(switches::kWebIntentsInvocationEnabled)
1097 },
[email protected]99002fd2012-11-06 04:35:521098 {
1099 "show-app-list-shortcut",
1100 IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_NAME,
1101 IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_DESCRIPTION,
1102 kOsWin,
1103 SINGLE_VALUE_TYPE(switches::kShowAppListShortcut)
1104 },
[email protected]a7259fb2012-11-08 06:22:231105 {
1106 "enable-experimental-form-filling",
1107 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1108 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1109 kOsWin | kOsCrOS,
1110 SINGLE_VALUE_TYPE(switches::kEnableExperimentalFormFilling)
1111 },
[email protected]aa75e4ed2012-11-08 23:51:511112 {
1113 "enable-interactive-autocomplete",
1114 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1115 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
1116 kOsWin | kOsCrOS,
1117 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1118 },
[email protected]a0e4b072011-08-17 01:47:071119};
[email protected]ad2a3ded2010-08-27 13:19:051120
[email protected]a314ee5a2010-10-26 21:23:281121const Experiment* experiments = kExperiments;
1122size_t num_experiments = arraysize(kExperiments);
1123
[email protected]e2ddbc92010-10-15 20:02:071124// Stores and encapsulates the little state that about:flags has.
1125class FlagsState {
1126 public:
1127 FlagsState() : needs_restart_(false) {}
1128 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1129 bool IsRestartNeededToCommitChanges();
1130 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281131 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071132 void RemoveFlagsSwitches(
1133 std::map<std::string, CommandLine::StringType>* switch_list);
1134 void reset();
1135
1136 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551137 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071138 return Singleton<FlagsState>::get();
1139 }
1140
1141 private:
1142 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531143 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071144
1145 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1146};
1147
[email protected]c7b7800a2010-10-07 18:51:351148// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]ad2a3ded2010-08-27 13:19:051149// in a set.
[email protected]1a47d7e2010-10-15 00:37:241150void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051151 const ListValue* enabled_experiments = prefs->GetList(
1152 prefs::kEnabledLabsExperiments);
1153 if (!enabled_experiments)
1154 return;
1155
1156 for (ListValue::const_iterator it = enabled_experiments->begin();
1157 it != enabled_experiments->end();
1158 ++it) {
1159 std::string experiment_name;
1160 if (!(*it)->GetAsString(&experiment_name)) {
1161 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1162 continue;
1163 }
1164 result->insert(experiment_name);
1165 }
1166}
1167
1168// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241169void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051170 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381171 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1172 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051173
1174 experiments_list->Clear();
1175 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1176 it != enabled_experiments.end();
1177 ++it) {
1178 experiments_list->Append(new StringValue(*it));
1179 }
1180}
1181
[email protected]8a6ff28d2010-12-02 16:35:191182// Returns the name used in prefs for the choice at the specified index.
1183std::string NameForChoice(const Experiment& e, int index) {
[email protected]2ce9c89752011-02-25 18:24:341184 DCHECK_EQ(Experiment::MULTI_VALUE, e.type);
1185 DCHECK_LT(index, e.num_choices);
[email protected]8a6ff28d2010-12-02 16:35:191186 return std::string(e.internal_name) + about_flags::testing::kMultiSeparator +
1187 base::IntToString(index);
1188}
1189
1190// Adds the internal names for the specified experiment to |names|.
1191void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1192 if (e.type == Experiment::SINGLE_VALUE) {
1193 names->insert(e.internal_name);
1194 } else {
[email protected]2ce9c89752011-02-25 18:24:341195 DCHECK_EQ(Experiment::MULTI_VALUE, e.type);
[email protected]8a6ff28d2010-12-02 16:35:191196 for (int i = 0; i < e.num_choices; ++i)
1197 names->insert(NameForChoice(e, i));
1198 }
1199}
1200
[email protected]28e35af2011-02-09 12:56:221201// Confirms that an experiment is valid, used in a DCHECK in
1202// SanitizeList below.
1203bool ValidateExperiment(const Experiment& e) {
1204 switch (e.type) {
1205 case Experiment::SINGLE_VALUE:
1206 DCHECK_EQ(0, e.num_choices);
1207 DCHECK(!e.choices);
1208 break;
1209 case Experiment::MULTI_VALUE:
1210 DCHECK_GT(e.num_choices, 0);
1211 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531212 DCHECK(e.choices[0].command_line_switch);
1213 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221214 break;
1215 default:
1216 NOTREACHED();
1217 }
1218 return true;
1219}
1220
[email protected]ad2a3ded2010-08-27 13:19:051221// Removes all experiments from prefs::kEnabledLabsExperiments that are
1222// unknown, to prevent this list to become very long as experiments are added
1223// and removed.
1224void SanitizeList(PrefService* prefs) {
1225 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221226 for (size_t i = 0; i < num_experiments; ++i) {
1227 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191228 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221229 }
[email protected]ad2a3ded2010-08-27 13:19:051230
1231 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241232 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051233
1234 std::set<std::string> new_enabled_experiments;
1235 std::set_intersection(
1236 known_experiments.begin(), known_experiments.end(),
1237 enabled_experiments.begin(), enabled_experiments.end(),
1238 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1239
[email protected]4c8853f2012-07-23 01:29:161240 if (new_enabled_experiments != enabled_experiments)
1241 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051242}
1243
[email protected]1a47d7e2010-10-15 00:37:241244void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051245 PrefService* prefs, std::set<std::string>* result) {
1246 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241247 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051248}
1249
[email protected]a314ee5a2010-10-26 21:23:281250// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1251// enabled on the current platform.
1252void GetSanitizedEnabledFlagsForCurrentPlatform(
1253 PrefService* prefs, std::set<std::string>* result) {
1254 GetSanitizedEnabledFlags(prefs, result);
1255
1256 // Filter out any experiments that aren't enabled on the current platform. We
1257 // don't remove these from prefs else syncing to a platform with a different
1258 // set of experiments would be lossy.
1259 std::set<std::string> platform_experiments;
1260 int current_platform = GetCurrentPlatform();
1261 for (size_t i = 0; i < num_experiments; ++i) {
1262 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191263 AddInternalName(experiments[i], &platform_experiments);
[email protected]a314ee5a2010-10-26 21:23:281264 }
1265
1266 std::set<std::string> new_enabled_experiments;
1267 std::set_intersection(
1268 platform_experiments.begin(), platform_experiments.end(),
1269 result->begin(), result->end(),
1270 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1271
1272 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051273}
1274
[email protected]8a6ff28d2010-12-02 16:35:191275// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191276Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221277 const std::set<std::string>& enabled_experiments) {
[email protected]2ce9c89752011-02-25 18:24:341278 DCHECK_EQ(Experiment::MULTI_VALUE, experiment.type);
[email protected]8a6ff28d2010-12-02 16:35:191279 ListValue* result = new ListValue;
1280 for (int i = 0; i < experiment.num_choices; ++i) {
1281 const Experiment::Choice& choice = experiment.choices[i];
1282 DictionaryValue* value = new DictionaryValue;
1283 std::string name = NameForChoice(experiment, i);
1284 value->SetString("description",
1285 l10n_util::GetStringUTF16(choice.description_id));
1286 value->SetString("internal_name", name);
[email protected]28e35af2011-02-09 12:56:221287 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191288 result->Append(value);
1289 }
1290 return result;
1291}
1292
[email protected]e2ddbc92010-10-15 20:02:071293} // namespace
1294
[email protected]1a47d7e2010-10-15 00:37:241295void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551296 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051297}
1298
[email protected]1a47d7e2010-10-15 00:37:241299ListValue* GetFlagsExperimentsData(PrefService* prefs) {
[email protected]ad2a3ded2010-08-27 13:19:051300 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241301 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051302
1303 int current_platform = GetCurrentPlatform();
1304
1305 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281306 for (size_t i = 0; i < num_experiments; ++i) {
1307 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051308
1309 DictionaryValue* data = new DictionaryValue();
1310 data->SetString("internal_name", experiment.internal_name);
1311 data->SetString("name",
1312 l10n_util::GetStringUTF16(experiment.visible_name_id));
1313 data->SetString("description",
1314 l10n_util::GetStringUTF16(
1315 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401316 bool supported = !!(experiment.supported_platforms & current_platform);
1317 data->SetBoolean("supported", supported);
1318
1319 ListValue* supported_platforms = new ListValue();
1320 AddOsStrings(experiment.supported_platforms, supported_platforms);
1321 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051322
[email protected]28e35af2011-02-09 12:56:221323 switch (experiment.type) {
1324 case Experiment::SINGLE_VALUE:
1325 data->SetBoolean(
1326 "enabled",
1327 enabled_experiments.count(experiment.internal_name) > 0);
1328 break;
1329 case Experiment::MULTI_VALUE:
1330 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1331 break;
1332 default:
1333 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191334 }
1335
[email protected]ad2a3ded2010-08-27 13:19:051336 experiments_data->Append(data);
1337 }
1338 return experiments_data;
1339}
1340
[email protected]ad2a3ded2010-08-27 13:19:051341bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551342 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051343}
1344
1345void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351346 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551347 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071348}
1349
1350void RemoveFlagsSwitches(
1351 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551352 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071353}
1354
[email protected]a314ee5a2010-10-26 21:23:281355int GetCurrentPlatform() {
1356#if defined(OS_MACOSX)
1357 return kOsMac;
1358#elif defined(OS_WIN)
1359 return kOsWin;
1360#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1361 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211362#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281363 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401364#elif defined(OS_ANDROID)
1365 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281366#else
1367#error Unknown platform
1368#endif
1369}
1370
[email protected]4bc5050c2010-11-18 17:55:541371void RecordUMAStatistics(const PrefService* prefs) {
1372 std::set<std::string> flags;
1373 GetEnabledFlags(prefs, &flags);
1374 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1375 ++it) {
1376 std::string action("AboutFlags_");
1377 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381378 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541379 }
1380 // Since flag metrics are recorded every startup, add a tick so that the
1381 // stats can be made meaningful.
1382 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381383 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1384 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541385}
1386
[email protected]e2ddbc92010-10-15 20:02:071387//////////////////////////////////////////////////////////////////////////////
1388// FlagsState implementation.
1389
1390namespace {
1391
1392void FlagsState::ConvertFlagsToSwitches(
1393 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071394 if (command_line->HasSwitch(switches::kNoExperiments))
1395 return;
1396
1397 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001398
[email protected]a314ee5a2010-10-26 21:23:281399 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071400
[email protected]a82744532011-02-11 16:15:531401 typedef std::map<std::string, std::pair<std::string, std::string> >
1402 NameToSwitchAndValueMap;
1403 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191404 for (size_t i = 0; i < num_experiments; ++i) {
1405 const Experiment& e = experiments[i];
1406 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]a82744532011-02-11 16:15:531407 name_to_switch_map[e.internal_name] =
1408 std::pair<std::string, std::string>(e.command_line_switch,
1409 e.command_line_value);
[email protected]8a6ff28d2010-12-02 16:35:191410 } else {
1411 for (int j = 0; j < e.num_choices; ++j)
[email protected]a82744532011-02-11 16:15:531412 name_to_switch_map[NameForChoice(e, j)] =
1413 std::pair<std::string, std::string>(
1414 e.choices[j].command_line_switch,
1415 e.choices[j].command_line_value);
[email protected]8a6ff28d2010-12-02 16:35:191416 }
1417 }
[email protected]e2ddbc92010-10-15 20:02:071418
1419 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531420 flags_switches_.insert(
1421 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1422 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071423 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1424 it != enabled_experiments.end();
1425 ++it) {
1426 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531427 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191428 name_to_switch_map.find(experiment_name);
1429 if (name_to_switch_it == name_to_switch_map.end()) {
1430 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071431 continue;
[email protected]8a6ff28d2010-12-02 16:35:191432 }
[email protected]e2ddbc92010-10-15 20:02:071433
[email protected]a82744532011-02-11 16:15:531434 const std::pair<std::string, std::string>&
1435 switch_and_value_pair = name_to_switch_it->second;
1436
1437 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1438 switch_and_value_pair.second);
1439 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071440 }
1441 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531442 flags_switches_.insert(
1443 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1444 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071445}
1446
1447bool FlagsState::IsRestartNeededToCommitChanges() {
1448 return needs_restart_;
1449}
1450
1451void FlagsState::SetExperimentEnabled(
1452 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]ad2a3ded2010-08-27 13:19:051453 needs_restart_ = true;
1454
[email protected]8a6ff28d2010-12-02 16:35:191455 size_t at_index = internal_name.find(about_flags::testing::kMultiSeparator);
1456 if (at_index != std::string::npos) {
1457 DCHECK(enable);
1458 // We're being asked to enable a multi-choice experiment. Disable the
1459 // currently selected choice.
1460 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221461 const std::string experiment_name = internal_name.substr(0, at_index);
1462 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191463
[email protected]28e35af2011-02-09 12:56:221464 // And enable the new choice, if it is not the default first choice.
1465 if (internal_name != experiment_name + "@0") {
1466 std::set<std::string> enabled_experiments;
1467 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
1468 enabled_experiments.insert(internal_name);
1469 SetEnabledFlags(prefs, enabled_experiments);
1470 }
[email protected]8a6ff28d2010-12-02 16:35:191471 return;
1472 }
1473
[email protected]ad2a3ded2010-08-27 13:19:051474 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241475 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051476
[email protected]8a6ff28d2010-12-02 16:35:191477 const Experiment* e = NULL;
1478 for (size_t i = 0; i < num_experiments; ++i) {
1479 if (experiments[i].internal_name == internal_name) {
1480 e = experiments + i;
1481 break;
1482 }
1483 }
1484 DCHECK(e);
1485
1486 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591487 if (enable)
[email protected]8a6ff28d2010-12-02 16:35:191488 enabled_experiments.insert(internal_name);
[email protected]8a2713682011-08-19 10:36:591489 else
[email protected]8a6ff28d2010-12-02 16:35:191490 enabled_experiments.erase(internal_name);
1491 } else {
1492 if (enable) {
1493 // Enable the first choice.
1494 enabled_experiments.insert(NameForChoice(*e, 0));
1495 } else {
1496 // Find the currently enabled choice and disable it.
1497 for (int i = 0; i < e->num_choices; ++i) {
1498 std::string choice_name = NameForChoice(*e, i);
1499 if (enabled_experiments.find(choice_name) !=
1500 enabled_experiments.end()) {
1501 enabled_experiments.erase(choice_name);
1502 // Continue on just in case there's a bug and more than one
1503 // experiment for this choice was enabled.
1504 }
1505 }
1506 }
1507 }
[email protected]ad2a3ded2010-08-27 13:19:051508
[email protected]1a47d7e2010-10-15 00:37:241509 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051510}
1511
[email protected]e2ddbc92010-10-15 20:02:071512void FlagsState::RemoveFlagsSwitches(
1513 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531514 for (std::map<std::string, std::string>::const_iterator
1515 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1516 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071517 }
1518}
1519
1520void FlagsState::reset() {
1521 needs_restart_ = false;
1522 flags_switches_.clear();
1523}
1524
[email protected]38e46812011-05-09 20:49:221525} // namespace
[email protected]e2ddbc92010-10-15 20:02:071526
1527namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191528
1529// WARNING: '@' is also used in the html file. If you update this constant you
1530// also need to update the html file.
1531const char kMultiSeparator[] = "@";
1532
[email protected]e2ddbc92010-10-15 20:02:071533void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551534 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071535}
[email protected]a314ee5a2010-10-26 21:23:281536
1537void SetExperiments(const Experiment* e, size_t count) {
1538 if (!e) {
1539 experiments = kExperiments;
1540 num_experiments = arraysize(kExperiments);
1541 } else {
1542 experiments = e;
1543 num_experiments = count;
1544 }
1545}
1546
[email protected]8a6ff28d2010-12-02 16:35:191547const Experiment* GetExperiments(size_t* count) {
1548 *count = num_experiments;
1549 return experiments;
1550}
1551
[email protected]e2ddbc92010-10-15 20:02:071552} // namespace testing
1553
[email protected]1a47d7e2010-10-15 00:37:241554} // namespace about_flags