blob: 1e7902ba207e5d2795b601e55d16af2a37d4f341 [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]ad2a3ded2010-08-27 13:19:0515#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1516#include "base/memory/singleton.h"
[email protected]3853a4c2013-02-11 17:15:5717#include "base/prefs/pref_service.h"
[email protected]3ea1b182013-02-08 22:38:4118#include "base/strings/string_number_conversions.h"
[email protected]d208f4d82011-05-23 21:52:0319#include "base/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0520#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5221#include "cc/base/switches.h"
[email protected]1bc78422011-03-31 08:41:3822#include "chrome/browser/prefs/scoped_user_pref_update.h"
[email protected]d208f4d82011-05-23 21:52:0323#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0524#include "chrome/common/chrome_switches.h"
[email protected]1fd1f292013-03-23 23:08:4025#include "chrome/common/chrome_version_info.h"
[email protected]ad2a3ded2010-08-27 13:19:0526#include "chrome/common/pref_names.h"
[email protected]7f6f44c2011-12-14 13:23:3827#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0228#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0529#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0230#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0231#include "media/base/media_switches.h"
[email protected]0bc6c272012-07-17 03:32:0332#include "ui/app_list/app_list_switches.h"
[email protected]c051a1b2011-01-21 23:30:1733#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5934#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4835#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2736#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2437#include "ui/keyboard/keyboard_switches.h"
[email protected]8b1c3c72013-01-25 01:48:4338#include "ui/surface/surface_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0539
[email protected]f1c39242013-01-29 16:13:0140#if defined(ENABLE_MESSAGE_CENTER)
41#include "ui/message_center/message_center_switches.h"
42#endif
43
[email protected]dc04be7c2012-03-15 23:57:4944#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3145#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4946#endif
47
[email protected]badba1ad2012-11-16 17:21:4648#if defined(OS_CHROMEOS)
49#include "chromeos/chromeos_switches.h"
50#endif
51
[email protected]7f6f44c2011-12-14 13:23:3852using content::UserMetricsAction;
53
[email protected]1a47d7e2010-10-15 00:37:2454namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0555
[email protected]8a6ff28d2010-12-02 16:35:1956// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5357#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4458 Experiment::SINGLE_VALUE, \
59 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5360#define SINGLE_VALUE_TYPE(command_line_switch) \
61 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4462#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
63 disable_switch, disable_value) \
64 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
65 disable_switch, disable_value, NULL, 3
66#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
67 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5368#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4469 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1970
[email protected]e2ddbc92010-10-15 20:02:0771namespace {
72
[email protected]9c7453d2012-01-21 00:45:4073const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5674const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0575
[email protected]cc3e2052011-12-20 01:01:4076// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
77// whether the experiment is available on that platform.
78void AddOsStrings(unsigned bitmask, ListValue* list) {
79 struct {
80 unsigned bit;
81 const char* const name;
82 } kBitsToOs[] = {
83 {kOsMac, "Mac"},
84 {kOsWin, "Windows"},
85 {kOsLinux, "Linux"},
86 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0187 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5888 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[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[] = {
[email protected]9a3de3e32013-04-23 19:05:21217 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
218 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
219 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03220 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
221 switches::kUseSimpleCacheBackend, "on"}
222};
223
[email protected]4bc5050c2010-11-18 17:55:54224// RECORDING USER METRICS FOR FLAGS:
225// -----------------------------------------------------------------------------
226// The first line of the experiment is the internal name. If you'd like to
227// gather statistics about the usage of your flag, you should append a marker
228// comment to the end of the feature name, like so:
229// "my-special-feature", // FLAGS:RECORD_UMA
230//
231// After doing that, run //chrome/tools/extract_actions.py (see instructions at
232// the top of that file for details) to update the chromeactions.txt file, which
233// will enable UMA to record your feature flag.
234//
[email protected]783d5bb2012-10-24 03:47:14235// After your feature has shipped under a flag, you can locate the metrics under
236// the action name AboutFlags_internal-action-name. Actions are recorded once
237// per startup, so you should divide this number by AboutFlags_StartupTick to
238// get a sense of usage. Note that this will not be the same as number of users
239// with a given feature enabled because users can quit and relaunch the
240// application multiple times over a given time interval. The dashboard also
241// shows you how many (metrics reporting) users have enabled the flag over the
242// last seven days. However, note that this is not the same as the number of
243// users who have the flag enabled, since enabling the flag happens once,
244// whereas running with the flag enabled happens until the user flips the flag
245// again.
[email protected]4bc5050c2010-11-18 17:55:54246
[email protected]8a6ff28d2010-12-02 16:35:19247// To add a new experiment add to the end of kExperiments. There are two
248// distinct types of experiments:
249// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
250// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22251// . MULTI_VALUE: a list of choices, the first of which should correspond to a
252// deactivated state for this lab (i.e. no command line option). To specify
253// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
254// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19255// See the documentation of Experiment for details on the fields.
256//
257// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05258const Experiment kExperiments[] = {
[email protected]270f0342013-02-20 01:19:44259#if defined(OS_ANDROID)
260 {
[email protected]199def22013-02-21 17:52:29261 "enable-spdy-proxy-auth",
262 IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME,
263 IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION,
[email protected]270f0342013-02-20 01:19:44264 kOsAndroid,
[email protected]199def22013-02-21 17:52:29265 SINGLE_VALUE_TYPE(switches::kEnableSpdyProxyAuth)
[email protected]270f0342013-02-20 01:19:44266 },
267#endif
[email protected]ad2a3ded2010-08-27 13:19:05268 {
[email protected]aac169d2011-03-18 19:53:03269 "expose-for-tabs", // FLAGS:RECORD_UMA
270 IDS_FLAGS_TABPOSE_NAME,
271 IDS_FLAGS_TABPOSE_DESCRIPTION,
272 kOsMac,
273#if defined(OS_MACOSX)
274 // The switch exists only on OS X.
275 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
276#else
277 SINGLE_VALUE_TYPE("")
278#endif
279 },
280 {
[email protected]4bc5050c2010-11-18 17:55:54281 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05282 IDS_FLAGS_CONFLICTS_CHECK_NAME,
283 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
284 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19285 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05286 },
287 {
[email protected]4bc5050c2010-11-18 17:55:54288 "cloud-print-proxy", // FLAGS:RECORD_UMA
[email protected]dae7325b2011-12-21 20:56:54289 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME,
290 IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION,
[email protected]9f8872b32011-03-04 19:44:45291 // For a Chrome build, we know we have a PDF plug-in on Windows, so it's
[email protected]4fa24bf2011-08-20 02:15:22292 // fully enabled.
[email protected]5d10d57d2011-07-22 22:16:31293 // Otherwise, where we know Windows could be working if a viable PDF
[email protected]4fa24bf2011-08-20 02:15:22294 // plug-in could be supplied, we'll keep the lab enabled. Mac and Linux
295 // always have PDF rasterization available, so no flag needed there.
296#if !defined(GOOGLE_CHROME_BUILD)
297 kOsWin,
298#else
299 0,
[email protected]fa6d2a2f2010-11-30 21:47:19300#endif
[email protected]8a6ff28d2010-12-02 16:35:19301 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintProxy)
[email protected]8b6588a2010-10-12 02:39:42302 },
[email protected]60d77bd2012-08-22 00:10:07303#if defined(OS_WIN)
304 {
305 "print-raster",
306 IDS_FLAGS_PRINT_RASTER_NAME,
307 IDS_FLAGS_PRINT_RASTER_DESCRIPTION,
308 kOsWin,
309 SINGLE_VALUE_TYPE(switches::kPrintRaster)
310 },
311#endif // OS_WIN
[email protected]0209b442012-07-18 00:38:05312 {
[email protected]96c6f4c2011-05-18 19:36:22313 "ignore-gpu-blacklist",
314 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
315 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
316 kOsAll,
317 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
318 },
319 {
[email protected]0110cf112011-07-02 00:39:43320 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22321 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
322 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23323 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44324 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
325 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22326 },
327 {
[email protected]72787e392012-03-23 05:55:43328 "threaded-compositing-mode",
329 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
330 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58331 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44332 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
333 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59334 },
335 {
[email protected]17e27692013-02-06 17:02:09336 "force-accelerated-composited-scrolling",
337 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
338 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
339 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44340 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
341 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09342 },
343 {
[email protected]8b1c3c72013-01-25 01:48:43344 "present-with-GDI",
345 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
346 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
347 kOsWin,
348 MULTI_VALUE_TYPE(kGDIPresentChoices)
349 },
350 {
[email protected]81c64af62012-06-06 20:15:52351 "disable-accelerated-2d-canvas",
352 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
353 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
354 kOsAll,
355 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
356 },
357 {
[email protected]efcde132012-05-30 01:05:18358 "disable-threaded-animation",
359 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
360 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59361 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37362 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59363 },
364 {
[email protected]5963b772011-02-09 22:55:38365 "composited-layer-borders",
366 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
367 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
368 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57369 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38370 },
371 {
[email protected]a8f1eaa2011-03-07 19:00:58372 "show-fps-counter",
373 IDS_FLAGS_SHOW_FPS_COUNTER,
374 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
375 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57376 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58377 },
[email protected]8ff7f342011-05-25 01:49:47378 {
[email protected]70c98a332011-12-21 20:51:52379 "accelerated-filters",
380 IDS_FLAGS_ACCELERATED_FILTERS,
381 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
382 kOsAll,
383 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
384 },
385 {
[email protected]8ff7f342011-05-25 01:49:47386 "disable-gpu-vsync",
387 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
388 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56389 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47390 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
391 },
[email protected]deaba6d52011-09-23 14:47:12392 {
[email protected]4052d832013-01-16 05:31:01393 "enable-webgl",
394 IDS_FLAGS_ENABLE_WEBGL_NAME,
395 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
396 kOsAndroid,
397#if defined(OS_ANDROID)
398 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
399#else
400 SINGLE_VALUE_TYPE("")
401#endif
402 },
403 {
[email protected]deaba6d52011-09-23 14:47:12404 "disable-webgl",
405 IDS_FLAGS_DISABLE_WEBGL_NAME,
406 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56407 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01408#if defined(OS_ANDROID)
409 SINGLE_VALUE_TYPE("")
410#else
[email protected]deaba6d52011-09-23 14:47:12411 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01412#endif
[email protected]deaba6d52011-09-23 14:47:12413 },
[email protected]09096e02012-05-24 11:12:04414 {
[email protected]ce585bf2013-03-14 16:25:16415 "disable-webrtc",
416 IDS_FLAGS_DISABLE_WEBRTC_NAME,
417 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05418 kOsAndroid,
419#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16420 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05421#else
422 SINGLE_VALUE_TYPE("")
423#endif
424 },
[email protected]34cb5292013-04-15 06:06:31425#if defined(OS_ANDROID)
426 {
427 "enable-webaudio",
428 IDS_FLAGS_ENABLE_WEBAUDIO_NAME,
429 IDS_FLAGS_ENABLE_WEBAUDIO_DESCRIPTION,
430 kOsAndroid,
431 SINGLE_VALUE_TYPE(switches::kEnableWebAudio)
432 },
433#endif
[email protected]d9da9582013-01-31 04:59:05434 {
[email protected]96bcdc102012-05-24 23:42:10435 "fixed-position-creates-stacking-context",
436 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
437 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
438 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44439 ENABLE_DISABLE_VALUE_TYPE(
440 switches::kEnableFixedPositionCreatesStackingContext,
441 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10442 },
[email protected]fb854192013-02-06 01:30:04443 {
444 "enable-compositing-for-fixed-position",
445 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
446 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
447 kOsAll,
448 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
449 },
[email protected]a7640ef22012-10-06 00:52:08450 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53451 {
[email protected]e3791ce92011-08-09 01:03:32452 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40453 IDS_FLAGS_ENABLE_NACL_NAME,
454 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56455 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19456 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40457 },
458 {
[email protected]9addd1c2012-09-15 14:28:24459 "enable-nacl-debug", // FLAGS:RECORD_UMA
460 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
461 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56462 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24463 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13464 },
465 {
[email protected]66f409c2012-10-04 20:59:04466 "nacl-debug-mask", // FLAGS:RECORD_UMA
467 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
468 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56469 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04470 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
471 },
472 {
[email protected]7babd1c2012-08-08 20:35:29473 "enable-pnacl", // FLAGS:RECORD_UMA
474 IDS_FLAGS_ENABLE_PNACL_NAME,
475 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56476 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29477 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
478 },
479 {
[email protected]4bc5050c2010-11-18 17:55:54480 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32481 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
482 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56483 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19484 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32485 },
[email protected]3627b06d2010-11-12 16:36:16486 {
[email protected]ac2e2acd2013-03-21 12:57:29487 "extensions-on-chrome-urls",
488 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
489 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
490 kOsAll,
491 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
492 },
493 {
[email protected]e9cddd52013-03-23 17:37:53494 "enable-adview",
495 IDS_FLAGS_ENABLE_ADVIEW_NAME,
496 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
497 kOsDesktop,
498 SINGLE_VALUE_TYPE(switches::kEnableAdview)
499 },
500 {
501 "enable-adview-src-attribute",
502 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
503 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
504 kOsDesktop,
505 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
506 },
507 {
[email protected]544471a2012-10-13 05:27:09508 "action-box",
[email protected]cab18ef2012-04-27 07:22:03509 IDS_FLAGS_ACTION_BOX_NAME,
510 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56511 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44512 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
513 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03514 },
515 {
[email protected]3a362432012-06-18 20:39:51516 "script-badges",
517 IDS_FLAGS_SCRIPT_BADGES_NAME,
518 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56519 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09520 SINGLE_VALUE_TYPE(switches::kScriptBadges)
521 },
522 {
523 "script-bubble",
524 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
525 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56526 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44527 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
528 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51529 },
530 {
[email protected]cbe224d2011-08-04 22:12:49531 "apps-new-install-bubble",
532 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
533 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56534 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49535 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
536 },
537 {
[email protected]80bd24e2010-11-30 09:34:38538 "disable-hyperlink-auditing",
539 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
540 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
541 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19542 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51543 },
544 {
545 "experimental-location-features", // FLAGS:RECORD_UMA
546 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
547 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
548 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19549 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
550 },
551 {
[email protected]5aea1862011-03-23 23:55:39552 "tab-groups-context-menu",
553 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
554 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
555 kOsWin,
556 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
557 },
[email protected]c94cebd2012-06-21 00:55:28558 {
559 "enable-instant-extended-api",
560 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
561 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56562 kOsDesktop,
[email protected]73444382013-02-26 19:31:51563 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
564 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28565 },
[email protected]e9bf9d92011-03-31 20:57:15566 {
[email protected]07fd48a2013-04-13 02:53:27567 "enable-local-only-instant-extended-api",
568 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API,
569 IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION,
570 kOsDesktop,
571 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalOnlyInstantExtendedAPI,
572 switches::kDisableLocalOnlyInstantExtendedAPI)
573 },
574 {
[email protected]354e33b2011-06-15 00:29:10575 "static-ip-config",
576 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
577 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
578 kOsCrOS,
579#if defined(OS_CHROMEOS)
580 // This switch exists only on Chrome OS.
581 SINGLE_VALUE_TYPE(switches::kEnableStaticIPConfig)
582#else
583 SINGLE_VALUE_TYPE("")
584#endif
585 },
[email protected]3eb5728c2011-06-20 22:32:24586 {
587 "show-autofill-type-predictions",
588 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
589 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
590 kOsAll,
[email protected]e217c5632013-04-12 19:11:48591 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24592 },
[email protected]bff4d3e2011-06-21 23:58:52593 {
[email protected]a5e9faa2013-03-19 09:58:38594 "enable-sync-favicons",
595 IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME,
596 IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION,
[email protected]fdf4e252012-04-27 00:26:55597 kOsAll,
[email protected]a5e9faa2013-03-19 09:58:38598 SINGLE_VALUE_TYPE(switches::kEnableSyncFavicons)
[email protected]fdf4e252012-04-27 00:26:55599 },
600 {
[email protected]5d90a0a2012-11-15 02:43:40601 "sync-keystore-encryption",
602 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME,
603 IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION,
604 kOsAll,
605 SINGLE_VALUE_TYPE(switches::kSyncKeystoreEncryption)
606 },
607 {
[email protected]e755a382012-09-13 17:16:35608 "enable-gesture-tap-highlight",
609 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
610 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
611 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47612 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
613 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35614 },
615 {
[email protected]a22ebd812011-06-23 00:05:39616 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
617 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
618 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
619 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40620 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25621 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39622 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
623 },
[email protected]81a6b0b2011-06-24 17:55:40624 {
[email protected]68317802012-06-07 19:13:23625 "omnibox-history-quick-provider-new-scoring",
626 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME,
627 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION,
628 kOsAll,
629 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderNewScoringChoices)
630 },
631 {
[email protected]128dc6c2012-06-22 20:30:35632 "omnibox-history-quick-provider-reorder-for-inlining",
633 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
634 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
635 kOsAll,
636 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
637 },
638 {
[email protected]032d5e6c2012-02-17 17:53:55639 "omnibox-inline-history-quick-provider",
640 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
641 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
642 kOsAll,
643 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
644 },
645 {
[email protected]7e7a28092011-12-09 22:24:55646 "enable-panels",
647 IDS_FLAGS_ENABLE_PANELS_NAME,
648 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56649 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55650 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54651 },
[email protected]e3749d12011-07-25 22:22:12652 {
[email protected]27c14f02012-06-22 17:29:58653 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27654 "save-page-as-mhtml", // FLAGS:RECORD_UMA
655 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
656 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
657 kOsMac | kOsWin | kOsLinux,
658 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
659 },
660 {
[email protected]b7bb44f2011-09-01 05:17:03661 "enable-autologin",
662 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
663 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
664 kOsMac | kOsWin | kOsLinux,
665 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
666 },
[email protected]b9841172011-09-26 23:36:09667 {
[email protected]18cf89d2013-04-12 02:42:32668 "enable-spdy4a1",
669 IDS_FLAGS_ENABLE_SPDY4A1_NAME,
670 IDS_FLAGS_ENABLE_SPDY4A1_DESCRIPTION,
671 kOsAll,
672 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a1)
673 },
674 {
[email protected]27b3fe92012-03-21 05:35:06675 "enable-async-dns",
676 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
677 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46678 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44679 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
680 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06681 },
682 {
[email protected]1eb93802012-09-11 18:57:56683 "disable-media-source",
[email protected]da43c082012-09-07 18:56:11684 IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME,
685 IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32686 kOsAll,
[email protected]da43c082012-09-07 18:56:11687 SINGLE_VALUE_TYPE(switches::kDisableMediaSource)
[email protected]6aa03b32011-10-27 21:44:44688 },
[email protected]e4e68dbb2011-11-18 01:50:22689 {
[email protected]36d98412013-01-31 20:28:53690 "disable-encrypted-media",
691 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME,
692 IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56693 kOsDesktop,
[email protected]36d98412013-01-31 20:28:53694 SINGLE_VALUE_TYPE(switches::kDisableEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03695 },
[email protected]f88628792012-12-18 07:07:50696 {
697 "enable-opus-playback",
698 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
699 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56700 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50701 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
702 },
[email protected]ca6eaa5a2013-01-24 16:16:04703 {
[email protected]c54e1aa2013-01-25 09:26:17704 "enable-vp9-playback",
705 IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME,
706 IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION,
707 kOsDesktop,
708 SINGLE_VALUE_TYPE(switches::kEnableVp9Playback)
709 },
710 {
[email protected]6ac955b2013-04-19 23:43:32711 "enable-vp8-alpha-playback",
712 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
713 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
714 kOsDesktop,
715 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
716 },
717 {
[email protected]ca6eaa5a2013-01-24 16:16:04718 "enable-managed-users",
719 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
720 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58721 kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04722 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
723 },
[email protected]dc04be7c2012-03-15 23:57:49724#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50725 {
[email protected]2a13a9a2013-04-19 04:00:21726 "ash-disable-auto-maximizing",
727 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
728 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
729 kOsWin | kOsLinux | kOsCrOS,
730 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
731 },
732 {
[email protected]cda278d2012-10-30 20:31:40733 "ash-disable-auto-window-placement",
734 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
735 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
736 kOsWin | kOsLinux | kOsCrOS,
737 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
738 },
[email protected]b4e4ec42012-11-29 21:42:40739 {
[email protected]16f55a22013-02-13 23:47:34740 "ash-disable-per-app-launcher",
741 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
742 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40743 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34744 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40745 },
[email protected]dc04be7c2012-03-15 23:57:49746#endif
[email protected]eaae8b462012-01-20 22:20:39747 {
[email protected]db543d322011-12-15 20:40:15748 "per-tile-painting",
749 IDS_FLAGS_PER_TILE_PAINTING_NAME,
750 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37751 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37752 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15753 },
[email protected]bf88c032011-12-22 19:05:47754 {
755 "enable-javascript-harmony",
756 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
757 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
758 kOsAll,
759 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
760 },
[email protected]7e7f378a2012-01-05 14:35:37761 {
[email protected]85646172012-01-09 22:45:54762 "enable-tab-browser-dragging",
763 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
764 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
765 kOsWin,
766 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
767 },
768 {
[email protected]068b7b52012-02-27 12:41:44769 "disable-restore-session-state",
770 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
771 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37772 kOsAll,
[email protected]068b7b52012-02-27 12:41:44773 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37774 },
[email protected]88864db2012-01-18 20:56:35775 {
776 "disable-software-rasterizer",
777 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
778 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
779#if defined(ENABLE_SWIFTSHADER)
780 kOsAll,
781#else
782 0,
783#endif
784 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
785 },
[email protected]15a5d722012-01-23 09:11:14786 {
[email protected]ff7b6dd2012-09-15 20:20:03787 "enable-experimental-webkit-features",
788 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME,
789 IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16790 kOsAll,
[email protected]ff7b6dd2012-09-15 20:20:03791 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebKitFeatures)
[email protected]ca7a3d792012-03-02 15:55:49792 },
793 {
[email protected]0f95a252012-09-13 22:30:04794 "enable-css-shaders",
795 IDS_FLAGS_CSS_SHADERS_NAME,
796 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
797 kOsAll,
798 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
799 },
800 {
[email protected]9860c68b2012-02-02 01:58:09801 "enable-extension-activity-ui",
802 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_NAME,
803 IDS_FLAGS_ENABLE_EXTENSION_ACTIVITY_UI_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56804 kOsDesktop,
[email protected]9860c68b2012-02-02 01:58:09805 SINGLE_VALUE_TYPE(switches::kEnableExtensionActivityUI)
[email protected]8bed69d2012-02-02 06:46:00806 },
[email protected]54ae4e92012-02-16 15:19:05807 {
[email protected]3e8befc2012-03-13 01:17:03808 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16809 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
810 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56811 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03812 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16813 },
[email protected]dc04be7c2012-03-15 23:57:49814#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01815 {
[email protected]3cd198a22012-03-12 20:38:01816 "enable-ash-oak",
817 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
818 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
819 kOsAll,
820 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
821 },
[email protected]31cf1c52012-02-29 20:55:01822#endif
[email protected]184ec592012-03-01 11:54:28823 {
824 "enable-devtools-experiments",
825 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
826 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56827 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28828 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
829 },
[email protected]76d1854e2012-03-02 23:57:44830 {
[email protected]2fefdb32013-02-26 14:28:10831 "silent-debugger-extension-api",
832 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
833 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
834 kOsDesktop,
835 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
836 },
837 {
[email protected]76d1854e2012-03-02 23:57:44838 "enable-suggestions-ntp",
839 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
840 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56841 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44842 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
843 },
[email protected]a3d54252012-04-05 20:04:13844 {
[email protected]1dbaf5e2012-11-30 05:51:32845 "spellcheck-autocorrect",
846 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
847 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
848 kOsWin | kOsLinux | kOsCrOS,
849 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
850 },
851 {
[email protected]d7932532012-11-21 21:10:31852 "touch-events",
853 IDS_TOUCH_EVENTS_NAME,
854 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56855 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31856 MULTI_VALUE_TYPE(kTouchEventsChoices)
857 },
858 {
[email protected]c9c73ad42012-04-18 03:35:59859 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06860 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
861 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55862 kOsWin,
[email protected]347a0c72012-05-14 20:28:06863 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59864 },
[email protected]8a6aaa72012-04-20 20:53:58865 {
[email protected]b9c96ff2012-11-26 22:24:40866 "disable-touch-adjustment",
867 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
868 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
869 kOsWin | kOsLinux | kOsCrOS,
870 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
871 },
872 {
[email protected]0b9383a2012-10-26 00:58:16873 "enable-tab-capture",
874 IDS_ENABLE_TAB_CAPTURE_NAME,
875 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25876 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44877 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
878 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16879 },
[email protected]0b60afa2012-04-19 17:36:39880#if defined(OS_CHROMEOS)
881 {
[email protected]7c4a9bc2012-09-11 22:10:05882 "enable-background-loader",
883 IDS_ENABLE_BACKLOADER_NAME,
884 IDS_ENABLE_BACKLOADER_DESCRIPTION,
885 kOsCrOS,
886 SINGLE_VALUE_TYPE(switches::kEnableBackgroundLoader)
887 },
888 {
[email protected]c5667b282012-08-31 00:32:50889 "enable-bezel-touch",
890 IDS_ENABLE_BEZEL_TOUCH_NAME,
891 IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION,
[email protected]1995d80d2012-08-23 02:58:47892 kOsCrOS,
[email protected]c5667b282012-08-31 00:32:50893 SINGLE_VALUE_TYPE(switches::kEnableBezelTouch)
[email protected]1995d80d2012-08-23 02:58:47894 },
895 {
[email protected]3f4181a2013-02-01 21:31:07896 "enable-screensaver-extension",
897 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
898 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
899 kOsCrOS,
900 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
901 },
902 {
[email protected]0b60afa2012-04-19 17:36:39903 "no-discard-tabs",
904 IDS_FLAGS_NO_DISCARD_TABS_NAME,
905 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
906 kOsCrOS,
907 SINGLE_VALUE_TYPE(switches::kNoDiscardTabs)
908 },
909#endif
[email protected]79be6d32012-04-24 20:47:44910 {
[email protected]8d68a3e02013-01-12 15:57:10911 "enable-download-resumption",
912 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
913 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56914 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10915 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
916 },
917 {
[email protected]9a5940d2012-04-27 19:16:23918 "allow-nacl-socket-api",
919 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
920 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56921 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23922 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
923 },
[email protected]85333732012-05-01 19:02:24924 {
[email protected]60673ad72012-05-02 06:16:33925 "stacked-tab-strip",
926 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
927 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
928 kOsWin,
929 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
930 },
931 {
[email protected]4bd20202012-06-14 17:35:01932 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24933 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
934 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
935 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01936 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:24937 },
[email protected]190349fd2012-05-02 00:10:47938#if defined(OS_CHROMEOS)
939 {
940 "allow-touchpad-three-finger-click",
941 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
942 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
943 kOsCrOS,
944 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerClick)
945 },
[email protected]fbc176b62012-10-27 02:19:58946 {
947 "allow-touchpad-three-finger-swipe",
948 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME,
949 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION,
950 kOsCrOS,
951 SINGLE_VALUE_TYPE(switches::kEnableTouchpadThreeFingerSwipe)
952 },
[email protected]190349fd2012-05-02 00:10:47953#endif
[email protected]1992a2f42012-10-23 18:32:21954 {
[email protected]a585e462013-01-26 00:37:15955 "use-client-login-signin-flow",
956 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME,
957 IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION,
[email protected]1992a2f42012-10-23 18:32:21958 kOsMac | kOsWin | kOsLinux,
[email protected]a585e462013-01-26 00:37:15959 SINGLE_VALUE_TYPE(switches::kUseClientLoginSigninFlow)
[email protected]1992a2f42012-10-23 18:32:21960 },
[email protected]8ee02242012-12-04 15:23:32961 {
962 "enable-desktop-guest-mode",
963 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
964 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
965 kOsMac | kOsWin | kOsLinux,
966 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
967 },
[email protected]53520b1b2012-05-07 21:43:37968#if defined(USE_ASH)
969 {
[email protected]8257d382013-03-26 13:08:42970 "show-launcher-alignment-menu",
971 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
972 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:42973 kOsAll,
[email protected]8257d382013-03-26 13:08:42974 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:42975 },
976 {
[email protected]2ddf37b2013-04-20 01:15:58977 "disable-minimize-on-second-launcher-item-click",
978 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
979 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
980 kOsAll,
981 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
982 },
983 {
[email protected]73074742012-05-17 01:44:41984 "show-touch-hud",
985 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
986 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
987 kOsAll,
988 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
989 },
990 {
[email protected]9f0940b62012-05-23 22:56:35991 "enable-pinch",
992 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
993 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:06994 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:38995 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
996 },
997 {
998 "pinch-zoom-scrollbars",
999 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_NAME,
1000 IDS_FLAGS_PINCH_ZOOM_SCROLLBARS_DESCRIPTION,
1001 kOsCrOS,
1002 ENABLE_DISABLE_VALUE_TYPE(cc::switches::kEnablePinchZoomScrollbars,
1003 cc::switches::kDisablePinchZoomScrollbars)
[email protected]9f0940b62012-05-23 22:56:351004 },
[email protected]a8379312012-06-15 00:20:431005 {
1006 "app-list-show-apps-only",
1007 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME,
1008 IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION,
1009 kOsAll,
[email protected]0bc6c272012-07-17 03:32:031010 SINGLE_VALUE_TYPE(app_list::switches::kAppListShowAppsOnly),
[email protected]a8379312012-06-15 00:20:431011 },
[email protected]73074742012-05-17 01:44:411012#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281013#if defined(OS_CHROMEOS)
1014 {
[email protected]8b04a1652012-08-04 02:59:491015 "disable-boot-animation",
1016 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1017 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581018 kOsCrOSOwnerOnly,
[email protected]8b04a1652012-08-04 02:59:491019 SINGLE_VALUE_TYPE(switches::kDisableBootAnimation),
1020 },
[email protected]95058572012-08-20 14:57:291021 {
[email protected]b4557192012-09-19 11:29:581022 "disable-boot-animation2",
1023 IDS_FLAGS_DISABLE_BOOT_ANIMATION2,
1024 IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581025 kOsCrOSOwnerOnly,
[email protected]b4557192012-09-19 11:29:581026 SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2),
1027 },
1028 {
[email protected]ea2f3342012-09-21 21:13:361029 "boot-animation-fucntion",
1030 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION,
1031 IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581032 kOsCrOSOwnerOnly,
[email protected]ea2f3342012-09-21 21:13:361033 MULTI_VALUE_TYPE(kAshBootAnimationFunction),
1034 },
[email protected]839667d62012-10-23 19:38:571035 {
[email protected]d96aef22012-10-30 11:47:021036 "captive-portal-detector",
1037 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1038 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581039 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021040 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1041 },
1042 {
[email protected]c11aa8f12012-12-18 18:43:141043 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571044 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1045 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1046 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141047 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571048 },
[email protected]f0280952012-11-06 20:30:501049 {
[email protected]ea2fab32013-04-16 06:55:021050 "file-manager-legacy",
1051 IDS_FLAGS_FILE_MANAGER_LEGACY_NAME,
1052 IDS_FLAGS_FILE_MANAGER_LEGACY_DESCRIPTION,
[email protected]0fb5c4852012-11-08 20:33:231053 kOsCrOS,
[email protected]ea2fab32013-04-16 06:55:021054 SINGLE_VALUE_TYPE(switches::kFileManagerLegacy),
[email protected]0fb5c4852012-11-08 20:33:231055 },
[email protected]3e035e82012-11-27 20:54:321056 {
[email protected]828d99052013-04-22 08:15:031057 "file-manager-legacy-ui",
1058 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_NAME,
1059 IDS_FLAGS_FILE_MANAGER_LEGACY_UI_DESCRIPTION,
[email protected]bc545292013-04-18 14:33:101060 kOsCrOS,
[email protected]828d99052013-04-22 08:15:031061 SINGLE_VALUE_TYPE(switches::kFileManagerLegacyUI),
[email protected]bc545292013-04-18 14:33:101062 },
1063 {
[email protected]8039e06c2013-01-17 23:34:501064 "disable-launcher-per-display",
1065 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME,
1066 IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION,
[email protected]62018dc2012-12-13 00:37:351067 kOsCrOS,
[email protected]8039e06c2013-01-17 23:34:501068 SINGLE_VALUE_TYPE(ash::switches::kAshDisableLauncherPerDisplay),
[email protected]62018dc2012-12-13 00:37:351069 },
[email protected]06b146d2013-02-07 06:06:471070 {
[email protected]c64d7732013-03-25 18:09:501071 "disable-app-mode",
[email protected]640aa2b2013-03-22 16:00:521072 IDS_FLAGS_DISABLE_KIOSK_APPS_NAME,
1073 IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581074 kOsCrOSOwnerOnly,
[email protected]640aa2b2013-03-22 16:00:521075 SINGLE_VALUE_TYPE(switches::kDisableAppMode),
[email protected]06b146d2013-02-07 06:06:471076 },
[email protected]6ad015c2013-03-06 00:49:511077 {
[email protected]c64d7732013-03-25 18:09:501078 "disable-force-fullscreen-app",
[email protected]640aa2b2013-03-22 16:00:521079 IDS_FLAGS_DISABLE_FULLSCREEN_APP_NAME,
1080 IDS_FLAGS_DISABLE_FULLSCREEN_APP_DESCRIPTION,
[email protected]6ad015c2013-03-06 00:49:511081 kOsCrOS,
[email protected]640aa2b2013-03-22 16:00:521082 SINGLE_VALUE_TYPE(switches::kDisableFullscreenApp),
[email protected]6ad015c2013-03-06 00:49:511083 },
[email protected]62018dc2012-12-13 00:37:351084#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391085 {
[email protected]6247aba2013-03-04 22:57:181086 "views-textfield",
1087 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1088 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391089 kOsWin,
[email protected]6247aba2013-03-04 22:57:181090 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1091 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391092 },
[email protected]bd0cd3bb2012-06-14 03:03:381093 {
[email protected]2d4817742012-12-17 20:16:181094 "enable-new-dialog-style",
1095 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME,
1096 IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321097 kOsWin | kOsCrOS,
[email protected]2d4817742012-12-17 20:16:181098 SINGLE_VALUE_TYPE(switches::kEnableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321099 },
[email protected]7db8893a2012-07-26 00:49:401100 { "disable-accelerated-video-decode",
1101 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1102 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561103 kOsDesktop,
[email protected]7db8893a2012-07-26 00:49:401104 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151105 },
[email protected]66ae9fc2012-06-19 21:33:521106#if defined(USE_ASH)
1107 {
1108 "ash-debug-shortcuts",
1109 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1110 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1111 kOsAll,
1112 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1113 },
1114#endif
[email protected]37fee0942012-08-07 21:07:451115 {
[email protected]ad3f6d22012-08-29 02:34:191116 "enable-contacts",
1117 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1118 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1119 kOsCrOS,
1120 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1121 },
[email protected]1d9bb9cd2012-08-28 22:02:501122#if defined(USE_ASH)
1123 { "ash-enable-advanced-gestures",
1124 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1125 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1126 kOsCrOS,
1127 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1128 },
[email protected]cfa24e62013-02-13 21:19:111129 { "ash-disable-tab-scrubbing",
1130 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1131 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161132 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111133 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161134 },
[email protected]83eef802012-12-02 07:43:521135 { "ash-enable-workspace-scrubbing",
1136 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1137 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1138 kOsCrOS,
1139 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1140 },
[email protected]cf2b1a82013-04-20 01:05:431141 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111142 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1143 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241144 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431145 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1146 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241147 },
[email protected]316708a2012-11-05 22:57:021148#if defined(OS_LINUX)
1149 { "ash-enable-memory-monitor",
1150 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1151 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1152 kOsCrOS,
1153 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1154 },
1155#endif
[email protected]1d9bb9cd2012-08-28 22:02:501156#endif
[email protected]9b7ab882012-09-10 23:46:361157#if defined(OS_CHROMEOS)
[email protected]9475ee6f2013-03-08 18:20:091158 { "ash-disable-new-network-status-area",
1159 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_NAME,
1160 IDS_FLAGS_ASH_DISABLE_NEW_NETWORK_STATUS_AREA_DESCRIPTION,
[email protected]badba1ad2012-11-16 17:21:461161 kOsCrOS,
[email protected]9475ee6f2013-03-08 18:20:091162 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewNetworkStatusArea),
[email protected]badba1ad2012-11-16 17:21:461163 },
[email protected]9b7ab882012-09-10 23:46:361164 {
[email protected]205f07892012-10-16 20:26:221165 "enable-carrier-switching",
1166 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1167 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1168 kOsCrOS,
1169 SINGLE_VALUE_TYPE(switches::kEnableCarrierSwitching)
1170 },
1171 {
[email protected]9b7ab882012-09-10 23:46:361172 "enable-request-tablet-site",
1173 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1174 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1175 kOsCrOS,
1176 SINGLE_VALUE_TYPE(switches::kEnableRequestTabletSite)
1177 },
1178#endif
[email protected]dab49c0b2012-10-04 05:55:351179 {
1180 "debug-packed-apps",
1181 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1182 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561183 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351184 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1185 },
[email protected]d1459ed2012-10-10 01:29:331186 {
1187 "enable-password-generation",
1188 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1189 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561190 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331191 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1192 },
[email protected]26d045f2012-10-18 21:18:431193 {
[email protected]76f7d4882012-10-26 21:09:221194 "enable-deferred-image-decoding",
1195 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1196 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221197 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221198 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1199 },
1200 {
[email protected]075543d2012-10-24 01:29:141201 "performance-monitor-gathering",
1202 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1203 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1204 kOsAll,
1205 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1206 },
[email protected]783d5bb2012-10-24 03:47:141207 {
[email protected]90b482d2013-04-04 10:45:581208 "disable-native-autofill-ui",
1209 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME,
1210 IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION,
[email protected]1fdeac72013-03-19 17:28:431211 kOsDesktop,
[email protected]90b482d2013-04-04 10:45:581212 SINGLE_VALUE_TYPE(switches::kDisableNativeAutofillUi)
[email protected]1fdeac72013-03-19 17:28:431213 },
1214 {
[email protected]a7259fb2012-11-08 06:22:231215 "enable-experimental-form-filling",
1216 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1217 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1218 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481219 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231220 },
[email protected]6e6efe42013-01-30 00:04:501221 {
[email protected]db3178c2013-03-21 14:54:541222 "wallet-service-use-prod",
1223 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1224 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1225 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481226 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541227 },
1228 {
[email protected]6e6efe42013-01-30 00:04:501229 "enable-interactive-autocomplete",
1230 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1231 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]57e67ac2013-02-22 03:37:221232 kOsWin | kOsCrOS | kOsAndroid,
[email protected]6e6efe42013-01-30 00:04:501233 SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete)
1234 },
[email protected]177260c2013-04-24 01:47:381235#if defined(USE_AURA)
1236 {
1237 "overscroll-history-navigation",
1238 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1239 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1240 kOsAll,
1241 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1242 switches::kOverscrollHistoryNavigation, "1",
1243 switches::kOverscrollHistoryNavigation, "0")
1244 },
1245#endif
[email protected]edbea622012-11-28 20:39:381246 {
1247 "enable-touch-drag-drop",
1248 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1249 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1250 kOsWin | kOsCrOS,
1251 SINGLE_VALUE_TYPE(switches::kEnableTouchDragDrop)
1252 },
[email protected]0e2f43b62013-02-21 00:47:151253 {
1254 "enable-touch-editing",
1255 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1256 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1257 kOsCrOS,
1258 SINGLE_VALUE_TYPE(switches::kEnableTouchEditing)
1259 },
[email protected]f1c39242013-01-29 16:13:011260#if defined(ENABLE_MESSAGE_CENTER)
[email protected]92e12dd92012-12-11 03:33:201261 {
1262 "enable-rich-notifications",
1263 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1264 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
1265 kOsWin | kOsCrOS,
[email protected]aee412aa2013-04-02 20:01:231266 ENABLE_DISABLE_VALUE_TYPE(
1267 message_center::switches::kEnableRichNotifications,
1268 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201269 },
[email protected]f1c39242013-01-29 16:13:011270#endif
[email protected]4d51c682012-12-11 11:34:551271 {
1272 "full-history-sync",
1273 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1274 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1275 kOsAll,
1276 SINGLE_VALUE_TYPE(switches::kHistoryEnableFullHistorySync)
1277 },
[email protected]628a69a92012-12-23 04:09:341278 {
[email protected]fd030142013-02-08 02:04:381279 "enable-usermedia-screen-capture",
1280 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1281 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1282 kOsDesktop,
1283 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1284 },
[email protected]5b93e162013-02-19 06:33:091285 {
1286 "enable-apps-devtool-app",
1287 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1288 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1289 kOsDesktop,
1290 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1291 },
[email protected]9323fdd12013-02-23 00:31:361292 {
1293 "impl-side-painting",
1294 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1295 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041296 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361297 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1298 },
[email protected]a42c85f2013-04-04 18:15:121299 {
[email protected]1c92d3e2013-04-18 05:31:391300 "enable-websocket-experimental-implementation",
1301 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1302 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1303 kOsAll,
1304 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1305 },
1306 {
[email protected]a42c85f2013-04-04 18:15:121307 "max-tiles-for-interest-area",
1308 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1309 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1310 kOsAndroid | kOsLinux | kOsCrOS,
1311 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1312 },
[email protected]7cf7ccb2013-04-20 02:53:081313 {
1314 "enable-offline-mode",
1315 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1316 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1317 kOsAll,
1318 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1319 },
[email protected]2f2f72b2013-03-08 22:37:311320 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1321#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371322 {
1323 "track-active-visit-time",
1324 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1325 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1326 kOsWin,
1327 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1328 },
[email protected]2f2f72b2013-03-08 22:37:311329#endif
[email protected]8cc71d42013-03-02 17:26:081330#if defined(OS_ANDROID)
1331 {
1332 "disable-gesture-requirement-for-media-playback",
1333 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1334 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1335 kOsAndroid,
1336 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1337 },
1338#endif
[email protected]e79f2fd52013-03-08 23:52:471339#if defined(OS_CHROMEOS)
1340 {
1341 "enable-experimental-bluetooth",
1342 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME,
1343 IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION,
1344 kOsCrOS,
1345 SINGLE_VALUE_TYPE(chromeos::switches::kEnableExperimentalBluetooth)
1346 },
1347#endif
[email protected]6077cab2013-03-11 19:36:141348#if defined(ENABLE_GOOGLE_NOW)
1349 {
1350 "enable-google-now",
1351 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1352 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
1353 kOsWin | kOsCrOS,
1354 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1355 },
1356#endif
[email protected]4a9e2e02013-04-08 16:19:491357 {
1358 "enable-translate-alpha-languages",
1359 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_NAME,
1360 IDS_FLAGS_ENABLE_TRANSLATE_ALPHA_LANGUAGES_DESCRIPTION,
1361 kOsAll,
1362 SINGLE_VALUE_TYPE(switches::kEnableTranslateAlphaLanguages)
1363 },
[email protected]86459e2c2013-04-10 13:39:241364#if defined(OS_CHROMEOS)
1365 {
1366 "enable-virtual-keyboard",
1367 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1368 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1369 kOsCrOS,
1370 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1371 },
1372#endif
[email protected]38484df12013-04-10 16:42:031373 {
1374 "enable-simple-cache-backend",
1375 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1376 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
1377 kOsAndroid,
1378 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1379 },
[email protected]717e4e22013-04-10 20:52:231380 {
1381 "enable-tcp-fast-open",
1382 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1383 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111384 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231385 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1386 },
[email protected]8027acd2013-04-18 08:35:151387 {
1388 "enable-webp-in-accept-header",
1389 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME,
1390 IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION,
1391 kOsAll,
1392 SINGLE_VALUE_TYPE(switches::kEnableWebPInAcceptHeader)
1393 },
[email protected]a0e4b072011-08-17 01:47:071394};
[email protected]ad2a3ded2010-08-27 13:19:051395
[email protected]a314ee5a2010-10-26 21:23:281396const Experiment* experiments = kExperiments;
1397size_t num_experiments = arraysize(kExperiments);
1398
[email protected]e2ddbc92010-10-15 20:02:071399// Stores and encapsulates the little state that about:flags has.
1400class FlagsState {
1401 public:
1402 FlagsState() : needs_restart_(false) {}
1403 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
1404 bool IsRestartNeededToCommitChanges();
1405 void SetExperimentEnabled(
[email protected]a314ee5a2010-10-26 21:23:281406 PrefService* prefs, const std::string& internal_name, bool enable);
[email protected]e2ddbc92010-10-15 20:02:071407 void RemoveFlagsSwitches(
1408 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]cb93bf52013-02-20 01:20:001409 void ResetAllFlags(PrefService* prefs);
[email protected]e2ddbc92010-10-15 20:02:071410 void reset();
1411
1412 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551413 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071414 return Singleton<FlagsState>::get();
1415 }
1416
1417 private:
1418 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531419 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071420
1421 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1422};
1423
[email protected]c7b7800a2010-10-07 18:51:351424// Extracts the list of enabled lab experiments from preferences and stores them
[email protected]c6343372013-03-13 17:05:491425// in a set.
[email protected]1a47d7e2010-10-15 00:37:241426void GetEnabledFlags(const PrefService* prefs, std::set<std::string>* result) {
[email protected]ad2a3ded2010-08-27 13:19:051427 const ListValue* enabled_experiments = prefs->GetList(
1428 prefs::kEnabledLabsExperiments);
1429 if (!enabled_experiments)
1430 return;
1431
1432 for (ListValue::const_iterator it = enabled_experiments->begin();
1433 it != enabled_experiments->end();
1434 ++it) {
1435 std::string experiment_name;
1436 if (!(*it)->GetAsString(&experiment_name)) {
1437 LOG(WARNING) << "Invalid entry in " << prefs::kEnabledLabsExperiments;
1438 continue;
1439 }
1440 result->insert(experiment_name);
1441 }
1442}
1443
[email protected]c6343372013-03-13 17:05:491444// Takes a set of enabled lab experiments
[email protected]1a47d7e2010-10-15 00:37:241445void SetEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051446 PrefService* prefs, const std::set<std::string>& enabled_experiments) {
[email protected]1bc78422011-03-31 08:41:381447 ListPrefUpdate update(prefs, prefs::kEnabledLabsExperiments);
1448 ListValue* experiments_list = update.Get();
[email protected]ad2a3ded2010-08-27 13:19:051449
1450 experiments_list->Clear();
1451 for (std::set<std::string>::const_iterator it = enabled_experiments.begin();
1452 it != enabled_experiments.end();
1453 ++it) {
1454 experiments_list->Append(new StringValue(*it));
1455 }
1456}
1457
[email protected]8a6ff28d2010-12-02 16:35:191458// Adds the internal names for the specified experiment to |names|.
1459void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1460 if (e.type == Experiment::SINGLE_VALUE) {
1461 names->insert(e.internal_name);
1462 } else {
[email protected]83e9fa702013-02-25 19:30:441463 DCHECK(e.type == Experiment::MULTI_VALUE ||
1464 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191465 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441466 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191467 }
1468}
1469
[email protected]28e35af2011-02-09 12:56:221470// Confirms that an experiment is valid, used in a DCHECK in
1471// SanitizeList below.
1472bool ValidateExperiment(const Experiment& e) {
1473 switch (e.type) {
1474 case Experiment::SINGLE_VALUE:
1475 DCHECK_EQ(0, e.num_choices);
1476 DCHECK(!e.choices);
1477 break;
1478 case Experiment::MULTI_VALUE:
1479 DCHECK_GT(e.num_choices, 0);
1480 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531481 DCHECK(e.choices[0].command_line_switch);
1482 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221483 break;
[email protected]83e9fa702013-02-25 19:30:441484 case Experiment::ENABLE_DISABLE_VALUE:
1485 DCHECK_EQ(3, e.num_choices);
1486 DCHECK(!e.choices);
1487 DCHECK(e.command_line_switch);
1488 DCHECK(e.command_line_value);
1489 DCHECK(e.disable_command_line_switch);
1490 DCHECK(e.disable_command_line_value);
1491 break;
[email protected]28e35af2011-02-09 12:56:221492 default:
1493 NOTREACHED();
1494 }
1495 return true;
1496}
1497
[email protected]ad2a3ded2010-08-27 13:19:051498// Removes all experiments from prefs::kEnabledLabsExperiments that are
1499// unknown, to prevent this list to become very long as experiments are added
1500// and removed.
1501void SanitizeList(PrefService* prefs) {
1502 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221503 for (size_t i = 0; i < num_experiments; ++i) {
1504 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191505 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221506 }
[email protected]ad2a3ded2010-08-27 13:19:051507
1508 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241509 GetEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051510
1511 std::set<std::string> new_enabled_experiments;
1512 std::set_intersection(
1513 known_experiments.begin(), known_experiments.end(),
1514 enabled_experiments.begin(), enabled_experiments.end(),
1515 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1516
[email protected]4c8853f2012-07-23 01:29:161517 if (new_enabled_experiments != enabled_experiments)
1518 SetEnabledFlags(prefs, new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051519}
1520
[email protected]1a47d7e2010-10-15 00:37:241521void GetSanitizedEnabledFlags(
[email protected]ad2a3ded2010-08-27 13:19:051522 PrefService* prefs, std::set<std::string>* result) {
1523 SanitizeList(prefs);
[email protected]1a47d7e2010-10-15 00:37:241524 GetEnabledFlags(prefs, result);
[email protected]ad2a3ded2010-08-27 13:19:051525}
1526
[email protected]a314ee5a2010-10-26 21:23:281527// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1528// enabled on the current platform.
1529void GetSanitizedEnabledFlagsForCurrentPlatform(
1530 PrefService* prefs, std::set<std::string>* result) {
1531 GetSanitizedEnabledFlags(prefs, result);
1532
1533 // Filter out any experiments that aren't enabled on the current platform. We
1534 // don't remove these from prefs else syncing to a platform with a different
1535 // set of experiments would be lossy.
1536 std::set<std::string> platform_experiments;
1537 int current_platform = GetCurrentPlatform();
1538 for (size_t i = 0; i < num_experiments; ++i) {
1539 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191540 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581541#if defined(OS_CHROMEOS)
1542 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1543 AddInternalName(experiments[i], &platform_experiments);
1544#endif
[email protected]a314ee5a2010-10-26 21:23:281545 }
1546
1547 std::set<std::string> new_enabled_experiments;
1548 std::set_intersection(
1549 platform_experiments.begin(), platform_experiments.end(),
1550 result->begin(), result->end(),
1551 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1552
1553 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051554}
1555
[email protected]8a6ff28d2010-12-02 16:35:191556// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191557Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221558 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441559 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1560 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191561 ListValue* result = new ListValue;
1562 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191563 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441564 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191565 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441566 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221567 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191568 result->Append(value);
1569 }
1570 return result;
1571}
1572
[email protected]e2ddbc92010-10-15 20:02:071573} // namespace
1574
[email protected]83e9fa702013-02-25 19:30:441575std::string Experiment::NameForChoice(int index) const {
1576 DCHECK(type == Experiment::MULTI_VALUE ||
1577 type == Experiment::ENABLE_DISABLE_VALUE);
1578 DCHECK_LT(index, num_choices);
1579 return std::string(internal_name) + testing::kMultiSeparator +
1580 base::IntToString(index);
1581}
1582
1583string16 Experiment::DescriptionForChoice(int index) const {
1584 DCHECK(type == Experiment::MULTI_VALUE ||
1585 type == Experiment::ENABLE_DISABLE_VALUE);
1586 DCHECK_LT(index, num_choices);
1587 int description_id;
1588 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1589 const int kEnableDisableDescriptionIds[] = {
1590 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1591 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1592 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1593 };
1594 description_id = kEnableDisableDescriptionIds[index];
1595 } else {
1596 description_id = choices[index].description_id;
1597 }
1598 return l10n_util::GetStringUTF16(description_id);
1599}
1600
[email protected]1a47d7e2010-10-15 00:37:241601void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) {
[email protected]8e8bb6d2010-12-13 08:18:551602 FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line);
[email protected]ad2a3ded2010-08-27 13:19:051603}
1604
[email protected]37736bd2013-04-18 11:53:581605ListValue* GetFlagsExperimentsData(PrefService* prefs, FlagAccess access) {
[email protected]ad2a3ded2010-08-27 13:19:051606 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241607 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051608
1609 int current_platform = GetCurrentPlatform();
1610
1611 ListValue* experiments_data = new ListValue();
[email protected]a314ee5a2010-10-26 21:23:281612 for (size_t i = 0; i < num_experiments; ++i) {
1613 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051614
[email protected]1fd1f292013-03-23 23:08:401615#if defined(OS_ANDROID)
1616 // Special case enable-spdy-proxy-auth, because it should only
1617 // be available on Dev and Beta channels.
1618 if (!strcmp("enable-spdy-proxy-auth", experiment.internal_name) &&
1619 chrome::VersionInfo::GetChannel() ==
1620 chrome::VersionInfo::CHANNEL_STABLE)
1621 continue;
1622#endif
1623
[email protected]ad2a3ded2010-08-27 13:19:051624 DictionaryValue* data = new DictionaryValue();
1625 data->SetString("internal_name", experiment.internal_name);
1626 data->SetString("name",
1627 l10n_util::GetStringUTF16(experiment.visible_name_id));
1628 data->SetString("description",
1629 l10n_util::GetStringUTF16(
1630 experiment.visible_description_id));
[email protected]37736bd2013-04-18 11:53:581631 bool supported = (experiment.supported_platforms & current_platform) != 0;
1632#if defined(OS_CHROMEOS)
1633 if (access == kOwnerAccessToFlags &&
1634 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0)
1635 supported = true;
1636#endif
[email protected]cc3e2052011-12-20 01:01:401637 data->SetBoolean("supported", supported);
1638
1639 ListValue* supported_platforms = new ListValue();
1640 AddOsStrings(experiment.supported_platforms, supported_platforms);
1641 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051642
[email protected]28e35af2011-02-09 12:56:221643 switch (experiment.type) {
1644 case Experiment::SINGLE_VALUE:
1645 data->SetBoolean(
1646 "enabled",
1647 enabled_experiments.count(experiment.internal_name) > 0);
1648 break;
1649 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441650 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221651 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1652 break;
1653 default:
1654 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191655 }
1656
[email protected]ad2a3ded2010-08-27 13:19:051657 experiments_data->Append(data);
1658 }
1659 return experiments_data;
1660}
1661
[email protected]ad2a3ded2010-08-27 13:19:051662bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551663 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051664}
1665
1666void SetExperimentEnabled(
[email protected]c7b7800a2010-10-07 18:51:351667 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]8e8bb6d2010-12-13 08:18:551668 FlagsState::GetInstance()->SetExperimentEnabled(prefs, internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071669}
1670
1671void RemoveFlagsSwitches(
1672 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551673 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071674}
1675
[email protected]cb93bf52013-02-20 01:20:001676void ResetAllFlags(PrefService* prefs) {
1677 FlagsState::GetInstance()->ResetAllFlags(prefs);
1678}
1679
[email protected]a314ee5a2010-10-26 21:23:281680int GetCurrentPlatform() {
1681#if defined(OS_MACOSX)
1682 return kOsMac;
1683#elif defined(OS_WIN)
1684 return kOsWin;
1685#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1686 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211687#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281688 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401689#elif defined(OS_ANDROID)
1690 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281691#else
1692#error Unknown platform
1693#endif
1694}
1695
[email protected]4bc5050c2010-11-18 17:55:541696void RecordUMAStatistics(const PrefService* prefs) {
1697 std::set<std::string> flags;
1698 GetEnabledFlags(prefs, &flags);
1699 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1700 ++it) {
1701 std::string action("AboutFlags_");
1702 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381703 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541704 }
1705 // Since flag metrics are recorded every startup, add a tick so that the
1706 // stats can be made meaningful.
1707 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381708 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1709 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541710}
1711
[email protected]e2ddbc92010-10-15 20:02:071712//////////////////////////////////////////////////////////////////////////////
1713// FlagsState implementation.
1714
1715namespace {
1716
[email protected]83e9fa702013-02-25 19:30:441717typedef std::map<std::string, std::pair<std::string, std::string> >
1718 NameToSwitchAndValueMap;
1719
1720void SetFlagToSwitchMapping(const std::string& key,
1721 const std::string& switch_name,
1722 const std::string& switch_value,
1723 NameToSwitchAndValueMap* name_to_switch_map) {
1724 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1725 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1726}
1727
[email protected]e2ddbc92010-10-15 20:02:071728void FlagsState::ConvertFlagsToSwitches(
1729 PrefService* prefs, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071730 if (command_line->HasSwitch(switches::kNoExperiments))
1731 return;
1732
1733 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001734
[email protected]a314ee5a2010-10-26 21:23:281735 GetSanitizedEnabledFlagsForCurrentPlatform(prefs, &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071736
[email protected]a82744532011-02-11 16:15:531737 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191738 for (size_t i = 0; i < num_experiments; ++i) {
1739 const Experiment& e = experiments[i];
1740 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441741 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1742 e.command_line_value, &name_to_switch_map);
1743 } else if (e.type == Experiment::MULTI_VALUE) {
1744 for (int j = 0; j < e.num_choices; ++j) {
1745 SetFlagToSwitchMapping(e.NameForChoice(j),
1746 e.choices[j].command_line_switch,
1747 e.choices[j].command_line_value,
1748 &name_to_switch_map);
1749 }
[email protected]8a6ff28d2010-12-02 16:35:191750 } else {
[email protected]83e9fa702013-02-25 19:30:441751 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1752 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1753 &name_to_switch_map);
1754 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1755 e.command_line_value, &name_to_switch_map);
1756 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1757 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191758 }
1759 }
[email protected]e2ddbc92010-10-15 20:02:071760
1761 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531762 flags_switches_.insert(
1763 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1764 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071765 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1766 it != enabled_experiments.end();
1767 ++it) {
1768 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531769 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191770 name_to_switch_map.find(experiment_name);
1771 if (name_to_switch_it == name_to_switch_map.end()) {
1772 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071773 continue;
[email protected]8a6ff28d2010-12-02 16:35:191774 }
[email protected]e2ddbc92010-10-15 20:02:071775
[email protected]a82744532011-02-11 16:15:531776 const std::pair<std::string, std::string>&
1777 switch_and_value_pair = name_to_switch_it->second;
1778
1779 command_line->AppendSwitchASCII(switch_and_value_pair.first,
1780 switch_and_value_pair.second);
1781 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:071782 }
1783 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:531784 flags_switches_.insert(
1785 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
1786 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071787}
1788
1789bool FlagsState::IsRestartNeededToCommitChanges() {
1790 return needs_restart_;
1791}
1792
1793void FlagsState::SetExperimentEnabled(
1794 PrefService* prefs, const std::string& internal_name, bool enable) {
[email protected]83e9fa702013-02-25 19:30:441795 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:191796 if (at_index != std::string::npos) {
1797 DCHECK(enable);
1798 // We're being asked to enable a multi-choice experiment. Disable the
1799 // currently selected choice.
1800 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:221801 const std::string experiment_name = internal_name.substr(0, at_index);
1802 SetExperimentEnabled(prefs, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:191803
[email protected]28e35af2011-02-09 12:56:221804 // And enable the new choice, if it is not the default first choice.
1805 if (internal_name != experiment_name + "@0") {
1806 std::set<std::string> enabled_experiments;
1807 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:081808 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]28e35af2011-02-09 12:56:221809 SetEnabledFlags(prefs, enabled_experiments);
1810 }
[email protected]8a6ff28d2010-12-02 16:35:191811 return;
1812 }
1813
[email protected]ad2a3ded2010-08-27 13:19:051814 std::set<std::string> enabled_experiments;
[email protected]1a47d7e2010-10-15 00:37:241815 GetSanitizedEnabledFlags(prefs, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051816
[email protected]8a6ff28d2010-12-02 16:35:191817 const Experiment* e = NULL;
1818 for (size_t i = 0; i < num_experiments; ++i) {
1819 if (experiments[i].internal_name == internal_name) {
1820 e = experiments + i;
1821 break;
1822 }
1823 }
1824 DCHECK(e);
1825
1826 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:591827 if (enable)
[email protected]147492b2013-03-19 23:52:081828 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:591829 else
[email protected]147492b2013-03-19 23:52:081830 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191831 } else {
1832 if (enable) {
1833 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:081834 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:191835 } else {
1836 // Find the currently enabled choice and disable it.
1837 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:441838 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191839 if (enabled_experiments.find(choice_name) !=
1840 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:081841 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:191842 enabled_experiments.erase(choice_name);
1843 // Continue on just in case there's a bug and more than one
1844 // experiment for this choice was enabled.
1845 }
1846 }
1847 }
1848 }
[email protected]ad2a3ded2010-08-27 13:19:051849
[email protected]1a47d7e2010-10-15 00:37:241850 SetEnabledFlags(prefs, enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051851}
1852
[email protected]e2ddbc92010-10-15 20:02:071853void FlagsState::RemoveFlagsSwitches(
1854 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:531855 for (std::map<std::string, std::string>::const_iterator
1856 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
1857 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:071858 }
1859}
1860
[email protected]cb93bf52013-02-20 01:20:001861void FlagsState::ResetAllFlags(PrefService* prefs) {
1862 needs_restart_ = true;
1863
1864 std::set<std::string> no_experiments;
1865 SetEnabledFlags(prefs, no_experiments);
1866}
1867
[email protected]e2ddbc92010-10-15 20:02:071868void FlagsState::reset() {
1869 needs_restart_ = false;
1870 flags_switches_.clear();
1871}
1872
[email protected]38e46812011-05-09 20:49:221873} // namespace
[email protected]e2ddbc92010-10-15 20:02:071874
1875namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:191876
1877// WARNING: '@' is also used in the html file. If you update this constant you
1878// also need to update the html file.
1879const char kMultiSeparator[] = "@";
1880
[email protected]e2ddbc92010-10-15 20:02:071881void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:551882 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:071883}
[email protected]a314ee5a2010-10-26 21:23:281884
1885void SetExperiments(const Experiment* e, size_t count) {
1886 if (!e) {
1887 experiments = kExperiments;
1888 num_experiments = arraysize(kExperiments);
1889 } else {
1890 experiments = e;
1891 num_experiments = count;
1892 }
1893}
1894
[email protected]8a6ff28d2010-12-02 16:35:191895const Experiment* GetExperiments(size_t* count) {
1896 *count = num_experiments;
1897 return experiments;
1898}
1899
[email protected]e2ddbc92010-10-15 20:02:071900} // namespace testing
1901
[email protected]1a47d7e2010-10-15 00:37:241902} // namespace about_flags