blob: 4129e6fdd0b08469870ac155079188621ef4c546 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
[email protected]1fd1f292013-03-23 23:08:407#include <string.h>
8
[email protected]ad2a3ded2010-08-27 13:19:059#include <algorithm>
10#include <iterator>
11#include <map>
12#include <set>
[email protected]83e9fa702013-02-25 19:30:4413#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0514
[email protected]7d1d2092013-03-04 04:12:4315#include "apps/switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0516#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1517#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5718#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4119#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5222#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3823#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0324#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "chrome/common/chrome_switches.h"
[email protected]1fd1f292013-03-23 23:08:4026#include "chrome/common/chrome_version_info.h"
[email protected]ad2a3ded2010-08-27 13:19:0527#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3828#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0229#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0530#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0231#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0232#include "media/base/media_switches.h"
[email protected]0bc6c272012-07-17 03:32:0333#include "ui/app_list/app_list_switches.h"
[email protected]c051a1b2011-01-21 23:30:1734#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5935#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4836#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2737#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2438#include "ui/keyboard/keyboard_switches.h"
[email protected]8b1c3c72013-01-25 01:48:4339#include "ui/surface/surface_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0540
[email protected]f1c39242013-01-29 16:13:0141#if defined(ENABLE_MESSAGE_CENTER)
42#include "ui/message_center/message_center_switches.h"
43#endif
44
[email protected]dc04be7c2012-03-15 23:57:4945#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3146#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4947#endif
48
[email protected]badba1ad2012-11-16 17:21:4649#if defined(OS_CHROMEOS)
50#include "chromeos/chromeos_switches.h"
51#endif
52
[email protected]7f6f44c2011-12-14 13:23:3853using content::UserMetricsAction;
54
[email protected]1a47d7e2010-10-15 00:37:2455namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0556
[email protected]8a6ff28d2010-12-02 16:35:1957// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5358#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4459 Experiment::SINGLE_VALUE, \
60 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5361#define SINGLE_VALUE_TYPE(command_line_switch) \
62 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4463#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
64 disable_switch, disable_value) \
65 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
66 disable_switch, disable_value, NULL, 3
67#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
68 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5369#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4470 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1971
[email protected]e2ddbc92010-10-15 20:02:0772namespace {
73
[email protected]9c7453d2012-01-21 00:45:4074const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5675const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0576
[email protected]cc3e2052011-12-20 01:01:4077// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
78// whether the experiment is available on that platform.
79void AddOsStrings(unsigned bitmask, ListValue* list) {
80 struct {
81 unsigned bit;
82 const char* const name;
83 } kBitsToOs[] = {
84 {kOsMac, "Mac"},
85 {kOsWin, "Windows"},
86 {kOsLinux, "Linux"},
87 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0188 {kOsAndroid, "Android"},
[email protected]cc3e2052011-12-20 01:01:4089 };
90 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
91 if (bitmask & kBitsToOs[i].bit)
92 list->Append(new StringValue(kBitsToOs[i].name));
93}
94
[email protected]68317802012-06-07 19:13:2395const Experiment::Choice kOmniboxHistoryQuickProviderNewScoringChoices[] = {
96 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC, "", "" },
97 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED,
98 switches::kOmniboxHistoryQuickProviderNewScoring,
99 switches::kOmniboxHistoryQuickProviderNewScoringEnabled },
100 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED,
101 switches::kOmniboxHistoryQuickProviderNewScoring,
102 switches::kOmniboxHistoryQuickProviderNewScoringDisabled }
103};
104
[email protected]128dc6c2012-06-22 20:30:35105const Experiment::Choice
106 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
107 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
108 "",
109 "" },
110 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
111 switches::kOmniboxHistoryQuickProviderReorderForInlining,
112 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
113 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
114 switches::kOmniboxHistoryQuickProviderReorderForInlining,
115 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
116};
117
[email protected]032d5e6c2012-02-17 17:53:55118const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
119 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
120 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
121 switches::kOmniboxInlineHistoryQuickProvider,
122 switches::kOmniboxInlineHistoryQuickProviderAllowed },
123 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
124 switches::kOmniboxInlineHistoryQuickProvider,
125 switches::kOmniboxInlineHistoryQuickProviderProhibited }
126};
127
[email protected]fb854192013-02-06 01:30:04128const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
129 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
130 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
131 switches::kEnableCompositingForFixedPosition, ""},
132 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
133 switches::kDisableCompositingForFixedPosition, ""},
134 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
135 switches::kEnableHighDpiCompositingForFixedPosition, ""}
136};
137
[email protected]8b1c3c72013-01-25 01:48:43138const Experiment::Choice kGDIPresentChoices[] = {
139 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
140 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
141 switches::kDoFirstShowPresentWithGDI, ""},
142 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
143 switches::kDoAllShowPresentWithGDI, ""}
144};
145
[email protected]d7932532012-11-21 21:10:31146const Experiment::Choice kTouchEventsChoices[] = {
147 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
148 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
149 switches::kTouchEvents,
150 switches::kTouchEventsEnabled },
151 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
152 switches::kTouchEvents,
153 switches::kTouchEventsDisabled }
154};
155
[email protected]347a0c72012-05-14 20:28:06156const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31157 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20158 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06159 switches::kTouchOptimizedUI,
160 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20161 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06162 switches::kTouchOptimizedUI,
163 switches::kTouchOptimizedUIDisabled }
164};
165
[email protected]66f409c2012-10-04 20:59:04166const Experiment::Choice kNaClDebugMaskChoices[] = {
167 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
168 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
169 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
170 // an option to switch off its debugging.
171 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
172 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
173 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
174 switches::kNaClDebugMask, "*://*/*debug.nmf" }
175};
176
[email protected]ea2f3342012-09-21 21:13:36177#if defined(OS_CHROMEOS)
178const Experiment::Choice kAshBootAnimationFunction[] = {
179 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
180 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2,
181 ash::switches::kAshBootAnimationFunction2, ""},
182 { IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3,
183 ash::switches::kAshBootAnimationFunction3, ""}
184};
[email protected]d96aef22012-10-30 11:47:02185
186const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]ad2fe9f2012-11-15 11:03:19187 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
[email protected]d96aef22012-10-30 11:47:02188 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]ad2fe9f2012-11-15 11:03:19189 switches::kEnableChromeCaptivePortalDetector, ""},
190 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
191 switches::kDisableChromeCaptivePortalDetector, ""}
[email protected]d96aef22012-10-30 11:47:02192};
[email protected]a78c7432013-03-13 06:22:43193
[email protected]ea2f3342012-09-21 21:13:36194#endif
195
[email protected]9323fdd12013-02-23 00:31:36196const Experiment::Choice kImplSidePaintingChoices[] = {
197 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
198 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
199 cc::switches::kEnableImplSidePainting, ""},
200 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
201 cc::switches::kDisableImplSidePainting, ""}
202};
203
[email protected]a42c85f2013-04-04 18:15:12204const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
205 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
206 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
207 cc::switches::kMaxTilesForInterestArea, "64"},
208 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
209 cc::switches::kMaxTilesForInterestArea, "128"},
210 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
211 cc::switches::kMaxTilesForInterestArea, "256"},
212 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
213 cc::switches::kMaxTilesForInterestArea, "512"}
214};
215
[email protected]38484df12013-04-10 16:42:03216const Experiment::Choice kSimpleCacheBackendChoices[] = {
217 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", "off" },
218 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
219 switches::kUseSimpleCacheBackend, "on"}
220};
221
[email protected]4bc5050c2010-11-18 17:55:54222// RECORDING USER METRICS FOR FLAGS:
223// -----------------------------------------------------------------------------
224// The first line of the experiment is the internal name. If you'd like to
225// gather statistics about the usage of your flag, you should append a marker
226// comment to the end of the feature name, like so:
227// "my-special-feature", // FLAGS:RECORD_UMA
228//
229// After doing that, run //chrome/tools/extract_actions.py (see instructions at
230// the top of that file for details) to update the chromeactions.txt file, which
231// will enable UMA to record your feature flag.
232//
[email protected]783d5bb2012-10-24 03:47:14233// After your feature has shipped under a flag, you can locate the metrics under
234// the action name AboutFlags_internal-action-name. Actions are recorded once
235// per startup, so you should divide this number by AboutFlags_StartupTick to
236// get a sense of usage. Note that this will not be the same as number of users
237// with a given feature enabled because users can quit and relaunch the
238// application multiple times over a given time interval. The dashboard also
239// shows you how many (metrics reporting) users have enabled the flag over the
240// last seven days. However, note that this is not the same as the number of
241// users who have the flag enabled, since enabling the flag happens once,
242// whereas running with the flag enabled happens until the user flips the flag
243// again.
[email protected]4bc5050c2010-11-18 17:55:54244
[email protected]8a6ff28d2010-12-02 16:35:19245// To add a new experiment add to the end of kExperiments. There are two
246// distinct types of experiments:
247// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
248// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22249// . MULTI_VALUE: a list of choices, the first of which should correspond to a
250// deactivated state for this lab (i.e. no command line option). To specify
251// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
252// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19253// See the documentation of Experiment for details on the fields.
254//
255// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05256const Experiment kExperiments[] = {
[email protected]270f0342013-02-20 01:19:44257#if defined(OS_ANDROID)
258 {
[email protected]199def22013-02-21 17:52:29259 "enable-spdy-proxy-auth",
260 IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME,
261 IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION,
[email protected]270f0342013-02-20 01:19:44262 kOsAndroid,
[email protected]199def22013-02-21 17:52:29263 SINGLE_VALUE_TYPE(switches::kEnableSpdyProxyAuth)
[email protected]270f0342013-02-20 01:19:44264 },
265#endif
[email protected]ad2a3ded2010-08-27 13:19:05266 {
[email protected]aac169d2011-03-18 19:53:03267 "expose-for-tabs", // FLAGS:RECORD_UMA
268 IDS_FLAGS_TABPOSE_NAME,
269 IDS_FLAGS_TABPOSE_DESCRIPTION,
270 kOsMac,
271#if defined(OS_MACOSX)
272 // The switch exists only on OS X.
273 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
274#else
275 SINGLE_VALUE_TYPE("")
276#endif
277 },
278 {
[email protected]4bc5050c2010-11-18 17:55:54279 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05280 IDS_FLAGS_CONFLICTS_CHECK_NAME,
281 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
282 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19283 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05284 },
285 {
[email protected]4bc5050c2010-11-18 17:55:54286 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54287 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
288 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45289 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22290 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31291 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22292 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
293 // always have PDF rasterization available, so no flag needed there.
294#if !defined(GOOGLE_CHROME_BUILD)
295 kOsWin,
296#else
297 0,
[email protected]fa6d2a2f2010-11-30 21:47:19298#endif
[email protected]8a6ff28d2010-12-02 16:35:19299 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42300 },
[email protected]60d77bd2012-08-22 00:10:07301#if defined(OS_WIN)
302 {
303 "print-raster",
304 IDS_FLAGS_PRINT_RASTER_NAME,
305 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
306 kOsWin,
307 SINGLE_VALUE_TYPE(switches::kPrintRaster)
308 },
309#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05310 {
[email protected]96c6f4c2011-05-18 19:36:22311 "ignore-gpu-blacklist",
312 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
313 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
314 kOsAll,
315 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
316 },
317 {
[email protected]0110cf112011-07-02 00:39:43318 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22319 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
320 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23321 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44322 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
323 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22324 },
325 {
[email protected]72787e392012-03-23 05:55:43326 "threaded-compositing-mode",
327 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
328 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56329 kOsDesktop & ~kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44330 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
331 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59332 },
333 {
[email protected]17e27692013-02-06 17:02:09334 "force-accelerated-composited-scrolling",
335 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
336 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
337 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44338 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
339 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09340 },
341 {
[email protected]8b1c3c72013-01-25 01:48:43342 "present-with-GDI",
343 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
344 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
345 kOsWin,
346 MULTI_VALUE_TYPE(kGDIPresentChoices)
347 },
348 {
[email protected]81c64af62012-06-06 20:15:52349 "disable-accelerated-2d-canvas",
350 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
351 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
352 kOsAll,
353 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
354 },
355 {
[email protected]efcde132012-05-30 01:05:18356 "disable-threaded-animation",
357 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
358 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59359 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37360 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59361 },
362 {
[email protected]5963b772011-02-09 22:55:38363 "composited-layer-borders",
364 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
365 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
366 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57367 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38368 },
369 {
[email protected]a8f1eaa2011-03-07 19:00:58370 "show-fps-counter",
371 IDS_FLAGS_SHOW_FPS_COUNTER,
372 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
373 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57374 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58375 },
[email protected]8ff7f342011-05-25 01:49:47376 {
[email protected]70c98a332011-12-21 20:51:52377 "accelerated-filters",
378 IDS_FLAGS_ACCELERATED_FILTERS,
379 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
380 kOsAll,
381 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
382 },
383 {
[email protected]8ff7f342011-05-25 01:49:47384 "disable-gpu-vsync",
385 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
386 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56387 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47388 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
389 },
[email protected]deaba6d52011-09-23 14:47:12390 {
[email protected]4052d832013-01-16 05:31:01391 "enable-webgl",
392 IDS_FLAGS_ENABLE_WEBGL_NAME,
393 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
394 kOsAndroid,
395#if defined(OS_ANDROID)
396 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
397#else
398 SINGLE_VALUE_TYPE("")
399#endif
400 },
401 {
[email protected]deaba6d52011-09-23 14:47:12402 "disable-webgl",
403 IDS_FLAGS_DISABLE_WEBGL_NAME,
404 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56405 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01406#if defined(OS_ANDROID)
407 SINGLE_VALUE_TYPE("")
408#else
[email protected]deaba6d52011-09-23 14:47:12409 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01410#endif
[email protected]deaba6d52011-09-23 14:47:12411 },
[email protected]09096e02012-05-24 11:12:04412 {
[email protected]ce585bf2013-03-14 16:25:16413 "disable-webrtc",
414 IDS_FLAGS_DISABLE_WEBRTC_NAME,
415 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05416 kOsAndroid,
417#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16418 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05419#else
420 SINGLE_VALUE_TYPE("")
421#endif
422 },
423 {
[email protected]96bcdc102012-05-24 23:42:10424 "fixed-position-creates-stacking-context",
425 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
426 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
427 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44428 ENABLE_DISABLE_VALUE_TYPE(
429 switches::kEnableFixedPositionCreatesStackingContext,
430 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10431 },
[email protected]fb854192013-02-06 01:30:04432 {
433 "enable-compositing-for-fixed-position",
434 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
435 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
436 kOsAll,
437 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
438 },
[email protected]a7640ef22012-10-06 00:52:08439 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53440 {
[email protected]e3791ce92011-08-09 01:03:32441 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40442 IDS_FLAGS_ENABLE_NACL_NAME,
443 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56444 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19445 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40446 },
[email protected]b39c6d92012-01-31 16:38:41447 // TODO(halyavin): When exception handling is on by default, replace this
448 // flag with disable-nacl-exception-handling.
449 {
450 "enable-nacl-exception-handling", // FLAGS:RECORD_UMA
451 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_NAME,
452 IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56453 kOsDesktop,
[email protected]b39c6d92012-01-31 16:38:41454 SINGLE_VALUE_TYPE(switches::kEnableNaClExceptionHandling)
455 },
[email protected]4ff87d202010-11-06 01:28:40456 {
[email protected]9addd1c2012-09-15 14:28:24457 "enable-nacl-debug", // FLAGS:RECORD_UMA
458 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
459 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56460 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24461 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13462 },
463 {
[email protected]66f409c2012-10-04 20:59:04464 "nacl-debug-mask", // FLAGS:RECORD_UMA
465 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
466 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56467 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04468 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
469 },
470 {
[email protected]7babd1c2012-08-08 20:35:29471 "enable-pnacl", // FLAGS:RECORD_UMA
472 IDS_FLAGS_ENABLE_PNACL_NAME,
473 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56474 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29475 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
476 },
477 {
[email protected]4bc5050c2010-11-18 17:55:54478 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32479 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
480 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56481 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19482 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32483 },
[email protected]3627b06d2010-11-12 16:36:16484 {
[email protected]ac2e2acd2013-03-21 12:57:29485 "extensions-on-chrome-urls",
486 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
487 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
488 kOsAll,
489 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
490 },
491 {
[email protected]e9cddd52013-03-23 17:37:53492 "enable-adview",
493 IDS_FLAGS_ENABLE_ADVIEW_NAME,
494 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
495 kOsDesktop,
496 SINGLE_VALUE_TYPE(switches::kEnableAdview)
497 },
498 {
499 "enable-adview-src-attribute",
500 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
501 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
502 kOsDesktop,
503 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
504 },
505 {
[email protected]544471a2012-10-13 05:27:09506 "action-box",
[email protected]cab18ef2012-04-27 07:22:03507 IDS_FLAGS_ACTION_BOX_NAME,
508 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56509 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44510 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
511 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03512 },
513 {
[email protected]3a362432012-06-18 20:39:51514 "script-badges",
515 IDS_FLAGS_SCRIPT_BADGES_NAME,
516 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56517 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09518 SINGLE_VALUE_TYPE(switches::kScriptBadges)
519 },
520 {
521 "script-bubble",
522 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
523 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56524 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44525 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
526 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51527 },
528 {
[email protected]cbe224d2011-08-04 22:12:49529 "apps-new-install-bubble",
530 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
531 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56532 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49533 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
534 },
535 {
[email protected]80bd24e2010-11-30 09:34:38536 "disable-hyperlink-auditing",
537 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
538 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
539 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19540 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51541 },
542 {
543 "experimental-location-features", // FLAGS:RECORD_UMA
544 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
545 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
546 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19547 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
548 },
549 {
[email protected]5aea1862011-03-23 23:55:39550 "tab-groups-context-menu",
551 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
552 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
553 kOsWin,
554 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
555 },
[email protected]c94cebd2012-06-21 00:55:28556 {
557 "enable-instant-extended-api",
558 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
559 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56560 kOsDesktop,
[email protected]73444382013-02-26 19:31:51561 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
562 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28563 },
[email protected]e9bf9d92011-03-31 20:57:15564 {
[email protected]354e33b2011-06-15 00:29:10565 "static-ip-config",
566 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
567 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
568 kOsCrOS,
569#if defined(OS_CHROMEOS)
570 // This switch exists only on Chrome OS.
571 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
572#else
573 SINGLE_VALUE_TYPE("")
574#endif
575 },
[email protected]3eb5728c2011-06-20 22:32:24576 {
577 "show-autofill-type-predictions",
578 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
579 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
580 kOsAll,
[email protected]e217c5632013-04-12 19:11:48581 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24582 },
[email protected]bff4d3e2011-06-21 23:58:52583 {
[email protected]a5e9faa2013-03-19 09:58:38584 "enable-sync-favicons",
585 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
586 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55587 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38588 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55589 },
590 {
[email protected]5d90a0a2012-11-15 02:43:40591 "sync-keystore-encryption",
592 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
593 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
594 kOsAll,
595 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
596 },
597 {
[email protected]e755a382012-09-13 17:16:35598 "enable-gesture-tap-highlight",
599 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
600 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
601 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47602 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
603 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35604 },
605 {
[email protected]a22ebd812011-06-23 00:05:39606 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
607 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
608 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
609 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40610 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25611 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39612 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
613 },
[email protected]81a6b0b2011-06-24 17:55:40614 {
[email protected]68317802012-06-07 19:13:23615 "omnibox-history-quick-provider-new-scoring",
616 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME,
617 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION,
618 kOsAll,
619 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices)
620 },
621 {
[email protected]128dc6c2012-06-22 20:30:35622 "omnibox-history-quick-provider-reorder-for-inlining",
623 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
624 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
625 kOsAll,
626 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
627 },
628 {
[email protected]032d5e6c2012-02-17 17:53:55629 "omnibox-inline-history-quick-provider",
630 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
631 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
632 kOsAll,
633 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
634 },
635 {
[email protected]7e7a28092011-12-09 22:24:55636 "enable-panels",
637 IDS_FLAGS_ENABLE_PANELS_NAME,
638 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56639 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55640 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54641 },
[email protected]e3749d12011-07-25 22:22:12642 {
[email protected]27c14f02012-06-22 17:29:58643 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27644 "save-page-as-mhtml", // FLAGS:RECORD_UMA
645 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
646 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
647 kOsMac | kOsWin | kOsLinux,
648 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
649 },
650 {
[email protected]b7bb44f2011-09-01 05:17:03651 "enable-autologin",
652 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
653 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
654 kOsMac | kOsWin | kOsLinux,
655 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
656 },
[email protected]b9841172011-09-26 23:36:09657 {
[email protected]14371cb2013-03-21 07:46:12658 "enable-spdy31",
659 IDS_FLAGS_ENABLE_SPDY31_NAME,
660 IDS_FLAGS_ENABLE_SPDY31_DESCRIPTION,
[email protected]3231b612012-03-23 05:57:54661 kOsAll,
[email protected]14371cb2013-03-21 07:46:12662 SINGLE_VALUE_TYPE(switches::kEnableSpdy31)
[email protected]3231b612012-03-23 05:57:54663 },
664 {
[email protected]18cf89d2013-04-12 02:42:32665 "enable-spdy4a1",
666 IDS_FLAGS_ENABLE_SPDY4A1_NAME,
667 IDS_FLAGS_ENABLE_SPDY4A1_DESCRIPTION,
668 kOsAll,
669 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a1)
670 },
671 {
[email protected]27b3fe92012-03-21 05:35:06672 "enable-async-dns",
673 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
674 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46675 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44676 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
677 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06678 },
679 {
[email protected]1eb93802012-09-11 18:57:56680 "disable-media-source",
[email protected]da43c082012-09-07 18:56:11681 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
682 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32683 kOsAll,
[email protected]da43c082012-09-07 18:56:11684 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]6aa03b32011-10-27 21:44:44685 },
[email protected]e4e68dbb2011-11-18 01:50:22686 {
[email protected]36d98412013-01-31 20:28:53687 "disable-encrypted-media",
688 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
689 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56690 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53691 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03692 },
[email protected]f88628792012-12-18 07:07:50693 {
694 "enable-opus-playback",
695 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
696 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56697 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50698 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
699 },
[email protected]ca6eaa5a2013-01-24 16:16:04700 {
[email protected]c54e1aa2013-01-25 09:26:17701 "enable-vp9-playback",
702 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
703 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
704 kOsDesktop,
705 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
706 },
707 {
[email protected]ca6eaa5a2013-01-24 16:16:04708 "enable-managed-users",
709 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
710 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
711 kOsAll,
712 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
713 },
[email protected]dc04be7c2012-03-15 23:57:49714#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50715 {
[email protected]cda278d2012-10-30 20:31:40716 "ash-disable-auto-window-placement",
717 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
718 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
719 kOsWin | kOsLinux | kOsCrOS,
720 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
721 },
[email protected]b4e4ec42012-11-29 21:42:40722 {
[email protected]16f55a22013-02-13 23:47:34723 "ash-disable-per-app-launcher",
724 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
725 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40726 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34727 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40728 },
[email protected]dc04be7c2012-03-15 23:57:49729#endif
[email protected]eaae8b462012-01-20 22:20:39730 {
[email protected]db543d322011-12-15 20:40:15731 "per-tile-painting",
732 IDS_FLAGS_PER_TILE_PAINTING_NAME,
733 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37734 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37735 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15736 },
[email protected]bf88c032011-12-22 19:05:47737 {
738 "enable-javascript-harmony",
739 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
740 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
741 kOsAll,
742 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
743 },
[email protected]7e7f378a2012-01-05 14:35:37744 {
[email protected]85646172012-01-09 22:45:54745 "enable-tab-browser-dragging",
746 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
747 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
748 kOsWin,
749 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
750 },
751 {
[email protected]068b7b52012-02-27 12:41:44752 "disable-restore-session-state",
753 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
754 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37755 kOsAll,
[email protected]068b7b52012-02-27 12:41:44756 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37757 },
[email protected]88864db2012-01-18 20:56:35758 {
759 "disable-software-rasterizer",
760 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
761 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
762#if defined(ENABLE_SWIFTSHADER)
763 kOsAll,
764#else
765 0,
766#endif
767 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
768 },
[email protected]15a5d722012-01-23 09:11:14769 {
[email protected]ff7b6dd2012-09-15 20:20:03770 "enable-experimental-webkit-features",
771 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
772 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16773 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03774 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49775 },
776 {
[email protected]0f95a252012-09-13 22:30:04777 "enable-css-shaders",
778 IDS_FLAGS_CSS_SHADERS_NAME,
779 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
780 kOsAll,
781 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
782 },
783 {
[email protected]9860c68b2012-02-02 01:58:09784 "enable-extension-activity-ui",
785 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
786 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56787 kOsDesktop,
[email protected]9860c68b2012-02-02 01:58:09788 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00789 },
[email protected]54ae4e92012-02-16 15:19:05790 {
[email protected]3e8befc2012-03-13 01:17:03791 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16792 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
793 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56794 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03795 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16796 },
[email protected]dc04be7c2012-03-15 23:57:49797#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01798 {
[email protected]3cd198a22012-03-12 20:38:01799 "enable-ash-oak",
800 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
801 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
802 kOsAll,
803 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
804 },
[email protected]31cf1c52012-02-29 20:55:01805#endif
[email protected]184ec592012-03-01 11:54:28806 {
807 "enable-devtools-experiments",
808 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
809 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56810 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28811 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
812 },
[email protected]76d1854e2012-03-02 23:57:44813 {
[email protected]2fefdb32013-02-26 14:28:10814 "silent-debugger-extension-api",
815 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
816 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
817 kOsDesktop,
818 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
819 },
820 {
[email protected]76d1854e2012-03-02 23:57:44821 "enable-suggestions-ntp",
822 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
823 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56824 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44825 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
826 },
[email protected]a3d54252012-04-05 20:04:13827 {
[email protected]1dbaf5e2012-11-30 05:51:32828 "spellcheck-autocorrect",
829 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
830 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
831 kOsWin | kOsLinux | kOsCrOS,
832 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
833 },
834 {
[email protected]d7932532012-11-21 21:10:31835 "touch-events",
836 IDS_TOUCH_EVENTS_NAME,
837 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56838 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31839 MULTI_VALUE_TYPE(kTouchEventsChoices)
840 },
841 {
[email protected]c9c73ad42012-04-18 03:35:59842 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06843 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
844 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55845 kOsWin,
[email protected]347a0c72012-05-14 20:28:06846 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59847 },
[email protected]8a6aaa72012-04-20 20:53:58848 {
[email protected]b9c96ff2012-11-26 22:24:40849 "disable-touch-adjustment",
850 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
851 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
852 kOsWin | kOsLinux | kOsCrOS,
853 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
854 },
855 {
[email protected]0b9383a2012-10-26 00:58:16856 "enable-tab-capture",
857 IDS_ENABLE_TAB_CAPTURE_NAME,
858 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25859 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44860 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
861 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16862 },
[email protected]0b60afa2012-04-19 17:36:39863#if defined(OS_CHROMEOS)
864 {
[email protected]7c4a9bc2012-09-11 22:10:05865 "enable-background-loader",
866 IDS_ENABLE_BACKLOADER_NAME,
867 IDS_ENABLE_BACKLOADER_DESCRIPTION,
868 kOsCrOS,
869 SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader)
870 },
871 {
[email protected]c5667b282012-08-31 00:32:50872 "enable-bezel-touch",
873 IDS_ENABLE_BEZEL_TOUCH_NAME,
874 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47875 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50876 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47877 },
878 {
[email protected]3f4181a2013-02-01 21:31:07879 "enable-screensaver-extension",
880 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
881 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
882 kOsCrOS,
883 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
884 },
885 {
[email protected]0b60afa2012-04-19 17:36:39886 "no-discard-tabs",
887 IDS_FLAGS_NO_DISCARD_TABS_NAME,
888 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
889 kOsCrOS,
890 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
891 },
892#endif
[email protected]79be6d32012-04-24 20:47:44893 {
[email protected]8d68a3e02013-01-12 15:57:10894 "enable-download-resumption",
895 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
896 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56897 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10898 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
899 },
900 {
[email protected]9a5940d2012-04-27 19:16:23901 "allow-nacl-socket-api",
902 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
903 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56904 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23905 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
906 },
[email protected]85333732012-05-01 19:02:24907 {
[email protected]60673ad72012-05-02 06:16:33908 "stacked-tab-strip",
909 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
910 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
911 kOsWin,
912 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
913 },
914 {
[email protected]4bd20202012-06-14 17:35:01915 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24916 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
917 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
918 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01919 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24920 },
[email protected]190349fd2012-05-02 00:10:47921#if defined(OS_CHROMEOS)
922 {
923 "allow-touchpad-three-finger-click",
924 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
925 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
926 kOsCrOS,
927 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
928 },
[email protected]fbc176b62012-10-27 02:19:58929 {
930 "allow-touchpad-three-finger-swipe",
931 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
932 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
933 kOsCrOS,
934 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe)
935 },
[email protected]190349fd2012-05-02 00:10:47936#endif
[email protected]1992a2f42012-10-23 18:32:21937 {
[email protected]a585e462013-01-26 00:37:15938 "use-client-login-signin-flow",
939 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
940 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21941 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15942 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21943 },
[email protected]8ee02242012-12-04 15:23:32944 {
945 "enable-desktop-guest-mode",
946 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
947 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
948 kOsMac | kOsWin | kOsLinux,
949 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
950 },
[email protected]53520b1b2012-05-07 21:43:37951#if defined(USE_ASH)
952 {
[email protected]8257d382013-03-26 13:08:42953 "show-launcher-alignment-menu",
954 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
955 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42956 kOsAll,
[email protected]8257d382013-03-26 13:08:42957 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42958 },
959 {
[email protected]73074742012-05-17 01:44:41960 "show-touch-hud",
961 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
962 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
963 kOsAll,
964 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
965 },
966 {
[email protected]9f0940b62012-05-23 22:56:35967 "enable-pinch",
968 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
969 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:06970 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:38971 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
972 },
973 {
974 "pinch-zoom-scrollbars",
975 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_NAME,
976 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_DESCRIPTION,
977 kOsCrOS,
978 ENABLE_DISABLE_VALUE_TYPE(cc::switches::kEnablePinchZoomScrollbars,
979 cc::switches::kDisablePinchZoomScrollbars)
[email protected]9f0940b62012-05-23 22:56:35980 },
[email protected]a8379312012-06-15 00:20:43981 {
982 "app-list-show-apps-only",
983 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME,
984 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION,
985 kOsAll,
[email protected]0bc6c272012-07-17 03:32:03986 SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly),
[email protected]a8379312012-06-15 00:20:43987 },
[email protected]73074742012-05-17 01:44:41988#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:28989#if defined(OS_CHROMEOS)
990 {
[email protected]8b04a1652012-08-04 02:59:49991 "disable-boot-animation",
992 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
993 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
994 kOsCrOS,
995 SINGLE_VALUE_TYPE(switches::kDisableBootAnimation),
996 },
[email protected]95058572012-08-20 14:57:29997 {
[email protected]b4557192012-09-19 11:29:58998 "disable-boot-animation2",
999 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
1000 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
1001 kOsCrOS,
1002 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
1003 },
1004 {
[email protected]ea2f3342012-09-21 21:13:361005 "boot-animation-fucntion",
1006 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
1007 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
1008 kOsCrOS,
1009 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
1010 },
[email protected]839667d62012-10-23 19:38:571011 {
[email protected]d96aef22012-10-30 11:47:021012 "captive-portal-detector",
1013 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1014 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
1015 kOsCrOS,
1016 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1017 },
1018 {
[email protected]c11aa8f12012-12-18 18:43:141019 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571020 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1021 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1022 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141023 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571024 },
[email protected]f0280952012-11-06 20:30:501025 {
[email protected]0fb5c4852012-11-08 20:33:231026 "file-manager-packaged",
1027 IDS_FLAGS_FILE_MANAGER_PACKAGED_NAME,
1028 IDS_FLAGS_FILE_MANAGER_PACKAGED_DESCRIPTION,
1029 kOsCrOS,
1030 SINGLE_VALUE_TYPE(switches::kFileManagerPackaged),
1031 },
[email protected]3e035e82012-11-27 20:54:321032 {
[email protected]8039e06c2013-01-17 23:34:501033 "disable-launcher-per-display",
1034 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME,
1035 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION,
[email protected]62018dc2012-12-13 00:37:351036 kOsCrOS,
[email protected]8039e06c2013-01-17 23:34:501037 SINGLE_VALUE_TYPE(ash::switches::kAshDisableLauncherPerDisplay),
[email protected]62018dc2012-12-13 00:37:351038 },
[email protected]06b146d2013-02-07 06:06:471039 {
[email protected]c64d7732013-03-25 18:09:501040 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521041 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1042 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]06b146d2013-02-07 06:06:471043 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521044 SINGLE_VALUE_TYPE(switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471045 },
[email protected]6ad015c2013-03-06 00:49:511046 {
[email protected]c64d7732013-03-25 18:09:501047 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521048 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1049 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511050 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521051 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511052 },
[email protected]62018dc2012-12-13 00:37:351053#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391054 {
[email protected]6247aba2013-03-04 22:57:181055 "views-textfield",
1056 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1057 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391058 kOsWin,
[email protected]6247aba2013-03-04 22:57:181059 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1060 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391061 },
[email protected]bd0cd3bb2012-06-14 03:03:381062 {
[email protected]2d4817742012-12-17 20:16:181063 "enable-new-dialog-style",
1064 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME,
1065 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321066 kOsWin | kOsCrOS,
[email protected]2d4817742012-12-17 20:16:181067 SINGLE_VALUE_TYPE(switches::kEnableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321068 },
[email protected]7db8893a2012-07-26 00:49:401069 { "disable-accelerated-video-decode",
1070 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1071 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561072 kOsDesktop,
[email protected]7db8893a2012-07-26 00:49:401073 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151074 },
[email protected]66ae9fc2012-06-19 21:33:521075#if defined(USE_ASH)
1076 {
1077 "ash-debug-shortcuts",
1078 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1079 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1080 kOsAll,
1081 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1082 },
1083#endif
[email protected]37fee0942012-08-07 21:07:451084 {
[email protected]ad3f6d22012-08-29 02:34:191085 "enable-contacts",
1086 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1087 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1088 kOsCrOS,
1089 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1090 },
[email protected]1d9bb9cd2012-08-28 22:02:501091#if defined(USE_ASH)
1092 { "ash-enable-advanced-gestures",
1093 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1094 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1095 kOsCrOS,
1096 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1097 },
[email protected]cfa24e62013-02-13 21:19:111098 { "ash-disable-tab-scrubbing",
1099 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1100 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161101 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111102 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161103 },
[email protected]83eef802012-12-02 07:43:521104 { "ash-enable-workspace-scrubbing",
1105 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1106 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1107 kOsCrOS,
1108 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1109 },
[email protected]819e58d22013-03-20 00:16:111110 { "ash-immersive-fullscreen",
1111 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1112 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241113 kOsCrOS,
[email protected]819e58d22013-03-20 00:16:111114 SINGLE_VALUE_TYPE(ash::switches::kAshImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241115 },
[email protected]316708a2012-11-05 22:57:021116#if defined(OS_LINUX)
1117 { "ash-enable-memory-monitor",
1118 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1119 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1120 kOsCrOS,
1121 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1122 },
1123#endif
[email protected]1d9bb9cd2012-08-28 22:02:501124#endif
[email protected]9b7ab882012-09-10 23:46:361125#if defined(OS_CHROMEOS)
[email protected]9475ee6f2013-03-08 18:20:091126 { "ash-disable-new-network-status-area",
1127 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME,
1128 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION,
[email protected]badba1ad2012-11-16 17:21:461129 kOsCrOS,
[email protected]9475ee6f2013-03-08 18:20:091130 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea),
[email protected]badba1ad2012-11-16 17:21:461131 },
[email protected]9b7ab882012-09-10 23:46:361132 {
[email protected]205f07892012-10-16 20:26:221133 "enable-carrier-switching",
1134 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1135 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1136 kOsCrOS,
1137 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1138 },
1139 {
[email protected]9b7ab882012-09-10 23:46:361140 "enable-request-tablet-site",
1141 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1142 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1143 kOsCrOS,
1144 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1145 },
1146#endif
[email protected]dab49c0b2012-10-04 05:55:351147 {
1148 "debug-packed-apps",
1149 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1150 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561151 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351152 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1153 },
[email protected]d1459ed2012-10-10 01:29:331154 {
1155 "enable-password-generation",
1156 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1157 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561158 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331159 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1160 },
[email protected]26d045f2012-10-18 21:18:431161 {
[email protected]76f7d4882012-10-26 21:09:221162 "enable-deferred-image-decoding",
1163 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1164 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221165 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221166 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1167 },
1168 {
[email protected]075543d2012-10-24 01:29:141169 "performance-monitor-gathering",
1170 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1171 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1172 kOsAll,
1173 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1174 },
[email protected]783d5bb2012-10-24 03:47:141175 {
[email protected]90b482d2013-04-04 10:45:581176 "disable-native-autofill-ui",
1177 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1178 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431179 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581180 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431181 },
1182 {
[email protected]99002fd2012-11-06 04:35:521183 "show-app-list-shortcut",
1184 IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_NAME,
1185 IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_DESCRIPTION,
1186 kOsWin,
[email protected]7d1d2092013-03-04 04:12:431187 SINGLE_VALUE_TYPE(apps::switches::kShowAppListShortcut)
[email protected]99002fd2012-11-06 04:35:521188 },
[email protected]a7259fb2012-11-08 06:22:231189 {
1190 "enable-experimental-form-filling",
1191 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1192 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1193 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481194 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231195 },
[email protected]6e6efe42013-01-30 00:04:501196 {
[email protected]db3178c2013-03-21 14:54:541197 "wallet-service-use-prod",
1198 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1199 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1200 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481201 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541202 },
1203 {
[email protected]6e6efe42013-01-30 00:04:501204 "enable-interactive-autocomplete",
1205 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1206 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]57e67ac2013-02-22 03:37:221207 kOsWin | kOsCrOS | kOsAndroid,
[email protected]6e6efe42013-01-30 00:04:501208 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1209 },
[email protected]edbea622012-11-28 20:39:381210 {
1211 "enable-touch-drag-drop",
1212 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1213 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1214 kOsWin | kOsCrOS,
1215 SINGLE_VALUE_TYPE(switches::kEnableTouchDragDrop)
1216 },
[email protected]0e2f43b62013-02-21 00:47:151217 {
1218 "enable-touch-editing",
1219 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1220 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1221 kOsCrOS,
1222 SINGLE_VALUE_TYPE(switches::kEnableTouchEditing)
1223 },
[email protected]f1c39242013-01-29 16:13:011224#if defined(ENABLE_MESSAGE_CENTER)
[email protected]92e12dd92012-12-11 03:33:201225 {
1226 "enable-rich-notifications",
1227 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1228 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1229 kOsWin | kOsCrOS,
[email protected]aee412aa2013-04-02 20:01:231230 ENABLE_DISABLE_VALUE_TYPE(
1231 message_center::switches::kEnableRichNotifications,
1232 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201233 },
[email protected]f1c39242013-01-29 16:13:011234#endif
[email protected]4d51c682012-12-11 11:34:551235 {
1236 "full-history-sync",
1237 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1238 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1239 kOsAll,
1240 SINGLE_VALUE_TYPE(switches::kHistoryEnableFullHistorySync)
1241 },
[email protected]628a69a92012-12-23 04:09:341242 {
[email protected]fd030142013-02-08 02:04:381243 "enable-usermedia-screen-capture",
1244 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1245 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1246 kOsDesktop,
1247 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1248 },
[email protected]5b93e162013-02-19 06:33:091249 {
1250 "enable-apps-devtool-app",
1251 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1252 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1253 kOsDesktop,
1254 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1255 },
[email protected]9323fdd12013-02-23 00:31:361256 {
1257 "impl-side-painting",
1258 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1259 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041260 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361261 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1262 },
[email protected]a42c85f2013-04-04 18:15:121263 {
[email protected]a42c85f2013-04-04 18:15:121264 "max-tiles-for-interest-area",
1265 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1266 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1267 kOsAndroid | kOsLinux | kOsCrOS,
1268 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1269 },
[email protected]2f2f72b2013-03-08 22:37:311270 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1271#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371272 {
1273 "track-active-visit-time",
1274 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1275 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1276 kOsWin,
1277 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1278 },
[email protected]2f2f72b2013-03-08 22:37:311279#endif
[email protected]8cc71d42013-03-02 17:26:081280#if defined(OS_ANDROID)
1281 {
1282 "disable-gesture-requirement-for-media-playback",
1283 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1284 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1285 kOsAndroid,
1286 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1287 },
1288#endif
[email protected]e79f2fd52013-03-08 23:52:471289#if defined(OS_CHROMEOS)
1290 {
1291 "enable-experimental-bluetooth",
1292 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME,
1293 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION,
1294 kOsCrOS,
1295 SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth)
1296 },
1297#endif
[email protected]6077cab2013-03-11 19:36:141298#if defined(ENABLE_GOOGLE_NOW)
1299 {
1300 "enable-google-now",
1301 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1302 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1303 kOsWin | kOsCrOS,
1304 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1305 },
1306#endif
[email protected]4a9e2e02013-04-08 16:19:491307 {
1308 "enable-translate-alpha-languages",
1309 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1310 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1311 kOsAll,
1312 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1313 },
[email protected]86459e2c2013-04-10 13:39:241314#if defined(OS_CHROMEOS)
1315 {
1316 "enable-virtual-keyboard",
1317 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1318 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1319 kOsCrOS,
1320 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1321 },
1322#endif
[email protected]38484df12013-04-10 16:42:031323 {
1324 "enable-simple-cache-backend",
1325 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1326 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1327 kOsAndroid,
1328 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1329 },
[email protected]717e4e22013-04-10 20:52:231330 {
1331 "enable-tcp-fast-open",
1332 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1333 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
1334 kOsAll,
1335 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1336 },
[email protected]a0e4b072011-08-17 01:47:071337};
[email protected]ad2a3ded2010-08-27 13:19:051338
[email protected]a314ee5a2010-10-26 21:23:281339const Experiment* experiments = kExperiments;
1340size_t num_experiments = arraysize(kExperiments);
1341
[email protected]e2ddbc92010-10-15 20:02:071342// Stores and encapsulates the little state that about:flags has.
1343class FlagsState {
1344 public:
1345 FlagsState() : needs_restart_(false) {}
1346 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1347 bool IsRestartNeededToCommitChanges();
1348 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281349 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071350 void RemoveFlagsSwitches(
1351 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001352 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071353 void reset();
1354
1355 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551356 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071357 return Singleton<FlagsState>::get();
1358 }
1359
1360 private:
1361 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531362 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071363
1364 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1365};
1366
[email protected]c7b7800a2010-10-07 18:51:351367// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491368// in a set.
[email protected]1a47d7e2010-10-15 00:37:241369void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051370 const ListValue* enabled_experiments = prefs->GetList(
1371 prefs::kEnabledLabsExperiments);
1372 if (!enabled_experiments)
1373 return;
1374
1375 for (ListValue::const_iterator it = enabled_experiments->begin();
1376 it != enabled_experiments->end();
1377 ++it) {
1378 std::string experiment_name;
1379 if (!(*it)->GetAsString(&experiment_name)) {
1380 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1381 continue;
1382 }
1383 result->insert(experiment_name);
1384 }
1385}
1386
[email protected]c6343372013-03-13 17:05:491387// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241388void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051389 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381390 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1391 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051392
1393 experiments_list->Clear();
1394 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1395 it != enabled_experiments.end();
1396 ++it) {
1397 experiments_list->Append(new StringValue(*it));
1398 }
1399}
1400
[email protected]8a6ff28d2010-12-02 16:35:191401// Adds the internal names for the specified experiment to |names|.
1402void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1403 if (e.type == Experiment::SINGLE_VALUE) {
1404 names->insert(e.internal_name);
1405 } else {
[email protected]83e9fa702013-02-25 19:30:441406 DCHECK(e.type == Experiment::MULTI_VALUE ||
1407 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191408 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441409 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191410 }
1411}
1412
[email protected]28e35af2011-02-09 12:56:221413// Confirms that an experiment is valid, used in a DCHECK in
1414// SanitizeList below.
1415bool ValidateExperiment(const Experiment& e) {
1416 switch (e.type) {
1417 case Experiment::SINGLE_VALUE:
1418 DCHECK_EQ(0, e.num_choices);
1419 DCHECK(!e.choices);
1420 break;
1421 case Experiment::MULTI_VALUE:
1422 DCHECK_GT(e.num_choices, 0);
1423 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531424 DCHECK(e.choices[0].command_line_switch);
1425 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221426 break;
[email protected]83e9fa702013-02-25 19:30:441427 case Experiment::ENABLE_DISABLE_VALUE:
1428 DCHECK_EQ(3, e.num_choices);
1429 DCHECK(!e.choices);
1430 DCHECK(e.command_line_switch);
1431 DCHECK(e.command_line_value);
1432 DCHECK(e.disable_command_line_switch);
1433 DCHECK(e.disable_command_line_value);
1434 break;
[email protected]28e35af2011-02-09 12:56:221435 default:
1436 NOTREACHED();
1437 }
1438 return true;
1439}
1440
[email protected]ad2a3ded2010-08-27 13:19:051441// Removes all experiments from prefs::kEnabledLabsExperiments that are
1442// unknown, to prevent this list to become very long as experiments are added
1443// and removed.
1444void SanitizeList(PrefService* prefs) {
1445 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221446 for (size_t i = 0; i < num_experiments; ++i) {
1447 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191448 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221449 }
[email protected]ad2a3ded2010-08-27 13:19:051450
1451 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241452 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051453
1454 std::set<std::string> new_enabled_experiments;
1455 std::set_intersection(
1456 known_experiments.begin(), known_experiments.end(),
1457 enabled_experiments.begin(), enabled_experiments.end(),
1458 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1459
[email protected]4c8853f2012-07-23 01:29:161460 if (new_enabled_experiments != enabled_experiments)
1461 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051462}
1463
[email protected]1a47d7e2010-10-15 00:37:241464void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051465 PrefService* prefs, std::set<std::string>* result) {
1466 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241467 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051468}
1469
[email protected]a314ee5a2010-10-26 21:23:281470// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1471// enabled on the current platform.
1472void GetSanitizedEnabledFlagsForCurrentPlatform(
1473 PrefService* prefs, std::set<std::string>* result) {
1474 GetSanitizedEnabledFlags(prefs, result);
1475
1476 // Filter out any experiments that aren't enabled on the current platform. We
1477 // don't remove these from prefs else syncing to a platform with a different
1478 // set of experiments would be lossy.
1479 std::set<std::string> platform_experiments;
1480 int current_platform = GetCurrentPlatform();
1481 for (size_t i = 0; i < num_experiments; ++i) {
1482 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191483 AddInternalName(experiments[i], &platform_experiments);
[email protected]a314ee5a2010-10-26 21:23:281484 }
1485
1486 std::set<std::string> new_enabled_experiments;
1487 std::set_intersection(
1488 platform_experiments.begin(), platform_experiments.end(),
1489 result->begin(), result->end(),
1490 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1491
1492 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051493}
1494
[email protected]8a6ff28d2010-12-02 16:35:191495// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191496Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221497 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441498 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1499 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191500 ListValue* result = new ListValue;
1501 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191502 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441503 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191504 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441505 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221506 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191507 result->Append(value);
1508 }
1509 return result;
1510}
1511
[email protected]e2ddbc92010-10-15 20:02:071512} // namespace
1513
[email protected]83e9fa702013-02-25 19:30:441514std::string Experiment::NameForChoice(int index) const {
1515 DCHECK(type == Experiment::MULTI_VALUE ||
1516 type == Experiment::ENABLE_DISABLE_VALUE);
1517 DCHECK_LT(index, num_choices);
1518 return std::string(internal_name) + testing::kMultiSeparator +
1519 base::IntToString(index);
1520}
1521
1522string16 Experiment::DescriptionForChoice(int index) const {
1523 DCHECK(type == Experiment::MULTI_VALUE ||
1524 type == Experiment::ENABLE_DISABLE_VALUE);
1525 DCHECK_LT(index, num_choices);
1526 int description_id;
1527 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1528 const int kEnableDisableDescriptionIds[] = {
1529 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1530 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1531 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1532 };
1533 description_id = kEnableDisableDescriptionIds[index];
1534 } else {
1535 description_id = choices[index].description_id;
1536 }
1537 return l10n_util::GetStringUTF16(description_id);
1538}
1539
[email protected]1a47d7e2010-10-15 00:37:241540void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551541 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051542}
1543
[email protected]1a47d7e2010-10-15 00:37:241544ListValue* GetFlagsExperimentsData(PrefService* prefs) {
[email protected]ad2a3ded2010-08-27 13:19:051545 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241546 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051547
1548 int current_platform = GetCurrentPlatform();
1549
1550 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281551 for (size_t i = 0; i < num_experiments; ++i) {
1552 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051553
[email protected]1fd1f292013-03-23 23:08:401554#if defined(OS_ANDROID)
1555 // Special case enable-spdy-proxy-auth, because it should only
1556 // be available on Dev and Beta channels.
1557 if (!strcmp("enable-spdy-proxy-auth", experiment.internal_name) &&
1558 chrome::VersionInfo::GetChannel() ==
1559 chrome::VersionInfo::CHANNEL_STABLE)
1560 continue;
1561#endif
1562
[email protected]ad2a3ded2010-08-27 13:19:051563 DictionaryValue* data = new DictionaryValue();
1564 data->SetString("internal_name", experiment.internal_name);
1565 data->SetString("name",
1566 l10n_util::GetStringUTF16(experiment.visible_name_id));
1567 data->SetString("description",
1568 l10n_util::GetStringUTF16(
1569 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401570 bool supported = !!(experiment.supported_platforms & current_platform);
1571 data->SetBoolean("supported", supported);
1572
1573 ListValue* supported_platforms = new ListValue();
1574 AddOsStrings(experiment.supported_platforms, supported_platforms);
1575 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051576
[email protected]28e35af2011-02-09 12:56:221577 switch (experiment.type) {
1578 case Experiment::SINGLE_VALUE:
1579 data->SetBoolean(
1580 "enabled",
1581 enabled_experiments.count(experiment.internal_name) > 0);
1582 break;
1583 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441584 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221585 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1586 break;
1587 default:
1588 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191589 }
1590
[email protected]ad2a3ded2010-08-27 13:19:051591 experiments_data->Append(data);
1592 }
1593 return experiments_data;
1594}
1595
[email protected]ad2a3ded2010-08-27 13:19:051596bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551597 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051598}
1599
1600void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351601 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551602 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071603}
1604
1605void RemoveFlagsSwitches(
1606 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551607 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071608}
1609
[email protected]cb93bf52013-02-20 01:20:001610void ResetAllFlags(PrefService* prefs) {
1611 FlagsState::GetInstance()->ResetAllFlags(prefs);
1612}
1613
[email protected]a314ee5a2010-10-26 21:23:281614int GetCurrentPlatform() {
1615#if defined(OS_MACOSX)
1616 return kOsMac;
1617#elif defined(OS_WIN)
1618 return kOsWin;
1619#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1620 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211621#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281622 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401623#elif defined(OS_ANDROID)
1624 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281625#else
1626#error Unknown platform
1627#endif
1628}
1629
[email protected]4bc5050c2010-11-18 17:55:541630void RecordUMAStatistics(const PrefService* prefs) {
1631 std::set<std::string> flags;
1632 GetEnabledFlags(prefs, &flags);
1633 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1634 ++it) {
1635 std::string action("AboutFlags_");
1636 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381637 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541638 }
1639 // Since flag metrics are recorded every startup, add a tick so that the
1640 // stats can be made meaningful.
1641 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381642 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1643 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541644}
1645
[email protected]e2ddbc92010-10-15 20:02:071646//////////////////////////////////////////////////////////////////////////////
1647// FlagsState implementation.
1648
1649namespace {
1650
[email protected]83e9fa702013-02-25 19:30:441651typedef std::map<std::string, std::pair<std::string, std::string> >
1652 NameToSwitchAndValueMap;
1653
1654void SetFlagToSwitchMapping(const std::string& key,
1655 const std::string& switch_name,
1656 const std::string& switch_value,
1657 NameToSwitchAndValueMap* name_to_switch_map) {
1658 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1659 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1660}
1661
[email protected]e2ddbc92010-10-15 20:02:071662void FlagsState::ConvertFlagsToSwitches(
1663 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071664 if (command_line->HasSwitch(switches::kNoExperiments))
1665 return;
1666
1667 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001668
[email protected]a314ee5a2010-10-26 21:23:281669 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071670
[email protected]a82744532011-02-11 16:15:531671 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191672 for (size_t i = 0; i < num_experiments; ++i) {
1673 const Experiment& e = experiments[i];
1674 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441675 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1676 e.command_line_value, &name_to_switch_map);
1677 } else if (e.type == Experiment::MULTI_VALUE) {
1678 for (int j = 0; j < e.num_choices; ++j) {
1679 SetFlagToSwitchMapping(e.NameForChoice(j),
1680 e.choices[j].command_line_switch,
1681 e.choices[j].command_line_value,
1682 &name_to_switch_map);
1683 }
[email protected]8a6ff28d2010-12-02 16:35:191684 } else {
[email protected]83e9fa702013-02-25 19:30:441685 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1686 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1687 &name_to_switch_map);
1688 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1689 e.command_line_value, &name_to_switch_map);
1690 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1691 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191692 }
1693 }
[email protected]e2ddbc92010-10-15 20:02:071694
1695 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531696 flags_switches_.insert(
1697 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1698 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071699 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1700 it != enabled_experiments.end();
1701 ++it) {
1702 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531703 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191704 name_to_switch_map.find(experiment_name);
1705 if (name_to_switch_it == name_to_switch_map.end()) {
1706 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071707 continue;
[email protected]8a6ff28d2010-12-02 16:35:191708 }
[email protected]e2ddbc92010-10-15 20:02:071709
[email protected]a82744532011-02-11 16:15:531710 const std::pair<std::string, std::string>&
1711 switch_and_value_pair = name_to_switch_it->second;
1712
1713 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1714 switch_and_value_pair.second);
1715 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071716 }
1717 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531718 flags_switches_.insert(
1719 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1720 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071721}
1722
1723bool FlagsState::IsRestartNeededToCommitChanges() {
1724 return needs_restart_;
1725}
1726
1727void FlagsState::SetExperimentEnabled(
1728 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441729 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191730 if (at_index != std::string::npos) {
1731 DCHECK(enable);
1732 // We're being asked to enable a multi-choice experiment. Disable the
1733 // currently selected choice.
1734 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221735 const std::string experiment_name = internal_name.substr(0, at_index);
1736 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191737
[email protected]28e35af2011-02-09 12:56:221738 // And enable the new choice, if it is not the default first choice.
1739 if (internal_name != experiment_name + "@0") {
1740 std::set<std::string> enabled_experiments;
1741 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081742 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221743 SetEnabledFlags(prefs, enabled_experiments);
1744 }
[email protected]8a6ff28d2010-12-02 16:35:191745 return;
1746 }
1747
[email protected]ad2a3ded2010-08-27 13:19:051748 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241749 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051750
[email protected]8a6ff28d2010-12-02 16:35:191751 const Experiment* e = NULL;
1752 for (size_t i = 0; i < num_experiments; ++i) {
1753 if (experiments[i].internal_name == internal_name) {
1754 e = experiments + i;
1755 break;
1756 }
1757 }
1758 DCHECK(e);
1759
1760 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591761 if (enable)
[email protected]147492b2013-03-19 23:52:081762 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591763 else
[email protected]147492b2013-03-19 23:52:081764 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191765 } else {
1766 if (enable) {
1767 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081768 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191769 } else {
1770 // Find the currently enabled choice and disable it.
1771 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441772 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191773 if (enabled_experiments.find(choice_name) !=
1774 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081775 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191776 enabled_experiments.erase(choice_name);
1777 // Continue on just in case there's a bug and more than one
1778 // experiment for this choice was enabled.
1779 }
1780 }
1781 }
1782 }
[email protected]ad2a3ded2010-08-27 13:19:051783
[email protected]1a47d7e2010-10-15 00:37:241784 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051785}
1786
[email protected]e2ddbc92010-10-15 20:02:071787void FlagsState::RemoveFlagsSwitches(
1788 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531789 for (std::map<std::string, std::string>::const_iterator
1790 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1791 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071792 }
1793}
1794
[email protected]cb93bf52013-02-20 01:20:001795void FlagsState::ResetAllFlags(PrefService* prefs) {
1796 needs_restart_ = true;
1797
1798 std::set<std::string> no_experiments;
1799 SetEnabledFlags(prefs, no_experiments);
1800}
1801
[email protected]e2ddbc92010-10-15 20:02:071802void FlagsState::reset() {
1803 needs_restart_ = false;
1804 flags_switches_.clear();
1805}
1806
[email protected]38e46812011-05-09 20:49:221807} // namespace
[email protected]e2ddbc92010-10-15 20:02:071808
1809namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191810
1811// WARNING: '@' is also used in the html file. If you update this constant you
1812// also need to update the html file.
1813const char kMultiSeparator[] = "@";
1814
[email protected]e2ddbc92010-10-15 20:02:071815void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551816 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071817}
[email protected]a314ee5a2010-10-26 21:23:281818
1819void SetExperiments(const Experiment* e, size_t count) {
1820 if (!e) {
1821 experiments = kExperiments;
1822 num_experiments = arraysize(kExperiments);
1823 } else {
1824 experiments = e;
1825 num_experiments = count;
1826 }
1827}
1828
[email protected]8a6ff28d2010-12-02 16:35:191829const Experiment* GetExperiments(size_t* count) {
1830 *count = num_experiments;
1831 return experiments;
1832}
1833
[email protected]e2ddbc92010-10-15 20:02:071834} // namespace testing
1835
[email protected]1a47d7e2010-10-15 00:37:241836} // namespace about_flags