blob: b64fee98dbadda5b07dd30d36a5cf816576f2ad8 [file] [log] [blame]
[email protected]9c66adc2012-01-05 02:10:161// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]ad2a3ded2010-08-27 13:19:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]1a47d7e2010-10-15 00:37:245#include "chrome/browser/about_flags.h"
[email protected]ad2a3ded2010-08-27 13:19:056
7#include <algorithm>
8#include <iterator>
9#include <map>
10#include <set>
[email protected]83e9fa702013-02-25 19:30:4411#include <utility>
[email protected]ad2a3ded2010-08-27 13:19:0512
[email protected]ad2a3ded2010-08-27 13:19:0513#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4115#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2016#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0517#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5218#include "cc/base/switches.h"
[email protected]e6d1c4f2013-06-12 17:37:4019#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0320#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0521#include "chrome/common/chrome_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1022#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3823#include "content/public/browser/user_metrics.h"
[email protected]d96aef22012-10-30 11:47:0224#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0525#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0226#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0227#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1728#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5929#include "ui/base/ui_base_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4830#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2731#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2432#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5633#include "ui/message_center/message_center_switches.h"
[email protected]fb1aac14e2013-05-14 05:30:2434#include "ui/surface/surface_switches.h"
[email protected]9a224572013-05-12 23:08:5635
[email protected]dc04be7c2012-03-15 23:57:4936#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3137#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4938#endif
39
[email protected]badba1ad2012-11-16 17:21:4640#if defined(OS_CHROMEOS)
41#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5142#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4643#endif
44
[email protected]7f6f44c2011-12-14 13:23:3845using content::UserMetricsAction;
46
[email protected]1a47d7e2010-10-15 00:37:2447namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0548
[email protected]8a6ff28d2010-12-02 16:35:1949// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5350#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4451 Experiment::SINGLE_VALUE, \
52 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5353#define SINGLE_VALUE_TYPE(command_line_switch) \
54 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4455#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
56 disable_switch, disable_value) \
57 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
58 disable_switch, disable_value, NULL, 3
59#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
60 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5361#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1963
[email protected]e2ddbc92010-10-15 20:02:0764namespace {
65
[email protected]9c7453d2012-01-21 00:45:4066const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5667const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0568
[email protected]cc3e2052011-12-20 01:01:4069// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
70// whether the experiment is available on that platform.
71void AddOsStrings(unsigned bitmask, ListValue* list) {
72 struct {
73 unsigned bit;
74 const char* const name;
75 } kBitsToOs[] = {
76 {kOsMac, "Mac"},
77 {kOsWin, "Windows"},
78 {kOsLinux, "Linux"},
79 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0180 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5881 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4082 };
83 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
84 if (bitmask & kBitsToOs[i].bit)
85 list->Append(new StringValue(kBitsToOs[i].name));
86}
87
[email protected]6d98abf2013-06-17 23:35:5188// Convert switch constants to proper CommandLine::StringType strings.
89CommandLine::StringType GetSwitchString(const std::string& flag) {
90 CommandLine cmd_line(CommandLine::NO_PROGRAM);
91 cmd_line.AppendSwitch(flag);
92 DCHECK(cmd_line.argv().size() == 2);
93 return cmd_line.argv()[1];
94}
95
96// Scoops flags from a command line.
97std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
98 const CommandLine& cmdline) {
99 std::set<CommandLine::StringType> flags;
100 // First do the ones between --flag-switches-begin and --flag-switches-end.
101 CommandLine::StringVector::const_iterator first =
102 std::find(cmdline.argv().begin(), cmdline.argv().end(),
103 GetSwitchString(switches::kFlagSwitchesBegin));
104 CommandLine::StringVector::const_iterator last =
105 std::find(cmdline.argv().begin(), cmdline.argv().end(),
106 GetSwitchString(switches::kFlagSwitchesEnd));
107 if (first != cmdline.argv().end() && last != cmdline.argv().end())
108 flags.insert(first + 1, last);
109#if defined(OS_CHROMEOS)
110 // Then add those between --policy-switches-begin and --policy-switches-end.
111 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
112 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
113 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
115 if (first != cmdline.argv().end() && last != cmdline.argv().end())
116 flags.insert(first + 1, last);
117#endif
118 return flags;
119}
120
[email protected]128dc6c2012-06-22 20:30:35121const Experiment::Choice
122 kOmniboxHistoryQuickProviderReorderForInliningChoices[] = {
123 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC,
124 "",
125 "" },
126 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED,
127 switches::kOmniboxHistoryQuickProviderReorderForInlining,
128 switches::kOmniboxHistoryQuickProviderReorderForInliningEnabled },
129 { IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED,
130 switches::kOmniboxHistoryQuickProviderReorderForInlining,
131 switches::kOmniboxHistoryQuickProviderReorderForInliningDisabled }
132};
133
[email protected]032d5e6c2012-02-17 17:53:55134const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
135 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
136 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
137 switches::kOmniboxInlineHistoryQuickProvider,
138 switches::kOmniboxInlineHistoryQuickProviderAllowed },
139 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
140 switches::kOmniboxInlineHistoryQuickProvider,
141 switches::kOmniboxInlineHistoryQuickProviderProhibited }
142};
143
[email protected]fb854192013-02-06 01:30:04144const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
145 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
146 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
147 switches::kEnableCompositingForFixedPosition, ""},
148 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
149 switches::kDisableCompositingForFixedPosition, ""},
150 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
151 switches::kEnableHighDpiCompositingForFixedPosition, ""}
152};
153
[email protected]d8221b22013-05-23 05:35:43154const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
155 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
156 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
157 switches::kEnableCompositingForTransition, ""},
158 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
159 switches::kDisableCompositingForTransition, ""},
160};
161
[email protected]06fc4d3b2013-07-08 21:07:24162const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
163 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
164 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
165 switches::kEnableAcceleratedFixedRootBackground, ""},
166 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
167 switches::kDisableAcceleratedFixedRootBackground, ""},
168};
169
[email protected]8b1c3c72013-01-25 01:48:43170const Experiment::Choice kGDIPresentChoices[] = {
171 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
172 { IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW,
173 switches::kDoFirstShowPresentWithGDI, ""},
174 { IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW,
175 switches::kDoAllShowPresentWithGDI, ""}
176};
177
[email protected]d7932532012-11-21 21:10:31178const Experiment::Choice kTouchEventsChoices[] = {
179 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
180 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
181 switches::kTouchEvents,
182 switches::kTouchEventsEnabled },
183 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
184 switches::kTouchEvents,
185 switches::kTouchEventsDisabled }
186};
187
[email protected]347a0c72012-05-14 20:28:06188const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31189 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20190 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06191 switches::kTouchOptimizedUI,
192 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20193 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06194 switches::kTouchOptimizedUI,
195 switches::kTouchOptimizedUIDisabled }
196};
197
[email protected]66f409c2012-10-04 20:59:04198const Experiment::Choice kNaClDebugMaskChoices[] = {
199 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
200 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
201 // debug stub to a remote machine. Since secure shell uses NaCl, we provide
202 // an option to switch off its debugging.
203 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS,
204 switches::kNaClDebugMask, "!*://*/*ssh_client.nmf" },
205 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
206 switches::kNaClDebugMask, "*://*/*debug.nmf" }
207};
208
[email protected]ea2f3342012-09-21 21:13:36209#if defined(OS_CHROMEOS)
[email protected]d96aef22012-10-30 11:47:02210
211const Experiment::Choice kChromeCaptivePortalDetectionChoices[] = {
[email protected]2f2d6c32013-05-10 02:56:24212 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]d96aef22012-10-30 11:47:02213 { IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24214 chromeos::switches::kEnableChromeCaptivePortalDetector, "" },
[email protected]ad2fe9f2012-11-15 11:03:19215 { IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR,
[email protected]2f2d6c32013-05-10 02:56:24216 chromeos::switches::kDisableChromeCaptivePortalDetector, "" }
[email protected]d96aef22012-10-30 11:47:02217};
[email protected]a78c7432013-03-13 06:22:43218
[email protected]ea2f3342012-09-21 21:13:36219#endif
220
[email protected]9323fdd12013-02-23 00:31:36221const Experiment::Choice kImplSidePaintingChoices[] = {
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
223 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
224 cc::switches::kEnableImplSidePainting, ""},
225 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
226 cc::switches::kDisableImplSidePainting, ""}
227};
228
[email protected]0c04d1c2013-07-10 00:02:32229const Experiment::Choice kDelegatedRendererChoices[] = {
230 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
231 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
232 switches::kEnableDelegatedRenderer, ""},
233 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
234 switches::kDisableDelegatedRenderer, ""}
235};
236
[email protected]a42c85f2013-04-04 18:15:12237const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
238 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
239 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
240 cc::switches::kMaxTilesForInterestArea, "64"},
241 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
242 cc::switches::kMaxTilesForInterestArea, "128"},
243 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
244 cc::switches::kMaxTilesForInterestArea, "256"},
245 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
246 cc::switches::kMaxTilesForInterestArea, "512"}
247};
248
[email protected]a3618122013-04-26 21:15:34249const Experiment::Choice kDefaultTileWidthChoices[] = {
250 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
251 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
252 switches::kDefaultTileWidth, "128"},
253 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
254 switches::kDefaultTileWidth, "256"},
255 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
256 switches::kDefaultTileWidth, "512"},
257 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
258 switches::kDefaultTileWidth, "1024"}
259};
260
261const Experiment::Choice kDefaultTileHeightChoices[] = {
262 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
263 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
264 switches::kDefaultTileHeight, "128"},
265 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
266 switches::kDefaultTileHeight, "256"},
267 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
268 switches::kDefaultTileHeight, "512"},
269 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
270 switches::kDefaultTileHeight, "1024"}
271};
272
[email protected]38484df12013-04-10 16:42:03273const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21274 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
275 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
276 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03277 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
278 switches::kUseSimpleCacheBackend, "on"}
279};
280
[email protected]910ecfe2013-06-03 23:38:14281const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
282 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
283 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
284 switches::kTabCaptureUpscaleQuality, "fast" },
285 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
286 switches::kTabCaptureUpscaleQuality, "good" },
287 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
288 switches::kTabCaptureUpscaleQuality, "best" },
289};
290
291const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
292 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
293 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
294 switches::kTabCaptureDownscaleQuality, "fast" },
295 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
296 switches::kTabCaptureDownscaleQuality, "good" },
297 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
298 switches::kTabCaptureDownscaleQuality, "best" },
299};
300
[email protected]4bc5050c2010-11-18 17:55:54301// RECORDING USER METRICS FOR FLAGS:
302// -----------------------------------------------------------------------------
303// The first line of the experiment is the internal name. If you'd like to
304// gather statistics about the usage of your flag, you should append a marker
305// comment to the end of the feature name, like so:
306// "my-special-feature", // FLAGS:RECORD_UMA
307//
308// After doing that, run //chrome/tools/extract_actions.py (see instructions at
309// the top of that file for details) to update the chromeactions.txt file, which
310// will enable UMA to record your feature flag.
311//
[email protected]783d5bb2012-10-24 03:47:14312// After your feature has shipped under a flag, you can locate the metrics under
313// the action name AboutFlags_internal-action-name. Actions are recorded once
314// per startup, so you should divide this number by AboutFlags_StartupTick to
315// get a sense of usage. Note that this will not be the same as number of users
316// with a given feature enabled because users can quit and relaunch the
317// application multiple times over a given time interval. The dashboard also
318// shows you how many (metrics reporting) users have enabled the flag over the
319// last seven days. However, note that this is not the same as the number of
320// users who have the flag enabled, since enabling the flag happens once,
321// whereas running with the flag enabled happens until the user flips the flag
322// again.
[email protected]4bc5050c2010-11-18 17:55:54323
[email protected]8a6ff28d2010-12-02 16:35:19324// To add a new experiment add to the end of kExperiments. There are two
325// distinct types of experiments:
326// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
327// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22328// . MULTI_VALUE: a list of choices, the first of which should correspond to a
329// deactivated state for this lab (i.e. no command line option). To specify
330// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
331// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19332// See the documentation of Experiment for details on the fields.
333//
334// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05335const Experiment kExperiments[] = {
336 {
[email protected]aac169d2011-03-18 19:53:03337 "expose-for-tabs", // FLAGS:RECORD_UMA
338 IDS_FLAGS_TABPOSE_NAME,
339 IDS_FLAGS_TABPOSE_DESCRIPTION,
340 kOsMac,
341#if defined(OS_MACOSX)
342 // The switch exists only on OS X.
343 SINGLE_VALUE_TYPE(switches::kEnableExposeForTabs)
344#else
345 SINGLE_VALUE_TYPE("")
346#endif
347 },
348 {
[email protected]4bc5050c2010-11-18 17:55:54349 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05350 IDS_FLAGS_CONFLICTS_CHECK_NAME,
351 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
352 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19353 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05354 },
355 {
[email protected]96c6f4c2011-05-18 19:36:22356 "ignore-gpu-blacklist",
357 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
358 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
359 kOsAll,
360 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
361 },
362 {
[email protected]0110cf112011-07-02 00:39:43363 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22364 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
365 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]9b19cf82012-06-13 06:23:23366 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44367 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
368 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22369 },
370 {
[email protected]72787e392012-03-23 05:55:43371 "threaded-compositing-mode",
372 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
373 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:58374 kOsMac | kOsWin | kOsLinux,
[email protected]83e9fa702013-02-25 19:30:44375 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
376 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59377 },
378 {
[email protected]17e27692013-02-06 17:02:09379 "force-accelerated-composited-scrolling",
380 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
381 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
382 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44383 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
384 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09385 },
386 {
[email protected]8b1c3c72013-01-25 01:48:43387 "present-with-GDI",
388 IDS_FLAGS_PRESENT_WITH_GDI_NAME,
389 IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION,
390 kOsWin,
391 MULTI_VALUE_TYPE(kGDIPresentChoices)
392 },
393 {
[email protected]2b608752013-05-01 03:34:36394 "enable-experimental-canvas-features",
395 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
396 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
397 kOsAll,
398 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
399 },
400 {
[email protected]81c64af62012-06-06 20:15:52401 "disable-accelerated-2d-canvas",
402 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
403 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
404 kOsAll,
405 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
406 },
407 {
[email protected]efcde132012-05-30 01:05:18408 "disable-threaded-animation",
409 IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME,
410 IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION,
[email protected]644a1072012-03-16 09:29:59411 kOsAll,
[email protected]65bfd9972012-10-19 03:39:37412 SINGLE_VALUE_TYPE(cc::switches::kDisableThreadedAnimation)
[email protected]644a1072012-03-16 09:29:59413 },
414 {
[email protected]5963b772011-02-09 22:55:38415 "composited-layer-borders",
416 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
417 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
418 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57419 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38420 },
421 {
[email protected]a8f1eaa2011-03-07 19:00:58422 "show-fps-counter",
423 IDS_FLAGS_SHOW_FPS_COUNTER,
424 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
425 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57426 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58427 },
[email protected]8ff7f342011-05-25 01:49:47428 {
[email protected]70c98a332011-12-21 20:51:52429 "accelerated-filters",
430 IDS_FLAGS_ACCELERATED_FILTERS,
431 IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION,
432 kOsAll,
433 SINGLE_VALUE_TYPE(switches::kEnableAcceleratedFilters)
434 },
435 {
[email protected]8ff7f342011-05-25 01:49:47436 "disable-gpu-vsync",
437 IDS_FLAGS_DISABLE_GPU_VSYNC_NAME,
438 IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56439 kOsDesktop,
[email protected]8ff7f342011-05-25 01:49:47440 SINGLE_VALUE_TYPE(switches::kDisableGpuVsync)
441 },
[email protected]deaba6d52011-09-23 14:47:12442 {
[email protected]4052d832013-01-16 05:31:01443 "enable-webgl",
444 IDS_FLAGS_ENABLE_WEBGL_NAME,
445 IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION,
446 kOsAndroid,
447#if defined(OS_ANDROID)
448 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebGL)
449#else
450 SINGLE_VALUE_TYPE("")
451#endif
452 },
453 {
[email protected]deaba6d52011-09-23 14:47:12454 "disable-webgl",
455 IDS_FLAGS_DISABLE_WEBGL_NAME,
456 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56457 kOsDesktop,
[email protected]4052d832013-01-16 05:31:01458#if defined(OS_ANDROID)
459 SINGLE_VALUE_TYPE("")
460#else
[email protected]deaba6d52011-09-23 14:47:12461 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
[email protected]4052d832013-01-16 05:31:01462#endif
[email protected]deaba6d52011-09-23 14:47:12463 },
[email protected]09096e02012-05-24 11:12:04464 {
[email protected]7ef205952013-07-09 02:14:41465 "enable-d3d11",
466 IDS_FLAGS_ENABLE_D3D11_NAME,
467 IDS_FLAGS_ENABLE_D3D11_DESCRIPTION,
468 kOsWin,
469 SINGLE_VALUE_TYPE(switches::kEnableD3D11)
470 },
471 {
[email protected]ce585bf2013-03-14 16:25:16472 "disable-webrtc",
473 IDS_FLAGS_DISABLE_WEBRTC_NAME,
474 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05475 kOsAndroid,
476#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16477 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05478#else
479 SINGLE_VALUE_TYPE("")
480#endif
481 },
[email protected]5e2bc8c2013-05-28 22:59:57482#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30483 {
484 "enable-sctp-data-channels",
485 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_NAME,
486 IDS_FLAGS_ENABLE_SCTP_DATA_CHANNELS_DESCRIPTION,
487 kOsAll,
488 SINGLE_VALUE_TYPE(switches::kEnableSCTPDataChannels)
489 },
[email protected]5e2bc8c2013-05-28 22:59:57490#endif
[email protected]34cb5292013-04-15 06:06:31491#if defined(OS_ANDROID)
492 {
[email protected]7b8a31632013-06-13 22:42:37493 "disable-webaudio",
494 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
495 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31496 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37497 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31498 },
499#endif
[email protected]d9da9582013-01-31 04:59:05500 {
[email protected]96bcdc102012-05-24 23:42:10501 "fixed-position-creates-stacking-context",
502 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
503 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
504 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44505 ENABLE_DISABLE_VALUE_TYPE(
506 switches::kEnableFixedPositionCreatesStackingContext,
507 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10508 },
[email protected]fb854192013-02-06 01:30:04509 {
510 "enable-compositing-for-fixed-position",
511 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
512 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
513 kOsAll,
514 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
515 },
[email protected]d8221b22013-05-23 05:35:43516 {
517 "enable-compositing-for-transition",
518 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
519 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
520 kOsAll,
521 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
522 },
[email protected]06fc4d3b2013-07-08 21:07:24523 {
524 "enable-accelerated-fixed-root-background",
525 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
526 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
527 kOsAll,
528 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
529 },
[email protected]a7640ef22012-10-06 00:52:08530 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53531 {
[email protected]e3791ce92011-08-09 01:03:32532 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40533 IDS_FLAGS_ENABLE_NACL_NAME,
534 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56535 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19536 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40537 },
538 {
[email protected]9addd1c2012-09-15 14:28:24539 "enable-nacl-debug", // FLAGS:RECORD_UMA
540 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
541 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56542 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24543 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13544 },
545 {
[email protected]66f409c2012-10-04 20:59:04546 "nacl-debug-mask", // FLAGS:RECORD_UMA
547 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
548 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56549 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04550 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
551 },
552 {
[email protected]7babd1c2012-08-08 20:35:29553 "enable-pnacl", // FLAGS:RECORD_UMA
554 IDS_FLAGS_ENABLE_PNACL_NAME,
555 IDS_FLAGS_ENABLE_PNACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56556 kOsDesktop,
[email protected]7babd1c2012-08-08 20:35:29557 SINGLE_VALUE_TYPE(switches::kEnablePnacl)
558 },
559 {
[email protected]4bc5050c2010-11-18 17:55:54560 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32561 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
562 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56563 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19564 SINGLE_VALUE_TYPE(switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32565 },
[email protected]3627b06d2010-11-12 16:36:16566 {
[email protected]ac2e2acd2013-03-21 12:57:29567 "extensions-on-chrome-urls",
568 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
569 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
570 kOsAll,
571 SINGLE_VALUE_TYPE(switches::kExtensionsOnChromeURLs)
572 },
573 {
[email protected]88c92012013-07-02 11:56:34574 "enable-fast-unload",
575 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
576 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
577 kOsAll,
578 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
579 },
580 {
[email protected]e9cddd52013-03-23 17:37:53581 "enable-adview",
582 IDS_FLAGS_ENABLE_ADVIEW_NAME,
583 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
584 kOsDesktop,
585 SINGLE_VALUE_TYPE(switches::kEnableAdview)
586 },
587 {
588 "enable-adview-src-attribute",
589 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_NAME,
590 IDS_FLAGS_ENABLE_ADVIEW_SRC_ATTRIBUTE_DESCRIPTION,
591 kOsDesktop,
592 SINGLE_VALUE_TYPE(switches::kEnableAdviewSrcAttribute)
593 },
594 {
[email protected]1f4da9e2013-06-27 05:23:44595 "enable-app-window-controls",
596 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
597 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
598 kOsDesktop,
599 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
600 },
601 {
[email protected]544471a2012-10-13 05:27:09602 "action-box",
[email protected]cab18ef2012-04-27 07:22:03603 IDS_FLAGS_ACTION_BOX_NAME,
604 IDS_FLAGS_ACTION_BOX_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56605 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44606 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kActionBox, "1",
607 switches::kActionBox, "0")
[email protected]cab18ef2012-04-27 07:22:03608 },
609 {
[email protected]3a362432012-06-18 20:39:51610 "script-badges",
611 IDS_FLAGS_SCRIPT_BADGES_NAME,
612 IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56613 kOsDesktop,
[email protected]544471a2012-10-13 05:27:09614 SINGLE_VALUE_TYPE(switches::kScriptBadges)
615 },
616 {
617 "script-bubble",
618 IDS_FLAGS_SCRIPT_BUBBLE_NAME,
619 IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56620 kOsDesktop,
[email protected]83e9fa702013-02-25 19:30:44621 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kScriptBubble, "1",
622 switches::kScriptBubble, "0")
[email protected]3a362432012-06-18 20:39:51623 },
624 {
[email protected]cbe224d2011-08-04 22:12:49625 "apps-new-install-bubble",
626 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
627 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56628 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49629 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
630 },
631 {
[email protected]80bd24e2010-11-30 09:34:38632 "disable-hyperlink-auditing",
633 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
634 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
635 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19636 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51637 },
638 {
639 "experimental-location-features", // FLAGS:RECORD_UMA
640 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME,
641 IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION,
642 kOsMac | kOsWin | kOsLinux, // Currently does nothing on CrOS.
[email protected]8a6ff28d2010-12-02 16:35:19643 SINGLE_VALUE_TYPE(switches::kExperimentalLocationFeatures)
644 },
645 {
[email protected]5aea1862011-03-23 23:55:39646 "tab-groups-context-menu",
647 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME,
648 IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION,
649 kOsWin,
650 SINGLE_VALUE_TYPE(switches::kEnableTabGroupsContextMenu)
651 },
[email protected]c94cebd2012-06-21 00:55:28652 {
653 "enable-instant-extended-api",
654 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API,
655 IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46656 kOsMac | kOsWin | kOsCrOS,
[email protected]73444382013-02-26 19:31:51657 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInstantExtendedAPI,
658 switches::kDisableInstantExtendedAPI)
[email protected]c94cebd2012-06-21 00:55:28659 },
[email protected]e9bf9d92011-03-31 20:57:15660 {
[email protected]8cc9e532013-05-06 21:01:47661 "enable-local-first-load-ntp",
662 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP,
663 IDS_FLAGS_ENABLE_LOCAL_FIRST_LOAD_NTP_DESCRIPTION,
[email protected]425a37892013-06-14 06:04:46664 kOsMac | kOsWin | kOsCrOS,
[email protected]8cc9e532013-05-06 21:01:47665 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableLocalFirstLoadNTP,
666 switches::kDisableLocalFirstLoadNTP)
667 },
668 {
[email protected]354e33b2011-06-15 00:29:10669 "static-ip-config",
670 IDS_FLAGS_STATIC_IP_CONFIG_NAME,
671 IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION,
672 kOsCrOS,
673#if defined(OS_CHROMEOS)
674 // This switch exists only on Chrome OS.
[email protected]2f2d6c32013-05-10 02:56:24675 SINGLE_VALUE_TYPE(chromeos::switches::kEnableStaticIPConfig)
[email protected]354e33b2011-06-15 00:29:10676#else
677 SINGLE_VALUE_TYPE("")
678#endif
679 },
[email protected]3eb5728c2011-06-20 22:32:24680 {
681 "show-autofill-type-predictions",
682 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
683 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
684 kOsAll,
[email protected]e217c5632013-04-12 19:11:48685 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24686 },
[email protected]bff4d3e2011-06-21 23:58:52687 {
[email protected]e755a382012-09-13 17:16:35688 "enable-gesture-tap-highlight",
689 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
690 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
691 kOsLinux | kOsCrOS,
[email protected]06ca05d2013-03-13 19:12:47692 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
693 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35694 },
695 {
[email protected]a22ebd812011-06-23 00:05:39696 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
697 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
698 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
699 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40700 // On by default for the Mac (different implementation in WebKit).
[email protected]2a5e9d02013-01-20 01:09:25701 kOsWin | kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39702 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
703 },
[email protected]81a6b0b2011-06-24 17:55:40704 {
[email protected]128dc6c2012-06-22 20:30:35705 "omnibox-history-quick-provider-reorder-for-inlining",
706 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME,
707 IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION,
708 kOsAll,
709 MULTI_VALUE_TYPE(kOmniboxHistoryQuickProviderReorderForInliningChoices)
710 },
711 {
[email protected]032d5e6c2012-02-17 17:53:55712 "omnibox-inline-history-quick-provider",
713 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME,
714 IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION,
715 kOsAll,
716 MULTI_VALUE_TYPE(kOmniboxInlineHistoryQuickProviderChoices)
717 },
718 {
[email protected]7e7a28092011-12-09 22:24:55719 "enable-panels",
720 IDS_FLAGS_ENABLE_PANELS_NAME,
721 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56722 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55723 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54724 },
[email protected]e3749d12011-07-25 22:22:12725 {
[email protected]27c14f02012-06-22 17:29:58726 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27727 "save-page-as-mhtml", // FLAGS:RECORD_UMA
728 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
729 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
730 kOsMac | kOsWin | kOsLinux,
731 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
732 },
733 {
[email protected]b7bb44f2011-09-01 05:17:03734 "enable-autologin",
735 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
736 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
737 kOsMac | kOsWin | kOsLinux,
738 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
739 },
[email protected]b9841172011-09-26 23:36:09740 {
[email protected]903e63382013-06-01 00:40:58741 "enable-quic",
742 IDS_FLAGS_ENABLE_QUIC_NAME,
743 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
744 kOsAll,
745 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
746 switches::kDisableQuic)
747 },
748 {
[email protected]bca09b9982013-06-27 22:30:46749 "enable-spdy4a2",
750 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
751 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
752 kOsAll,
753 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
754 },
755 {
[email protected]27b3fe92012-03-21 05:35:06756 "enable-async-dns",
757 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
758 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46759 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44760 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
761 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06762 },
[email protected]85dd7ca2013-05-30 23:53:00763#if defined(ANDROID) && !defined(GOOGLE_TV)
764 {
765 "enable-media-source",
766 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_NAME,
767 IDS_FLAGS_ENABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
768 kOsAll,
769 SINGLE_VALUE_TYPE(switches::kEnableWebKitMediaSource)
770 },
771#else
[email protected]27b3fe92012-03-21 05:35:06772 {
[email protected]1eb93802012-09-11 18:57:56773 "disable-media-source",
[email protected]5bf1223a52013-05-14 21:42:31774 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
775 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32776 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31777 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44778 },
[email protected]85dd7ca2013-05-30 23:53:00779#endif
[email protected]e4e68dbb2011-11-18 01:50:22780 {
[email protected]16c242d2013-05-31 23:56:47781 "enable-encrypted-media",
782 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
783 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56784 kOsDesktop,
[email protected]16c242d2013-05-31 23:56:47785 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
786 },
787 {
788 "disable-encrypted-media",
789 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
790 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
791 kOsDesktop,
792 SINGLE_VALUE_TYPE(switches::kDisableLegacyEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03793 },
[email protected]f88628792012-12-18 07:07:50794 {
[email protected]d21ead42013-06-24 06:35:06795 "override-encrypted-media-canplaytype",
796 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_NAME,
797 IDS_FLAGS_ENCRYPTED_MEDIA_CANPLAYTYPE_OVERRIDE_DESCRIPTION,
798 kOsMac | kOsWin,
799 SINGLE_VALUE_TYPE(switches::kOverrideEncryptedMediaCanPlayType)
800 },
801 {
[email protected]f88628792012-12-18 07:07:50802 "enable-opus-playback",
803 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME,
804 IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56805 kOsDesktop,
[email protected]f88628792012-12-18 07:07:50806 SINGLE_VALUE_TYPE(switches::kEnableOpusPlayback)
807 },
[email protected]b150b5532013-06-15 00:50:54808 {
[email protected]6ac955b2013-04-19 23:43:32809 "enable-vp8-alpha-playback",
810 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_NAME,
811 IDS_FLAGS_ENABLE_VP8_ALPHA_PLAYBACK_DESCRIPTION,
812 kOsDesktop,
813 SINGLE_VALUE_TYPE(switches::kEnableVp8AlphaPlayback)
814 },
815 {
[email protected]ca6eaa5a2013-01-24 16:16:04816 "enable-managed-users",
817 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME,
818 IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION,
[email protected]fae057a2013-06-21 22:46:08819 kOsMac | kOsWin | kOsLinux | kOsCrOSOwnerOnly,
[email protected]ca6eaa5a2013-01-24 16:16:04820 SINGLE_VALUE_TYPE(switches::kEnableManagedUsers)
821 },
[email protected]dc04be7c2012-03-15 23:57:49822#if defined(USE_ASH)
[email protected]8cc10df2011-11-03 23:57:50823 {
[email protected]2a13a9a2013-04-19 04:00:21824 "ash-disable-auto-maximizing",
825 IDS_FLAGS_ASH_AUTO_MAXIMIZING_NAME,
826 IDS_FLAGS_ASH_AUTO_MAXIMIZING_DESCRIPTION,
827 kOsWin | kOsLinux | kOsCrOS,
828 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoMaximizing)
829 },
830 {
[email protected]cda278d2012-10-30 20:31:40831 "ash-disable-auto-window-placement",
832 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME,
833 IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION,
834 kOsWin | kOsLinux | kOsCrOS,
835 SINGLE_VALUE_TYPE(ash::switches::kAshDisableAutoWindowPlacement)
836 },
[email protected]b4e4ec42012-11-29 21:42:40837 {
[email protected]16f55a22013-02-13 23:47:34838 "ash-disable-per-app-launcher",
839 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME,
840 IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION,
[email protected]b4e4ec42012-11-29 21:42:40841 kOsWin | kOsLinux | kOsCrOS,
[email protected]16f55a22013-02-13 23:47:34842 SINGLE_VALUE_TYPE(ash::switches::kAshDisablePerAppLauncher)
[email protected]b4e4ec42012-11-29 21:42:40843 },
[email protected]dc04be7c2012-03-15 23:57:49844#endif
[email protected]eaae8b462012-01-20 22:20:39845 {
[email protected]db543d322011-12-15 20:40:15846 "per-tile-painting",
847 IDS_FLAGS_PER_TILE_PAINTING_NAME,
848 IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION,
[email protected]a5b1b272012-01-06 20:44:37849 kOsMac | kOsLinux | kOsCrOS,
[email protected]65bfd9972012-10-19 03:39:37850 SINGLE_VALUE_TYPE(cc::switches::kEnablePerTilePainting)
[email protected]db543d322011-12-15 20:40:15851 },
[email protected]bf88c032011-12-22 19:05:47852 {
853 "enable-javascript-harmony",
854 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
855 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
856 kOsAll,
857 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
858 },
[email protected]7e7f378a2012-01-05 14:35:37859 {
[email protected]85646172012-01-09 22:45:54860 "enable-tab-browser-dragging",
861 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME,
862 IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION,
863 kOsWin,
864 SINGLE_VALUE_TYPE(switches::kTabBrowserDragging)
865 },
866 {
[email protected]068b7b52012-02-27 12:41:44867 "disable-restore-session-state",
868 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME,
869 IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION,
[email protected]7e7f378a2012-01-05 14:35:37870 kOsAll,
[email protected]068b7b52012-02-27 12:41:44871 SINGLE_VALUE_TYPE(switches::kDisableRestoreSessionState)
[email protected]7e7f378a2012-01-05 14:35:37872 },
[email protected]88864db2012-01-18 20:56:35873 {
874 "disable-software-rasterizer",
875 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
876 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
877#if defined(ENABLE_SWIFTSHADER)
878 kOsAll,
879#else
880 0,
881#endif
882 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
883 },
[email protected]15a5d722012-01-23 09:11:14884 {
[email protected]c1b18ea2013-07-10 13:01:16885 "enable-experimental-web-platform-features",
886 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME,
887 IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION,
[email protected]d2edc6702012-01-30 09:13:16888 kOsAll,
[email protected]c1b18ea2013-07-10 13:01:16889 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures)
[email protected]ca7a3d792012-03-02 15:55:49890 },
891 {
[email protected]0f95a252012-09-13 22:30:04892 "enable-css-shaders",
893 IDS_FLAGS_CSS_SHADERS_NAME,
894 IDS_FLAGS_CSS_SHADERS_DESCRIPTION,
895 kOsAll,
896 SINGLE_VALUE_TYPE(switches::kEnableCssShaders)
897 },
898 {
[email protected]3e8befc2012-03-13 01:17:03899 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16900 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
901 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56902 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03903 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16904 },
[email protected]dc04be7c2012-03-15 23:57:49905#if defined(USE_ASH)
[email protected]31cf1c52012-02-29 20:55:01906 {
[email protected]3cd198a22012-03-12 20:38:01907 "enable-ash-oak",
908 IDS_FLAGS_ENABLE_ASH_OAK_NAME,
909 IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION,
910 kOsAll,
911 SINGLE_VALUE_TYPE(ash::switches::kAshEnableOak),
912 },
[email protected]31cf1c52012-02-29 20:55:01913#endif
[email protected]184ec592012-03-01 11:54:28914 {
915 "enable-devtools-experiments",
916 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
917 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56918 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28919 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
920 },
[email protected]76d1854e2012-03-02 23:57:44921 {
[email protected]3db81f242013-07-12 08:56:17922 "remote-debugging-raw-usb",
923 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_NAME,
924 IDS_FLAGS_REMOTE_DEBUGGING_RAW_USB_DESCRIPTION,
925 kOsLinux | kOsCrOS,
926 SINGLE_VALUE_TYPE(switches::kRemoteDebuggingRawUSB)
927 },
928 {
[email protected]2fefdb32013-02-26 14:28:10929 "silent-debugger-extension-api",
930 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
931 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
932 kOsDesktop,
933 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
934 },
935 {
[email protected]76d1854e2012-03-02 23:57:44936 "enable-suggestions-ntp",
937 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME,
938 IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56939 kOsDesktop,
[email protected]76d1854e2012-03-02 23:57:44940 SINGLE_VALUE_TYPE(switches::kEnableSuggestionsTabPage)
941 },
[email protected]a3d54252012-04-05 20:04:13942 {
[email protected]1dbaf5e2012-11-30 05:51:32943 "spellcheck-autocorrect",
944 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
945 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
946 kOsWin | kOsLinux | kOsCrOS,
947 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
948 },
949 {
[email protected]e27137282013-06-20 02:38:35950 "enable-scroll-prediction",
951 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
952 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
953 kOsDesktop,
954 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
955 },
956 {
[email protected]d7932532012-11-21 21:10:31957 "touch-events",
958 IDS_TOUCH_EVENTS_NAME,
959 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56960 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31961 MULTI_VALUE_TYPE(kTouchEventsChoices)
962 },
963 {
[email protected]c9c73ad42012-04-18 03:35:59964 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06965 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
966 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55967 kOsWin,
[email protected]347a0c72012-05-14 20:28:06968 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59969 },
[email protected]8a6aaa72012-04-20 20:53:58970 {
[email protected]b9c96ff2012-11-26 22:24:40971 "disable-touch-adjustment",
972 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
973 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
974 kOsWin | kOsLinux | kOsCrOS,
975 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
976 },
977 {
[email protected]0b9383a2012-10-26 00:58:16978 "enable-tab-capture",
979 IDS_ENABLE_TAB_CAPTURE_NAME,
980 IDS_ENABLE_TAB_CAPTURE_DESCRIPTION,
[email protected]a692d132012-10-31 05:15:25981 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44982 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kTabCapture, "1",
983 switches::kTabCapture, "0")
[email protected]0b9383a2012-10-26 00:58:16984 },
[email protected]0b60afa2012-04-19 17:36:39985#if defined(OS_CHROMEOS)
986 {
[email protected]690de0f2013-06-26 00:51:16987 "ash-use-alternate-shelf",
[email protected]1dd46bd2013-06-14 07:08:31988 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
989 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
990 kOsCrOS,
991 SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
992 },
993 {
[email protected]7c4a9bc2012-09-11 22:10:05994 "enable-background-loader",
995 IDS_ENABLE_BACKLOADER_NAME,
996 IDS_ENABLE_BACKLOADER_DESCRIPTION,
997 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:24998 SINGLE_VALUE_TYPE(chromeos::switches::kEnableBackgroundLoader)
[email protected]7c4a9bc2012-09-11 22:10:05999 },
1000 {
[email protected]3f4181a2013-02-01 21:31:071001 "enable-screensaver-extension",
1002 IDS_ENABLE_SCREENSAVER_EXTENSION_NAME,
1003 IDS_ENABLE_SCREENSAVER_EXTENSION_DESCRIPTION,
1004 kOsCrOS,
1005 SINGLE_VALUE_TYPE(chromeos::switches::kEnableScreensaverExtensions)
1006 },
1007 {
[email protected]0b60afa2012-04-19 17:36:391008 "no-discard-tabs",
1009 IDS_FLAGS_NO_DISCARD_TABS_NAME,
1010 IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION,
1011 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241012 SINGLE_VALUE_TYPE(chromeos::switches::kNoDiscardTabs)
[email protected]0b60afa2012-04-19 17:36:391013 },
1014#endif
[email protected]79be6d32012-04-24 20:47:441015 {
[email protected]8d68a3e02013-01-12 15:57:101016 "enable-download-resumption",
1017 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
1018 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561019 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:101020 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
1021 },
1022 {
[email protected]9a5940d2012-04-27 19:16:231023 "allow-nacl-socket-api",
1024 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
1025 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561026 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:231027 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
1028 },
[email protected]85333732012-05-01 19:02:241029 {
[email protected]60673ad72012-05-02 06:16:331030 "stacked-tab-strip",
1031 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
1032 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
1033 kOsWin,
1034 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
1035 },
1036 {
[email protected]4bd20202012-06-14 17:35:011037 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:241038 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
1039 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
1040 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:011041 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241042 },
[email protected]190349fd2012-05-02 00:10:471043#if defined(OS_CHROMEOS)
1044 {
1045 "allow-touchpad-three-finger-click",
1046 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1047 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1048 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241049 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471050 },
[email protected]190349fd2012-05-02 00:10:471051#endif
[email protected]1992a2f42012-10-23 18:32:211052 {
[email protected]8ee02242012-12-04 15:23:321053 "enable-desktop-guest-mode",
1054 IDS_FLAGS_DESKTOP_GUEST_MODE_NAME,
1055 IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION,
1056 kOsMac | kOsWin | kOsLinux,
1057 SINGLE_VALUE_TYPE(switches::kEnableDesktopGuestMode)
1058 },
[email protected]53520b1b2012-05-07 21:43:371059#if defined(USE_ASH)
1060 {
[email protected]8257d382013-03-26 13:08:421061 "show-launcher-alignment-menu",
1062 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_NAME,
1063 IDS_FLAGS_SHOW_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION,
[email protected]35a4ced2013-02-06 23:24:421064 kOsAll,
[email protected]8257d382013-03-26 13:08:421065 SINGLE_VALUE_TYPE(switches::kShowLauncherAlignmentMenu)
[email protected]35a4ced2013-02-06 23:24:421066 },
1067 {
[email protected]2ddf37b2013-04-20 01:15:581068 "disable-minimize-on-second-launcher-item-click",
1069 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1070 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1071 kOsAll,
1072 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1073 },
1074 {
[email protected]73074742012-05-17 01:44:411075 "show-touch-hud",
1076 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1077 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1078 kOsAll,
1079 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1080 },
1081 {
[email protected]9f0940b62012-05-23 22:56:351082 "enable-pinch",
1083 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1084 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061085 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381086 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1087 },
1088 {
[email protected]de0aaed2013-05-27 18:16:431089 "enable-pinch-virtual-viewport",
1090 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1091 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1092 kOsLinux | kOsWin | kOsCrOS,
1093 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1094 },
1095 {
[email protected]a4016f12013-05-02 07:53:471096 "forced-maximize-mode",
1097 IDS_FLAGS_FORCE_MAXIMIZE_MODE_NAME,
1098 IDS_FLAGS_FORCE_MAXIMIZE_MODE_DESCRIPTION,
1099 kOsLinux | kOsWin | kOsCrOS,
1100 SINGLE_VALUE_TYPE(ash::switches::kForcedMaximizeMode),
1101 },
[email protected]73074742012-05-17 01:44:411102#endif // defined(USE_ASH)
[email protected]ed7b67f32012-05-28 10:12:281103#if defined(OS_CHROMEOS)
1104 {
[email protected]8b04a1652012-08-04 02:59:491105 "disable-boot-animation",
1106 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1107 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581108 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241109 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491110 },
[email protected]95058572012-08-20 14:57:291111 {
[email protected]d96aef22012-10-30 11:47:021112 "captive-portal-detector",
1113 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME,
1114 IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581115 kOsCrOSOwnerOnly,
[email protected]d96aef22012-10-30 11:47:021116 MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices),
1117 },
1118 {
[email protected]c11aa8f12012-12-18 18:43:141119 "disable-new-lock-animations",
[email protected]839667d62012-10-23 19:38:571120 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS,
1121 IDS_FLAGS_ASH_NEW_LOCK_ANIMATIONS_DESCRIPTION,
1122 kOsCrOS,
[email protected]c11aa8f12012-12-18 18:43:141123 SINGLE_VALUE_TYPE(ash::switches::kAshDisableNewLockAnimations),
[email protected]839667d62012-10-23 19:38:571124 },
[email protected]f0280952012-11-06 20:30:501125 {
[email protected]53bc4352013-06-24 10:22:371126 "file-manager-show-checkboxes",
1127 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_NAME,
1128 IDS_FLAGS_FILE_MANAGER_SHOW_CHECKBOXES_DESCRIPTION,
[email protected]465fc2d2013-06-14 09:28:491129 kOsCrOS,
[email protected]53bc4352013-06-24 10:22:371130 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerShowCheckboxes)
[email protected]465fc2d2013-06-14 09:28:491131 },
1132 {
[email protected]50a3f5a2013-06-24 14:36:151133 "file-manager-enable-sharing",
1134 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_NAME,
1135 IDS_FLAGS_FILE_MANAGER_ENABLE_SHARING_DESCRIPTION,
1136 kOsCrOS,
1137 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableSharing)
1138 },
1139 {
[email protected]099b890c2013-04-25 19:16:261140 "disable-quickoffice-component-app",
1141 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1142 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1143 kOsCrOS,
1144 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1145 },
[email protected]62018dc2012-12-13 00:37:351146#endif // defined(OS_CHROMEOS)
[email protected]fc7a93c2012-06-08 20:25:391147 {
[email protected]6247aba2013-03-04 22:57:181148 "views-textfield",
1149 IDS_FLAGS_VIEWS_TEXTFIELD_NAME,
1150 IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION,
[email protected]fc7a93c2012-06-08 20:25:391151 kOsWin,
[email protected]6247aba2013-03-04 22:57:181152 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableViewsTextfield,
1153 switches::kDisableViewsTextfield),
[email protected]fc7a93c2012-06-08 20:25:391154 },
[email protected]bd0cd3bb2012-06-14 03:03:381155 {
[email protected]ffbe5782013-05-09 23:22:081156 "new-dialog-style",
1157 IDS_FLAGS_NEW_DIALOG_STYLE_NAME,
1158 IDS_FLAGS_NEW_DIALOG_STYLE_DESCRIPTION,
[email protected]fcb88de2012-07-12 22:25:321159 kOsWin | kOsCrOS,
[email protected]ffbe5782013-05-09 23:22:081160 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewDialogStyle,
1161 switches::kDisableNewDialogStyle),
[email protected]fcb88de2012-07-12 22:25:321162 },
[email protected]7db8893a2012-07-26 00:49:401163 { "disable-accelerated-video-decode",
1164 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1165 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191166 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401167 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151168 },
[email protected]66ae9fc2012-06-19 21:33:521169#if defined(USE_ASH)
1170 {
1171 "ash-debug-shortcuts",
1172 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1173 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1174 kOsAll,
1175 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1176 },
1177#endif
[email protected]37fee0942012-08-07 21:07:451178 {
[email protected]ad3f6d22012-08-29 02:34:191179 "enable-contacts",
1180 IDS_FLAGS_ENABLE_CONTACTS_NAME,
1181 IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION,
1182 kOsCrOS,
1183 SINGLE_VALUE_TYPE(switches::kEnableContacts)
1184 },
[email protected]1d9bb9cd2012-08-28 22:02:501185#if defined(USE_ASH)
1186 { "ash-enable-advanced-gestures",
1187 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME,
1188 IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION,
1189 kOsCrOS,
1190 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAdvancedGestures),
1191 },
[email protected]cfa24e62013-02-13 21:19:111192 { "ash-disable-tab-scrubbing",
1193 IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME,
1194 IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION,
[email protected]51075f8c2012-11-13 01:48:161195 kOsCrOS,
[email protected]cfa24e62013-02-13 21:19:111196 SINGLE_VALUE_TYPE(switches::kAshDisableTabScrubbing),
[email protected]51075f8c2012-11-13 01:48:161197 },
[email protected]ad6fcc32013-05-30 03:46:481198 { "ash-disable-drag-and-drop-applist-to-launcher",
[email protected]00c8469e22013-05-08 21:40:081199 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_NAME,
1200 IDS_FLAGS_DND_APPLIST_TO_LAUNCHER_DESCRIPTION,
1201 kOsCrOS,
[email protected]ad6fcc32013-05-30 03:46:481202 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragAndDropAppListToLauncher),
[email protected]00c8469e22013-05-08 21:40:081203 },
[email protected]83eef802012-12-02 07:43:521204 { "ash-enable-workspace-scrubbing",
1205 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME,
1206 IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION,
1207 kOsCrOS,
1208 SINGLE_VALUE_TYPE(ash::switches::kAshEnableWorkspaceScrubbing),
1209 },
[email protected]cf2b1a82013-04-20 01:05:431210 { "ash-immersive-fullscreen-2",
[email protected]819e58d22013-03-20 00:16:111211 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME,
1212 IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION,
[email protected]c043df272012-11-21 00:43:241213 kOsCrOS,
[email protected]cf2b1a82013-04-20 01:05:431214 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshEnableImmersiveFullscreen,
1215 ash::switches::kAshDisableImmersiveFullscreen),
[email protected]c043df272012-11-21 00:43:241216 },
[email protected]316708a2012-11-05 22:57:021217#if defined(OS_LINUX)
1218 { "ash-enable-memory-monitor",
1219 IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME,
1220 IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION,
1221 kOsCrOS,
1222 SINGLE_VALUE_TYPE(ash::switches::kAshEnableMemoryMonitor),
1223 },
1224#endif
[email protected]1d9bb9cd2012-08-28 22:02:501225#endif
[email protected]9b7ab882012-09-10 23:46:361226#if defined(OS_CHROMEOS)
[email protected]1f9fa302013-05-17 21:11:131227 { "use-new-network-configuration-handlers",
1228 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_NAME,
1229 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONFIGURATION_HANDLERS_DESCRIPTION,
1230 kOsCrOS,
1231 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConfigurationHandlers),
1232 },
[email protected]ce98ef82013-05-31 22:43:241233 { "use-new-network-connection-handler",
1234 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_NAME,
1235 IDS_FLAGS_CHROMEOS_USE_NEW_NETWORK_CONNECTION_HANDLER_DESCRIPTION,
1236 kOsCrOS,
1237 SINGLE_VALUE_TYPE(chromeos::switches::kUseNewNetworkConnectionHandler),
1238 },
[email protected]9b7ab882012-09-10 23:46:361239 {
[email protected]354ff2d2013-05-01 17:06:311240 "ash-enable-new-audio-handler2",
[email protected]db5be732013-04-24 05:21:121241 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_NAME,
1242 IDS_FLAGS_ASH_ENABLE_NEW_AUDIO_HANDLER_DESCRIPTION,
1243 kOsCrOS,
[email protected]354ff2d2013-05-01 17:06:311244 ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableNewAudioHandler)
1245 },
1246 {
1247 "ash-audio-device-menu",
1248 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
1249 IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
1250 kOsCrOS,
1251 SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
[email protected]db5be732013-04-24 05:21:121252 },
1253 {
[email protected]205f07892012-10-16 20:26:221254 "enable-carrier-switching",
1255 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1256 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1257 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241258 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221259 },
1260 {
[email protected]9b7ab882012-09-10 23:46:361261 "enable-request-tablet-site",
1262 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1263 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1264 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241265 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361266 },
1267#endif
[email protected]dab49c0b2012-10-04 05:55:351268 {
1269 "debug-packed-apps",
1270 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1271 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561272 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351273 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1274 },
[email protected]d1459ed2012-10-10 01:29:331275 {
1276 "enable-password-generation",
1277 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1278 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561279 kOsDesktop,
[email protected]d1459ed2012-10-10 01:29:331280 SINGLE_VALUE_TYPE(switches::kEnablePasswordGeneration)
1281 },
[email protected]26d045f2012-10-18 21:18:431282 {
[email protected]17b9c742013-06-22 13:48:421283 "enable-password-autofill-public-suffix-domain-matching",
1284 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_NAME,
1285 IDS_FLAGS_ENABLE_PASSWORD_AUTOFILL_PUBLIC_SUFFIX_DOMAIN_MATCHING_DESCRIPTION,
1286 kOsAndroid,
1287 SINGLE_VALUE_TYPE(
1288 switches::kEnablePasswordAutofillPublicSuffixDomainMatching)
1289 },
1290 {
[email protected]76f7d4882012-10-26 21:09:221291 "enable-deferred-image-decoding",
1292 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1293 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221294 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221295 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1296 },
1297 {
[email protected]075543d2012-10-24 01:29:141298 "performance-monitor-gathering",
1299 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1300 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1301 kOsAll,
1302 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1303 },
[email protected]783d5bb2012-10-24 03:47:141304 {
[email protected]a7259fb2012-11-08 06:22:231305 "enable-experimental-form-filling",
1306 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME,
1307 IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION,
1308 kOsWin | kOsCrOS,
[email protected]e217c5632013-04-12 19:11:481309 SINGLE_VALUE_TYPE(autofill::switches::kEnableExperimentalFormFilling)
[email protected]a7259fb2012-11-08 06:22:231310 },
[email protected]6e6efe42013-01-30 00:04:501311 {
[email protected]db3178c2013-03-21 14:54:541312 "wallet-service-use-prod",
1313 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_NAME,
1314 IDS_FLAGS_ENABLE_WALLET_PRODUCTION_SERVICE_DESCRIPTION,
1315 kOsCrOS | kOsWin,
[email protected]e217c5632013-04-12 19:11:481316 SINGLE_VALUE_TYPE(autofill::switches::kWalletServiceUseProd)
[email protected]db3178c2013-03-21 14:54:541317 },
1318 {
[email protected]6e6efe42013-01-30 00:04:501319 "enable-interactive-autocomplete",
1320 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1321 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]600f8032013-06-12 13:42:061322 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171323 ENABLE_DISABLE_VALUE_TYPE(
1324 autofill::switches::kEnableInteractiveAutocomplete,
1325 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501326 },
[email protected]177260c2013-04-24 01:47:381327#if defined(USE_AURA)
1328 {
1329 "overscroll-history-navigation",
1330 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1331 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1332 kOsAll,
1333 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1334 switches::kOverscrollHistoryNavigation, "1",
1335 switches::kOverscrollHistoryNavigation, "0")
1336 },
1337#endif
[email protected]edbea622012-11-28 20:39:381338 {
1339 "enable-touch-drag-drop",
1340 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1341 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1342 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271343 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1344 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381345 },
[email protected]0e2f43b62013-02-21 00:47:151346 {
1347 "enable-touch-editing",
1348 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1349 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1350 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271351 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1352 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151353 },
[email protected]92e12dd92012-12-11 03:33:201354 {
1355 "enable-rich-notifications",
1356 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME,
1357 IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION,
[email protected]6ac6c882013-07-01 18:42:361358 kOsWin | kOsMac,
[email protected]aee412aa2013-04-02 20:01:231359 ENABLE_DISABLE_VALUE_TYPE(
1360 message_center::switches::kEnableRichNotifications,
1361 message_center::switches::kDisableRichNotifications)
[email protected]92e12dd92012-12-11 03:33:201362 },
[email protected]4d51c682012-12-11 11:34:551363 {
[email protected]ddec1aa2013-04-28 23:22:451364 "enable-sync-synced-notifications",
1365 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1366 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181367 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451368 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1369 switches::kDisableSyncSyncedNotifications)
1370 },
1371 {
[email protected]a50e16a2013-04-25 14:07:171372 "disable-full-history-sync",
[email protected]4d51c682012-12-11 11:34:551373 IDS_FLAGS_FULL_HISTORY_SYNC_NAME,
1374 IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION,
1375 kOsAll,
[email protected]a50e16a2013-04-25 14:07:171376 SINGLE_VALUE_TYPE(switches::kHistoryDisableFullHistorySync)
[email protected]4d51c682012-12-11 11:34:551377 },
[email protected]628a69a92012-12-23 04:09:341378 {
[email protected]fd030142013-02-08 02:04:381379 "enable-usermedia-screen-capture",
1380 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1381 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1382 kOsDesktop,
1383 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1384 },
[email protected]5b93e162013-02-19 06:33:091385 {
1386 "enable-apps-devtool-app",
1387 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME,
1388 IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION,
1389 kOsDesktop,
1390 SINGLE_VALUE_TYPE(switches::kAppsDevtool)
1391 },
[email protected]9323fdd12013-02-23 00:31:361392 {
1393 "impl-side-painting",
1394 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1395 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]532fe2e2013-03-18 17:00:041396 kOsAndroid | kOsLinux | kOsCrOS,
[email protected]9323fdd12013-02-23 00:31:361397 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1398 },
[email protected]a42c85f2013-04-04 18:15:121399 {
[email protected]0c04d1c2013-07-10 00:02:321400 "delegated-renderer",
1401 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1402 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
1403#ifdef USE_AURA
1404 kOsWin | kOsLinux |
1405#endif
1406 kOsAndroid | kOsCrOS,
1407 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1408 },
1409 {
[email protected]1c92d3e2013-04-18 05:31:391410 "enable-websocket-experimental-implementation",
1411 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1412 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1413 kOsAll,
1414 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1415 },
1416 {
[email protected]a42c85f2013-04-04 18:15:121417 "max-tiles-for-interest-area",
1418 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1419 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
1420 kOsAndroid | kOsLinux | kOsCrOS,
1421 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1422 },
[email protected]7cf7ccb2013-04-20 02:53:081423 {
1424 "enable-offline-mode",
1425 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1426 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1427 kOsAll,
1428 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1429 },
[email protected]a3618122013-04-26 21:15:341430 {
1431 "default-tile-width",
1432 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1433 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1434 kOsAll,
1435 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1436 },
1437 {
1438 "default-tile-height",
1439 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1440 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1441 kOsAll,
1442 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1443 },
[email protected]2f2f72b2013-03-08 22:37:311444 // TODO(sky): ifdef needed until focus sorted out in DesktopNativeWidgetAura.
1445#if !defined(USE_AURA)
[email protected]484deaa2013-03-01 03:10:371446 {
1447 "track-active-visit-time",
1448 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME,
1449 IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION,
1450 kOsWin,
1451 SINGLE_VALUE_TYPE(switches::kTrackActiveVisitTime)
1452 },
[email protected]2f2f72b2013-03-08 22:37:311453#endif
[email protected]8cc71d42013-03-02 17:26:081454#if defined(OS_ANDROID)
1455 {
1456 "disable-gesture-requirement-for-media-playback",
1457 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1458 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1459 kOsAndroid,
1460 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1461 },
1462#endif
[email protected]6077cab2013-03-11 19:36:141463#if defined(ENABLE_GOOGLE_NOW)
1464 {
1465 "enable-google-now",
1466 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME,
1467 IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION,
[email protected]fd32db12013-06-06 20:06:361468 kOsWin | kOsCrOS | kOsMac,
[email protected]6077cab2013-03-11 19:36:141469 SINGLE_VALUE_TYPE(switches::kEnableGoogleNowIntegration)
1470 },
1471#endif
[email protected]86459e2c2013-04-10 13:39:241472#if defined(OS_CHROMEOS)
1473 {
1474 "enable-virtual-keyboard",
1475 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1476 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1477 kOsCrOS,
1478 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1479 },
1480#endif
[email protected]38484df12013-04-10 16:42:031481 {
1482 "enable-simple-cache-backend",
1483 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1484 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]a4a71082013-06-10 15:57:251485 kOsAll,
[email protected]38484df12013-04-10 16:42:031486 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1487 },
[email protected]717e4e22013-04-10 20:52:231488 {
1489 "enable-tcp-fast-open",
1490 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1491 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111492 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231493 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1494 },
[email protected]8027acd2013-04-18 08:35:151495 {
[email protected]58c740f2013-05-06 05:25:441496 "apps-use-native-frame",
1497 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1498 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
1499 kOsWin,
1500 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1501 },
[email protected]896d86b32013-05-09 19:36:441502 {
1503 "enable-syncfs-directory-operation",
1504 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1505 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1506 kOsAll,
1507 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1508 },
[email protected]a4ed7e12013-05-24 01:00:281509 {
[email protected]380532aa2013-05-24 11:59:351510 "enable-reset-profile-settings",
1511 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_NAME,
1512 IDS_FLAGS_ENABLE_RESET_PROFILE_SETTINGS_DESCRIPTION,
1513 kOsAll,
1514 SINGLE_VALUE_TYPE(switches::kEnableResetProfileSettings)
1515 },
[email protected]9f94a6c42013-07-11 18:49:151516 {
1517 "enable-device-discovery",
1518 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_NAME,
1519 IDS_FLAGS_ENABLE_DEVICE_DISCOVERY_DESCRIPTION,
1520 kOsDesktop,
1521 SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscovery)
1522 },
[email protected]56d3c6e42013-05-29 11:28:011523#if defined(OS_MACOSX)
1524 {
1525 "enable-app-list-shim",
1526 IDS_FLAGS_ENABLE_APP_LIST_SHIM_NAME,
1527 IDS_FLAGS_ENABLE_APP_LIST_SHIM_DESCRIPTION,
1528 kOsMac,
1529 SINGLE_VALUE_TYPE(switches::kEnableAppListShim)
1530 },
[email protected]cb29e162013-05-31 07:47:021531 {
1532 "enable-app-shims",
1533 IDS_FLAGS_ENABLE_APP_SHIMS_NAME,
1534 IDS_FLAGS_ENABLE_APP_SHIMS_DESCRIPTION,
1535 kOsMac,
1536 SINGLE_VALUE_TYPE(switches::kEnableAppShims)
1537 },
[email protected]67604442013-06-15 00:04:331538 {
1539 "enable-simplified-fullscreen",
1540 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1541 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1542 kOsMac,
1543 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1544 },
[email protected]56d3c6e42013-05-29 11:28:011545#endif
[email protected]13177832013-05-31 07:46:051546#if defined(OS_CHROMEOS) || defined(OS_WIN)
1547 {
1548 "enable-omnibox-auto-completion-for-ime",
1549 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1550 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
1551 kOsCrOS,
1552 SINGLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme)
1553 },
1554#endif
[email protected]910ecfe2013-06-03 23:38:141555#if defined(USE_AURA)
1556 {
1557 "tab-capture-upscale-quality",
1558 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1559 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1560 kOsAll,
1561 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1562 },
1563 {
1564 "tab-capture-downscale-quality",
1565 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1566 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1567 kOsAll,
1568 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1569 },
1570#endif
[email protected]71d4f602013-06-04 23:21:101571 {
[email protected]5e099c62013-06-08 05:46:231572 "enable-spelling-service-feedback",
1573 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_NAME,
1574 IDS_FLAGS_ENABLE_SPELLING_SERVICE_FEEDBACK_DESCRIPTION,
1575 kOsAll,
1576 SINGLE_VALUE_TYPE(switches::kEnableSpellingServiceFeedback)
1577 },
1578 {
[email protected]71d4f602013-06-04 23:21:101579 "enable-webgl-draft-extensions",
1580 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1581 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1582 kOsAll,
1583 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1584 },
[email protected]deadc492013-06-07 21:39:281585 {
1586 "high-dpi-support",
1587 IDS_FLAGS_HIDPI_NAME,
1588 IDS_FLAGS_HIDPI_DESCRIPTION,
1589 kOsWin,
1590 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport,"1",
1591 switches::kHighDPISupport,"0")
1592 },
[email protected]77e69a512013-06-08 05:56:451593#if defined(OS_CHROMEOS)
1594 {
1595 "enable-quickoffice-editing",
1596 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_NAME,
1597 IDS_FLAGS_ENABLE_QUICKOFFICE_DESKTOP_EDIT_DESCRIPTION,
1598 kOsCrOS,
1599 SINGLE_VALUE_TYPE(switches::kEnableQuickofficeEdit),
1600 },
1601#endif
[email protected]82ca4212013-06-11 12:09:171602 {
1603 "enable-translate-settings",
1604 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_NAME,
1605 IDS_FLAGS_ENABLE_TRANSLATE_SETTINGS_DESCRIPTION,
1606 kOsAll,
1607 SINGLE_VALUE_TYPE(switches::kEnableTranslateSettings)
1608 },
[email protected]bc1697a82013-06-27 15:48:311609 {
1610 "enable-web-midi",
1611 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1612 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
1613 kOsMac,
1614 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1615 },
[email protected]020df792013-06-29 14:26:211616 {
1617 "enable-new-profile-management",
1618 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1619 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
1620 kOsWin,
1621 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1622 },
1623 {
1624 "enable-gaia-profile-info",
1625 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_NAME,
1626 IDS_FLAGS_ENABLE_GAIA_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221627 kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211628 SINGLE_VALUE_TYPE(switches::kGaiaProfileInfo)
1629 },
[email protected]dcf6cf32013-07-03 10:53:281630#if defined(OS_WIN)
1631 {
1632 "disable-app-launcher",
1633 IDS_FLAGS_DISABLE_APP_LIST_NAME,
1634 IDS_FLAGS_DISABLE_APP_LIST_DESCRIPTION,
1635 kOsAll,
1636 SINGLE_VALUE_TYPE(switches::kDisableAppList)
1637 },
1638#endif
[email protected]a0e4b072011-08-17 01:47:071639};
[email protected]ad2a3ded2010-08-27 13:19:051640
[email protected]a314ee5a2010-10-26 21:23:281641const Experiment* experiments = kExperiments;
1642size_t num_experiments = arraysize(kExperiments);
1643
[email protected]e2ddbc92010-10-15 20:02:071644// Stores and encapsulates the little state that about:flags has.
1645class FlagsState {
1646 public:
1647 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401648 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1649 CommandLine* command_line);
[email protected]e2ddbc92010-10-15 20:02:071650 bool IsRestartNeededToCommitChanges();
1651 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401652 FlagsStorage* flags_storage,
1653 const std::string& internal_name,
1654 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071655 void RemoveFlagsSwitches(
1656 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401657 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071658 void reset();
1659
1660 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551661 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071662 return Singleton<FlagsState>::get();
1663 }
1664
1665 private:
1666 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531667 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071668
1669 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1670};
1671
[email protected]8a6ff28d2010-12-02 16:35:191672// Adds the internal names for the specified experiment to |names|.
1673void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1674 if (e.type == Experiment::SINGLE_VALUE) {
1675 names->insert(e.internal_name);
1676 } else {
[email protected]83e9fa702013-02-25 19:30:441677 DCHECK(e.type == Experiment::MULTI_VALUE ||
1678 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191679 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441680 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191681 }
1682}
1683
[email protected]28e35af2011-02-09 12:56:221684// Confirms that an experiment is valid, used in a DCHECK in
1685// SanitizeList below.
1686bool ValidateExperiment(const Experiment& e) {
1687 switch (e.type) {
1688 case Experiment::SINGLE_VALUE:
1689 DCHECK_EQ(0, e.num_choices);
1690 DCHECK(!e.choices);
1691 break;
1692 case Experiment::MULTI_VALUE:
1693 DCHECK_GT(e.num_choices, 0);
1694 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531695 DCHECK(e.choices[0].command_line_switch);
1696 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221697 break;
[email protected]83e9fa702013-02-25 19:30:441698 case Experiment::ENABLE_DISABLE_VALUE:
1699 DCHECK_EQ(3, e.num_choices);
1700 DCHECK(!e.choices);
1701 DCHECK(e.command_line_switch);
1702 DCHECK(e.command_line_value);
1703 DCHECK(e.disable_command_line_switch);
1704 DCHECK(e.disable_command_line_value);
1705 break;
[email protected]28e35af2011-02-09 12:56:221706 default:
1707 NOTREACHED();
1708 }
1709 return true;
1710}
1711
[email protected]ad2a3ded2010-08-27 13:19:051712// Removes all experiments from prefs::kEnabledLabsExperiments that are
1713// unknown, to prevent this list to become very long as experiments are added
1714// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401715void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051716 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221717 for (size_t i = 0; i < num_experiments; ++i) {
1718 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191719 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221720 }
[email protected]ad2a3ded2010-08-27 13:19:051721
[email protected]e6d1c4f2013-06-12 17:37:401722 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051723
1724 std::set<std::string> new_enabled_experiments;
1725 std::set_intersection(
1726 known_experiments.begin(), known_experiments.end(),
1727 enabled_experiments.begin(), enabled_experiments.end(),
1728 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1729
[email protected]4c8853f2012-07-23 01:29:161730 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401731 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051732}
1733
[email protected]1a47d7e2010-10-15 00:37:241734void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401735 FlagsStorage* flags_storage, std::set<std::string>* result) {
1736 SanitizeList(flags_storage);
1737 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051738}
1739
[email protected]a314ee5a2010-10-26 21:23:281740// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1741// enabled on the current platform.
1742void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401743 FlagsStorage* flags_storage, std::set<std::string>* result) {
1744 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281745
1746 // Filter out any experiments that aren't enabled on the current platform. We
1747 // don't remove these from prefs else syncing to a platform with a different
1748 // set of experiments would be lossy.
1749 std::set<std::string> platform_experiments;
1750 int current_platform = GetCurrentPlatform();
1751 for (size_t i = 0; i < num_experiments; ++i) {
1752 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191753 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581754#if defined(OS_CHROMEOS)
1755 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1756 AddInternalName(experiments[i], &platform_experiments);
1757#endif
[email protected]a314ee5a2010-10-26 21:23:281758 }
1759
1760 std::set<std::string> new_enabled_experiments;
1761 std::set_intersection(
1762 platform_experiments.begin(), platform_experiments.end(),
1763 result->begin(), result->end(),
1764 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1765
1766 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051767}
1768
[email protected]8a6ff28d2010-12-02 16:35:191769// Returns the Value representing the choice data in the specified experiment.
[email protected]8a6ff28d2010-12-02 16:35:191770Value* CreateChoiceData(const Experiment& experiment,
[email protected]28e35af2011-02-09 12:56:221771 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:441772 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
1773 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191774 ListValue* result = new ListValue;
1775 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]8a6ff28d2010-12-02 16:35:191776 DictionaryValue* value = new DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:441777 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:191778 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:441779 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:221780 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:191781 result->Append(value);
1782 }
1783 return result;
1784}
1785
[email protected]e2ddbc92010-10-15 20:02:071786} // namespace
1787
[email protected]83e9fa702013-02-25 19:30:441788std::string Experiment::NameForChoice(int index) const {
1789 DCHECK(type == Experiment::MULTI_VALUE ||
1790 type == Experiment::ENABLE_DISABLE_VALUE);
1791 DCHECK_LT(index, num_choices);
1792 return std::string(internal_name) + testing::kMultiSeparator +
1793 base::IntToString(index);
1794}
1795
1796string16 Experiment::DescriptionForChoice(int index) const {
1797 DCHECK(type == Experiment::MULTI_VALUE ||
1798 type == Experiment::ENABLE_DISABLE_VALUE);
1799 DCHECK_LT(index, num_choices);
1800 int description_id;
1801 if (type == Experiment::ENABLE_DISABLE_VALUE) {
1802 const int kEnableDisableDescriptionIds[] = {
1803 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
1804 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
1805 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
1806 };
1807 description_id = kEnableDisableDescriptionIds[index];
1808 } else {
1809 description_id = choices[index].description_id;
1810 }
1811 return l10n_util::GetStringUTF16(description_id);
1812}
1813
[email protected]e6d1c4f2013-06-12 17:37:401814void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
1815 CommandLine* command_line) {
1816 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
1817 command_line);
[email protected]ad2a3ded2010-08-27 13:19:051818}
1819
[email protected]6d98abf2013-06-17 23:35:511820bool AreSwitchesIdenticalToCurrentCommandLine(
1821 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
1822 std::set<CommandLine::StringType> new_flags =
1823 ExtractFlagsFromCommandLine(new_cmdline);
1824 std::set<CommandLine::StringType> active_flags =
1825 ExtractFlagsFromCommandLine(active_cmdline);
1826
1827 // Needed because std::equal doesn't check if the 2nd set is empty.
1828 if (new_flags.size() != active_flags.size())
1829 return false;
1830
1831 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
1832}
1833
[email protected]e6d1c4f2013-06-12 17:37:401834void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:521835 FlagAccess access,
1836 base::ListValue* supported_experiments,
1837 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:051838 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:401839 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051840
1841 int current_platform = GetCurrentPlatform();
1842
[email protected]a314ee5a2010-10-26 21:23:281843 for (size_t i = 0; i < num_experiments; ++i) {
1844 const Experiment& experiment = experiments[i];
[email protected]ad2a3ded2010-08-27 13:19:051845
1846 DictionaryValue* data = new DictionaryValue();
1847 data->SetString("internal_name", experiment.internal_name);
1848 data->SetString("name",
1849 l10n_util::GetStringUTF16(experiment.visible_name_id));
1850 data->SetString("description",
1851 l10n_util::GetStringUTF16(
1852 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:401853
1854 ListValue* supported_platforms = new ListValue();
1855 AddOsStrings(experiment.supported_platforms, supported_platforms);
1856 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:051857
[email protected]28e35af2011-02-09 12:56:221858 switch (experiment.type) {
1859 case Experiment::SINGLE_VALUE:
1860 data->SetBoolean(
1861 "enabled",
1862 enabled_experiments.count(experiment.internal_name) > 0);
1863 break;
1864 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:441865 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:221866 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
1867 break;
1868 default:
1869 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:191870 }
1871
[email protected]ee28495a2013-05-20 04:10:521872 bool supported = (experiment.supported_platforms & current_platform) != 0;
1873#if defined(OS_CHROMEOS)
1874 if (access == kOwnerAccessToFlags &&
1875 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
1876 supported = true;
1877 }
1878#endif
1879 if (supported)
1880 supported_experiments->Append(data);
1881 else
1882 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:051883 }
[email protected]ad2a3ded2010-08-27 13:19:051884}
1885
[email protected]ad2a3ded2010-08-27 13:19:051886bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:551887 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:051888}
1889
[email protected]e6d1c4f2013-06-12 17:37:401890void SetExperimentEnabled(FlagsStorage* flags_storage,
1891 const std::string& internal_name,
1892 bool enable) {
1893 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
1894 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:071895}
1896
1897void RemoveFlagsSwitches(
1898 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:551899 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:071900}
1901
[email protected]e6d1c4f2013-06-12 17:37:401902void ResetAllFlags(FlagsStorage* flags_storage) {
1903 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:001904}
1905
[email protected]a314ee5a2010-10-26 21:23:281906int GetCurrentPlatform() {
1907#if defined(OS_MACOSX)
1908 return kOsMac;
1909#elif defined(OS_WIN)
1910 return kOsWin;
1911#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
1912 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:211913#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:281914 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:401915#elif defined(OS_ANDROID)
1916 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:281917#else
1918#error Unknown platform
1919#endif
1920}
1921
[email protected]e6d1c4f2013-06-12 17:37:401922void RecordUMAStatistics(FlagsStorage* flags_storage) {
1923 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:541924 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
1925 ++it) {
1926 std::string action("AboutFlags_");
1927 action += *it;
[email protected]7f6f44c2011-12-14 13:23:381928 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:541929 }
1930 // Since flag metrics are recorded every startup, add a tick so that the
1931 // stats can be made meaningful.
1932 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:381933 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
1934 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:541935}
1936
[email protected]e2ddbc92010-10-15 20:02:071937//////////////////////////////////////////////////////////////////////////////
1938// FlagsState implementation.
1939
1940namespace {
1941
[email protected]83e9fa702013-02-25 19:30:441942typedef std::map<std::string, std::pair<std::string, std::string> >
1943 NameToSwitchAndValueMap;
1944
1945void SetFlagToSwitchMapping(const std::string& key,
1946 const std::string& switch_name,
1947 const std::string& switch_value,
1948 NameToSwitchAndValueMap* name_to_switch_map) {
1949 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
1950 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
1951}
1952
[email protected]e2ddbc92010-10-15 20:02:071953void FlagsState::ConvertFlagsToSwitches(
[email protected]e6d1c4f2013-06-12 17:37:401954 FlagsStorage* flags_storage, CommandLine* command_line) {
[email protected]e2ddbc92010-10-15 20:02:071955 if (command_line->HasSwitch(switches::kNoExperiments))
1956 return;
1957
1958 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:001959
[email protected]e6d1c4f2013-06-12 17:37:401960 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
1961 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:071962
[email protected]a82744532011-02-11 16:15:531963 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:191964 for (size_t i = 0; i < num_experiments; ++i) {
1965 const Experiment& e = experiments[i];
1966 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:441967 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
1968 e.command_line_value, &name_to_switch_map);
1969 } else if (e.type == Experiment::MULTI_VALUE) {
1970 for (int j = 0; j < e.num_choices; ++j) {
1971 SetFlagToSwitchMapping(e.NameForChoice(j),
1972 e.choices[j].command_line_switch,
1973 e.choices[j].command_line_value,
1974 &name_to_switch_map);
1975 }
[email protected]8a6ff28d2010-12-02 16:35:191976 } else {
[email protected]83e9fa702013-02-25 19:30:441977 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
1978 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
1979 &name_to_switch_map);
1980 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
1981 e.command_line_value, &name_to_switch_map);
1982 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
1983 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:191984 }
1985 }
[email protected]e2ddbc92010-10-15 20:02:071986
1987 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
[email protected]a82744532011-02-11 16:15:531988 flags_switches_.insert(
1989 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
1990 std::string()));
[email protected]e2ddbc92010-10-15 20:02:071991 for (std::set<std::string>::iterator it = enabled_experiments.begin();
1992 it != enabled_experiments.end();
1993 ++it) {
1994 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:531995 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:191996 name_to_switch_map.find(experiment_name);
1997 if (name_to_switch_it == name_to_switch_map.end()) {
1998 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:071999 continue;
[email protected]8a6ff28d2010-12-02 16:35:192000 }
[email protected]e2ddbc92010-10-15 20:02:072001
[email protected]a82744532011-02-11 16:15:532002 const std::pair<std::string, std::string>&
2003 switch_and_value_pair = name_to_switch_it->second;
2004
2005 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2006 switch_and_value_pair.second);
2007 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072008 }
2009 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
[email protected]a82744532011-02-11 16:15:532010 flags_switches_.insert(
2011 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2012 std::string()));
[email protected]e2ddbc92010-10-15 20:02:072013}
2014
2015bool FlagsState::IsRestartNeededToCommitChanges() {
2016 return needs_restart_;
2017}
2018
[email protected]e6d1c4f2013-06-12 17:37:402019void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2020 const std::string& internal_name,
2021 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442022 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192023 if (at_index != std::string::npos) {
2024 DCHECK(enable);
2025 // We're being asked to enable a multi-choice experiment. Disable the
2026 // currently selected choice.
2027 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222028 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402029 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192030
[email protected]28e35af2011-02-09 12:56:222031 // And enable the new choice, if it is not the default first choice.
2032 if (internal_name != experiment_name + "@0") {
2033 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402034 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082035 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402036 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222037 }
[email protected]8a6ff28d2010-12-02 16:35:192038 return;
2039 }
2040
[email protected]ad2a3ded2010-08-27 13:19:052041 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402042 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052043
[email protected]8a6ff28d2010-12-02 16:35:192044 const Experiment* e = NULL;
2045 for (size_t i = 0; i < num_experiments; ++i) {
2046 if (experiments[i].internal_name == internal_name) {
2047 e = experiments + i;
2048 break;
2049 }
2050 }
2051 DCHECK(e);
2052
2053 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592054 if (enable)
[email protected]147492b2013-03-19 23:52:082055 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592056 else
[email protected]147492b2013-03-19 23:52:082057 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192058 } else {
2059 if (enable) {
2060 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082061 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192062 } else {
2063 // Find the currently enabled choice and disable it.
2064 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442065 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192066 if (enabled_experiments.find(choice_name) !=
2067 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082068 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192069 enabled_experiments.erase(choice_name);
2070 // Continue on just in case there's a bug and more than one
2071 // experiment for this choice was enabled.
2072 }
2073 }
2074 }
2075 }
[email protected]ad2a3ded2010-08-27 13:19:052076
[email protected]e6d1c4f2013-06-12 17:37:402077 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052078}
2079
[email protected]e2ddbc92010-10-15 20:02:072080void FlagsState::RemoveFlagsSwitches(
2081 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532082 for (std::map<std::string, std::string>::const_iterator
2083 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2084 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072085 }
2086}
2087
[email protected]e6d1c4f2013-06-12 17:37:402088void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002089 needs_restart_ = true;
2090
2091 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402092 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002093}
2094
[email protected]e2ddbc92010-10-15 20:02:072095void FlagsState::reset() {
2096 needs_restart_ = false;
2097 flags_switches_.clear();
2098}
2099
[email protected]38e46812011-05-09 20:49:222100} // namespace
[email protected]e2ddbc92010-10-15 20:02:072101
2102namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192103
2104// WARNING: '@' is also used in the html file. If you update this constant you
2105// also need to update the html file.
2106const char kMultiSeparator[] = "@";
2107
[email protected]e2ddbc92010-10-15 20:02:072108void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552109 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072110}
[email protected]a314ee5a2010-10-26 21:23:282111
2112void SetExperiments(const Experiment* e, size_t count) {
2113 if (!e) {
2114 experiments = kExperiments;
2115 num_experiments = arraysize(kExperiments);
2116 } else {
2117 experiments = e;
2118 num_experiments = count;
2119 }
2120}
2121
[email protected]8a6ff28d2010-12-02 16:35:192122const Experiment* GetExperiments(size_t* count) {
2123 *count = num_experiments;
2124 return experiments;
2125}
2126
[email protected]e2ddbc92010-10-15 20:02:072127} // namespace testing
2128
[email protected]1a47d7e2010-10-15 00:37:242129} // namespace about_flags