blob: ac9c2d90c66938d7840cb0e83cc08b8be5534097 [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]265fd7b2013-08-13 02:32:1013#include "ash/ash_switches.h"
[email protected]ad2a3ded2010-08-27 13:19:0514#include "base/command_line.h"
[email protected]3b63f8f42011-03-28 01:54:1515#include "base/memory/singleton.h"
[email protected]3ea1b182013-02-08 22:38:4116#include "base/strings/string_number_conversions.h"
[email protected]135cb802013-06-09 16:44:2017#include "base/strings/utf_string_conversions.h"
[email protected]ad2a3ded2010-08-27 13:19:0518#include "base/values.h"
[email protected]681ccff2013-03-18 06:13:5219#include "cc/base/switches.h"
[email protected]11534552013-12-05 02:09:3020#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
[email protected]e6d1c4f2013-06-12 17:37:4021#include "chrome/browser/flags_storage.h"
[email protected]d208f4d82011-05-23 21:52:0322#include "chrome/common/chrome_content_client.h"
[email protected]ad2a3ded2010-08-27 13:19:0523#include "chrome/common/chrome_switches.h"
[email protected]58bc1c32013-12-16 22:52:0724#include "components/autofill/core/common/autofill_switches.h"
[email protected]cbb22eb2013-06-24 23:53:1025#include "components/nacl/common/nacl_switches.h"
[email protected]7f6f44c2011-12-14 13:23:3826#include "content/public/browser/user_metrics.h"
[email protected]49d9b142013-07-19 08:50:2727#include "extensions/common/switches.h"
[email protected]d96aef22012-10-30 11:47:0228#include "grit/chromium_strings.h"
[email protected]ad2a3ded2010-08-27 13:19:0529#include "grit/generated_resources.h"
[email protected]d96aef22012-10-30 11:47:0230#include "grit/google_chrome_strings.h"
[email protected]e2e8e322012-09-12 04:37:0231#include "media/base/media_switches.h"
[email protected]c051a1b2011-01-21 23:30:1732#include "ui/base/l10n/l10n_util.h"
[email protected]c9c73ad42012-04-18 03:35:5933#include "ui/base/ui_base_switches.h"
[email protected]bf3f4592014-03-31 19:50:4434#include "ui/display/display_switches.h"
[email protected]a6147a22013-09-26 06:55:0935#include "ui/events/event_switches.h"
[email protected]0d3b9dd2012-11-14 04:14:4836#include "ui/gfx/switches.h"
[email protected]c9e2cbbb2012-05-12 21:17:2737#include "ui/gl/gl_switches.h"
[email protected]86459e2c2013-04-10 13:39:2438#include "ui/keyboard/keyboard_switches.h"
[email protected]9a224572013-05-12 23:08:5639#include "ui/message_center/message_center_switches.h"
[email protected]e3d512a72014-03-18 20:50:4740#include "ui/native_theme/native_theme_switches.h"
[email protected]c4f51d22013-11-05 03:11:2641#include "ui/views/views_switches.h"
[email protected]9a224572013-05-12 23:08:5642
[email protected]dc04be7c2012-03-15 23:57:4943#if defined(USE_ASH)
[email protected]b65bdda2011-12-23 23:35:3144#include "ash/ash_switches.h"
[email protected]dc04be7c2012-03-15 23:57:4945#endif
46
[email protected]badba1ad2012-11-16 17:21:4647#if defined(OS_CHROMEOS)
48#include "chromeos/chromeos_switches.h"
[email protected]6d98abf2013-06-17 23:35:5149#include "third_party/cros_system_api/switches/chrome_switches.h"
[email protected]badba1ad2012-11-16 17:21:4650#endif
51
[email protected]fe2b77f62013-11-09 04:30:5152#if defined(ENABLE_APP_LIST)
53#include "ui/app_list/app_list_switches.h"
54#endif
55
[email protected]e6e30ac2014-01-13 21:24:3956using base::UserMetricsAction;
[email protected]7f6f44c2011-12-14 13:23:3857
[email protected]1a47d7e2010-10-15 00:37:2458namespace about_flags {
[email protected]ad2a3ded2010-08-27 13:19:0559
[email protected]8a6ff28d2010-12-02 16:35:1960// Macros to simplify specifying the type.
[email protected]a82744532011-02-11 16:15:5361#define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \
[email protected]83e9fa702013-02-25 19:30:4462 Experiment::SINGLE_VALUE, \
63 command_line_switch, switch_value, NULL, NULL, NULL, 0
[email protected]a82744532011-02-11 16:15:5364#define SINGLE_VALUE_TYPE(command_line_switch) \
65 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "")
[email protected]83e9fa702013-02-25 19:30:4466#define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \
67 disable_switch, disable_value) \
68 Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \
69 disable_switch, disable_value, NULL, 3
70#define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \
71 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "")
[email protected]a82744532011-02-11 16:15:5372#define MULTI_VALUE_TYPE(choices) \
[email protected]83e9fa702013-02-25 19:30:4473 Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices)
[email protected]8a6ff28d2010-12-02 16:35:1974
[email protected]e2ddbc92010-10-15 20:02:0775namespace {
76
[email protected]9c7453d2012-01-21 00:45:4077const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
[email protected]f3cd6802013-01-23 20:25:5678const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
[email protected]ad2a3ded2010-08-27 13:19:0579
[email protected]cc3e2052011-12-20 01:01:4080// Adds a |StringValue| to |list| for each platform where |bitmask| indicates
81// whether the experiment is available on that platform.
[email protected]5bcdd99d2013-12-23 18:28:3082void AddOsStrings(unsigned bitmask, base::ListValue* list) {
[email protected]cc3e2052011-12-20 01:01:4083 struct {
84 unsigned bit;
85 const char* const name;
86 } kBitsToOs[] = {
87 {kOsMac, "Mac"},
88 {kOsWin, "Windows"},
89 {kOsLinux, "Linux"},
90 {kOsCrOS, "Chrome OS"},
[email protected]4052d832013-01-16 05:31:0191 {kOsAndroid, "Android"},
[email protected]37736bd2013-04-18 11:53:5892 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"},
[email protected]cc3e2052011-12-20 01:01:4093 };
94 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
95 if (bitmask & kBitsToOs[i].bit)
[email protected]5bcdd99d2013-12-23 18:28:3096 list->Append(new base::StringValue(kBitsToOs[i].name));
[email protected]cc3e2052011-12-20 01:01:4097}
98
[email protected]6d98abf2013-06-17 23:35:5199// Convert switch constants to proper CommandLine::StringType strings.
100CommandLine::StringType GetSwitchString(const std::string& flag) {
101 CommandLine cmd_line(CommandLine::NO_PROGRAM);
102 cmd_line.AppendSwitch(flag);
103 DCHECK(cmd_line.argv().size() == 2);
104 return cmd_line.argv()[1];
105}
106
107// Scoops flags from a command line.
108std::set<CommandLine::StringType> ExtractFlagsFromCommandLine(
109 const CommandLine& cmdline) {
110 std::set<CommandLine::StringType> flags;
111 // First do the ones between --flag-switches-begin and --flag-switches-end.
112 CommandLine::StringVector::const_iterator first =
113 std::find(cmdline.argv().begin(), cmdline.argv().end(),
114 GetSwitchString(switches::kFlagSwitchesBegin));
115 CommandLine::StringVector::const_iterator last =
116 std::find(cmdline.argv().begin(), cmdline.argv().end(),
117 GetSwitchString(switches::kFlagSwitchesEnd));
118 if (first != cmdline.argv().end() && last != cmdline.argv().end())
119 flags.insert(first + 1, last);
120#if defined(OS_CHROMEOS)
121 // Then add those between --policy-switches-begin and --policy-switches-end.
122 first = std::find(cmdline.argv().begin(), cmdline.argv().end(),
123 GetSwitchString(chromeos::switches::kPolicySwitchesBegin));
124 last = std::find(cmdline.argv().begin(), cmdline.argv().end(),
125 GetSwitchString(chromeos::switches::kPolicySwitchesEnd));
126 if (first != cmdline.argv().end() && last != cmdline.argv().end())
127 flags.insert(first + 1, last);
128#endif
129 return flags;
130}
131
[email protected]fb854192013-02-06 01:30:04132const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = {
133 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
134 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
135 switches::kEnableCompositingForFixedPosition, ""},
136 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
137 switches::kDisableCompositingForFixedPosition, ""},
138 { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI,
139 switches::kEnableHighDpiCompositingForFixedPosition, ""}
140};
141
[email protected]d8221b22013-05-23 05:35:43142const Experiment::Choice kEnableCompositingForTransitionChoices[] = {
143 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
144 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
145 switches::kEnableCompositingForTransition, ""},
146 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
147 switches::kDisableCompositingForTransition, ""},
148};
149
[email protected]06fc4d3b2013-07-08 21:07:24150const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = {
151 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
152 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
153 switches::kEnableAcceleratedFixedRootBackground, ""},
154 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
155 switches::kDisableAcceleratedFixedRootBackground, ""},
156};
157
[email protected]d7932532012-11-21 21:10:31158const Experiment::Choice kTouchEventsChoices[] = {
159 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
160 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
161 switches::kTouchEvents,
162 switches::kTouchEventsEnabled },
163 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
164 switches::kTouchEvents,
165 switches::kTouchEventsDisabled }
166};
167
[email protected]347a0c72012-05-14 20:28:06168const Experiment::Choice kTouchOptimizedUIChoices[] = {
[email protected]d7932532012-11-21 21:10:31169 { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" },
[email protected]a45c69402012-06-24 16:32:20170 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]347a0c72012-05-14 20:28:06171 switches::kTouchOptimizedUI,
172 switches::kTouchOptimizedUIEnabled },
[email protected]a45c69402012-06-24 16:32:20173 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]347a0c72012-05-14 20:28:06174 switches::kTouchOptimizedUI,
175 switches::kTouchOptimizedUIDisabled }
176};
177
[email protected]c38e9802014-02-18 21:32:12178#if defined(USE_AURA)
179const Experiment::Choice kOverscrollHistoryNavigationChoices[] = {
180 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" },
181 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
182 switches::kOverscrollHistoryNavigation,
183 "0" },
184 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI,
185 switches::kOverscrollHistoryNavigation,
186 "2" }
187};
188#endif
189
[email protected]66f409c2012-10-04 20:59:04190const Experiment::Choice kNaClDebugMaskChoices[] = {
[email protected]66f409c2012-10-04 20:59:04191 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
[email protected]402bed6e2014-03-07 08:33:09192 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
193 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
194 // so by default we want to avoid debugging that.
195 // NOTE: As the default value must be the empty string, the mask excluding
196 // the PNaCl translator and secure shell is substituted elsewhere.
197 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" },
198 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" },
[email protected]66f409c2012-10-04 20:59:04199 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
200 switches::kNaClDebugMask, "*://*/*debug.nmf" }
201};
202
[email protected]9323fdd12013-02-23 00:31:36203const Experiment::Choice kImplSidePaintingChoices[] = {
204 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
205 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]a23530d2014-03-11 06:04:14206 switches::kEnableImplSidePainting, ""},
[email protected]9323fdd12013-02-23 00:31:36207 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]a23530d2014-03-11 06:04:14208 switches::kDisableImplSidePainting, ""}
[email protected]9323fdd12013-02-23 00:31:36209};
210
[email protected]7621af22013-09-12 23:06:33211const Experiment::Choice kLCDTextChoices[] = {
212 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]a23530d2014-03-11 06:04:14213 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""},
214 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""}
[email protected]7621af22013-09-12 23:06:33215};
216
[email protected]758efb02014-04-05 07:53:45217#ifndef USE_AURA
[email protected]0c04d1c2013-07-10 00:02:32218const Experiment::Choice kDelegatedRendererChoices[] = {
219 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
220 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
221 switches::kEnableDelegatedRenderer, ""},
222 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
223 switches::kDisableDelegatedRenderer, ""}
224};
[email protected]758efb02014-04-05 07:53:45225#endif
[email protected]0c04d1c2013-07-10 00:02:32226
[email protected]a42c85f2013-04-04 18:15:12227const Experiment::Choice kMaxTilesForInterestAreaChoices[] = {
228 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
229 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT,
230 cc::switches::kMaxTilesForInterestArea, "64"},
231 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL,
232 cc::switches::kMaxTilesForInterestArea, "128"},
233 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE,
234 cc::switches::kMaxTilesForInterestArea, "256"},
235 { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI,
236 cc::switches::kMaxTilesForInterestArea, "512"}
237};
238
[email protected]a3618122013-04-26 21:15:34239const Experiment::Choice kDefaultTileWidthChoices[] = {
240 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
241 { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT,
242 switches::kDefaultTileWidth, "128"},
243 { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL,
244 switches::kDefaultTileWidth, "256"},
245 { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE,
246 switches::kDefaultTileWidth, "512"},
247 { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI,
248 switches::kDefaultTileWidth, "1024"}
249};
250
251const Experiment::Choice kDefaultTileHeightChoices[] = {
252 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
253 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT,
254 switches::kDefaultTileHeight, "128"},
255 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL,
256 switches::kDefaultTileHeight, "256"},
257 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE,
258 switches::kDefaultTileHeight, "512"},
259 { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI,
260 switches::kDefaultTileHeight, "1024"}
261};
262
[email protected]38484df12013-04-10 16:42:03263const Experiment::Choice kSimpleCacheBackendChoices[] = {
[email protected]9a3de3e32013-04-23 19:05:21264 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
265 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
266 switches::kUseSimpleCacheBackend, "off" },
[email protected]38484df12013-04-10 16:42:03267 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
268 switches::kUseSimpleCacheBackend, "on"}
269};
270
[email protected]9afc14e22013-09-25 22:34:14271#if defined(USE_AURA)
[email protected]910ecfe2013-06-03 23:38:14272const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = {
273 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
274 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
275 switches::kTabCaptureUpscaleQuality, "fast" },
276 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
277 switches::kTabCaptureUpscaleQuality, "good" },
278 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
279 switches::kTabCaptureUpscaleQuality, "best" },
280};
281
282const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = {
283 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
284 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST,
285 switches::kTabCaptureDownscaleQuality, "fast" },
286 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD,
287 switches::kTabCaptureDownscaleQuality, "good" },
288 { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST,
289 switches::kTabCaptureDownscaleQuality, "best" },
290};
[email protected]9afc14e22013-09-25 22:34:14291#endif
[email protected]910ecfe2013-06-03 23:38:14292
[email protected]54c8d282014-01-24 17:31:08293#if defined(USE_AURA) || defined(OS_LINUX)
294const Experiment::Choice kOverlayScrollbarChoices[] = {
295 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
296 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
297 switches::kEnableOverlayScrollbar, ""},
298 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
299 switches::kDisableOverlayScrollbar, ""}
300};
301#endif
302
[email protected]be2e40a2013-08-27 02:49:20303const Experiment::Choice kMapImageChoices[] = {
304 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
305 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
[email protected]a23530d2014-03-11 06:04:14306 switches::kEnableMapImage, ""},
[email protected]be2e40a2013-08-27 02:49:20307 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
[email protected]a23530d2014-03-11 06:04:14308 switches::kDisableMapImage, ""}
[email protected]be2e40a2013-08-27 02:49:20309};
310
[email protected]d5874f12013-12-05 04:30:00311#if defined(OS_ANDROID)
312const Experiment::Choice kZeroSuggestExperimentsChoices[] = {
313 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
314 { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED,
315 switches::kEnableZeroSuggestMostVisited, ""},
316 { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP,
317 switches::kEnableZeroSuggestEtherSerp, ""},
318 { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP,
319 switches::kEnableZeroSuggestEtherNoSerp, ""},
[email protected]162c8d9fa2014-03-18 20:25:41320 { IDS_FLAGS_ZERO_SUGGEST_PERSONALIZED,
321 switches::kEnableZeroSuggestPersonalized, ""},
[email protected]d5874f12013-12-05 04:30:00322 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
323 switches::kDisableZeroSuggest, ""}
324};
325#endif
326
[email protected]1a82f7372013-12-06 12:46:52327const Experiment::Choice kNumRasterThreadsChoices[] = {
328 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
[email protected]00d92d32014-01-23 09:46:50329 { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" },
330 { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" },
331 { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" },
332 { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" }
[email protected]1a82f7372013-12-06 12:46:52333};
334
[email protected]a23530d2014-03-11 06:04:14335const Experiment::Choice kEnableGpuRasterizationChoices[] = {
336 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
337 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
338 switches::kEnableGpuRasterization, "" },
339 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
340 switches::kDisableGpuRasterization, "" },
341 { IDS_FLAGS_FORCE_GPU_RASTERIZATION,
342 switches::kForceGpuRasterization, "" },
343};
344
[email protected]dc920d62013-12-13 22:12:47345// We're using independent flags here (as opposed to a common flag with
346// different values) to be able to enable/disable the entire experience
347// associated with this feature server-side from the FieldTrial (the complete
348// experience includes other flag changes as well). It is not currently possible
349// to do that with "flag=value" flags.
350const Experiment::Choice kSearchButtonInOmniboxChoices[] = {
351 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
352 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
353 switches::kDisableSearchButtonInOmnibox, ""},
354 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
355 switches::kEnableSearchButtonInOmniboxForStr, ""},
356 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
357 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
358 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
359 switches::kEnableSearchButtonInOmniboxAlways, ""}
360};
361
[email protected]78dd09e2014-01-12 02:41:46362// See comment above for kSearchButtonInOmniboxChoices. The same reasoning
363// applies here.
364const Experiment::Choice kOriginChipChoices[] = {
365 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
366 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
[email protected]78dd09e2014-01-12 02:41:46367 { IDS_FLAGS_ORIGIN_CHIP_TRAILING_LOCATION_BAR,
368 switches::kEnableOriginChipTrailingLocationBar, ""},
[email protected]a0ebaf92014-01-14 04:47:52369 { IDS_FLAGS_ORIGIN_CHIP_LEADING_LOCATION_BAR,
370 switches::kEnableOriginChipLeadingLocationBar, ""},
[email protected]78dd09e2014-01-12 02:41:46371 { IDS_FLAGS_ORIGIN_CHIP_LEADING_MENU_BUTTON,
372 switches::kEnableOriginChipLeadingMenuButton, ""}
373};
[email protected]7a54bf4b2014-02-06 19:21:54374const Experiment::Choice kOriginChipV2Choices[] = {
375 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
376 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChipV2, ""},
377 { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE,
378 switches::kEnableOriginChipV2HideOnMouseRelease, ""},
379 { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_USER_INPUT,
380 switches::kEnableOriginChipV2HideOnUserInput, ""}
381};
[email protected]78dd09e2014-01-12 02:41:46382
[email protected]4d11b08b2014-01-27 22:19:07383const Experiment::Choice kNotificationCenterTrayBehaviorChoices[] = {
384 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
385 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NEVER,
386 message_center::switches::kNotificationCenterTrayBehavior, "never" },
387 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_ALWAYS,
388 message_center::switches::kNotificationCenterTrayBehavior, "always" },
389 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_UNREAD,
390 message_center::switches::kNotificationCenterTrayBehavior, "unread" }
391};
392
[email protected]f42cffb2014-03-08 18:03:25393const Experiment::Choice kTouchScrollingModeChoices[] = {
394 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
395 { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL,
396 switches::kTouchScrollingMode,
397 switches::kTouchScrollingModeTouchcancel },
398 { IDS_FLAGS_TOUCH_SCROLLING_MODE_ABSORB_TOUCHMOVE,
399 switches::kTouchScrollingMode,
400 switches::kTouchScrollingModeAbsorbTouchmove },
401 { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE,
402 switches::kTouchScrollingMode,
403 switches::kTouchScrollingModeSyncTouchmove },
404};
405
[email protected]4734b902014-04-03 16:42:10406#if defined(ENABLE_APP_LIST)
407const Experiment::Choice kEnableSyncAppListChoices[] = {
408 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
409 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
410 app_list::switches::kEnableSyncAppList, "" },
411 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
412 app_list::switches::kDisableSyncAppList, "" },
413};
414#endif
415
[email protected]4bc5050c2010-11-18 17:55:54416// RECORDING USER METRICS FOR FLAGS:
417// -----------------------------------------------------------------------------
418// The first line of the experiment is the internal name. If you'd like to
419// gather statistics about the usage of your flag, you should append a marker
420// comment to the end of the feature name, like so:
421// "my-special-feature", // FLAGS:RECORD_UMA
422//
[email protected]d8320fb62014-03-22 03:16:37423// After doing that, run
424// tools/metrics/actions/extract_actions.py
425// to add the metric to actions.xml (which will enable UMA to record your
426// feature flag), then update the <owner>s and <description> sections. Make sure
427// to include the actions.xml file when you upload your code for review!
[email protected]4bc5050c2010-11-18 17:55:54428//
[email protected]783d5bb2012-10-24 03:47:14429// After your feature has shipped under a flag, you can locate the metrics under
430// the action name AboutFlags_internal-action-name. Actions are recorded once
431// per startup, so you should divide this number by AboutFlags_StartupTick to
432// get a sense of usage. Note that this will not be the same as number of users
433// with a given feature enabled because users can quit and relaunch the
434// application multiple times over a given time interval. The dashboard also
435// shows you how many (metrics reporting) users have enabled the flag over the
436// last seven days. However, note that this is not the same as the number of
437// users who have the flag enabled, since enabling the flag happens once,
438// whereas running with the flag enabled happens until the user flips the flag
439// again.
[email protected]4bc5050c2010-11-18 17:55:54440
[email protected]8a6ff28d2010-12-02 16:35:19441// To add a new experiment add to the end of kExperiments. There are two
442// distinct types of experiments:
443// . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE
444// macro for this type supplying the command line to the macro.
[email protected]28e35af2011-02-09 12:56:22445// . MULTI_VALUE: a list of choices, the first of which should correspond to a
446// deactivated state for this lab (i.e. no command line option). To specify
447// this type of experiment use the macro MULTI_VALUE_TYPE supplying it the
448// array of choices.
[email protected]8a6ff28d2010-12-02 16:35:19449// See the documentation of Experiment for details on the fields.
450//
451// When adding a new choice, add it to the end of the list.
[email protected]ad2a3ded2010-08-27 13:19:05452const Experiment kExperiments[] = {
453 {
[email protected]4bc5050c2010-11-18 17:55:54454 "conflicting-modules-check", // FLAGS:RECORD_UMA
[email protected]c1bbaa82010-11-08 11:17:05455 IDS_FLAGS_CONFLICTS_CHECK_NAME,
456 IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION,
457 kOsWin,
[email protected]8a6ff28d2010-12-02 16:35:19458 SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck)
[email protected]c1bbaa82010-11-08 11:17:05459 },
460 {
[email protected]96c6f4c2011-05-18 19:36:22461 "ignore-gpu-blacklist",
462 IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME,
463 IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION,
464 kOsAll,
465 SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)
466 },
467 {
[email protected]0110cf112011-07-02 00:39:43468 "force-compositing-mode-2",
[email protected]96c6f4c2011-05-18 19:36:22469 IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME,
470 IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION,
[email protected]758efb02014-04-05 07:53:45471#if !defined(USE_AURA)
[email protected]85a36cd2014-01-22 11:41:26472 kOsLinux,
[email protected]758efb02014-04-05 07:53:45473#else
474 0,
475#endif
[email protected]83e9fa702013-02-25 19:30:44476 ENABLE_DISABLE_VALUE_TYPE(switches::kForceCompositingMode,
477 switches::kDisableForceCompositingMode)
[email protected]96c6f4c2011-05-18 19:36:22478 },
479 {
[email protected]72787e392012-03-23 05:55:43480 "threaded-compositing-mode",
481 IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME,
482 IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION,
[email protected]758efb02014-04-05 07:53:45483#if !defined(USE_AURA)
[email protected]85a36cd2014-01-22 11:41:26484 kOsLinux,
[email protected]758efb02014-04-05 07:53:45485#else
486 0,
487#endif
[email protected]83e9fa702013-02-25 19:30:44488 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing,
489 switches::kDisableThreadedCompositing)
[email protected]644a1072012-03-16 09:29:59490 },
491 {
[email protected]17e27692013-02-06 17:02:09492 "force-accelerated-composited-scrolling",
493 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
494 IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
495 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44496 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll,
497 switches::kDisableAcceleratedOverflowScroll)
[email protected]17e27692013-02-06 17:02:09498 },
499 {
[email protected]44de7492013-10-18 15:14:59500 "force-universal-accelerated-composited-scrolling",
501 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME,
502 IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION,
503 kOsAll,
504 ENABLE_DISABLE_VALUE_TYPE(
505 switches::kEnableUniversalAcceleratedOverflowScroll,
506 switches::kDisableUniversalAcceleratedOverflowScroll)
507 },
[email protected]5b7033fc2013-12-07 22:32:07508#if defined(OS_WIN)
509 {
510 "enable-direct-write",
511 IDS_FLAGS_ENABLE_DIRECT_WRITE_NAME,
512 IDS_FLAGS_ENABLE_DIRECT_WRITE_DESCRIPTION,
513 kOsWin,
514 SINGLE_VALUE_TYPE(switches::kEnableDirectWrite)
515 },
516#endif
[email protected]8b1c3c72013-01-25 01:48:43517 {
[email protected]2b608752013-05-01 03:34:36518 "enable-experimental-canvas-features",
519 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME,
520 IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION,
521 kOsAll,
522 SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures)
523 },
524 {
[email protected]81c64af62012-06-06 20:15:52525 "disable-accelerated-2d-canvas",
526 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME,
527 IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION,
528 kOsAll,
529 SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)
530 },
531 {
[email protected]5963b772011-02-09 22:55:38532 "composited-layer-borders",
533 IDS_FLAGS_COMPOSITED_LAYER_BORDERS,
534 IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION,
535 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57536 SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)
[email protected]5963b772011-02-09 22:55:38537 },
538 {
[email protected]a8f1eaa2011-03-07 19:00:58539 "show-fps-counter",
540 IDS_FLAGS_SHOW_FPS_COUNTER,
541 IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION,
542 kOsAll,
[email protected]4d5e6762013-03-19 18:46:57543 SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter)
[email protected]a8f1eaa2011-03-07 19:00:58544 },
[email protected]8ff7f342011-05-25 01:49:47545 {
[email protected]deaba6d52011-09-23 14:47:12546 "disable-webgl",
547 IDS_FLAGS_DISABLE_WEBGL_NAME,
548 IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION,
[email protected]6c7784e2013-08-01 22:41:28549 kOsAll,
[email protected]deaba6d52011-09-23 14:47:12550 SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL)
551 },
[email protected]09096e02012-05-24 11:12:04552 {
[email protected]ce585bf2013-03-14 16:25:16553 "disable-webrtc",
554 IDS_FLAGS_DISABLE_WEBRTC_NAME,
555 IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION,
[email protected]d9da9582013-01-31 04:59:05556 kOsAndroid,
557#if defined(OS_ANDROID)
[email protected]ce585bf2013-03-14 16:25:16558 SINGLE_VALUE_TYPE(switches::kDisableWebRTC)
[email protected]d9da9582013-01-31 04:59:05559#else
560 SINGLE_VALUE_TYPE("")
561#endif
562 },
[email protected]5e2bc8c2013-05-28 22:59:57563#if defined(ENABLE_WEBRTC)
[email protected]d816ddc2013-05-23 14:28:30564 {
[email protected]f1045f02013-08-02 23:19:35565 "disable-device-enumeration",
566 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME,
567 IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION,
[email protected]c1298742013-07-17 04:06:32568 kOsAll,
[email protected]f1045f02013-08-02 23:19:35569 SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration)
[email protected]c1298742013-07-17 04:06:32570 },
[email protected]96cbf422013-09-11 12:42:22571 {
[email protected]fdf631e2013-09-13 09:06:07572 "disable-webrtc-hw-decoding",
573 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME,
574 IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION,
[email protected]6442b022013-12-05 11:09:05575 kOsAndroid | kOsCrOS,
[email protected]fdf631e2013-09-13 09:06:07576 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)
577 },
578 {
[email protected]96cbf422013-09-11 12:42:22579 "disable-webrtc-hw-encoding",
580 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME,
581 IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION,
[email protected]6998f01f22013-12-04 09:27:57582 kOsAndroid | kOsCrOS,
[email protected]96cbf422013-09-11 12:42:22583 SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)
584 },
[email protected]5e2bc8c2013-05-28 22:59:57585#endif
[email protected]34cb5292013-04-15 06:06:31586#if defined(OS_ANDROID)
587 {
[email protected]7b8a31632013-06-13 22:42:37588 "disable-webaudio",
589 IDS_FLAGS_DISABLE_WEBAUDIO_NAME,
590 IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION,
[email protected]34cb5292013-04-15 06:06:31591 kOsAndroid,
[email protected]7b8a31632013-06-13 22:42:37592 SINGLE_VALUE_TYPE(switches::kDisableWebAudio)
[email protected]34cb5292013-04-15 06:06:31593 },
594#endif
[email protected]d9da9582013-01-31 04:59:05595 {
[email protected]96bcdc102012-05-24 23:42:10596 "fixed-position-creates-stacking-context",
597 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME,
598 IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION,
599 kOsAll,
[email protected]83e9fa702013-02-25 19:30:44600 ENABLE_DISABLE_VALUE_TYPE(
601 switches::kEnableFixedPositionCreatesStackingContext,
602 switches::kDisableFixedPositionCreatesStackingContext)
[email protected]96bcdc102012-05-24 23:42:10603 },
[email protected]fb854192013-02-06 01:30:04604 {
605 "enable-compositing-for-fixed-position",
606 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME,
607 IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION,
608 kOsAll,
609 MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices)
610 },
[email protected]d8221b22013-05-23 05:35:43611 {
612 "enable-compositing-for-transition",
613 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME,
614 IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION,
615 kOsAll,
616 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
617 },
[email protected]06fc4d3b2013-07-08 21:07:24618 {
619 "enable-accelerated-fixed-root-background",
620 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
621 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
622 kOsAll,
623 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
624 },
[email protected]a7640ef22012-10-06 00:52:08625 // TODO(bbudge): When NaCl is on by default, remove this flag entry.
[email protected]2fe15fcb2010-10-21 20:39:53626 {
[email protected]e3791ce92011-08-09 01:03:32627 "enable-nacl", // FLAGS:RECORD_UMA
[email protected]4ff87d202010-11-06 01:28:40628 IDS_FLAGS_ENABLE_NACL_NAME,
629 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56630 kOsDesktop,
[email protected]8a6ff28d2010-12-02 16:35:19631 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
[email protected]4ff87d202010-11-06 01:28:40632 },
633 {
[email protected]9addd1c2012-09-15 14:28:24634 "enable-nacl-debug", // FLAGS:RECORD_UMA
635 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
636 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56637 kOsDesktop,
[email protected]9addd1c2012-09-15 14:28:24638 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
[email protected]401b90792012-05-30 11:41:13639 },
640 {
[email protected]7de24f52013-08-29 10:02:55641 "disable-pnacl", // FLAGS:RECORD_UMA
642 IDS_FLAGS_DISABLE_PNACL_NAME,
643 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
644 kOsDesktop,
645 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
646 },
647 {
[email protected]66f409c2012-10-04 20:59:04648 "nacl-debug-mask", // FLAGS:RECORD_UMA
649 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
650 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56651 kOsDesktop,
[email protected]66f409c2012-10-04 20:59:04652 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
653 },
654 {
[email protected]4bc5050c2010-11-18 17:55:54655 "extension-apis", // FLAGS:RECORD_UMA
[email protected]11dd68cd52010-11-12 01:15:32656 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
657 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56658 kOsDesktop,
[email protected]c8d02992013-07-31 22:16:51659 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
[email protected]11dd68cd52010-11-12 01:15:32660 },
[email protected]3627b06d2010-11-12 16:36:16661 {
[email protected]ac2e2acd2013-03-21 12:57:29662 "extensions-on-chrome-urls",
663 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
664 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION,
665 kOsAll,
[email protected]49d9b142013-07-19 08:50:27666 SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)
[email protected]ac2e2acd2013-03-21 12:57:29667 },
668 {
[email protected]88c92012013-07-02 11:56:34669 "enable-fast-unload",
670 IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME,
671 IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION,
672 kOsAll,
673 SINGLE_VALUE_TYPE(switches::kEnableFastUnload)
674 },
675 {
[email protected]e9cddd52013-03-23 17:37:53676 "enable-adview",
677 IDS_FLAGS_ENABLE_ADVIEW_NAME,
678 IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION,
679 kOsDesktop,
680 SINGLE_VALUE_TYPE(switches::kEnableAdview)
681 },
682 {
[email protected]1f4da9e2013-06-27 05:23:44683 "enable-app-window-controls",
684 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME,
685 IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION,
686 kOsDesktop,
687 SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls)
688 },
689 {
[email protected]cbe224d2011-08-04 22:12:49690 "apps-new-install-bubble",
691 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME,
692 IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56693 kOsDesktop,
[email protected]cbe224d2011-08-04 22:12:49694 SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble)
695 },
696 {
[email protected]80bd24e2010-11-30 09:34:38697 "disable-hyperlink-auditing",
698 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME,
699 IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION,
700 kOsAll,
[email protected]8a6ff28d2010-12-02 16:35:19701 SINGLE_VALUE_TYPE(switches::kNoPings)
[email protected]feb28fef2010-12-01 10:52:51702 },
[email protected]333bdc52013-07-16 00:37:04703#if defined(OS_ANDROID)
704 {
705 "enable-new-ntp",
706 IDS_FLAGS_ENABLE_NEW_NTP,
707 IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION,
708 kOsAndroid,
[email protected]6bab2e32013-09-11 00:09:03709 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP,
710 switches::kDisableNewNTP)
[email protected]333bdc52013-07-16 00:37:04711 },
[email protected]26d1b4d2014-02-08 02:42:17712 {
713 "contextual-search",
714 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH,
715 IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION,
716 kOsAndroid,
717 SINGLE_VALUE_TYPE(switches::kEnableContextualSearch)
718 },
[email protected]333bdc52013-07-16 00:37:04719#endif
[email protected]8cc9e532013-05-06 21:01:47720 {
[email protected]3eb5728c2011-06-20 22:32:24721 "show-autofill-type-predictions",
722 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME,
723 IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION,
724 kOsAll,
[email protected]e217c5632013-04-12 19:11:48725 SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions)
[email protected]3eb5728c2011-06-20 22:32:24726 },
[email protected]bff4d3e2011-06-21 23:58:52727 {
[email protected]e755a382012-09-13 17:16:35728 "enable-gesture-tap-highlight",
729 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME,
730 IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION,
[email protected]9ef42cf2014-03-11 02:50:12731 kOsLinux | kOsCrOS | kOsWin | kOsAndroid,
[email protected]06ca05d2013-03-13 19:12:47732 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight,
733 switches::kDisableGestureTapHighlight)
[email protected]e755a382012-09-13 17:16:35734 },
735 {
[email protected]a22ebd812011-06-23 00:05:39736 "enable-smooth-scrolling", // FLAGS:RECORD_UMA
737 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME,
738 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION,
739 // Can't expose the switch unless the code is compiled in.
[email protected]554b7062011-09-03 03:09:40740 // On by default for the Mac (different implementation in WebKit).
[email protected]a5a5aaf2013-12-19 02:10:10741 kOsLinux,
[email protected]a22ebd812011-06-23 00:05:39742 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling)
743 },
[email protected]54c8d282014-01-24 17:31:08744#if defined(USE_AURA) || defined(OS_LINUX)
[email protected]81a6b0b2011-06-24 17:55:40745 {
[email protected]54c8d282014-01-24 17:31:08746 "overlay-scrollbars",
[email protected]23eecbd02013-09-19 18:13:37747 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME,
748 IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION,
749 // Uses the system preference on Mac (a different implementation).
750 // On Android, this is always enabled.
[email protected]54c8d282014-01-24 17:31:08751 kOsLinux | kOsCrOS | kOsWin,
752 MULTI_VALUE_TYPE(kOverlayScrollbarChoices)
[email protected]23eecbd02013-09-19 18:13:37753 },
[email protected]54c8d282014-01-24 17:31:08754#endif
[email protected]23eecbd02013-09-19 18:13:37755 {
[email protected]7e7a28092011-12-09 22:24:55756 "enable-panels",
757 IDS_FLAGS_ENABLE_PANELS_NAME,
758 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56759 kOsDesktop,
[email protected]7e7a28092011-12-09 22:24:55760 SINGLE_VALUE_TYPE(switches::kEnablePanels)
[email protected]73fb1fc52011-07-09 00:06:54761 },
[email protected]e3749d12011-07-25 22:22:12762 {
[email protected]27c14f02012-06-22 17:29:58763 // See http://crbug.com/120416 for how to remove this flag.
[email protected]6474b112012-05-04 19:35:27764 "save-page-as-mhtml", // FLAGS:RECORD_UMA
765 IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME,
766 IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION,
767 kOsMac | kOsWin | kOsLinux,
768 SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML)
769 },
770 {
[email protected]c00d32572014-03-24 15:58:36771 "enable-autologin",
772 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME,
773 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION,
774 kOsMac | kOsWin | kOsLinux,
775 SINGLE_VALUE_TYPE(switches::kEnableAutologin)
776 },
777 {
[email protected]903e63382013-06-01 00:40:58778 "enable-quic",
779 IDS_FLAGS_ENABLE_QUIC_NAME,
780 IDS_FLAGS_ENABLE_QUIC_DESCRIPTION,
781 kOsAll,
782 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic,
783 switches::kDisableQuic)
784 },
785 {
[email protected]eb8f88e2013-07-15 09:52:17786 "enable-quic-https",
787 IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME,
788 IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION,
789 kOsAll,
[email protected]a64b213e2013-07-24 21:41:00790 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps,
791 switches::kDisableQuicHttps)
[email protected]eb8f88e2013-07-15 09:52:17792 },
793 {
[email protected]bca09b9982013-06-27 22:30:46794 "enable-spdy4a2",
795 IDS_FLAGS_ENABLE_SPDY4A2_NAME,
796 IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION,
797 kOsAll,
798 SINGLE_VALUE_TYPE(switches::kEnableSpdy4a2)
799 },
800 {
[email protected]88a332622013-07-30 07:13:32801 "enable-http2-draft-04",
802 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME,
803 IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION,
804 kOsAll,
805 SINGLE_VALUE_TYPE(switches::kEnableHttp2Draft04)
806 },
807 {
[email protected]27b3fe92012-03-21 05:35:06808 "enable-async-dns",
809 IDS_FLAGS_ENABLE_ASYNC_DNS_NAME,
810 IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION,
[email protected]85594c142012-09-11 18:02:46811 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]83e9fa702013-02-25 19:30:44812 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns,
813 switches::kDisableAsyncDns)
[email protected]27b3fe92012-03-21 05:35:06814 },
815 {
[email protected]bc9235c22013-09-24 07:32:44816 "disable-webkit-media-source",
[email protected]5bf1223a52013-05-14 21:42:31817 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_NAME,
818 IDS_FLAGS_DISABLE_WEBKIT_MEDIA_SOURCE_DESCRIPTION,
[email protected]ec9d0532012-03-21 05:55:32819 kOsAll,
[email protected]5bf1223a52013-05-14 21:42:31820 SINGLE_VALUE_TYPE(switches::kDisableWebKitMediaSource)
[email protected]6aa03b32011-10-27 21:44:44821 },
[email protected]e4e68dbb2011-11-18 01:50:22822 {
[email protected]722b4d484f2013-10-08 20:33:59823 "disable-unprefixed-media-source",
824 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_NAME,
825 IDS_FLAGS_DISABLE_UNPREFIXED_MEDIA_SOURCE_DESCRIPTION,
826 kOsAll,
827 SINGLE_VALUE_TYPE(switches::kDisableUnprefixedMediaSource)
828 },
829 {
[email protected]16c242d2013-05-31 23:56:47830 "enable-encrypted-media",
831 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME,
832 IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50833 kOsAll,
[email protected]16c242d2013-05-31 23:56:47834 SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia)
835 },
836 {
[email protected]e76d92f2013-09-26 20:03:35837 "disable-prefixed-encrypted-media",
[email protected]16c242d2013-05-31 23:56:47838 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME,
839 IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION,
[email protected]ddb0f262013-07-26 13:16:50840 kOsAll,
[email protected]e76d92f2013-09-26 20:03:35841 SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia)
[email protected]9f5b7822012-04-18 23:39:03842 },
[email protected]ce3934bb2013-09-10 02:02:56843#if defined(OS_ANDROID)
844 {
[email protected]3c56ec12013-09-25 02:03:42845 "disable-infobar-for-protected-media-identifier",
846 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME,
847 IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION,
848 kOsAndroid,
849 SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier)
850 },
851 {
[email protected]ce3934bb2013-09-10 02:02:56852 "mediadrm-enable-non-compositing",
853 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME,
854 IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION,
855 kOsAndroid,
856 SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing)
857 },
858#endif // defined(OS_ANDROID)
[email protected]d21ead42013-06-24 06:35:06859 {
[email protected]bf88c032011-12-22 19:05:47860 "enable-javascript-harmony",
861 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
862 IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
863 kOsAll,
864 SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony")
865 },
[email protected]7e7f378a2012-01-05 14:35:37866 {
[email protected]88864db2012-01-18 20:56:35867 "disable-software-rasterizer",
868 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME,
869 IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION,
870#if defined(ENABLE_SWIFTSHADER)
871 kOsAll,
872#else
873 0,
874#endif
875 SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer)
876 },
[email protected]15a5d722012-01-23 09:11:14877 {
[email protected]d1ddf8c52014-02-06 22:09:31878 "enable-gpu-rasterization",
879 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME,
880 IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION,
[email protected]96d25e22014-03-04 05:56:18881 kOsAndroid,
[email protected]a23530d2014-03-11 06:04:14882 MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)
[email protected]d1ddf8c52014-02-06 22:09:31883 },
884 {
[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]3e8befc2012-03-13 01:17:03892 "disable-ntp-other-sessions-menu",
[email protected]156f966332012-02-29 00:03:16893 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME,
894 IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56895 kOsDesktop,
[email protected]3e8befc2012-03-13 01:17:03896 SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu)
[email protected]156f966332012-02-29 00:03:16897 },
[email protected]184ec592012-03-01 11:54:28898 {
899 "enable-devtools-experiments",
900 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME,
901 IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56902 kOsDesktop,
[email protected]184ec592012-03-01 11:54:28903 SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)
904 },
[email protected]76d1854e2012-03-02 23:57:44905 {
[email protected]2fefdb32013-02-26 14:28:10906 "silent-debugger-extension-api",
907 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME,
908 IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION,
909 kOsDesktop,
910 SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI)
911 },
912 {
[email protected]1dbaf5e2012-11-30 05:51:32913 "spellcheck-autocorrect",
914 IDS_FLAGS_SPELLCHECK_AUTOCORRECT,
915 IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION,
916 kOsWin | kOsLinux | kOsCrOS,
917 SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect)
918 },
919 {
[email protected]e27137282013-06-20 02:38:35920 "enable-scroll-prediction",
921 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME,
922 IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION,
923 kOsDesktop,
924 SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction)
925 },
926 {
[email protected]d7932532012-11-21 21:10:31927 "touch-events",
928 IDS_TOUCH_EVENTS_NAME,
929 IDS_TOUCH_EVENTS_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56930 kOsDesktop,
[email protected]d7932532012-11-21 21:10:31931 MULTI_VALUE_TYPE(kTouchEventsChoices)
932 },
933 {
[email protected]c9c73ad42012-04-18 03:35:59934 "touch-optimized-ui",
[email protected]347a0c72012-05-14 20:28:06935 IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME,
936 IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION,
[email protected]c71fe6402012-08-15 15:22:55937 kOsWin,
[email protected]347a0c72012-05-14 20:28:06938 MULTI_VALUE_TYPE(kTouchOptimizedUIChoices)
[email protected]c9c73ad42012-04-18 03:35:59939 },
[email protected]8a6aaa72012-04-20 20:53:58940 {
[email protected]b9c96ff2012-11-26 22:24:40941 "disable-touch-adjustment",
942 IDS_DISABLE_TOUCH_ADJUSTMENT_NAME,
943 IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION,
944 kOsWin | kOsLinux | kOsCrOS,
945 SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment)
946 },
[email protected]0b60afa2012-04-19 17:36:39947#if defined(OS_CHROMEOS)
948 {
[email protected]fda64c9e2014-03-12 21:45:32949 "ash-use-alternate-shelf",
950 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_NAME,
951 IDS_FLAGS_ALTERNATE_SHELF_LAYOUT_DESCRIPTION,
952 kOsCrOS,
953 ENABLE_DISABLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout,
954 ash::switches::kAshDisableAlternateShelfLayout)
955 },
956 {
[email protected]736282c2014-01-06 22:01:58957 "ash-disable-docked-windows",
[email protected]ba7df7e2013-07-18 21:49:59958 IDS_FLAGS_DOCKED_WINDOWS_NAME,
959 IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION,
960 kOsCrOS,
[email protected]736282c2014-01-06 22:01:58961 SINGLE_VALUE_TYPE(ash::switches::kAshDisableDockedWindows)
[email protected]ba7df7e2013-07-18 21:49:59962 },
[email protected]63458432013-11-20 17:28:53963 {
[email protected]81f89e92014-02-21 14:27:35964 "network-portal-notification",
965 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME,
966 IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION,
967 kOsCrOS,
968 ENABLE_DISABLE_VALUE_TYPE(
969 chromeos::switches::kEnableNetworkPortalNotification,
970 chromeos::switches::kDisableNetworkPortalNotification)
971 },
[email protected]0b60afa2012-04-19 17:36:39972#endif
[email protected]79be6d32012-04-24 20:47:44973 {
[email protected]8d68a3e02013-01-12 15:57:10974 "enable-download-resumption",
975 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
976 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56977 kOsDesktop,
[email protected]8d68a3e02013-01-12 15:57:10978 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
979 },
980 {
[email protected]9a5940d2012-04-27 19:16:23981 "allow-nacl-socket-api",
982 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
983 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:56984 kOsDesktop,
[email protected]9a5940d2012-04-27 19:16:23985 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
986 },
[email protected]85333732012-05-01 19:02:24987 {
[email protected]60673ad72012-05-02 06:16:33988 "stacked-tab-strip",
989 IDS_FLAGS_STACKED_TAB_STRIP_NAME,
990 IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION,
991 kOsWin,
992 SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip)
993 },
994 {
[email protected]4bd20202012-06-14 17:35:01995 "force-device-scale-factor",
[email protected]85333732012-05-01 19:02:24996 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
997 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
998 kOsCrOS,
[email protected]4bd20202012-06-14 17:35:01999 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
[email protected]85333732012-05-01 19:02:241000 },
[email protected]190349fd2012-05-02 00:10:471001#if defined(OS_CHROMEOS)
1002 {
1003 "allow-touchpad-three-finger-click",
1004 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME,
1005 IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION,
1006 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241007 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick)
[email protected]190349fd2012-05-02 00:10:471008 },
1009#endif
[email protected]53520b1b2012-05-07 21:43:371010#if defined(USE_ASH)
1011 {
[email protected]2ddf37b2013-04-20 01:15:581012 "disable-minimize-on-second-launcher-item-click",
1013 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME,
1014 IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION,
1015 kOsAll,
1016 SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick)
1017 },
1018 {
[email protected]73074742012-05-17 01:44:411019 "show-touch-hud",
1020 IDS_FLAGS_SHOW_TOUCH_HUD_NAME,
1021 IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION,
1022 kOsAll,
1023 SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
1024 },
1025 {
[email protected]9f0940b62012-05-23 22:56:351026 "enable-pinch",
1027 IDS_FLAGS_ENABLE_PINCH_SCALE_NAME,
1028 IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION,
[email protected]16ad47f82012-12-05 21:06:061029 kOsLinux | kOsWin | kOsCrOS,
[email protected]e4cd82e2013-04-10 15:20:381030 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch),
1031 },
1032 {
[email protected]de0aaed2013-05-27 18:16:431033 "enable-pinch-virtual-viewport",
1034 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME,
1035 IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION,
1036 kOsLinux | kOsWin | kOsCrOS,
1037 SINGLE_VALUE_TYPE(cc::switches::kEnablePinchVirtualViewport),
1038 },
[email protected]73074742012-05-17 01:44:411039#endif // defined(USE_ASH)
[email protected]68bc37c2014-01-07 15:56:481040 {
1041 "enable-viewport-meta",
1042 IDS_FLAGS_ENABLE_VIEWPORT_META_NAME,
1043 IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION,
1044 kOsLinux | kOsWin | kOsCrOS | kOsMac,
1045 SINGLE_VALUE_TYPE(switches::kEnableViewportMeta),
1046 },
[email protected]ed7b67f32012-05-28 10:12:281047#if defined(OS_CHROMEOS)
1048 {
[email protected]8b04a1652012-08-04 02:59:491049 "disable-boot-animation",
1050 IDS_FLAGS_DISABLE_BOOT_ANIMATION,
1051 IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION,
[email protected]37736bd2013-04-18 11:53:581052 kOsCrOSOwnerOnly,
[email protected]2f2d6c32013-05-10 02:56:241053 SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation),
[email protected]8b04a1652012-08-04 02:59:491054 },
[email protected]95058572012-08-20 14:57:291055 {
[email protected]4e8e8622014-01-30 04:37:051056 "enable-new-audio-player",
1057 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_NAME,
1058 IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_DESCRIPTION,
1059 kOsCrOS,
1060 SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableNewAudioPlayer)
1061 },
1062 {
[email protected]099b890c2013-04-25 19:16:261063 "disable-quickoffice-component-app",
1064 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME,
1065 IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION,
1066 kOsCrOS,
1067 SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp),
1068 },
[email protected]31cf1472013-09-13 00:36:421069 {
[email protected]21d5a6b62014-01-24 22:47:141070 "disable-saml-signin",
1071 IDS_FLAGS_DISABLE_SAML_SIGNIN_NAME,
1072 IDS_FLAGS_DISABLE_SAML_SIGNIN_DESCRIPTION,
[email protected]31cf1472013-09-13 00:36:421073 kOsCrOS,
[email protected]21d5a6b62014-01-24 22:47:141074 SINGLE_VALUE_TYPE(chromeos::switches::kDisableSamlSignin),
[email protected]31cf1472013-09-13 00:36:421075 },
[email protected]d81240b2013-09-20 21:05:281076 {
1077 "enable-multi-profiles",
1078 IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME,
1079 IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION,
1080 kOsCrOS,
1081 SINGLE_VALUE_TYPE(switches::kMultiProfiles),
1082 },
[email protected]bf3f4592014-03-31 19:50:441083 {
1084 "disable-display-color-calibration",
1085 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME,
1086 IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION,
1087 kOsCrOS,
1088 SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration),
1089 },
[email protected]62018dc2012-12-13 00:37:351090#endif // defined(OS_CHROMEOS)
[email protected]7db8893a2012-07-26 00:49:401091 { "disable-accelerated-video-decode",
1092 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME,
1093 IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION,
[email protected]33e98a852013-04-26 05:14:191094 kOsWin | kOsCrOS,
[email protected]7db8893a2012-07-26 00:49:401095 SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
[email protected]66dcb0492012-06-18 22:32:151096 },
[email protected]1d9bb9cd2012-08-28 22:02:501097#if defined(USE_ASH)
[email protected]35c9a4e2013-09-14 01:32:381098 {
1099 "ash-debug-shortcuts",
1100 IDS_FLAGS_DEBUG_SHORTCUTS_NAME,
1101 IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION,
1102 kOsAll,
1103 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1104 },
[email protected]35c9a4e2013-09-14 01:32:381105 { "ash-alternate-caption-button",
1106 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_NAME,
1107 IDS_FLAGS_ASH_FRAME_CAPTION_BUTTON_STYLE_DESCRIPTION,
1108 kOsCrOS,
1109 ENABLE_DISABLE_VALUE_TYPE(
1110 ash::switches::kAshEnableAlternateFrameCaptionButtonStyle,
1111 ash::switches::kAshDisableAlternateFrameCaptionButtonStyle),
1112 },
[email protected]b19b09a2014-02-26 05:34:341113 { "ash-enable-touch-view-testing",
1114 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME,
1115 IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION,
1116 kOsCrOS,
1117 SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting),
1118 },
[email protected]1d9bb9cd2012-08-28 22:02:501119#endif
[email protected]9b7ab882012-09-10 23:46:361120#if defined(OS_CHROMEOS)
1121 {
[email protected]205f07892012-10-16 20:26:221122 "enable-carrier-switching",
1123 IDS_FLAGS_ENABLE_CARRIER_SWITCHING,
1124 IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION,
1125 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241126 SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching)
[email protected]205f07892012-10-16 20:26:221127 },
1128 {
[email protected]9b7ab882012-09-10 23:46:361129 "enable-request-tablet-site",
1130 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME,
1131 IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION,
1132 kOsCrOS,
[email protected]2f2d6c32013-05-10 02:56:241133 SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite)
[email protected]9b7ab882012-09-10 23:46:361134 },
1135#endif
[email protected]dab49c0b2012-10-04 05:55:351136 {
1137 "debug-packed-apps",
1138 IDS_FLAGS_DEBUG_PACKED_APP_NAME,
1139 IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561140 kOsDesktop,
[email protected]dab49c0b2012-10-04 05:55:351141 SINGLE_VALUE_TYPE(switches::kDebugPackedApps)
1142 },
[email protected]d1459ed2012-10-10 01:29:331143 {
1144 "enable-password-generation",
1145 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME,
1146 IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION,
[email protected]f3cd6802013-01-23 20:25:561147 kOsDesktop,
[email protected]c3cc0632013-10-03 21:54:431148 ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration,
1149 autofill::switches::kDisablePasswordGeneration)
[email protected]d1459ed2012-10-10 01:29:331150 },
[email protected]26d045f2012-10-18 21:18:431151 {
[email protected]f2a394b2013-11-28 20:08:041152 "password-manager-reauthentication",
[email protected]429a6e02013-10-23 18:40:481153 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME,
1154 IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION,
[email protected]48293fb2013-12-04 04:02:031155 kOsMac | kOsWin,
[email protected]f2a394b2013-11-28 20:08:041156 SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
[email protected]429a6e02013-10-23 18:40:481157 },
1158 {
[email protected]76f7d4882012-10-26 21:09:221159 "enable-deferred-image-decoding",
1160 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME,
1161 IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION,
[email protected]76f7d4882012-10-26 21:09:221162 kOsMac | kOsLinux | kOsCrOS,
[email protected]76f7d4882012-10-26 21:09:221163 SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding)
1164 },
1165 {
[email protected]075543d2012-10-24 01:29:141166 "performance-monitor-gathering",
1167 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME,
1168 IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION,
1169 kOsAll,
1170 SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering)
1171 },
[email protected]783d5bb2012-10-24 03:47:141172 {
[email protected]45476982013-10-01 03:22:291173 "wallet-service-use-sandbox",
1174 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME,
1175 IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION,
1176 kOsCrOS | kOsWin | kOsMac,
1177 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1178 autofill::switches::kWalletServiceUseSandbox, "1",
1179 autofill::switches::kWalletServiceUseSandbox, "0")
[email protected]db3178c2013-03-21 14:54:541180 },
1181 {
[email protected]6e6efe42013-01-30 00:04:501182 "enable-interactive-autocomplete",
1183 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME,
1184 IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION,
[email protected]2a9b0c12013-08-15 02:38:391185 kOsWin | kOsCrOS | kOsAndroid | kOsMac,
[email protected]000f3ad2013-05-16 02:19:171186 ENABLE_DISABLE_VALUE_TYPE(
1187 autofill::switches::kEnableInteractiveAutocomplete,
1188 autofill::switches::kDisableInteractiveAutocomplete)
[email protected]6e6efe42013-01-30 00:04:501189 },
[email protected]177260c2013-04-24 01:47:381190#if defined(USE_AURA)
1191 {
1192 "overscroll-history-navigation",
1193 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME,
1194 IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION,
1195 kOsAll,
[email protected]c38e9802014-02-18 21:32:121196 MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices)
[email protected]177260c2013-04-24 01:47:381197 },
1198#endif
[email protected]edbea622012-11-28 20:39:381199 {
[email protected]888878e82013-07-24 22:49:401200 "scroll-end-effect",
1201 IDS_FLAGS_SCROLL_END_EFFECT_NAME,
1202 IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION,
1203 kOsCrOS,
1204 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1205 switches::kScrollEndEffect, "1",
1206 switches::kScrollEndEffect, "0")
1207 },
1208 {
[email protected]edbea622012-11-28 20:39:381209 "enable-touch-drag-drop",
1210 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME,
1211 IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION,
1212 kOsWin | kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271213 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop,
1214 switches::kDisableTouchDragDrop)
[email protected]edbea622012-11-28 20:39:381215 },
[email protected]0e2f43b62013-02-21 00:47:151216 {
1217 "enable-touch-editing",
1218 IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME,
1219 IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION,
1220 kOsCrOS,
[email protected]1400e6dc2013-04-27 02:36:271221 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing,
1222 switches::kDisableTouchEditing)
[email protected]0e2f43b62013-02-21 00:47:151223 },
[email protected]92e12dd92012-12-11 03:33:201224 {
[email protected]ddec1aa2013-04-28 23:22:451225 "enable-sync-synced-notifications",
1226 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
1227 IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION,
[email protected]43168932013-05-24 06:35:181228 kOsDesktop,
[email protected]ddec1aa2013-04-28 23:22:451229 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications,
1230 switches::kDisableSyncSyncedNotifications)
1231 },
[email protected]630a27a2014-01-15 08:24:091232#if defined(ENABLE_APP_LIST)
1233 {
[email protected]4734b902014-04-03 16:42:101234 "enable-sync-app-list",
1235 IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME,
1236 IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION,
[email protected]630a27a2014-01-15 08:24:091237 kOsDesktop,
[email protected]4734b902014-04-03 16:42:101238 MULTI_VALUE_TYPE(kEnableSyncAppListChoices)
[email protected]630a27a2014-01-15 08:24:091239 },
1240#endif
[email protected]ddec1aa2013-04-28 23:22:451241 {
[email protected]fd030142013-02-08 02:04:381242 "enable-usermedia-screen-capture",
1243 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME,
1244 IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION,
1245 kOsDesktop,
1246 SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing)
1247 },
[email protected]d41cf1b2014-02-21 01:24:351248#if defined(OS_MACOSX)
1249 {
[email protected]0039b0be2014-03-12 20:24:111250 "enable-avfoundation",
1251 IDS_FLAGS_ENABLE_AVFOUNDATION_NAME,
1252 IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION,
[email protected]d41cf1b2014-02-21 01:24:351253 kOsMac,
[email protected]0039b0be2014-03-12 20:24:111254 SINGLE_VALUE_TYPE(switches::kEnableAVFoundation)
[email protected]d41cf1b2014-02-21 01:24:351255 },
1256#endif
[email protected]5b93e162013-02-19 06:33:091257 {
[email protected]9323fdd12013-02-23 00:31:361258 "impl-side-painting",
1259 IDS_FLAGS_IMPL_SIDE_PAINTING_NAME,
1260 IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521261 kOsAll,
[email protected]9323fdd12013-02-23 00:31:361262 MULTI_VALUE_TYPE(kImplSidePaintingChoices)
1263 },
[email protected]a42c85f2013-04-04 18:15:121264 {
[email protected]7621af22013-09-12 23:06:331265 "lcd-text-aa",
1266 IDS_FLAGS_LCD_TEXT_NAME,
1267 IDS_FLAGS_LCD_TEXT_DESCRIPTION,
1268 kOsDesktop,
1269 MULTI_VALUE_TYPE(kLCDTextChoices)
1270 },
[email protected]758efb02014-04-05 07:53:451271#ifndef USE_AURA
[email protected]7621af22013-09-12 23:06:331272 {
[email protected]0c04d1c2013-07-10 00:02:321273 "delegated-renderer",
1274 IDS_FLAGS_DELEGATED_RENDERER_NAME,
1275 IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION,
[email protected]758efb02014-04-05 07:53:451276 kOsAndroid,
[email protected]0c04d1c2013-07-10 00:02:321277 MULTI_VALUE_TYPE(kDelegatedRendererChoices)
1278 },
[email protected]758efb02014-04-05 07:53:451279#endif
[email protected]0c04d1c2013-07-10 00:02:321280 {
[email protected]1c92d3e2013-04-18 05:31:391281 "enable-websocket-experimental-implementation",
1282 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_NAME,
1283 IDS_FLAGS_ENABLE_EXPERIMENTAL_WEBSOCKET_DESCRIPTION,
1284 kOsAll,
1285 SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebSocket)
1286 },
1287 {
[email protected]a42c85f2013-04-04 18:15:121288 "max-tiles-for-interest-area",
1289 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME,
1290 IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION,
[email protected]1a82f7372013-12-06 12:46:521291 kOsAll,
[email protected]a42c85f2013-04-04 18:15:121292 MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices)
1293 },
[email protected]7cf7ccb2013-04-20 02:53:081294 {
1295 "enable-offline-mode",
1296 IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME,
1297 IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION,
1298 kOsAll,
1299 SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess)
1300 },
[email protected]a3618122013-04-26 21:15:341301 {
[email protected]5676e7482013-12-17 08:05:371302 "enable-offline-auto-reload",
1303 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME,
1304 IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION,
1305 kOsAll,
1306 SINGLE_VALUE_TYPE(switches::kEnableOfflineAutoReload)
1307 },
1308 {
[email protected]a3618122013-04-26 21:15:341309 "default-tile-width",
1310 IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME,
1311 IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION,
1312 kOsAll,
1313 MULTI_VALUE_TYPE(kDefaultTileWidthChoices)
1314 },
1315 {
1316 "default-tile-height",
1317 IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME,
1318 IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION,
1319 kOsAll,
1320 MULTI_VALUE_TYPE(kDefaultTileHeightChoices)
1321 },
[email protected]8cc71d42013-03-02 17:26:081322#if defined(OS_ANDROID)
1323 {
1324 "disable-gesture-requirement-for-media-playback",
1325 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME,
1326 IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION,
1327 kOsAndroid,
1328 SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback)
1329 },
1330#endif
[email protected]86459e2c2013-04-10 13:39:241331#if defined(OS_CHROMEOS)
1332 {
1333 "enable-virtual-keyboard",
1334 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME,
1335 IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION,
1336 kOsCrOS,
1337 SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard)
1338 },
[email protected]8b4321e2013-10-25 01:16:181339 {
1340 "enable-swipe-selection",
1341 IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME,
1342 IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION,
1343 kOsCrOS,
1344 SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection)
1345 },
[email protected]0e627fb12014-03-25 18:18:531346 {
1347 "enable-input-view",
1348 IDS_FLAGS_ENABLE_INPUT_VIEW_NAME,
1349 IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION,
1350 kOsCrOS,
1351 ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView,
1352 keyboard::switches::kDisableInputView)
1353 },
[email protected]86459e2c2013-04-10 13:39:241354#endif
[email protected]38484df12013-04-10 16:42:031355 {
1356 "enable-simple-cache-backend",
1357 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME,
1358 IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION,
[email protected]957cd5a2014-03-27 19:54:171359 kOsWin | kOsMac | kOsLinux | kOsCrOS,
[email protected]38484df12013-04-10 16:42:031360 MULTI_VALUE_TYPE(kSimpleCacheBackendChoices)
1361 },
[email protected]717e4e22013-04-10 20:52:231362 {
1363 "enable-tcp-fast-open",
1364 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME,
1365 IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION,
[email protected]d0a8a162013-04-13 01:37:111366 kOsLinux | kOsCrOS | kOsAndroid,
[email protected]717e4e22013-04-10 20:52:231367 SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen)
1368 },
[email protected]8027acd2013-04-18 08:35:151369 {
[email protected]58c740f2013-05-06 05:25:441370 "apps-use-native-frame",
1371 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME,
1372 IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION,
[email protected]7cccda1d2014-02-21 14:30:251373 kOsMac,
[email protected]58c740f2013-05-06 05:25:441374 SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame)
1375 },
[email protected]896d86b32013-05-09 19:36:441376 {
1377 "enable-syncfs-directory-operation",
1378 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME,
1379 IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION,
1380 kOsAll,
1381 SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation),
1382 },
[email protected]2188c8d2014-03-21 00:58:561383#if defined(ENABLE_SERVICE_DISCOVERY)
[email protected]a4ed7e12013-05-24 01:00:281384 {
[email protected]2f7992ba2013-09-08 23:44:571385 "disable-device-discovery",
1386 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME,
1387 IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION,
1388 kOsWin | kOsLinux | kOsCrOS,
1389 SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery)
[email protected]9f94a6c42013-07-11 18:49:151390 },
[email protected]94868922013-09-19 18:00:551391 {
[email protected]d394d9762013-09-22 06:00:251392 "device-discovery-notifications",
1393 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME,
1394 IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION,
[email protected]94868922013-09-19 18:00:551395 kOsWin | kOsLinux | kOsCrOS,
[email protected]d394d9762013-09-22 06:00:251396 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications,
1397 switches::kDisableDeviceDiscoveryNotifications)
[email protected]94868922013-09-19 18:00:551398 },
[email protected]53ffe0d2013-10-30 01:20:401399 {
[email protected]f0392392014-03-10 20:07:521400 "enable-print-preview-register-promos",
1401 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME,
1402 IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION,
1403 kOsWin | kOsLinux | kOsCrOS,
1404 SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos)
1405 },
[email protected]2188c8d2014-03-21 00:58:561406#endif // ENABLE_SERVICE_DISCOVERY
[email protected]ca53b142014-02-25 22:42:231407#if defined(OS_WIN)
1408 {
1409 "enable-cloud-print-xps",
1410 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME,
1411 IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION,
1412 kOsWin,
1413 SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)
1414 },
1415#endif
[email protected]56d3c6e42013-05-29 11:28:011416#if defined(OS_MACOSX)
1417 {
[email protected]a9397d62013-12-30 06:31:361418 "disable-app-shims",
1419 IDS_FLAGS_DISABLE_APP_SHIMS_NAME,
1420 IDS_FLAGS_DISABLE_APP_SHIMS_DESCRIPTION,
[email protected]cb29e162013-05-31 07:47:021421 kOsMac,
[email protected]a9397d62013-12-30 06:31:361422 SINGLE_VALUE_TYPE(switches::kDisableAppShims)
[email protected]cb29e162013-05-31 07:47:021423 },
[email protected]67604442013-06-15 00:04:331424 {
1425 "enable-simplified-fullscreen",
1426 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME,
1427 IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION,
1428 kOsMac,
1429 SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen)
1430 },
[email protected]56d3c6e42013-05-29 11:28:011431#endif
[email protected]5fa9f742013-11-14 06:33:081432#if defined(TOOLKIT_VIEWS)
[email protected]13177832013-05-31 07:46:051433 {
[email protected]6d9087b2013-07-30 08:25:461434 "omnibox-auto-completion-for-ime",
[email protected]13177832013-05-31 07:46:051435 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_NAME,
1436 IDS_FLAGS_ENABLE_OMNIBOX_AUTO_COMPLETION_FOR_IME_DESCRIPTION,
[email protected]445f4fb62013-11-12 11:46:521437 kOsCrOS | kOsWin | kOsLinux,
[email protected]6d9087b2013-07-30 08:25:461438 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOmniboxAutoCompletionForIme,
1439 switches::kDisableOmniboxAutoCompletionForIme)
[email protected]13177832013-05-31 07:46:051440 },
1441#endif
[email protected]910ecfe2013-06-03 23:38:141442#if defined(USE_AURA)
1443 {
1444 "tab-capture-upscale-quality",
1445 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME,
1446 IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION,
1447 kOsAll,
1448 MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices)
1449 },
1450 {
1451 "tab-capture-downscale-quality",
1452 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME,
1453 IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION,
1454 kOsAll,
1455 MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices)
1456 },
1457#endif
[email protected]71d4f602013-06-04 23:21:101458 {
[email protected]ba7993d2013-11-26 23:44:561459 "enable-spelling-feedback-field-trial",
1460 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME,
1461 IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION,
[email protected]5e099c62013-06-08 05:46:231462 kOsAll,
[email protected]ba7993d2013-11-26 23:44:561463 SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial)
[email protected]5e099c62013-06-08 05:46:231464 },
1465 {
[email protected]71d4f602013-06-04 23:21:101466 "enable-webgl-draft-extensions",
1467 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME,
1468 IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION,
1469 kOsAll,
1470 SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions)
1471 },
[email protected]deadc492013-06-07 21:39:281472 {
[email protected]803c48a2014-02-10 23:57:091473 "enable-html-imports",
1474 IDS_FLAGS_ENABLE_HTML_IMPORTS_NAME,
1475 IDS_FLAGS_ENABLE_HTML_IMPORTS_DESCRIPTION,
1476 kOsAll,
1477 SINGLE_VALUE_TYPE(switches::kEnableHTMLImports)
1478 },
1479 {
[email protected]bc1697a82013-06-27 15:48:311480 "enable-web-midi",
1481 IDS_FLAGS_ENABLE_WEB_MIDI_NAME,
1482 IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION,
[email protected]28e56e92014-01-03 07:52:391483 kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
[email protected]bc1697a82013-06-27 15:48:311484 SINGLE_VALUE_TYPE(switches::kEnableWebMIDI)
1485 },
[email protected]020df792013-06-29 14:26:211486 {
1487 "enable-new-profile-management",
1488 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME,
1489 IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION,
[email protected]dc6a48a82014-01-30 07:09:141490 kOsAndroid | kOsMac | kOsWin | kOsLinux,
[email protected]020df792013-06-29 14:26:211491 SINGLE_VALUE_TYPE(switches::kNewProfileManagement)
1492 },
1493 {
[email protected]8f569882014-03-25 21:12:121494 "enable-fast-user-switching",
1495 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME,
1496 IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION,
1497 kOsMac | kOsWin | kOsLinux,
1498 SINGLE_VALUE_TYPE(switches::kFastUserSwitching)
1499 },
1500 {
[email protected]85777bc2013-12-23 00:07:061501 "enable-web-based-signin",
1502 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME,
1503 IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION,
[email protected]2d279f72013-10-21 23:10:161504 kOsMac | kOsWin | kOsLinux,
[email protected]85777bc2013-12-23 00:07:061505 SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
[email protected]2d279f72013-10-21 23:10:161506 },
1507 {
[email protected]115d5728c2013-10-23 18:06:141508 "enable-google-profile-info",
1509 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
1510 IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,
[email protected]a9bf7d62013-07-11 22:11:221511 kOsMac | kOsWin | kOsLinux,
[email protected]115d5728c2013-10-23 18:06:141512 SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo)
[email protected]020df792013-06-29 14:26:211513 },
[email protected]dcf6cf32013-07-03 10:53:281514 {
[email protected]056ed7092014-01-09 12:57:211515 "reset-app-list-install-state",
[email protected]a85aa332013-10-22 11:09:591516 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME,
1517 IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION,
[email protected]7199367d2014-01-20 04:06:211518 kOsMac | kOsWin | kOsLinux,
[email protected]a85aa332013-10-22 11:09:591519 SINGLE_VALUE_TYPE(switches::kResetAppListInstallState)
[email protected]dcf6cf32013-07-03 10:53:281520 },
[email protected]919b2f82013-10-04 03:11:261521#if defined(ENABLE_APP_LIST)
[email protected]7199367d2014-01-20 04:06:211522#if defined(OS_LINUX)
1523 {
1524 // This is compiled out on non-Linux platforms because otherwise it would be
1525 // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing.
1526 // TODO(mgiuca): Remove the #if when Aura is the default on Linux.
1527 "enable-app-list",
1528 IDS_FLAGS_ENABLE_APP_LIST_NAME,
1529 IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION,
1530 kOsLinux,
1531 SINGLE_VALUE_TYPE(switches::kEnableAppList)
1532 },
1533#endif
[email protected]fe2b77f62013-11-09 04:30:511534 {
[email protected]234d110b2014-01-16 22:09:151535 "disable-app-list-voice-search",
1536 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH,
1537 IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH_DESCRIPTION,
[email protected]c879b652014-01-15 17:53:161538 kOsCrOS,
[email protected]234d110b2014-01-16 22:09:151539 SINGLE_VALUE_TYPE(app_list::switches::kDisableVoiceSearch)
[email protected]c879b652014-01-15 17:53:161540 },
[email protected]d6d867222014-02-06 11:09:581541 {
[email protected]d6d867222014-02-06 11:09:581542 "enable-app-list-app-info",
1543 IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST,
1544 IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST_DESCRIPTION,
1545 kOsLinux | kOsWin | kOsCrOS,
1546 SINGLE_VALUE_TYPE(app_list::switches::kEnableAppInfo)
1547 },
[email protected]919b2f82013-10-04 03:11:261548#endif
[email protected]d4839992013-08-13 05:41:091549#if defined(OS_CHROMEOS)
1550 {
1551 "disable-user-image-sync",
1552 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_NAME,
1553 IDS_FLAGS_DISABLE_USER_IMAGE_SYNC_DESCRIPTION,
1554 kOsCrOS,
1555 SINGLE_VALUE_TYPE(chromeos::switches::kDisableUserImageSync)
1556 },
1557#endif
[email protected]0e38c3252013-08-14 22:18:511558#if defined(OS_ANDROID)
1559 {
1560 "enable-accessibility-tab-switcher",
1561 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME,
1562 IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION,
1563 kOsAndroid,
1564 SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher)
[email protected]2e9d79f2013-08-16 05:45:561565 },
[email protected]738384172013-12-05 01:59:561566 {
[email protected]0e174722014-03-31 21:23:271567 // TODO(dmazzoni): remove this flag when native android accessibility
1568 // ships in the stable channel. http://crbug.com/356775
1569 "enable-accessibility-script-injection",
1570 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME,
1571 IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION,
[email protected]738384172013-12-05 01:59:561572 kOsAndroid,
[email protected]0e174722014-03-31 21:23:271573 // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION.
1574 SINGLE_VALUE_TYPE("enable-accessibility-script-injection")
[email protected]738384172013-12-05 01:59:561575 },
[email protected]0e38c3252013-08-14 22:18:511576#endif
[email protected]2e9d79f2013-08-16 05:45:561577 {
[email protected]be2e40a2013-08-27 02:49:201578 "map-image",
1579 IDS_FLAGS_MAP_IMAGE_NAME,
1580 IDS_FLAGS_MAP_IMAGE_DESCRIPTION,
1581 kOsAll,
1582 MULTI_VALUE_TYPE(kMapImageChoices)
[email protected]4fdc518f2013-08-28 21:37:271583 },
[email protected]bbb4beae2013-09-27 17:20:311584#if defined(OS_CHROMEOS)
1585 {
[email protected]e384a9f2013-11-25 11:23:371586 "disable-first-run-ui",
1587 IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME,
1588 IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION,
[email protected]bbb4beae2013-09-27 17:20:311589 kOsCrOS,
[email protected]e384a9f2013-11-25 11:23:371590 SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI)
[email protected]bbb4beae2013-09-27 17:20:311591 },
[email protected]407d82b2013-12-13 11:50:591592 {
1593 "enable-first-run-ui-transitions",
1594 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME,
1595 IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION,
1596 kOsCrOS,
1597 SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions)
1598 },
[email protected]bbb4beae2013-09-27 17:20:311599#endif
[email protected]ed1aab12013-10-08 14:27:071600 {
1601 "disable-compositor-touch-hit-testing",
1602 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME,
1603 IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION,
1604 kOsAll,
1605 SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting),
1606 },
[email protected]6dd2053b2013-10-09 16:29:541607 {
[email protected]f95e6df2013-10-11 13:05:171608 "enable-streamlined-hosted-apps",
1609 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME,
1610 IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION,
[email protected]abe7f8722013-12-13 11:38:061611 kOsWin | kOsCrOS | kOsLinux,
[email protected]f95e6df2013-10-11 13:05:171612 SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps)
1613 },
[email protected]a0ef5212013-10-15 18:08:261614 {
[email protected]912576e2013-10-21 10:33:131615 "enable-ephemeral-apps",
1616 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME,
1617 IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION,
[email protected]b10049952013-11-28 07:06:261618 kOsWin | kOsLinux | kOsCrOS,
[email protected]912576e2013-10-21 10:33:131619 SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps)
1620 },
1621 {
[email protected]5ec67052013-12-19 05:40:211622 "enable-linkable-ephemeral-apps",
1623 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME,
1624 IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION,
1625 kOsWin | kOsLinux | kOsCrOS,
1626 SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps)
1627 },
1628 {
[email protected]a0ef5212013-10-15 18:08:261629 "enable-service-worker",
1630 IDS_FLAGS_ENABLE_SERVICE_WORKER_NAME,
1631 IDS_FLAGS_ENABLE_SERVICE_WORKER_DESCRIPTION,
1632 kOsAll,
1633 SINGLE_VALUE_TYPE(switches::kEnableServiceWorker)
1634 },
[email protected]dfb66c522013-10-22 19:46:321635#if defined(OS_ANDROID)
1636 {
1637 "disable-click-delay",
1638 IDS_FLAGS_DISABLE_CLICK_DELAY_NAME,
1639 IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION,
1640 kOsAndroid,
1641 // Java-only switch: CommandLine.DISABLE_CLICK_DELAY
1642 SINGLE_VALUE_TYPE("disable-click-delay")
1643 },
1644#endif
[email protected]5a606592014-01-31 10:32:311645#if defined(OS_MACOSX)
[email protected]c2c84ab2013-11-18 03:05:091646 {
1647 "enable-translate-new-ux",
1648 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME,
1649 IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION,
[email protected]5a606592014-01-31 10:32:311650 kOsMac,
[email protected]c2c84ab2013-11-18 03:05:091651 SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX)
1652 },
[email protected]5a606592014-01-31 10:32:311653#endif
[email protected]c4f51d22013-11-05 03:11:261654#if defined(TOOLKIT_VIEWS)
1655 {
[email protected]88b47ad72013-11-21 03:34:381656 "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA
1657 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME,
1658 IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION,
[email protected]c4f51d22013-11-05 03:11:261659 kOsCrOS | kOsWin,
[email protected]88b47ad72013-11-21 03:34:381660 SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting)
[email protected]c4f51d22013-11-05 03:11:261661 },
1662#endif
[email protected]9f268072013-11-07 00:02:151663 {
1664 "enable-apps-show-on-first-paint",
1665 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME,
1666 IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION,
1667 kOsDesktop,
1668 SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint)
1669 },
[email protected]12271632013-11-26 03:06:391670 {
[email protected]4d7552f2014-03-04 04:53:331671 "enhanced-bookmarks-experiment",
[email protected]12271632013-11-26 03:06:391672 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1673 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1674 kOsDesktop,
[email protected]4d7552f2014-03-04 04:53:331675 ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(
1676 switches::kEnhancedBookmarksExperiment, "1",
1677 switches::kEnhancedBookmarksExperiment, "0")
[email protected]12271632013-11-26 03:06:391678 },
[email protected]cb13d462014-03-14 21:38:581679 {
1680 "manual-enhanced-bookmarks",
1681 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1682 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1683 kOsDesktop,
1684 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks)
1685 },
1686 {
1687 "manual-enhanced-bookmarks-optout",
1688 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME,
1689 IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION,
1690 kOsDesktop,
1691 SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout)
1692 },
[email protected]d5874f12013-12-05 04:30:001693#if defined(OS_ANDROID)
1694 {
1695 "enable-zero-suggest-experiment",
1696 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME,
1697 IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION,
1698 kOsAndroid,
1699 MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices)
[email protected]1a82f7372013-12-06 12:46:521700 },
[email protected]d5874f12013-12-05 04:30:001701#endif
[email protected]1a82f7372013-12-06 12:46:521702 {
1703 "num-raster-threads",
1704 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1705 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1706 kOsAll,
1707 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
[email protected]dc920d62013-12-13 22:12:471708 },
1709 {
1710 "origin-chip",
1711 IDS_FLAGS_ORIGIN_CHIP_NAME,
1712 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
1713 kOsCrOS | kOsWin,
[email protected]78dd09e2014-01-12 02:41:461714 MULTI_VALUE_TYPE(kOriginChipChoices)
[email protected]dc920d62013-12-13 22:12:471715 },
1716 {
[email protected]7a54bf4b2014-02-06 19:21:541717 "origin-chip-in-omnibox",
1718 IDS_FLAGS_ORIGIN_CHIP_V2_NAME,
1719 IDS_FLAGS_ORIGIN_CHIP_V2_DESCRIPTION,
1720 kOsCrOS | kOsMac | kOsWin,
1721 MULTI_VALUE_TYPE(kOriginChipV2Choices)
1722 },
1723 {
[email protected]dc920d62013-12-13 22:12:471724 "search-button-in-omnibox",
1725 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1726 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
1727 kOsCrOS | kOsMac | kOsWin,
1728 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
[email protected]58bc1c32013-12-16 22:52:071729 },
1730 {
[email protected]b785898a2014-02-05 06:54:431731 "disable-ignore-autocomplete-off",
1732 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME,
1733 IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION,
[email protected]58bc1c32013-12-16 22:52:071734 kOsAll,
[email protected]b785898a2014-02-05 06:54:431735 SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff)
[email protected]7cffac72013-12-20 20:21:501736 },
1737#if defined(USE_AURA) || defined(OS_WIN)
1738 {
[email protected]24ad58782014-01-23 23:43:451739 "enable-permissions-bubbles",
1740 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME,
1741 IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION,
1742 kOsCrOS | kOsWin,
1743 SINGLE_VALUE_TYPE(switches::kEnablePermissionsBubbles)
1744 },
1745#endif
[email protected]4d11b08b2014-01-27 22:19:071746 {
1747 "notification-center-tray-behavior",
1748 IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NAME,
1749 IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_DESCRIPTION,
1750 kOsMac,
1751 MULTI_VALUE_TYPE(kNotificationCenterTrayBehaviorChoices)
1752 },
[email protected]1231adf2014-01-31 02:22:331753 {
1754 "out-of-process-pdf",
1755 IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME,
1756 IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION,
1757 kOsDesktop,
1758 SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf)
1759 },
[email protected]181624c2014-02-04 17:03:341760#if defined(OS_ANDROID)
1761 {
[email protected]7073b1882014-02-11 23:24:461762 "enable-fast-text-autosizing",
1763 IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_NAME,
1764 IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_DESCRIPTION,
1765 kOsAndroid,
[email protected]c40a7482014-03-21 20:27:291766 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableFastTextAutosizing,
1767 switches::kDisableFastTextAutosizing)
[email protected]7073b1882014-02-11 23:24:461768 },
[email protected]30a8cec92014-02-24 10:09:091769 {
[email protected]276bdfa52014-02-24 14:03:091770 "disable-cast",
1771 IDS_FLAGS_DISABLE_CAST_NAME,
1772 IDS_FLAGS_DISABLE_CAST_DESCRIPTION,
[email protected]30a8cec92014-02-24 10:09:091773 kOsAndroid,
[email protected]276bdfa52014-02-24 14:03:091774 SINGLE_VALUE_TYPE(switches::kDisableCast)
[email protected]30a8cec92014-02-24 10:09:091775 },
[email protected]181624c2014-02-04 17:03:341776#endif
[email protected]99af9382014-02-12 09:02:551777 {
1778 "prefetch-search-results",
1779 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME,
1780 IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION,
1781 kOsDesktop,
1782 SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults)
1783 },
[email protected]9bd76572014-02-17 05:17:311784#if defined(ENABLE_APP_LIST)
1785 {
1786 "enable-experimental-app-list",
1787 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1788 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1789 kOsWin | kOsLinux | kOsCrOS,
1790 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList)
1791 },
[email protected]b18d51182014-03-13 10:38:271792 {
1793 "enable-experimental-app-list-position",
1794 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_POSITION_NAME,
1795 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_POSITION_DESCRIPTION,
1796 kOsWin | kOsLinux | kOsCrOS,
1797 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppListPosition)
1798 },
[email protected]9bd76572014-02-17 05:17:311799#endif
[email protected]f42cffb2014-03-08 18:03:251800 {
1801 "touch-scrolling-mode",
1802 IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME,
1803 IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION,
1804 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1805 MULTI_VALUE_TYPE(kTouchScrollingModeChoices)
1806 },
[email protected]67c5a212014-03-17 12:28:001807 {
1808 "bleeding-edge-renderer-mode",
1809 IDS_FLAGS_BLEEDING_RENDERER_NAME,
1810 IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION,
[email protected]a8a97512014-03-24 18:28:201811 kOsAndroid,
[email protected]67c5a212014-03-17 12:28:001812 SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths)
1813 },
[email protected]8a585cb2014-03-21 17:13:521814 {
1815 "enable-settings-window",
1816 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME,
1817 IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION,
1818 kOsDesktop,
1819 SINGLE_VALUE_TYPE(switches::kEnableSettingsWindow)
1820 },
[email protected]5a7a63a42014-03-26 04:19:301821#if defined(OS_ANDROID)
1822 {
1823 "enable-instant-search-clicks",
1824 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME,
1825 IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION,
1826 kOsAndroid,
1827 SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks)
1828 },
1829#endif
[email protected]4dffb662014-03-31 11:31:221830 {
1831 "enable-save-password-bubble",
1832 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME,
1833 IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION,
1834 kOsWin | kOsLinux | kOsCrOS,
[email protected]ea61c082014-04-07 16:57:241835 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble,
1836 switches::kDisableSavePasswordBubble)
[email protected]9804dad9102014-04-01 09:34:181837 },
1838#if defined(GOOGLE_CHROME_BUILD)
1839 {
1840 "enable-easy-unlock",
1841 IDS_FLAGS_ENABLE_EASY_UNLOCK_NAME,
1842 IDS_FLAGS_ENABLE_EASY_UNLOCK_DESCRIPTION,
1843 kOsCrOS,
1844 SINGLE_VALUE_TYPE(switches::kEnableEasyUnlock)
[email protected]212c7742014-04-03 14:51:321845 },
[email protected]9804dad9102014-04-01 09:34:181846#endif
[email protected]212c7742014-04-03 14:51:321847 {
1848 "enable-embedded-shared-worker",
1849 IDS_FLAGS_ENABLE_EMBEDDED_SHARED_WORKER_NAME,
1850 IDS_FLAGS_ENABLE_EMBEDDED_SHARED_WORKER_DESCRIPTION,
1851 kOsDesktop,
1852 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSharedWorker)
1853 },
[email protected]a0e4b072011-08-17 01:47:071854};
[email protected]ad2a3ded2010-08-27 13:19:051855
[email protected]a314ee5a2010-10-26 21:23:281856const Experiment* experiments = kExperiments;
1857size_t num_experiments = arraysize(kExperiments);
1858
[email protected]e2ddbc92010-10-15 20:02:071859// Stores and encapsulates the little state that about:flags has.
1860class FlagsState {
1861 public:
1862 FlagsState() : needs_restart_(false) {}
[email protected]e6d1c4f2013-06-12 17:37:401863 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:211864 CommandLine* command_line,
1865 SentinelsMode sentinels);
[email protected]e2ddbc92010-10-15 20:02:071866 bool IsRestartNeededToCommitChanges();
1867 void SetExperimentEnabled(
[email protected]e6d1c4f2013-06-12 17:37:401868 FlagsStorage* flags_storage,
1869 const std::string& internal_name,
1870 bool enable);
[email protected]e2ddbc92010-10-15 20:02:071871 void RemoveFlagsSwitches(
1872 std::map<std::string, CommandLine::StringType>* switch_list);
[email protected]e6d1c4f2013-06-12 17:37:401873 void ResetAllFlags(FlagsStorage* flags_storage);
[email protected]e2ddbc92010-10-15 20:02:071874 void reset();
1875
1876 // Returns the singleton instance of this class
[email protected]8e8bb6d2010-12-13 08:18:551877 static FlagsState* GetInstance() {
[email protected]e2ddbc92010-10-15 20:02:071878 return Singleton<FlagsState>::get();
1879 }
1880
1881 private:
1882 bool needs_restart_;
[email protected]a82744532011-02-11 16:15:531883 std::map<std::string, std::string> flags_switches_;
[email protected]e2ddbc92010-10-15 20:02:071884
1885 DISALLOW_COPY_AND_ASSIGN(FlagsState);
1886};
1887
[email protected]8a6ff28d2010-12-02 16:35:191888// Adds the internal names for the specified experiment to |names|.
1889void AddInternalName(const Experiment& e, std::set<std::string>* names) {
1890 if (e.type == Experiment::SINGLE_VALUE) {
1891 names->insert(e.internal_name);
1892 } else {
[email protected]83e9fa702013-02-25 19:30:441893 DCHECK(e.type == Experiment::MULTI_VALUE ||
1894 e.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]8a6ff28d2010-12-02 16:35:191895 for (int i = 0; i < e.num_choices; ++i)
[email protected]83e9fa702013-02-25 19:30:441896 names->insert(e.NameForChoice(i));
[email protected]8a6ff28d2010-12-02 16:35:191897 }
1898}
1899
[email protected]28e35af2011-02-09 12:56:221900// Confirms that an experiment is valid, used in a DCHECK in
1901// SanitizeList below.
1902bool ValidateExperiment(const Experiment& e) {
1903 switch (e.type) {
1904 case Experiment::SINGLE_VALUE:
1905 DCHECK_EQ(0, e.num_choices);
1906 DCHECK(!e.choices);
1907 break;
1908 case Experiment::MULTI_VALUE:
1909 DCHECK_GT(e.num_choices, 0);
1910 DCHECK(e.choices);
[email protected]a82744532011-02-11 16:15:531911 DCHECK(e.choices[0].command_line_switch);
1912 DCHECK_EQ('\0', e.choices[0].command_line_switch[0]);
[email protected]28e35af2011-02-09 12:56:221913 break;
[email protected]83e9fa702013-02-25 19:30:441914 case Experiment::ENABLE_DISABLE_VALUE:
1915 DCHECK_EQ(3, e.num_choices);
1916 DCHECK(!e.choices);
1917 DCHECK(e.command_line_switch);
1918 DCHECK(e.command_line_value);
1919 DCHECK(e.disable_command_line_switch);
1920 DCHECK(e.disable_command_line_value);
1921 break;
[email protected]28e35af2011-02-09 12:56:221922 default:
1923 NOTREACHED();
1924 }
1925 return true;
1926}
1927
[email protected]ad2a3ded2010-08-27 13:19:051928// Removes all experiments from prefs::kEnabledLabsExperiments that are
1929// unknown, to prevent this list to become very long as experiments are added
1930// and removed.
[email protected]e6d1c4f2013-06-12 17:37:401931void SanitizeList(FlagsStorage* flags_storage) {
[email protected]ad2a3ded2010-08-27 13:19:051932 std::set<std::string> known_experiments;
[email protected]28e35af2011-02-09 12:56:221933 for (size_t i = 0; i < num_experiments; ++i) {
1934 DCHECK(ValidateExperiment(experiments[i]));
[email protected]8a6ff28d2010-12-02 16:35:191935 AddInternalName(experiments[i], &known_experiments);
[email protected]28e35af2011-02-09 12:56:221936 }
[email protected]ad2a3ded2010-08-27 13:19:051937
[email protected]07d666d2013-07-21 23:56:261938 std::set<std::string> enabled_experiments = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051939
1940 std::set<std::string> new_enabled_experiments;
1941 std::set_intersection(
1942 known_experiments.begin(), known_experiments.end(),
1943 enabled_experiments.begin(), enabled_experiments.end(),
1944 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
1945
[email protected]07d666d2013-07-21 23:56:261946 if (new_enabled_experiments != enabled_experiments)
[email protected]e6d1c4f2013-06-12 17:37:401947 flags_storage->SetFlags(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:051948}
1949
[email protected]1a47d7e2010-10-15 00:37:241950void GetSanitizedEnabledFlags(
[email protected]e6d1c4f2013-06-12 17:37:401951 FlagsStorage* flags_storage, std::set<std::string>* result) {
1952 SanitizeList(flags_storage);
1953 *result = flags_storage->GetFlags();
[email protected]ad2a3ded2010-08-27 13:19:051954}
1955
[email protected]12271632013-11-26 03:06:391956bool SkipConditionalExperiment(const Experiment& experiment) {
[email protected]4d7552f2014-03-04 04:53:331957 if (experiment.internal_name ==
1958 std::string("enhanced-bookmarks-experiment")) {
1959 CommandLine* command_line = CommandLine::ForCurrentProcess();
1960 // Dont't skip experiment if it has non default value.
1961 // It means user selected it.
1962 if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment))
1963 return false;
1964
[email protected]11534552013-12-05 02:09:301965 return !IsEnhancedBookmarksExperimentEnabled();
[email protected]12271632013-11-26 03:06:391966 }
[email protected]cb13d462014-03-14 21:38:581967 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) ||
1968 (experiment.internal_name ==
1969 std::string("manual-enhanced-bookmarks-optout"))) {
1970 return true;
1971 }
[email protected]4d7552f2014-03-04 04:53:331972
[email protected]12271632013-11-26 03:06:391973 return false;
1974}
1975
1976
[email protected]a314ee5a2010-10-26 21:23:281977// Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
1978// enabled on the current platform.
1979void GetSanitizedEnabledFlagsForCurrentPlatform(
[email protected]e6d1c4f2013-06-12 17:37:401980 FlagsStorage* flags_storage, std::set<std::string>* result) {
1981 GetSanitizedEnabledFlags(flags_storage, result);
[email protected]a314ee5a2010-10-26 21:23:281982
1983 // Filter out any experiments that aren't enabled on the current platform. We
1984 // don't remove these from prefs else syncing to a platform with a different
1985 // set of experiments would be lossy.
1986 std::set<std::string> platform_experiments;
1987 int current_platform = GetCurrentPlatform();
1988 for (size_t i = 0; i < num_experiments; ++i) {
1989 if (experiments[i].supported_platforms & current_platform)
[email protected]8a6ff28d2010-12-02 16:35:191990 AddInternalName(experiments[i], &platform_experiments);
[email protected]37736bd2013-04-18 11:53:581991#if defined(OS_CHROMEOS)
1992 if (experiments[i].supported_platforms & kOsCrOSOwnerOnly)
1993 AddInternalName(experiments[i], &platform_experiments);
1994#endif
[email protected]a314ee5a2010-10-26 21:23:281995 }
1996
1997 std::set<std::string> new_enabled_experiments;
1998 std::set_intersection(
1999 platform_experiments.begin(), platform_experiments.end(),
2000 result->begin(), result->end(),
2001 std::inserter(new_enabled_experiments, new_enabled_experiments.begin()));
2002
2003 result->swap(new_enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052004}
2005
[email protected]8a6ff28d2010-12-02 16:35:192006// Returns the Value representing the choice data in the specified experiment.
[email protected]5bcdd99d2013-12-23 18:28:302007base::Value* CreateChoiceData(
2008 const Experiment& experiment,
2009 const std::set<std::string>& enabled_experiments) {
[email protected]83e9fa702013-02-25 19:30:442010 DCHECK(experiment.type == Experiment::MULTI_VALUE ||
2011 experiment.type == Experiment::ENABLE_DISABLE_VALUE);
[email protected]5bcdd99d2013-12-23 18:28:302012 base::ListValue* result = new base::ListValue;
[email protected]8a6ff28d2010-12-02 16:35:192013 for (int i = 0; i < experiment.num_choices; ++i) {
[email protected]5bcdd99d2013-12-23 18:28:302014 base::DictionaryValue* value = new base::DictionaryValue;
[email protected]83e9fa702013-02-25 19:30:442015 const std::string name = experiment.NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192016 value->SetString("internal_name", name);
[email protected]83e9fa702013-02-25 19:30:442017 value->SetString("description", experiment.DescriptionForChoice(i));
[email protected]28e35af2011-02-09 12:56:222018 value->SetBoolean("selected", enabled_experiments.count(name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192019 result->Append(value);
2020 }
2021 return result;
2022}
2023
[email protected]e2ddbc92010-10-15 20:02:072024} // namespace
2025
[email protected]83e9fa702013-02-25 19:30:442026std::string Experiment::NameForChoice(int index) const {
2027 DCHECK(type == Experiment::MULTI_VALUE ||
2028 type == Experiment::ENABLE_DISABLE_VALUE);
2029 DCHECK_LT(index, num_choices);
2030 return std::string(internal_name) + testing::kMultiSeparator +
2031 base::IntToString(index);
2032}
2033
[email protected]96920152013-12-04 21:00:162034base::string16 Experiment::DescriptionForChoice(int index) const {
[email protected]83e9fa702013-02-25 19:30:442035 DCHECK(type == Experiment::MULTI_VALUE ||
2036 type == Experiment::ENABLE_DISABLE_VALUE);
2037 DCHECK_LT(index, num_choices);
2038 int description_id;
2039 if (type == Experiment::ENABLE_DISABLE_VALUE) {
2040 const int kEnableDisableDescriptionIds[] = {
2041 IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT,
2042 IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
2043 IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
2044 };
2045 description_id = kEnableDisableDescriptionIds[index];
2046 } else {
2047 description_id = choices[index].description_id;
2048 }
2049 return l10n_util::GetStringUTF16(description_id);
2050}
2051
[email protected]e6d1c4f2013-06-12 17:37:402052void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
[email protected]578f2092013-09-16 17:16:212053 CommandLine* command_line,
2054 SentinelsMode sentinels) {
[email protected]e6d1c4f2013-06-12 17:37:402055 FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage,
[email protected]578f2092013-09-16 17:16:212056 command_line,
2057 sentinels);
[email protected]ad2a3ded2010-08-27 13:19:052058}
2059
[email protected]6d98abf2013-06-17 23:35:512060bool AreSwitchesIdenticalToCurrentCommandLine(
2061 const CommandLine& new_cmdline, const CommandLine& active_cmdline) {
2062 std::set<CommandLine::StringType> new_flags =
2063 ExtractFlagsFromCommandLine(new_cmdline);
2064 std::set<CommandLine::StringType> active_flags =
2065 ExtractFlagsFromCommandLine(active_cmdline);
2066
2067 // Needed because std::equal doesn't check if the 2nd set is empty.
2068 if (new_flags.size() != active_flags.size())
2069 return false;
2070
2071 return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin());
2072}
2073
[email protected]e6d1c4f2013-06-12 17:37:402074void GetFlagsExperimentsData(FlagsStorage* flags_storage,
[email protected]ee28495a2013-05-20 04:10:522075 FlagAccess access,
2076 base::ListValue* supported_experiments,
2077 base::ListValue* unsupported_experiments) {
[email protected]ad2a3ded2010-08-27 13:19:052078 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402079 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052080
2081 int current_platform = GetCurrentPlatform();
2082
[email protected]a314ee5a2010-10-26 21:23:282083 for (size_t i = 0; i < num_experiments; ++i) {
2084 const Experiment& experiment = experiments[i];
[email protected]12271632013-11-26 03:06:392085 if (SkipConditionalExperiment(experiment))
2086 continue;
[email protected]ad2a3ded2010-08-27 13:19:052087
[email protected]5bcdd99d2013-12-23 18:28:302088 base::DictionaryValue* data = new base::DictionaryValue();
[email protected]ad2a3ded2010-08-27 13:19:052089 data->SetString("internal_name", experiment.internal_name);
2090 data->SetString("name",
2091 l10n_util::GetStringUTF16(experiment.visible_name_id));
2092 data->SetString("description",
2093 l10n_util::GetStringUTF16(
2094 experiment.visible_description_id));
[email protected]cc3e2052011-12-20 01:01:402095
[email protected]5bcdd99d2013-12-23 18:28:302096 base::ListValue* supported_platforms = new base::ListValue();
[email protected]cc3e2052011-12-20 01:01:402097 AddOsStrings(experiment.supported_platforms, supported_platforms);
2098 data->Set("supported_platforms", supported_platforms);
[email protected]ad2a3ded2010-08-27 13:19:052099
[email protected]28e35af2011-02-09 12:56:222100 switch (experiment.type) {
2101 case Experiment::SINGLE_VALUE:
2102 data->SetBoolean(
2103 "enabled",
2104 enabled_experiments.count(experiment.internal_name) > 0);
2105 break;
2106 case Experiment::MULTI_VALUE:
[email protected]83e9fa702013-02-25 19:30:442107 case Experiment::ENABLE_DISABLE_VALUE:
[email protected]28e35af2011-02-09 12:56:222108 data->Set("choices", CreateChoiceData(experiment, enabled_experiments));
2109 break;
2110 default:
2111 NOTREACHED();
[email protected]8a6ff28d2010-12-02 16:35:192112 }
2113
[email protected]ee28495a2013-05-20 04:10:522114 bool supported = (experiment.supported_platforms & current_platform) != 0;
2115#if defined(OS_CHROMEOS)
2116 if (access == kOwnerAccessToFlags &&
2117 (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) {
2118 supported = true;
2119 }
2120#endif
2121 if (supported)
2122 supported_experiments->Append(data);
2123 else
2124 unsupported_experiments->Append(data);
[email protected]ad2a3ded2010-08-27 13:19:052125 }
[email protected]ad2a3ded2010-08-27 13:19:052126}
2127
[email protected]ad2a3ded2010-08-27 13:19:052128bool IsRestartNeededToCommitChanges() {
[email protected]8e8bb6d2010-12-13 08:18:552129 return FlagsState::GetInstance()->IsRestartNeededToCommitChanges();
[email protected]ad2a3ded2010-08-27 13:19:052130}
2131
[email protected]e6d1c4f2013-06-12 17:37:402132void SetExperimentEnabled(FlagsStorage* flags_storage,
2133 const std::string& internal_name,
2134 bool enable) {
2135 FlagsState::GetInstance()->SetExperimentEnabled(flags_storage,
2136 internal_name, enable);
[email protected]e2ddbc92010-10-15 20:02:072137}
2138
2139void RemoveFlagsSwitches(
2140 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]8e8bb6d2010-12-13 08:18:552141 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list);
[email protected]e2ddbc92010-10-15 20:02:072142}
2143
[email protected]e6d1c4f2013-06-12 17:37:402144void ResetAllFlags(FlagsStorage* flags_storage) {
2145 FlagsState::GetInstance()->ResetAllFlags(flags_storage);
[email protected]cb93bf52013-02-20 01:20:002146}
2147
[email protected]a314ee5a2010-10-26 21:23:282148int GetCurrentPlatform() {
2149#if defined(OS_MACOSX)
2150 return kOsMac;
2151#elif defined(OS_WIN)
2152 return kOsWin;
2153#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check.
2154 return kOsCrOS;
[email protected]c92f4ed2011-10-21 19:50:212155#elif defined(OS_LINUX) || defined(OS_OPENBSD)
[email protected]a314ee5a2010-10-26 21:23:282156 return kOsLinux;
[email protected]9c7453d2012-01-21 00:45:402157#elif defined(OS_ANDROID)
2158 return kOsAndroid;
[email protected]a314ee5a2010-10-26 21:23:282159#else
2160#error Unknown platform
2161#endif
2162}
2163
[email protected]e6d1c4f2013-06-12 17:37:402164void RecordUMAStatistics(FlagsStorage* flags_storage) {
2165 std::set<std::string> flags = flags_storage->GetFlags();
[email protected]4bc5050c2010-11-18 17:55:542166 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end();
2167 ++it) {
2168 std::string action("AboutFlags_");
2169 action += *it;
[email protected]7f6f44c2011-12-14 13:23:382170 content::RecordComputedAction(action);
[email protected]4bc5050c2010-11-18 17:55:542171 }
2172 // Since flag metrics are recorded every startup, add a tick so that the
2173 // stats can be made meaningful.
2174 if (flags.size())
[email protected]7f6f44c2011-12-14 13:23:382175 content::RecordAction(UserMetricsAction("AboutFlags_StartupTick"));
2176 content::RecordAction(UserMetricsAction("StartupTick"));
[email protected]4bc5050c2010-11-18 17:55:542177}
2178
[email protected]e2ddbc92010-10-15 20:02:072179//////////////////////////////////////////////////////////////////////////////
2180// FlagsState implementation.
2181
2182namespace {
2183
[email protected]83e9fa702013-02-25 19:30:442184typedef std::map<std::string, std::pair<std::string, std::string> >
2185 NameToSwitchAndValueMap;
2186
2187void SetFlagToSwitchMapping(const std::string& key,
2188 const std::string& switch_name,
2189 const std::string& switch_value,
2190 NameToSwitchAndValueMap* name_to_switch_map) {
2191 DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key));
2192 (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value);
2193}
2194
[email protected]578f2092013-09-16 17:16:212195void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage,
2196 CommandLine* command_line,
2197 SentinelsMode sentinels) {
[email protected]e2ddbc92010-10-15 20:02:072198 if (command_line->HasSwitch(switches::kNoExperiments))
2199 return;
2200
2201 std::set<std::string> enabled_experiments;
[email protected]ba8164242010-11-16 21:31:002202
[email protected]e6d1c4f2013-06-12 17:37:402203 GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage,
2204 &enabled_experiments);
[email protected]e2ddbc92010-10-15 20:02:072205
[email protected]a82744532011-02-11 16:15:532206 NameToSwitchAndValueMap name_to_switch_map;
[email protected]8a6ff28d2010-12-02 16:35:192207 for (size_t i = 0; i < num_experiments; ++i) {
2208 const Experiment& e = experiments[i];
2209 if (e.type == Experiment::SINGLE_VALUE) {
[email protected]83e9fa702013-02-25 19:30:442210 SetFlagToSwitchMapping(e.internal_name, e.command_line_switch,
2211 e.command_line_value, &name_to_switch_map);
2212 } else if (e.type == Experiment::MULTI_VALUE) {
2213 for (int j = 0; j < e.num_choices; ++j) {
2214 SetFlagToSwitchMapping(e.NameForChoice(j),
2215 e.choices[j].command_line_switch,
2216 e.choices[j].command_line_value,
2217 &name_to_switch_map);
2218 }
[email protected]8a6ff28d2010-12-02 16:35:192219 } else {
[email protected]83e9fa702013-02-25 19:30:442220 DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE);
2221 SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(),
2222 &name_to_switch_map);
2223 SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch,
2224 e.command_line_value, &name_to_switch_map);
2225 SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch,
2226 e.disable_command_line_value, &name_to_switch_map);
[email protected]8a6ff28d2010-12-02 16:35:192227 }
2228 }
[email protected]e2ddbc92010-10-15 20:02:072229
[email protected]578f2092013-09-16 17:16:212230 if (sentinels == kAddSentinels) {
2231 command_line->AppendSwitch(switches::kFlagSwitchesBegin);
2232 flags_switches_.insert(
2233 std::pair<std::string, std::string>(switches::kFlagSwitchesBegin,
2234 std::string()));
2235 }
[email protected]e2ddbc92010-10-15 20:02:072236 for (std::set<std::string>::iterator it = enabled_experiments.begin();
2237 it != enabled_experiments.end();
2238 ++it) {
2239 const std::string& experiment_name = *it;
[email protected]a82744532011-02-11 16:15:532240 NameToSwitchAndValueMap::const_iterator name_to_switch_it =
[email protected]8a6ff28d2010-12-02 16:35:192241 name_to_switch_map.find(experiment_name);
2242 if (name_to_switch_it == name_to_switch_map.end()) {
2243 NOTREACHED();
[email protected]e2ddbc92010-10-15 20:02:072244 continue;
[email protected]8a6ff28d2010-12-02 16:35:192245 }
[email protected]e2ddbc92010-10-15 20:02:072246
[email protected]a82744532011-02-11 16:15:532247 const std::pair<std::string, std::string>&
2248 switch_and_value_pair = name_to_switch_it->second;
2249
[email protected]9737b3632013-08-26 09:23:232250 CHECK(!switch_and_value_pair.first.empty());
[email protected]a82744532011-02-11 16:15:532251 command_line->AppendSwitchASCII(switch_and_value_pair.first,
2252 switch_and_value_pair.second);
2253 flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second;
[email protected]e2ddbc92010-10-15 20:02:072254 }
[email protected]578f2092013-09-16 17:16:212255 if (sentinels == kAddSentinels) {
2256 command_line->AppendSwitch(switches::kFlagSwitchesEnd);
2257 flags_switches_.insert(
2258 std::pair<std::string, std::string>(switches::kFlagSwitchesEnd,
2259 std::string()));
2260 }
[email protected]e2ddbc92010-10-15 20:02:072261}
2262
2263bool FlagsState::IsRestartNeededToCommitChanges() {
2264 return needs_restart_;
2265}
2266
[email protected]e6d1c4f2013-06-12 17:37:402267void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage,
2268 const std::string& internal_name,
2269 bool enable) {
[email protected]83e9fa702013-02-25 19:30:442270 size_t at_index = internal_name.find(testing::kMultiSeparator);
[email protected]8a6ff28d2010-12-02 16:35:192271 if (at_index != std::string::npos) {
2272 DCHECK(enable);
2273 // We're being asked to enable a multi-choice experiment. Disable the
2274 // currently selected choice.
2275 DCHECK_NE(at_index, 0u);
[email protected]28e35af2011-02-09 12:56:222276 const std::string experiment_name = internal_name.substr(0, at_index);
[email protected]e6d1c4f2013-06-12 17:37:402277 SetExperimentEnabled(flags_storage, experiment_name, false);
[email protected]8a6ff28d2010-12-02 16:35:192278
[email protected]28e35af2011-02-09 12:56:222279 // And enable the new choice, if it is not the default first choice.
2280 if (internal_name != experiment_name + "@0") {
2281 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402282 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]147492b2013-03-19 23:52:082283 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]e6d1c4f2013-06-12 17:37:402284 flags_storage->SetFlags(enabled_experiments);
[email protected]28e35af2011-02-09 12:56:222285 }
[email protected]8a6ff28d2010-12-02 16:35:192286 return;
2287 }
2288
[email protected]ad2a3ded2010-08-27 13:19:052289 std::set<std::string> enabled_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402290 GetSanitizedEnabledFlags(flags_storage, &enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052291
[email protected]8a6ff28d2010-12-02 16:35:192292 const Experiment* e = NULL;
2293 for (size_t i = 0; i < num_experiments; ++i) {
2294 if (experiments[i].internal_name == internal_name) {
2295 e = experiments + i;
2296 break;
2297 }
2298 }
2299 DCHECK(e);
2300
2301 if (e->type == Experiment::SINGLE_VALUE) {
[email protected]8a2713682011-08-19 10:36:592302 if (enable)
[email protected]147492b2013-03-19 23:52:082303 needs_restart_ |= enabled_experiments.insert(internal_name).second;
[email protected]8a2713682011-08-19 10:36:592304 else
[email protected]147492b2013-03-19 23:52:082305 needs_restart_ |= (enabled_experiments.erase(internal_name) > 0);
[email protected]8a6ff28d2010-12-02 16:35:192306 } else {
2307 if (enable) {
2308 // Enable the first choice.
[email protected]147492b2013-03-19 23:52:082309 needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second;
[email protected]8a6ff28d2010-12-02 16:35:192310 } else {
2311 // Find the currently enabled choice and disable it.
2312 for (int i = 0; i < e->num_choices; ++i) {
[email protected]83e9fa702013-02-25 19:30:442313 std::string choice_name = e->NameForChoice(i);
[email protected]8a6ff28d2010-12-02 16:35:192314 if (enabled_experiments.find(choice_name) !=
2315 enabled_experiments.end()) {
[email protected]147492b2013-03-19 23:52:082316 needs_restart_ = true;
[email protected]8a6ff28d2010-12-02 16:35:192317 enabled_experiments.erase(choice_name);
2318 // Continue on just in case there's a bug and more than one
2319 // experiment for this choice was enabled.
2320 }
2321 }
2322 }
2323 }
[email protected]ad2a3ded2010-08-27 13:19:052324
[email protected]e6d1c4f2013-06-12 17:37:402325 flags_storage->SetFlags(enabled_experiments);
[email protected]ad2a3ded2010-08-27 13:19:052326}
2327
[email protected]e2ddbc92010-10-15 20:02:072328void FlagsState::RemoveFlagsSwitches(
2329 std::map<std::string, CommandLine::StringType>* switch_list) {
[email protected]a82744532011-02-11 16:15:532330 for (std::map<std::string, std::string>::const_iterator
2331 it = flags_switches_.begin(); it != flags_switches_.end(); ++it) {
2332 switch_list->erase(it->first);
[email protected]e2ddbc92010-10-15 20:02:072333 }
2334}
2335
[email protected]e6d1c4f2013-06-12 17:37:402336void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) {
[email protected]cb93bf52013-02-20 01:20:002337 needs_restart_ = true;
2338
2339 std::set<std::string> no_experiments;
[email protected]e6d1c4f2013-06-12 17:37:402340 flags_storage->SetFlags(no_experiments);
[email protected]cb93bf52013-02-20 01:20:002341}
2342
[email protected]e2ddbc92010-10-15 20:02:072343void FlagsState::reset() {
2344 needs_restart_ = false;
2345 flags_switches_.clear();
2346}
2347
[email protected]38e46812011-05-09 20:49:222348} // namespace
[email protected]e2ddbc92010-10-15 20:02:072349
2350namespace testing {
[email protected]8a6ff28d2010-12-02 16:35:192351
2352// WARNING: '@' is also used in the html file. If you update this constant you
2353// also need to update the html file.
2354const char kMultiSeparator[] = "@";
2355
[email protected]e2ddbc92010-10-15 20:02:072356void ClearState() {
[email protected]8e8bb6d2010-12-13 08:18:552357 FlagsState::GetInstance()->reset();
[email protected]e2ddbc92010-10-15 20:02:072358}
[email protected]a314ee5a2010-10-26 21:23:282359
2360void SetExperiments(const Experiment* e, size_t count) {
2361 if (!e) {
2362 experiments = kExperiments;
2363 num_experiments = arraysize(kExperiments);
2364 } else {
2365 experiments = e;
2366 num_experiments = count;
2367 }
2368}
2369
[email protected]8a6ff28d2010-12-02 16:35:192370const Experiment* GetExperiments(size_t* count) {
2371 *count = num_experiments;
2372 return experiments;
2373}
2374
[email protected]e2ddbc92010-10-15 20:02:072375} // namespace testing
2376
[email protected]1a47d7e2010-10-15 00:37:242377} // namespace about_flags