[email protected] | 9c66adc | 2012-01-05 02:10:16 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 5 | #include "chrome/browser/about_flags.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 6 | |
| 7 | #include <algorithm> |
| 8 | #include <iterator> |
| 9 | #include <map> |
| 10 | #include <set> |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 11 | #include <utility> |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 12 | |
[email protected] | 265fd7b | 2013-08-13 02:32:10 | [diff] [blame] | 13 | #include "ash/ash_switches.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 14 | #include "base/command_line.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 15 | #include "base/memory/singleton.h" |
[email protected] | 3ea1b18 | 2013-02-08 22:38:41 | [diff] [blame] | 16 | #include "base/strings/string_number_conversions.h" |
[email protected] | 135cb80 | 2013-06-09 16:44:20 | [diff] [blame] | 17 | #include "base/strings/utf_string_conversions.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 18 | #include "base/values.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 19 | #include "cc/base/switches.h" |
[email protected] | 1153455 | 2013-12-05 02:09:30 | [diff] [blame] | 20 | #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 21 | #include "chrome/browser/flags_storage.h" |
[email protected] | d208f4d8 | 2011-05-23 21:52:03 | [diff] [blame] | 22 | #include "chrome/common/chrome_content_client.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 23 | #include "chrome/common/chrome_switches.h" |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 24 | #include "components/autofill/core/common/autofill_switches.h" |
[email protected] | cbb22eb | 2013-06-24 23:53:10 | [diff] [blame] | 25 | #include "components/nacl/common/nacl_switches.h" |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 26 | #include "content/public/browser/user_metrics.h" |
[email protected] | 49d9b14 | 2013-07-19 08:50:27 | [diff] [blame] | 27 | #include "extensions/common/switches.h" |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 28 | #include "grit/chromium_strings.h" |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 29 | #include "grit/generated_resources.h" |
[email protected] | d96aef2 | 2012-10-30 11:47:02 | [diff] [blame] | 30 | #include "grit/google_chrome_strings.h" |
[email protected] | e2e8e32 | 2012-09-12 04:37:02 | [diff] [blame] | 31 | #include "media/base/media_switches.h" |
[email protected] | c051a1b | 2011-01-21 23:30:17 | [diff] [blame] | 32 | #include "ui/base/l10n/l10n_util.h" |
[email protected] | c9c73ad4 | 2012-04-18 03:35:59 | [diff] [blame] | 33 | #include "ui/base/ui_base_switches.h" |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 34 | #include "ui/display/display_switches.h" |
[email protected] | a6147a2 | 2013-09-26 06:55:09 | [diff] [blame] | 35 | #include "ui/events/event_switches.h" |
[email protected] | 0d3b9dd | 2012-11-14 04:14:48 | [diff] [blame] | 36 | #include "ui/gfx/switches.h" |
[email protected] | c9e2cbbb | 2012-05-12 21:17:27 | [diff] [blame] | 37 | #include "ui/gl/gl_switches.h" |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 38 | #include "ui/keyboard/keyboard_switches.h" |
[email protected] | e3d512a7 | 2014-03-18 20:50:47 | [diff] [blame] | 39 | #include "ui/native_theme/native_theme_switches.h" |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 40 | #include "ui/views/views_switches.h" |
[email protected] | 9a22457 | 2013-05-12 23:08:56 | [diff] [blame] | 41 | |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 42 | #if defined(USE_ASH) |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 43 | #include "ash/ash_switches.h" |
[email protected] | dc04be7c | 2012-03-15 23:57:49 | [diff] [blame] | 44 | #endif |
| 45 | |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 46 | #if defined(OS_CHROMEOS) |
| 47 | #include "chromeos/chromeos_switches.h" |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 48 | #include "third_party/cros_system_api/switches/chrome_switches.h" |
[email protected] | badba1ad | 2012-11-16 17:21:46 | [diff] [blame] | 49 | #endif |
| 50 | |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 51 | #if defined(ENABLE_APP_LIST) |
| 52 | #include "ui/app_list/app_list_switches.h" |
| 53 | #endif |
| 54 | |
[email protected] | e6e30ac | 2014-01-13 21:24:39 | [diff] [blame] | 55 | using base::UserMetricsAction; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 56 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 57 | namespace about_flags { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 58 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 59 | // Macros to simplify specifying the type. |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 60 | #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 61 | Experiment::SINGLE_VALUE, \ |
| 62 | command_line_switch, switch_value, NULL, NULL, NULL, 0 |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 63 | #define SINGLE_VALUE_TYPE(command_line_switch) \ |
| 64 | SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 65 | #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
| 66 | disable_switch, disable_value) \ |
| 67 | Experiment::ENABLE_DISABLE_VALUE, enable_switch, enable_value, \ |
| 68 | disable_switch, disable_value, NULL, 3 |
| 69 | #define ENABLE_DISABLE_VALUE_TYPE(enable_switch, disable_switch) \ |
| 70 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, "", disable_switch, "") |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 71 | #define MULTI_VALUE_TYPE(choices) \ |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 72 | Experiment::MULTI_VALUE, NULL, NULL, NULL, NULL, choices, arraysize(choices) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 73 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 74 | namespace { |
| 75 | |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 76 | const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid; |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 77 | const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 78 | |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 79 | // Adds a |StringValue| to |list| for each platform where |bitmask| indicates |
| 80 | // whether the experiment is available on that platform. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 81 | void AddOsStrings(unsigned bitmask, base::ListValue* list) { |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 82 | struct { |
| 83 | unsigned bit; |
| 84 | const char* const name; |
| 85 | } kBitsToOs[] = { |
| 86 | {kOsMac, "Mac"}, |
| 87 | {kOsWin, "Windows"}, |
| 88 | {kOsLinux, "Linux"}, |
| 89 | {kOsCrOS, "Chrome OS"}, |
[email protected] | 4052d83 | 2013-01-16 05:31:01 | [diff] [blame] | 90 | {kOsAndroid, "Android"}, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 91 | {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 92 | }; |
| 93 | for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) |
| 94 | if (bitmask & kBitsToOs[i].bit) |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 95 | list->Append(new base::StringValue(kBitsToOs[i].name)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 96 | } |
| 97 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 98 | // Convert switch constants to proper CommandLine::StringType strings. |
| 99 | CommandLine::StringType GetSwitchString(const std::string& flag) { |
| 100 | CommandLine cmd_line(CommandLine::NO_PROGRAM); |
| 101 | cmd_line.AppendSwitch(flag); |
| 102 | DCHECK(cmd_line.argv().size() == 2); |
| 103 | return cmd_line.argv()[1]; |
| 104 | } |
| 105 | |
| 106 | // Scoops flags from a command line. |
| 107 | std::set<CommandLine::StringType> ExtractFlagsFromCommandLine( |
| 108 | const CommandLine& cmdline) { |
| 109 | std::set<CommandLine::StringType> flags; |
| 110 | // First do the ones between --flag-switches-begin and --flag-switches-end. |
| 111 | CommandLine::StringVector::const_iterator first = |
| 112 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 113 | GetSwitchString(switches::kFlagSwitchesBegin)); |
| 114 | CommandLine::StringVector::const_iterator last = |
| 115 | std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 116 | GetSwitchString(switches::kFlagSwitchesEnd)); |
| 117 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 118 | flags.insert(first + 1, last); |
| 119 | #if defined(OS_CHROMEOS) |
| 120 | // Then add those between --policy-switches-begin and --policy-switches-end. |
| 121 | first = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 122 | GetSwitchString(chromeos::switches::kPolicySwitchesBegin)); |
| 123 | last = std::find(cmdline.argv().begin(), cmdline.argv().end(), |
| 124 | GetSwitchString(chromeos::switches::kPolicySwitchesEnd)); |
| 125 | if (first != cmdline.argv().end() && last != cmdline.argv().end()) |
| 126 | flags.insert(first + 1, last); |
| 127 | #endif |
| 128 | return flags; |
| 129 | } |
| 130 | |
[email protected] | fb85419 | 2013-02-06 01:30:04 | [diff] [blame] | 131 | const Experiment::Choice kEnableCompositingForFixedPositionChoices[] = { |
| 132 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 133 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 134 | switches::kEnableCompositingForFixedPosition, ""}, |
| 135 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 136 | switches::kDisableCompositingForFixedPosition, ""}, |
| 137 | { IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_HIGH_DPI, |
| 138 | switches::kEnableHighDpiCompositingForFixedPosition, ""} |
| 139 | }; |
| 140 | |
[email protected] | d8221b2 | 2013-05-23 05:35:43 | [diff] [blame] | 141 | const Experiment::Choice kEnableCompositingForTransitionChoices[] = { |
| 142 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 143 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 144 | switches::kEnableCompositingForTransition, ""}, |
| 145 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 146 | switches::kDisableCompositingForTransition, ""}, |
| 147 | }; |
| 148 | |
[email protected] | 06fc4d3b | 2013-07-08 21:07:24 | [diff] [blame] | 149 | const Experiment::Choice kEnableAcceleratedFixedRootBackgroundChoices[] = { |
| 150 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 151 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 152 | switches::kEnableAcceleratedFixedRootBackground, ""}, |
| 153 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 154 | switches::kDisableAcceleratedFixedRootBackground, ""}, |
| 155 | }; |
| 156 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 157 | const Experiment::Choice kTouchEventsChoices[] = { |
| 158 | { IDS_GENERIC_EXPERIMENT_CHOICE_AUTOMATIC, "", "" }, |
| 159 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 160 | switches::kTouchEvents, |
| 161 | switches::kTouchEventsEnabled }, |
| 162 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 163 | switches::kTouchEvents, |
| 164 | switches::kTouchEventsDisabled } |
| 165 | }; |
| 166 | |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 167 | #if defined(USE_AURA) |
| 168 | const Experiment::Choice kOverscrollHistoryNavigationChoices[] = { |
| 169 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" }, |
| 170 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 171 | switches::kOverscrollHistoryNavigation, |
| 172 | "0" }, |
| 173 | { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI, |
| 174 | switches::kOverscrollHistoryNavigation, |
| 175 | "2" } |
| 176 | }; |
| 177 | #endif |
| 178 | |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 179 | const Experiment::Choice kNaClDebugMaskChoices[] = { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 180 | // Secure shell can be used on ChromeOS for forwarding the TCP port opened by |
[email protected] | 402bed6e | 2014-03-07 08:33:09 | [diff] [blame] | 181 | // debug stub to a remote machine. Since secure shell uses NaCl, we usually |
| 182 | // want to avoid debugging that. The PNaCl translator is also a NaCl module, |
| 183 | // so by default we want to avoid debugging that. |
| 184 | // NOTE: As the default value must be the empty string, the mask excluding |
| 185 | // the PNaCl translator and secure shell is substituted elsewhere. |
| 186 | { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, |
| 187 | { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 188 | { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, |
| 189 | switches::kNaClDebugMask, "*://*/*debug.nmf" } |
| 190 | }; |
| 191 | |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 192 | const Experiment::Choice kImplSidePaintingChoices[] = { |
| 193 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 194 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 195 | switches::kEnableImplSidePainting, ""}, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 196 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 197 | switches::kDisableImplSidePainting, ""} |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 198 | }; |
| 199 | |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 200 | const Experiment::Choice kLCDTextChoices[] = { |
| 201 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 202 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""}, |
| 203 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""} |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 204 | }; |
| 205 | |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 206 | const Experiment::Choice kDistanceFieldTextChoices[] = { |
| 207 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 208 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 209 | switches::kEnableDistanceFieldText, "" }, |
| 210 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 211 | switches::kDisableDistanceFieldText, "" } |
| 212 | }; |
| 213 | |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 214 | #ifndef USE_AURA |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 215 | const Experiment::Choice kDelegatedRendererChoices[] = { |
| 216 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 217 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 218 | switches::kEnableDelegatedRenderer, ""}, |
| 219 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 220 | switches::kDisableDelegatedRenderer, ""} |
| 221 | }; |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 222 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 223 | |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 224 | const Experiment::Choice kMaxTilesForInterestAreaChoices[] = { |
| 225 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 226 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_SHORT, |
| 227 | cc::switches::kMaxTilesForInterestArea, "64"}, |
| 228 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_TALL, |
| 229 | cc::switches::kMaxTilesForInterestArea, "128"}, |
| 230 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_GRANDE, |
| 231 | cc::switches::kMaxTilesForInterestArea, "256"}, |
| 232 | { IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_VENTI, |
| 233 | cc::switches::kMaxTilesForInterestArea, "512"} |
| 234 | }; |
| 235 | |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 236 | const Experiment::Choice kDefaultTileWidthChoices[] = { |
| 237 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 238 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT, |
| 239 | switches::kDefaultTileWidth, "128"}, |
| 240 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL, |
| 241 | switches::kDefaultTileWidth, "256"}, |
| 242 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_GRANDE, |
| 243 | switches::kDefaultTileWidth, "512"}, |
| 244 | { IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI, |
| 245 | switches::kDefaultTileWidth, "1024"} |
| 246 | }; |
| 247 | |
| 248 | const Experiment::Choice kDefaultTileHeightChoices[] = { |
| 249 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 250 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_SHORT, |
| 251 | switches::kDefaultTileHeight, "128"}, |
| 252 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_TALL, |
| 253 | switches::kDefaultTileHeight, "256"}, |
| 254 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_GRANDE, |
| 255 | switches::kDefaultTileHeight, "512"}, |
| 256 | { IDS_FLAGS_DEFAULT_TILE_HEIGHT_VENTI, |
| 257 | switches::kDefaultTileHeight, "1024"} |
| 258 | }; |
| 259 | |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 260 | const Experiment::Choice kSimpleCacheBackendChoices[] = { |
[email protected] | 9a3de3e3 | 2013-04-23 19:05:21 | [diff] [blame] | 261 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 262 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 263 | switches::kUseSimpleCacheBackend, "off" }, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 264 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 265 | switches::kUseSimpleCacheBackend, "on"} |
| 266 | }; |
| 267 | |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 268 | #if defined(USE_AURA) |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 269 | const Experiment::Choice kTabCaptureUpscaleQualityChoices[] = { |
| 270 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 271 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 272 | switches::kTabCaptureUpscaleQuality, "fast" }, |
| 273 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 274 | switches::kTabCaptureUpscaleQuality, "good" }, |
| 275 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 276 | switches::kTabCaptureUpscaleQuality, "best" }, |
| 277 | }; |
| 278 | |
| 279 | const Experiment::Choice kTabCaptureDownscaleQualityChoices[] = { |
| 280 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 281 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_FAST, |
| 282 | switches::kTabCaptureDownscaleQuality, "fast" }, |
| 283 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_GOOD, |
| 284 | switches::kTabCaptureDownscaleQuality, "good" }, |
| 285 | { IDS_FLAGS_TAB_CAPTURE_SCALE_QUALITY_BEST, |
| 286 | switches::kTabCaptureDownscaleQuality, "best" }, |
| 287 | }; |
[email protected] | 9afc14e2 | 2013-09-25 22:34:14 | [diff] [blame] | 288 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 289 | |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 290 | #if defined(USE_AURA) || defined(OS_LINUX) |
| 291 | const Experiment::Choice kOverlayScrollbarChoices[] = { |
| 292 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 293 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 294 | switches::kEnableOverlayScrollbar, ""}, |
| 295 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 296 | switches::kDisableOverlayScrollbar, ""} |
| 297 | }; |
| 298 | #endif |
| 299 | |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 300 | const Experiment::Choice kZeroCopyChoices[] = { |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 301 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 302 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 303 | switches::kEnableZeroCopy, ""}, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 304 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 305 | switches::kDisableZeroCopy, ""} |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 306 | }; |
| 307 | |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 308 | #if defined(OS_ANDROID) |
| 309 | const Experiment::Choice kZeroSuggestExperimentsChoices[] = { |
| 310 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 311 | { IDS_FLAGS_ZERO_SUGGEST_MOST_VISITED, |
| 312 | switches::kEnableZeroSuggestMostVisited, ""}, |
| 313 | { IDS_FLAGS_ZERO_SUGGEST_ETHER_SERP, |
| 314 | switches::kEnableZeroSuggestEtherSerp, ""}, |
| 315 | { IDS_FLAGS_ZERO_SUGGEST_ETHER_NO_SERP, |
| 316 | switches::kEnableZeroSuggestEtherNoSerp, ""}, |
[email protected] | 162c8d9fa | 2014-03-18 20:25:41 | [diff] [blame] | 317 | { IDS_FLAGS_ZERO_SUGGEST_PERSONALIZED, |
| 318 | switches::kEnableZeroSuggestPersonalized, ""}, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 319 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 320 | switches::kDisableZeroSuggest, ""} |
| 321 | }; |
| 322 | #endif |
| 323 | |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 324 | const Experiment::Choice kNumRasterThreadsChoices[] = { |
| 325 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
[email protected] | 00d92d3 | 2014-01-23 09:46:50 | [diff] [blame] | 326 | { IDS_FLAGS_NUM_RASTER_THREADS_ONE, switches::kNumRasterThreads, "1" }, |
| 327 | { IDS_FLAGS_NUM_RASTER_THREADS_TWO, switches::kNumRasterThreads, "2" }, |
| 328 | { IDS_FLAGS_NUM_RASTER_THREADS_THREE, switches::kNumRasterThreads, "3" }, |
| 329 | { IDS_FLAGS_NUM_RASTER_THREADS_FOUR, switches::kNumRasterThreads, "4" } |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 330 | }; |
| 331 | |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 332 | const Experiment::Choice kEnableGpuRasterizationChoices[] = { |
| 333 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 334 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 335 | switches::kEnableGpuRasterization, "" }, |
| 336 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 337 | switches::kDisableGpuRasterization, "" }, |
| 338 | { IDS_FLAGS_FORCE_GPU_RASTERIZATION, |
| 339 | switches::kForceGpuRasterization, "" }, |
| 340 | }; |
| 341 | |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 342 | // We're using independent flags here (as opposed to a common flag with |
| 343 | // different values) to be able to enable/disable the entire experience |
| 344 | // associated with this feature server-side from the FieldTrial (the complete |
| 345 | // experience includes other flag changes as well). It is not currently possible |
| 346 | // to do that with "flag=value" flags. |
| 347 | const Experiment::Choice kSearchButtonInOmniboxChoices[] = { |
| 348 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 349 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 350 | switches::kDisableSearchButtonInOmnibox, ""}, |
| 351 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, |
| 352 | switches::kEnableSearchButtonInOmniboxForStr, ""}, |
| 353 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP, |
| 354 | switches::kEnableSearchButtonInOmniboxForStrOrIip, ""}, |
| 355 | { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED, |
| 356 | switches::kEnableSearchButtonInOmniboxAlways, ""} |
| 357 | }; |
| 358 | |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 359 | // See comment above for kSearchButtonInOmniboxChoices. The same reasoning |
| 360 | // applies here. |
| 361 | const Experiment::Choice kOriginChipChoices[] = { |
| 362 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 363 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""}, |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 364 | { IDS_FLAGS_ORIGIN_CHIP_TRAILING_LOCATION_BAR, |
| 365 | switches::kEnableOriginChipTrailingLocationBar, ""}, |
[email protected] | a0ebaf9 | 2014-01-14 04:47:52 | [diff] [blame] | 366 | { IDS_FLAGS_ORIGIN_CHIP_LEADING_LOCATION_BAR, |
| 367 | switches::kEnableOriginChipLeadingLocationBar, ""}, |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 368 | { IDS_FLAGS_ORIGIN_CHIP_LEADING_MENU_BUTTON, |
| 369 | switches::kEnableOriginChipLeadingMenuButton, ""} |
| 370 | }; |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 371 | const Experiment::Choice kOriginChipV2Choices[] = { |
| 372 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 373 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChipV2, ""}, |
| 374 | { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE, |
| 375 | switches::kEnableOriginChipV2HideOnMouseRelease, ""}, |
| 376 | { IDS_FLAGS_ORIGIN_CHIP_V2_HIDE_ON_USER_INPUT, |
| 377 | switches::kEnableOriginChipV2HideOnUserInput, ""} |
| 378 | }; |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 379 | |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 380 | const Experiment::Choice kTouchScrollingModeChoices[] = { |
| 381 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 382 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL, |
| 383 | switches::kTouchScrollingMode, |
| 384 | switches::kTouchScrollingModeTouchcancel }, |
[email protected] | 372f52e | 2014-04-28 16:15:49 | [diff] [blame] | 385 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE, |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 386 | switches::kTouchScrollingMode, |
[email protected] | 372f52e | 2014-04-28 16:15:49 | [diff] [blame] | 387 | switches::kTouchScrollingModeAsyncTouchmove }, |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 388 | { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE, |
| 389 | switches::kTouchScrollingMode, |
| 390 | switches::kTouchScrollingModeSyncTouchmove }, |
| 391 | }; |
| 392 | |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 393 | #if defined(ENABLE_APP_LIST) |
| 394 | const Experiment::Choice kEnableSyncAppListChoices[] = { |
| 395 | { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, |
| 396 | { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 397 | app_list::switches::kEnableSyncAppList, "" }, |
| 398 | { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 399 | app_list::switches::kDisableSyncAppList, "" }, |
| 400 | }; |
| 401 | #endif |
| 402 | |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 403 | // RECORDING USER METRICS FOR FLAGS: |
| 404 | // ----------------------------------------------------------------------------- |
| 405 | // The first line of the experiment is the internal name. If you'd like to |
| 406 | // gather statistics about the usage of your flag, you should append a marker |
| 407 | // comment to the end of the feature name, like so: |
| 408 | // "my-special-feature", // FLAGS:RECORD_UMA |
| 409 | // |
[email protected] | d8320fb6 | 2014-03-22 03:16:37 | [diff] [blame] | 410 | // After doing that, run |
| 411 | // tools/metrics/actions/extract_actions.py |
| 412 | // to add the metric to actions.xml (which will enable UMA to record your |
| 413 | // feature flag), then update the <owner>s and <description> sections. Make sure |
| 414 | // to include the actions.xml file when you upload your code for review! |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 415 | // |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 416 | // After your feature has shipped under a flag, you can locate the metrics under |
| 417 | // the action name AboutFlags_internal-action-name. Actions are recorded once |
| 418 | // per startup, so you should divide this number by AboutFlags_StartupTick to |
| 419 | // get a sense of usage. Note that this will not be the same as number of users |
| 420 | // with a given feature enabled because users can quit and relaunch the |
| 421 | // application multiple times over a given time interval. The dashboard also |
| 422 | // shows you how many (metrics reporting) users have enabled the flag over the |
| 423 | // last seven days. However, note that this is not the same as the number of |
| 424 | // users who have the flag enabled, since enabling the flag happens once, |
| 425 | // whereas running with the flag enabled happens until the user flips the flag |
| 426 | // again. |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 427 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 428 | // To add a new experiment add to the end of kExperiments. There are two |
| 429 | // distinct types of experiments: |
| 430 | // . SINGLE_VALUE: experiment is either on or off. Use the SINGLE_VALUE_TYPE |
| 431 | // macro for this type supplying the command line to the macro. |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 432 | // . MULTI_VALUE: a list of choices, the first of which should correspond to a |
| 433 | // deactivated state for this lab (i.e. no command line option). To specify |
| 434 | // this type of experiment use the macro MULTI_VALUE_TYPE supplying it the |
| 435 | // array of choices. |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 436 | // See the documentation of Experiment for details on the fields. |
| 437 | // |
| 438 | // When adding a new choice, add it to the end of the list. |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 439 | const Experiment kExperiments[] = { |
| 440 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 441 | "conflicting-modules-check", // FLAGS:RECORD_UMA |
[email protected] | c1bbaa8 | 2010-11-08 11:17:05 | [diff] [blame] | 442 | IDS_FLAGS_CONFLICTS_CHECK_NAME, |
| 443 | IDS_FLAGS_CONFLICTS_CHECK_DESCRIPTION, |
| 444 | kOsWin, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 445 | SINGLE_VALUE_TYPE(switches::kConflictingModulesCheck) |
[email protected] | c1bbaa8 | 2010-11-08 11:17:05 | [diff] [blame] | 446 | }, |
| 447 | { |
[email protected] | 96c6f4c | 2011-05-18 19:36:22 | [diff] [blame] | 448 | "ignore-gpu-blacklist", |
| 449 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME, |
| 450 | IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION, |
| 451 | kOsAll, |
| 452 | SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist) |
| 453 | }, |
| 454 | { |
[email protected] | 72787e39 | 2012-03-23 05:55:43 | [diff] [blame] | 455 | "threaded-compositing-mode", |
| 456 | IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME, |
| 457 | IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 458 | #if !defined(USE_AURA) |
[email protected] | 85a36cd | 2014-01-22 11:41:26 | [diff] [blame] | 459 | kOsLinux, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 460 | #else |
| 461 | 0, |
| 462 | #endif |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 463 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing, |
| 464 | switches::kDisableThreadedCompositing) |
[email protected] | 644a107 | 2012-03-16 09:29:59 | [diff] [blame] | 465 | }, |
| 466 | { |
[email protected] | 17e2769 | 2013-02-06 17:02:09 | [diff] [blame] | 467 | "force-accelerated-composited-scrolling", |
| 468 | IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME, |
| 469 | IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION, |
| 470 | kOsAll, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 471 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAcceleratedOverflowScroll, |
| 472 | switches::kDisableAcceleratedOverflowScroll) |
[email protected] | 17e2769 | 2013-02-06 17:02:09 | [diff] [blame] | 473 | }, |
| 474 | { |
[email protected] | 44de749 | 2013-10-18 15:14:59 | [diff] [blame] | 475 | "force-universal-accelerated-composited-scrolling", |
| 476 | IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME, |
| 477 | IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION, |
| 478 | kOsAll, |
| 479 | ENABLE_DISABLE_VALUE_TYPE( |
| 480 | switches::kEnableUniversalAcceleratedOverflowScroll, |
| 481 | switches::kDisableUniversalAcceleratedOverflowScroll) |
| 482 | }, |
[email protected] | 8560336 | 2014-04-21 16:18:14 | [diff] [blame] | 483 | { |
| 484 | "disable_layer_squashing", |
| 485 | IDS_FLAGS_DISABLE_LAYER_SQUASHING_NAME, |
| 486 | IDS_FLAGS_DISABLE_LAYER_SQUASHING_DESCRIPTION, |
| 487 | kOsAll, |
| 488 | SINGLE_VALUE_TYPE(switches::kDisableLayerSquashing) |
| 489 | }, |
[email protected] | 5b7033fc | 2013-12-07 22:32:07 | [diff] [blame] | 490 | #if defined(OS_WIN) |
| 491 | { |
| 492 | "enable-direct-write", |
| 493 | IDS_FLAGS_ENABLE_DIRECT_WRITE_NAME, |
| 494 | IDS_FLAGS_ENABLE_DIRECT_WRITE_DESCRIPTION, |
| 495 | kOsWin, |
| 496 | SINGLE_VALUE_TYPE(switches::kEnableDirectWrite) |
| 497 | }, |
| 498 | #endif |
[email protected] | 8b1c3c7 | 2013-01-25 01:48:43 | [diff] [blame] | 499 | { |
[email protected] | 2b60875 | 2013-05-01 03:34:36 | [diff] [blame] | 500 | "enable-experimental-canvas-features", |
| 501 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME, |
| 502 | IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION, |
| 503 | kOsAll, |
| 504 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalCanvasFeatures) |
| 505 | }, |
| 506 | { |
[email protected] | 81c64af6 | 2012-06-06 20:15:52 | [diff] [blame] | 507 | "disable-accelerated-2d-canvas", |
| 508 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME, |
| 509 | IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION, |
| 510 | kOsAll, |
| 511 | SINGLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas) |
| 512 | }, |
| 513 | { |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 514 | "composited-layer-borders", |
| 515 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS, |
| 516 | IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION, |
| 517 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 518 | SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders) |
[email protected] | 5963b77 | 2011-02-09 22:55:38 | [diff] [blame] | 519 | }, |
| 520 | { |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 521 | "show-fps-counter", |
| 522 | IDS_FLAGS_SHOW_FPS_COUNTER, |
| 523 | IDS_FLAGS_SHOW_FPS_COUNTER_DESCRIPTION, |
| 524 | kOsAll, |
[email protected] | 4d5e676 | 2013-03-19 18:46:57 | [diff] [blame] | 525 | SINGLE_VALUE_TYPE(cc::switches::kShowFPSCounter) |
[email protected] | a8f1eaa | 2011-03-07 19:00:58 | [diff] [blame] | 526 | }, |
[email protected] | 8ff7f34 | 2011-05-25 01:49:47 | [diff] [blame] | 527 | { |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 528 | "disable-webgl", |
| 529 | IDS_FLAGS_DISABLE_WEBGL_NAME, |
| 530 | IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION, |
[email protected] | 6c7784e | 2013-08-01 22:41:28 | [diff] [blame] | 531 | kOsAll, |
[email protected] | deaba6d5 | 2011-09-23 14:47:12 | [diff] [blame] | 532 | SINGLE_VALUE_TYPE(switches::kDisableExperimentalWebGL) |
| 533 | }, |
[email protected] | 09096e0 | 2012-05-24 11:12:04 | [diff] [blame] | 534 | { |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 535 | "disable-webrtc", |
| 536 | IDS_FLAGS_DISABLE_WEBRTC_NAME, |
| 537 | IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION, |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 538 | kOsAndroid, |
| 539 | #if defined(OS_ANDROID) |
[email protected] | ce585bf | 2013-03-14 16:25:16 | [diff] [blame] | 540 | SINGLE_VALUE_TYPE(switches::kDisableWebRTC) |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 541 | #else |
| 542 | SINGLE_VALUE_TYPE("") |
| 543 | #endif |
| 544 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 545 | #if defined(ENABLE_WEBRTC) |
[email protected] | d816ddc | 2013-05-23 14:28:30 | [diff] [blame] | 546 | { |
[email protected] | f1045f0 | 2013-08-02 23:19:35 | [diff] [blame] | 547 | "disable-device-enumeration", |
| 548 | IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_NAME, |
| 549 | IDS_FLAGS_DISABLE_DEVICE_ENUMERATION_DESCRIPTION, |
[email protected] | c129874 | 2013-07-17 04:06:32 | [diff] [blame] | 550 | kOsAll, |
[email protected] | f1045f0 | 2013-08-02 23:19:35 | [diff] [blame] | 551 | SINGLE_VALUE_TYPE(switches::kDisableDeviceEnumeration) |
[email protected] | c129874 | 2013-07-17 04:06:32 | [diff] [blame] | 552 | }, |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 553 | { |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 554 | "disable-webrtc-hw-decoding", |
| 555 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_NAME, |
| 556 | IDS_FLAGS_DISABLE_WEBRTC_HW_DECODING_DESCRIPTION, |
[email protected] | 6442b02 | 2013-12-05 11:09:05 | [diff] [blame] | 557 | kOsAndroid | kOsCrOS, |
[email protected] | fdf631e | 2013-09-13 09:06:07 | [diff] [blame] | 558 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding) |
| 559 | }, |
| 560 | { |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 561 | "disable-webrtc-hw-encoding", |
| 562 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_NAME, |
| 563 | IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION, |
[email protected] | 6998f01f2 | 2013-12-04 09:27:57 | [diff] [blame] | 564 | kOsAndroid | kOsCrOS, |
[email protected] | 96cbf42 | 2013-09-11 12:42:22 | [diff] [blame] | 565 | SINGLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding) |
| 566 | }, |
[email protected] | 5e2bc8c | 2013-05-28 22:59:57 | [diff] [blame] | 567 | #endif |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 568 | #if defined(OS_ANDROID) |
| 569 | { |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 570 | "disable-webaudio", |
| 571 | IDS_FLAGS_DISABLE_WEBAUDIO_NAME, |
| 572 | IDS_FLAGS_DISABLE_WEBAUDIO_DESCRIPTION, |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 573 | kOsAndroid, |
[email protected] | 7b8a3163 | 2013-06-13 22:42:37 | [diff] [blame] | 574 | SINGLE_VALUE_TYPE(switches::kDisableWebAudio) |
[email protected] | 34cb529 | 2013-04-15 06:06:31 | [diff] [blame] | 575 | }, |
| 576 | #endif |
[email protected] | d9da958 | 2013-01-31 04:59:05 | [diff] [blame] | 577 | { |
[email protected] | 96bcdc10 | 2012-05-24 23:42:10 | [diff] [blame] | 578 | "fixed-position-creates-stacking-context", |
| 579 | IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME, |
| 580 | IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION, |
| 581 | kOsAll, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 582 | ENABLE_DISABLE_VALUE_TYPE( |
| 583 | switches::kEnableFixedPositionCreatesStackingContext, |
| 584 | switches::kDisableFixedPositionCreatesStackingContext) |
[email protected] | 96bcdc10 | 2012-05-24 23:42:10 | [diff] [blame] | 585 | }, |
[email protected] | fb85419 | 2013-02-06 01:30:04 | [diff] [blame] | 586 | { |
| 587 | "enable-compositing-for-fixed-position", |
| 588 | IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_NAME, |
| 589 | IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION, |
| 590 | kOsAll, |
| 591 | MULTI_VALUE_TYPE(kEnableCompositingForFixedPositionChoices) |
| 592 | }, |
[email protected] | d8221b2 | 2013-05-23 05:35:43 | [diff] [blame] | 593 | { |
| 594 | "enable-compositing-for-transition", |
| 595 | IDS_FLAGS_COMPOSITING_FOR_TRANSITION_NAME, |
| 596 | IDS_FLAGS_COMPOSITING_FOR_TRANSITION_DESCRIPTION, |
| 597 | kOsAll, |
| 598 | MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices) |
| 599 | }, |
[email protected] | 06fc4d3b | 2013-07-08 21:07:24 | [diff] [blame] | 600 | { |
| 601 | "enable-accelerated-fixed-root-background", |
| 602 | IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME, |
| 603 | IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION, |
| 604 | kOsAll, |
| 605 | MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices) |
| 606 | }, |
[email protected] | a7640ef2 | 2012-10-06 00:52:08 | [diff] [blame] | 607 | // TODO(bbudge): When NaCl is on by default, remove this flag entry. |
[email protected] | 2fe15fcb | 2010-10-21 20:39:53 | [diff] [blame] | 608 | { |
[email protected] | e3791ce9 | 2011-08-09 01:03:32 | [diff] [blame] | 609 | "enable-nacl", // FLAGS:RECORD_UMA |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 610 | IDS_FLAGS_ENABLE_NACL_NAME, |
| 611 | IDS_FLAGS_ENABLE_NACL_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 612 | kOsDesktop, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 613 | SINGLE_VALUE_TYPE(switches::kEnableNaCl) |
[email protected] | 4ff87d20 | 2010-11-06 01:28:40 | [diff] [blame] | 614 | }, |
| 615 | { |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 616 | "enable-nacl-debug", // FLAGS:RECORD_UMA |
| 617 | IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, |
| 618 | IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 619 | kOsDesktop, |
[email protected] | 9addd1c | 2012-09-15 14:28:24 | [diff] [blame] | 620 | SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) |
[email protected] | 401b9079 | 2012-05-30 11:41:13 | [diff] [blame] | 621 | }, |
| 622 | { |
[email protected] | 7de24f5 | 2013-08-29 10:02:55 | [diff] [blame] | 623 | "disable-pnacl", // FLAGS:RECORD_UMA |
| 624 | IDS_FLAGS_DISABLE_PNACL_NAME, |
| 625 | IDS_FLAGS_DISABLE_PNACL_DESCRIPTION, |
| 626 | kOsDesktop, |
| 627 | SINGLE_VALUE_TYPE(switches::kDisablePnacl) |
| 628 | }, |
| 629 | { |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 630 | "nacl-debug-mask", // FLAGS:RECORD_UMA |
| 631 | IDS_FLAGS_NACL_DEBUG_MASK_NAME, |
| 632 | IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 633 | kOsDesktop, |
[email protected] | 66f409c | 2012-10-04 20:59:04 | [diff] [blame] | 634 | MULTI_VALUE_TYPE(kNaClDebugMaskChoices) |
| 635 | }, |
| 636 | { |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 637 | "extension-apis", // FLAGS:RECORD_UMA |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 638 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, |
| 639 | IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 640 | kOsDesktop, |
[email protected] | c8d0299 | 2013-07-31 22:16:51 | [diff] [blame] | 641 | SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis) |
[email protected] | 11dd68cd5 | 2010-11-12 01:15:32 | [diff] [blame] | 642 | }, |
[email protected] | 3627b06d | 2010-11-12 16:36:16 | [diff] [blame] | 643 | { |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 644 | "extensions-on-chrome-urls", |
| 645 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, |
| 646 | IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION, |
| 647 | kOsAll, |
[email protected] | 49d9b14 | 2013-07-19 08:50:27 | [diff] [blame] | 648 | SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs) |
[email protected] | ac2e2acd | 2013-03-21 12:57:29 | [diff] [blame] | 649 | }, |
| 650 | { |
[email protected] | 88c9201 | 2013-07-02 11:56:34 | [diff] [blame] | 651 | "enable-fast-unload", |
| 652 | IDS_FLAGS_ENABLE_FAST_UNLOAD_NAME, |
| 653 | IDS_FLAGS_ENABLE_FAST_UNLOAD_DESCRIPTION, |
| 654 | kOsAll, |
| 655 | SINGLE_VALUE_TYPE(switches::kEnableFastUnload) |
| 656 | }, |
| 657 | { |
[email protected] | e9cddd5 | 2013-03-23 17:37:53 | [diff] [blame] | 658 | "enable-adview", |
| 659 | IDS_FLAGS_ENABLE_ADVIEW_NAME, |
| 660 | IDS_FLAGS_ENABLE_ADVIEW_DESCRIPTION, |
| 661 | kOsDesktop, |
| 662 | SINGLE_VALUE_TYPE(switches::kEnableAdview) |
| 663 | }, |
| 664 | { |
[email protected] | 1f4da9e | 2013-06-27 05:23:44 | [diff] [blame] | 665 | "enable-app-window-controls", |
| 666 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_NAME, |
| 667 | IDS_FLAGS_ENABLE_APP_WINDOW_CONTROLS_DESCRIPTION, |
| 668 | kOsDesktop, |
| 669 | SINGLE_VALUE_TYPE(switches::kEnableAppWindowControls) |
| 670 | }, |
| 671 | { |
[email protected] | cbe224d | 2011-08-04 22:12:49 | [diff] [blame] | 672 | "apps-new-install-bubble", |
| 673 | IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME, |
| 674 | IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 675 | kOsDesktop, |
[email protected] | cbe224d | 2011-08-04 22:12:49 | [diff] [blame] | 676 | SINGLE_VALUE_TYPE(switches::kAppsNewInstallBubble) |
| 677 | }, |
| 678 | { |
[email protected] | 80bd24e | 2010-11-30 09:34:38 | [diff] [blame] | 679 | "disable-hyperlink-auditing", |
| 680 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME, |
| 681 | IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION, |
| 682 | kOsAll, |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 683 | SINGLE_VALUE_TYPE(switches::kNoPings) |
[email protected] | feb28fef | 2010-12-01 10:52:51 | [diff] [blame] | 684 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 685 | #if defined(OS_ANDROID) |
| 686 | { |
| 687 | "enable-new-ntp", |
| 688 | IDS_FLAGS_ENABLE_NEW_NTP, |
| 689 | IDS_FLAGS_ENABLE_NEW_NTP_DESCRIPTION, |
| 690 | kOsAndroid, |
[email protected] | 6bab2e3 | 2013-09-11 00:09:03 | [diff] [blame] | 691 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNewNTP, |
| 692 | switches::kDisableNewNTP) |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 693 | }, |
[email protected] | 26d1b4d | 2014-02-08 02:42:17 | [diff] [blame] | 694 | { |
| 695 | "contextual-search", |
| 696 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH, |
| 697 | IDS_FLAGS_ENABLE_CONTEXTUAL_SEARCH_DESCRIPTION, |
| 698 | kOsAndroid, |
| 699 | SINGLE_VALUE_TYPE(switches::kEnableContextualSearch) |
| 700 | }, |
[email protected] | 333bdc5 | 2013-07-16 00:37:04 | [diff] [blame] | 701 | #endif |
[email protected] | 8cc9e53 | 2013-05-06 21:01:47 | [diff] [blame] | 702 | { |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 703 | "show-autofill-type-predictions", |
| 704 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME, |
| 705 | IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION, |
| 706 | kOsAll, |
[email protected] | e217c563 | 2013-04-12 19:11:48 | [diff] [blame] | 707 | SINGLE_VALUE_TYPE(autofill::switches::kShowAutofillTypePredictions) |
[email protected] | 3eb5728c | 2011-06-20 22:32:24 | [diff] [blame] | 708 | }, |
[email protected] | bff4d3e | 2011-06-21 23:58:52 | [diff] [blame] | 709 | { |
[email protected] | e755a38 | 2012-09-13 17:16:35 | [diff] [blame] | 710 | "enable-gesture-tap-highlight", |
| 711 | IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME, |
| 712 | IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION, |
[email protected] | 9ef42cf | 2014-03-11 02:50:12 | [diff] [blame] | 713 | kOsLinux | kOsCrOS | kOsWin | kOsAndroid, |
[email protected] | 06ca05d | 2013-03-13 19:12:47 | [diff] [blame] | 714 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableGestureTapHighlight, |
| 715 | switches::kDisableGestureTapHighlight) |
[email protected] | e755a38 | 2012-09-13 17:16:35 | [diff] [blame] | 716 | }, |
| 717 | { |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 718 | "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 719 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 720 | IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 721 | // Can't expose the switch unless the code is compiled in. |
[email protected] | 554b706 | 2011-09-03 03:09:40 | [diff] [blame] | 722 | // On by default for the Mac (different implementation in WebKit). |
[email protected] | a5a5aaf | 2013-12-19 02:10:10 | [diff] [blame] | 723 | kOsLinux, |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 724 | SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 725 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 726 | #if defined(USE_AURA) || defined(OS_LINUX) |
[email protected] | 81a6b0b | 2011-06-24 17:55:40 | [diff] [blame] | 727 | { |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 728 | "overlay-scrollbars", |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 729 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_NAME, |
| 730 | IDS_FLAGS_ENABLE_OVERLAY_SCROLLBARS_DESCRIPTION, |
| 731 | // Uses the system preference on Mac (a different implementation). |
| 732 | // On Android, this is always enabled. |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 733 | kOsLinux | kOsCrOS | kOsWin, |
| 734 | MULTI_VALUE_TYPE(kOverlayScrollbarChoices) |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 735 | }, |
[email protected] | 54c8d28 | 2014-01-24 17:31:08 | [diff] [blame] | 736 | #endif |
[email protected] | 23eecbd0 | 2013-09-19 18:13:37 | [diff] [blame] | 737 | { |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 738 | "enable-panels", |
| 739 | IDS_FLAGS_ENABLE_PANELS_NAME, |
| 740 | IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 741 | kOsDesktop, |
[email protected] | 7e7a2809 | 2011-12-09 22:24:55 | [diff] [blame] | 742 | SINGLE_VALUE_TYPE(switches::kEnablePanels) |
[email protected] | 73fb1fc5 | 2011-07-09 00:06:54 | [diff] [blame] | 743 | }, |
[email protected] | e3749d1 | 2011-07-25 22:22:12 | [diff] [blame] | 744 | { |
[email protected] | 27c14f0 | 2012-06-22 17:29:58 | [diff] [blame] | 745 | // See http://crbug.com/120416 for how to remove this flag. |
[email protected] | 6474b11 | 2012-05-04 19:35:27 | [diff] [blame] | 746 | "save-page-as-mhtml", // FLAGS:RECORD_UMA |
| 747 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME, |
| 748 | IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION, |
| 749 | kOsMac | kOsWin | kOsLinux, |
| 750 | SINGLE_VALUE_TYPE(switches::kSavePageAsMHTML) |
| 751 | }, |
| 752 | { |
[email protected] | 903e6338 | 2013-06-01 00:40:58 | [diff] [blame] | 753 | "enable-quic", |
| 754 | IDS_FLAGS_ENABLE_QUIC_NAME, |
| 755 | IDS_FLAGS_ENABLE_QUIC_DESCRIPTION, |
| 756 | kOsAll, |
| 757 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, |
| 758 | switches::kDisableQuic) |
| 759 | }, |
| 760 | { |
[email protected] | eb8f88e | 2013-07-15 09:52:17 | [diff] [blame] | 761 | "enable-quic-https", |
| 762 | IDS_FLAGS_ENABLE_QUIC_HTTPS_NAME, |
| 763 | IDS_FLAGS_ENABLE_QUIC_HTTPS_DESCRIPTION, |
| 764 | kOsAll, |
[email protected] | a64b213e | 2013-07-24 21:41:00 | [diff] [blame] | 765 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuicHttps, |
| 766 | switches::kDisableQuicHttps) |
[email protected] | eb8f88e | 2013-07-15 09:52:17 | [diff] [blame] | 767 | }, |
| 768 | { |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 769 | "enable-spdy4", |
| 770 | IDS_FLAGS_ENABLE_SPDY4_NAME, |
| 771 | IDS_FLAGS_ENABLE_SPDY4_DESCRIPTION, |
[email protected] | bca09b998 | 2013-06-27 22:30:46 | [diff] [blame] | 772 | kOsAll, |
[email protected] | d10833bc | 2014-04-14 17:50:46 | [diff] [blame] | 773 | SINGLE_VALUE_TYPE(switches::kEnableSpdy4) |
[email protected] | 88a33262 | 2013-07-30 07:13:32 | [diff] [blame] | 774 | }, |
| 775 | { |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 776 | "enable-async-dns", |
| 777 | IDS_FLAGS_ENABLE_ASYNC_DNS_NAME, |
| 778 | IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION, |
[email protected] | 85594c14 | 2012-09-11 18:02:46 | [diff] [blame] | 779 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 780 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableAsyncDns, |
| 781 | switches::kDisableAsyncDns) |
[email protected] | 27b3fe9 | 2012-03-21 05:35:06 | [diff] [blame] | 782 | }, |
| 783 | { |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 784 | "disable-media-source", |
| 785 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME, |
| 786 | IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION, |
[email protected] | ec9d053 | 2012-03-21 05:55:32 | [diff] [blame] | 787 | kOsAll, |
[email protected] | c3a47f8d | 2014-04-15 14:39:28 | [diff] [blame] | 788 | SINGLE_VALUE_TYPE(switches::kDisableMediaSource) |
[email protected] | 722b4d484f | 2013-10-08 20:33:59 | [diff] [blame] | 789 | }, |
| 790 | { |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 791 | "enable-encrypted-media", |
| 792 | IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_NAME, |
| 793 | IDS_FLAGS_ENABLE_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 794 | kOsAll, |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 795 | SINGLE_VALUE_TYPE(switches::kEnableEncryptedMedia) |
| 796 | }, |
| 797 | { |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 798 | "disable-prefixed-encrypted-media", |
[email protected] | 16c242d | 2013-05-31 23:56:47 | [diff] [blame] | 799 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_NAME, |
| 800 | IDS_FLAGS_DISABLE_PREFIXED_ENCRYPTED_MEDIA_DESCRIPTION, |
[email protected] | ddb0f26 | 2013-07-26 13:16:50 | [diff] [blame] | 801 | kOsAll, |
[email protected] | e76d92f | 2013-09-26 20:03:35 | [diff] [blame] | 802 | SINGLE_VALUE_TYPE(switches::kDisablePrefixedEncryptedMedia) |
[email protected] | 9f5b782 | 2012-04-18 23:39:03 | [diff] [blame] | 803 | }, |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 804 | #if defined(OS_ANDROID) |
| 805 | { |
[email protected] | 3c56ec1 | 2013-09-25 02:03:42 | [diff] [blame] | 806 | "disable-infobar-for-protected-media-identifier", |
| 807 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_NAME, |
| 808 | IDS_FLAGS_DISABLE_INFOBAR_FOR_PROTECTED_MEDIA_IDENTIFIER_DESCRIPTION, |
| 809 | kOsAndroid, |
| 810 | SINGLE_VALUE_TYPE(switches::kDisableInfobarForProtectedMediaIdentifier) |
| 811 | }, |
| 812 | { |
[email protected] | ce3934bb | 2013-09-10 02:02:56 | [diff] [blame] | 813 | "mediadrm-enable-non-compositing", |
| 814 | IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_NAME, |
| 815 | IDS_FLAGS_MEDIADRM_ENABLE_NON_COMPOSITING_DESCRIPTION, |
| 816 | kOsAndroid, |
| 817 | SINGLE_VALUE_TYPE(switches::kMediaDrmEnableNonCompositing) |
| 818 | }, |
| 819 | #endif // defined(OS_ANDROID) |
[email protected] | d21ead4 | 2013-06-24 06:35:06 | [diff] [blame] | 820 | { |
[email protected] | bf88c03 | 2011-12-22 19:05:47 | [diff] [blame] | 821 | "enable-javascript-harmony", |
| 822 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME, |
| 823 | IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION, |
| 824 | kOsAll, |
| 825 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kJavaScriptFlags, "--harmony") |
| 826 | }, |
[email protected] | 7e7f378a | 2012-01-05 14:35:37 | [diff] [blame] | 827 | { |
[email protected] | 88864db | 2012-01-18 20:56:35 | [diff] [blame] | 828 | "disable-software-rasterizer", |
| 829 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME, |
| 830 | IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION, |
| 831 | #if defined(ENABLE_SWIFTSHADER) |
| 832 | kOsAll, |
| 833 | #else |
| 834 | 0, |
| 835 | #endif |
| 836 | SINGLE_VALUE_TYPE(switches::kDisableSoftwareRasterizer) |
| 837 | }, |
[email protected] | 15a5d72 | 2012-01-23 09:11:14 | [diff] [blame] | 838 | { |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 839 | "enable-gpu-rasterization", |
| 840 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_NAME, |
| 841 | IDS_FLAGS_ENABLE_GPU_RASTERIZATION_DESCRIPTION, |
[email protected] | 96d25e2 | 2014-03-04 05:56:18 | [diff] [blame] | 842 | kOsAndroid, |
[email protected] | a23530d | 2014-03-11 06:04:14 | [diff] [blame] | 843 | MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices) |
[email protected] | d1ddf8c5 | 2014-02-06 22:09:31 | [diff] [blame] | 844 | }, |
| 845 | { |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 846 | "enable-experimental-web-platform-features", |
| 847 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME, |
| 848 | IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION, |
[email protected] | d2edc670 | 2012-01-30 09:13:16 | [diff] [blame] | 849 | kOsAll, |
[email protected] | c1b18ea | 2013-07-10 13:01:16 | [diff] [blame] | 850 | SINGLE_VALUE_TYPE(switches::kEnableExperimentalWebPlatformFeatures) |
[email protected] | ca7a3d79 | 2012-03-02 15:55:49 | [diff] [blame] | 851 | }, |
| 852 | { |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 853 | "disable-ntp-other-sessions-menu", |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 854 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME, |
| 855 | IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 856 | kOsDesktop, |
[email protected] | 3e8befc | 2012-03-13 01:17:03 | [diff] [blame] | 857 | SINGLE_VALUE_TYPE(switches::kDisableNTPOtherSessionsMenu) |
[email protected] | 156f96633 | 2012-02-29 00:03:16 | [diff] [blame] | 858 | }, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 859 | { |
| 860 | "enable-devtools-experiments", |
| 861 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME, |
| 862 | IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 863 | kOsDesktop, |
[email protected] | 184ec59 | 2012-03-01 11:54:28 | [diff] [blame] | 864 | SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments) |
| 865 | }, |
[email protected] | 76d1854e | 2012-03-02 23:57:44 | [diff] [blame] | 866 | { |
[email protected] | 2fefdb3 | 2013-02-26 14:28:10 | [diff] [blame] | 867 | "silent-debugger-extension-api", |
| 868 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_NAME, |
| 869 | IDS_FLAGS_SILENT_DEBUGGER_EXTENSION_API_DESCRIPTION, |
| 870 | kOsDesktop, |
| 871 | SINGLE_VALUE_TYPE(switches::kSilentDebuggerExtensionAPI) |
| 872 | }, |
| 873 | { |
[email protected] | 1dbaf5e | 2012-11-30 05:51:32 | [diff] [blame] | 874 | "spellcheck-autocorrect", |
| 875 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT, |
| 876 | IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION, |
| 877 | kOsWin | kOsLinux | kOsCrOS, |
| 878 | SINGLE_VALUE_TYPE(switches::kEnableSpellingAutoCorrect) |
| 879 | }, |
| 880 | { |
[email protected] | e2713728 | 2013-06-20 02:38:35 | [diff] [blame] | 881 | "enable-scroll-prediction", |
| 882 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_NAME, |
| 883 | IDS_FLAGS_ENABLE_SCROLL_PREDICTION_DESCRIPTION, |
| 884 | kOsDesktop, |
| 885 | SINGLE_VALUE_TYPE(switches::kEnableScrollPrediction) |
| 886 | }, |
| 887 | { |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 888 | "touch-events", |
| 889 | IDS_TOUCH_EVENTS_NAME, |
| 890 | IDS_TOUCH_EVENTS_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 891 | kOsDesktop, |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 892 | MULTI_VALUE_TYPE(kTouchEventsChoices) |
| 893 | }, |
| 894 | { |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 895 | "disable-touch-adjustment", |
| 896 | IDS_DISABLE_TOUCH_ADJUSTMENT_NAME, |
| 897 | IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION, |
| 898 | kOsWin | kOsLinux | kOsCrOS, |
| 899 | SINGLE_VALUE_TYPE(switches::kDisableTouchAdjustment) |
| 900 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 901 | #if defined(OS_CHROMEOS) |
| 902 | { |
[email protected] | 736282c | 2014-01-06 22:01:58 | [diff] [blame] | 903 | "ash-disable-docked-windows", |
[email protected] | ba7df7e | 2013-07-18 21:49:59 | [diff] [blame] | 904 | IDS_FLAGS_DOCKED_WINDOWS_NAME, |
| 905 | IDS_FLAGS_DOCKED_WINDOWS_DESCRIPTION, |
| 906 | kOsCrOS, |
[email protected] | 736282c | 2014-01-06 22:01:58 | [diff] [blame] | 907 | SINGLE_VALUE_TYPE(ash::switches::kAshDisableDockedWindows) |
[email protected] | ba7df7e | 2013-07-18 21:49:59 | [diff] [blame] | 908 | }, |
[email protected] | 6345843 | 2013-11-20 17:28:53 | [diff] [blame] | 909 | { |
[email protected] | 81f89e9 | 2014-02-21 14:27:35 | [diff] [blame] | 910 | "network-portal-notification", |
| 911 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_NAME, |
| 912 | IDS_FLAGS_NETWORK_PORTAL_NOTIFICATION_DESCRIPTION, |
| 913 | kOsCrOS, |
| 914 | ENABLE_DISABLE_VALUE_TYPE( |
| 915 | chromeos::switches::kEnableNetworkPortalNotification, |
| 916 | chromeos::switches::kDisableNetworkPortalNotification) |
| 917 | }, |
[email protected] | 0b60afa | 2012-04-19 17:36:39 | [diff] [blame] | 918 | #endif |
[email protected] | 79be6d3 | 2012-04-24 20:47:44 | [diff] [blame] | 919 | { |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 920 | "enable-download-resumption", |
| 921 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, |
| 922 | IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 923 | kOsDesktop, |
[email protected] | 8d68a3e0 | 2013-01-12 15:57:10 | [diff] [blame] | 924 | SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) |
| 925 | }, |
| 926 | { |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 927 | "allow-nacl-socket-api", |
| 928 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, |
| 929 | IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 930 | kOsDesktop, |
[email protected] | 9a5940d | 2012-04-27 19:16:23 | [diff] [blame] | 931 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") |
| 932 | }, |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 933 | { |
[email protected] | 60673ad7 | 2012-05-02 06:16:33 | [diff] [blame] | 934 | "stacked-tab-strip", |
| 935 | IDS_FLAGS_STACKED_TAB_STRIP_NAME, |
| 936 | IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION, |
| 937 | kOsWin, |
| 938 | SINGLE_VALUE_TYPE(switches::kEnableStackedTabStrip) |
| 939 | }, |
| 940 | { |
[email protected] | 4bd2020 | 2012-06-14 17:35:01 | [diff] [blame] | 941 | "force-device-scale-factor", |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 942 | IDS_FLAGS_FORCE_HIGH_DPI_NAME, |
| 943 | IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION, |
| 944 | kOsCrOS, |
[email protected] | 4bd2020 | 2012-06-14 17:35:01 | [diff] [blame] | 945 | SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2") |
[email protected] | 8533373 | 2012-05-01 19:02:24 | [diff] [blame] | 946 | }, |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 947 | #if defined(OS_CHROMEOS) |
| 948 | { |
| 949 | "allow-touchpad-three-finger-click", |
| 950 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME, |
| 951 | IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION, |
| 952 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 953 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableTouchpadThreeFingerClick) |
[email protected] | 190349fd | 2012-05-02 00:10:47 | [diff] [blame] | 954 | }, |
| 955 | #endif |
[email protected] | 53520b1b | 2012-05-07 21:43:37 | [diff] [blame] | 956 | #if defined(USE_ASH) |
| 957 | { |
[email protected] | 2ddf37b | 2013-04-20 01:15:58 | [diff] [blame] | 958 | "disable-minimize-on-second-launcher-item-click", |
| 959 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_NAME, |
| 960 | IDS_FLAGS_DISABLE_MINIMIZE_ON_SECOND_LAUNCHER_ITEM_CLICK_DESCRIPTION, |
| 961 | kOsAll, |
| 962 | SINGLE_VALUE_TYPE(switches::kDisableMinimizeOnSecondLauncherItemClick) |
| 963 | }, |
| 964 | { |
[email protected] | 7307474 | 2012-05-17 01:44:41 | [diff] [blame] | 965 | "show-touch-hud", |
| 966 | IDS_FLAGS_SHOW_TOUCH_HUD_NAME, |
| 967 | IDS_FLAGS_SHOW_TOUCH_HUD_DESCRIPTION, |
| 968 | kOsAll, |
| 969 | SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud) |
| 970 | }, |
| 971 | { |
[email protected] | 9f0940b6 | 2012-05-23 22:56:35 | [diff] [blame] | 972 | "enable-pinch", |
| 973 | IDS_FLAGS_ENABLE_PINCH_SCALE_NAME, |
| 974 | IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION, |
[email protected] | 16ad47f8 | 2012-12-05 21:06:06 | [diff] [blame] | 975 | kOsLinux | kOsWin | kOsCrOS, |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 976 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePinch, switches::kDisablePinch), |
| 977 | }, |
[email protected] | adcdcdd0 | 2014-04-25 03:30:24 | [diff] [blame] | 978 | #endif // defined(USE_ASH) |
[email protected] | e4cd82e | 2013-04-10 15:20:38 | [diff] [blame] | 979 | { |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 980 | "enable-pinch-virtual-viewport", |
| 981 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_NAME, |
| 982 | IDS_FLAGS_ENABLE_PINCH_VIRTUAL_VIEWPORT_DESCRIPTION, |
[email protected] | fe89d82 | 2014-04-28 10:29:00 | [diff] [blame] | 983 | kOsLinux | kOsWin | kOsCrOS | kOsAndroid, |
| 984 | ENABLE_DISABLE_VALUE_TYPE( |
| 985 | cc::switches::kEnablePinchVirtualViewport, |
| 986 | cc::switches::kDisablePinchVirtualViewport), |
[email protected] | de0aaed | 2013-05-27 18:16:43 | [diff] [blame] | 987 | }, |
[email protected] | 68bc37c | 2014-01-07 15:56:48 | [diff] [blame] | 988 | { |
| 989 | "enable-viewport-meta", |
| 990 | IDS_FLAGS_ENABLE_VIEWPORT_META_NAME, |
| 991 | IDS_FLAGS_ENABLE_VIEWPORT_META_DESCRIPTION, |
| 992 | kOsLinux | kOsWin | kOsCrOS | kOsMac, |
| 993 | SINGLE_VALUE_TYPE(switches::kEnableViewportMeta), |
| 994 | }, |
[email protected] | ed7b67f3 | 2012-05-28 10:12:28 | [diff] [blame] | 995 | #if defined(OS_CHROMEOS) |
| 996 | { |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 997 | "disable-boot-animation", |
| 998 | IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
| 999 | IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 1000 | kOsCrOSOwnerOnly, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1001 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableBootAnimation), |
[email protected] | 8b04a165 | 2012-08-04 02:59:49 | [diff] [blame] | 1002 | }, |
[email protected] | 9505857 | 2012-08-20 14:57:29 | [diff] [blame] | 1003 | { |
[email protected] | 4e8e862 | 2014-01-30 04:37:05 | [diff] [blame] | 1004 | "enable-new-audio-player", |
| 1005 | IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_NAME, |
| 1006 | IDS_FLAGS_FILE_MANAGER_ENABLE_NEW_AUDIO_PLAYER_DESCRIPTION, |
| 1007 | kOsCrOS, |
| 1008 | SINGLE_VALUE_TYPE(chromeos::switches::kFileManagerEnableNewAudioPlayer) |
| 1009 | }, |
| 1010 | { |
[email protected] | 099b890c | 2013-04-25 19:16:26 | [diff] [blame] | 1011 | "disable-quickoffice-component-app", |
| 1012 | IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_NAME, |
| 1013 | IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION, |
| 1014 | kOsCrOS, |
| 1015 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableQuickofficeComponentApp), |
| 1016 | }, |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 1017 | { |
[email protected] | 21d5a6b6 | 2014-01-24 22:47:14 | [diff] [blame] | 1018 | "disable-saml-signin", |
| 1019 | IDS_FLAGS_DISABLE_SAML_SIGNIN_NAME, |
| 1020 | IDS_FLAGS_DISABLE_SAML_SIGNIN_DESCRIPTION, |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 1021 | kOsCrOS, |
[email protected] | 21d5a6b6 | 2014-01-24 22:47:14 | [diff] [blame] | 1022 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableSamlSignin), |
[email protected] | 31cf147 | 2013-09-13 00:36:42 | [diff] [blame] | 1023 | }, |
[email protected] | d81240b | 2013-09-20 21:05:28 | [diff] [blame] | 1024 | { |
| 1025 | "enable-multi-profiles", |
| 1026 | IDS_FLAGS_ENABLE_MULTI_PROFILES_NAME, |
| 1027 | IDS_FLAGS_ENABLE_MULTI_PROFILES_DESCRIPTION, |
| 1028 | kOsCrOS, |
| 1029 | SINGLE_VALUE_TYPE(switches::kMultiProfiles), |
| 1030 | }, |
[email protected] | bf3f459 | 2014-03-31 19:50:44 | [diff] [blame] | 1031 | { |
| 1032 | "disable-display-color-calibration", |
| 1033 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME, |
| 1034 | IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION, |
| 1035 | kOsCrOS, |
| 1036 | SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration), |
| 1037 | }, |
[email protected] | 62018dc | 2012-12-13 00:37:35 | [diff] [blame] | 1038 | #endif // defined(OS_CHROMEOS) |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1039 | { "disable-accelerated-video-decode", |
| 1040 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, |
| 1041 | IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION, |
[email protected] | 33e98a85 | 2013-04-26 05:14:19 | [diff] [blame] | 1042 | kOsWin | kOsCrOS, |
[email protected] | 7db8893a | 2012-07-26 00:49:40 | [diff] [blame] | 1043 | SINGLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), |
[email protected] | 66dcb049 | 2012-06-18 22:32:15 | [diff] [blame] | 1044 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1045 | #if defined(USE_ASH) |
[email protected] | 35c9a4e | 2013-09-14 01:32:38 | [diff] [blame] | 1046 | { |
| 1047 | "ash-debug-shortcuts", |
| 1048 | IDS_FLAGS_DEBUG_SHORTCUTS_NAME, |
| 1049 | IDS_FLAGS_DEBUG_SHORTCUTS_DESCRIPTION, |
| 1050 | kOsAll, |
| 1051 | SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), |
| 1052 | }, |
[email protected] | b19b09a | 2014-02-26 05:34:34 | [diff] [blame] | 1053 | { "ash-enable-touch-view-testing", |
| 1054 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_NAME, |
| 1055 | IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION, |
| 1056 | kOsCrOS, |
| 1057 | SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting), |
| 1058 | }, |
[email protected] | 1d9bb9cd | 2012-08-28 22:02:50 | [diff] [blame] | 1059 | #endif |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1060 | #if defined(OS_CHROMEOS) |
| 1061 | { |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1062 | "enable-carrier-switching", |
| 1063 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING, |
| 1064 | IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION, |
| 1065 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1066 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableCarrierSwitching) |
[email protected] | 205f0789 | 2012-10-16 20:26:22 | [diff] [blame] | 1067 | }, |
| 1068 | { |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1069 | "enable-request-tablet-site", |
| 1070 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME, |
| 1071 | IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION, |
| 1072 | kOsCrOS, |
[email protected] | 2f2d6c3 | 2013-05-10 02:56:24 | [diff] [blame] | 1073 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableRequestTabletSite) |
[email protected] | 9b7ab88 | 2012-09-10 23:46:36 | [diff] [blame] | 1074 | }, |
| 1075 | #endif |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1076 | { |
| 1077 | "debug-packed-apps", |
| 1078 | IDS_FLAGS_DEBUG_PACKED_APP_NAME, |
| 1079 | IDS_FLAGS_DEBUG_PACKED_APP_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1080 | kOsDesktop, |
[email protected] | dab49c0b | 2012-10-04 05:55:35 | [diff] [blame] | 1081 | SINGLE_VALUE_TYPE(switches::kDebugPackedApps) |
| 1082 | }, |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1083 | { |
| 1084 | "enable-password-generation", |
| 1085 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_NAME, |
| 1086 | IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION, |
[email protected] | f3cd680 | 2013-01-23 20:25:56 | [diff] [blame] | 1087 | kOsDesktop, |
[email protected] | c3cc063 | 2013-10-03 21:54:43 | [diff] [blame] | 1088 | ENABLE_DISABLE_VALUE_TYPE(autofill::switches::kEnablePasswordGeneration, |
| 1089 | autofill::switches::kDisablePasswordGeneration) |
[email protected] | d1459ed | 2012-10-10 01:29:33 | [diff] [blame] | 1090 | }, |
[email protected] | 26d045f | 2012-10-18 21:18:43 | [diff] [blame] | 1091 | { |
[email protected] | 0477c06 | 2014-04-30 15:02:18 | [diff] [blame] | 1092 | "enable-automatic-password-saving", |
| 1093 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_NAME, |
| 1094 | IDS_FLAGS_ENABLE_AUTOMATIC_PASSWORD_SAVING_DESCRIPTION, |
| 1095 | kOsDesktop, |
| 1096 | SINGLE_VALUE_TYPE( |
| 1097 | password_manager::switches::kEnableAutomaticPasswordSaving) |
| 1098 | }, |
| 1099 | { |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1100 | "password-manager-reauthentication", |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1101 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_NAME, |
| 1102 | IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION, |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 1103 | kOsMac | kOsWin, |
[email protected] | f2a394b | 2013-11-28 20:08:04 | [diff] [blame] | 1104 | SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication) |
[email protected] | 429a6e0 | 2013-10-23 18:40:48 | [diff] [blame] | 1105 | }, |
| 1106 | { |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1107 | "enable-deferred-image-decoding", |
| 1108 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME, |
| 1109 | IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1110 | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 76f7d488 | 2012-10-26 21:09:22 | [diff] [blame] | 1111 | SINGLE_VALUE_TYPE(switches::kEnableDeferredImageDecoding) |
| 1112 | }, |
| 1113 | { |
[email protected] | 075543d | 2012-10-24 01:29:14 | [diff] [blame] | 1114 | "performance-monitor-gathering", |
| 1115 | IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME, |
| 1116 | IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION, |
| 1117 | kOsAll, |
| 1118 | SINGLE_VALUE_TYPE(switches::kPerformanceMonitorGathering) |
| 1119 | }, |
[email protected] | 783d5bb | 2012-10-24 03:47:14 | [diff] [blame] | 1120 | { |
[email protected] | 4547698 | 2013-10-01 03:22:29 | [diff] [blame] | 1121 | "wallet-service-use-sandbox", |
| 1122 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME, |
| 1123 | IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION, |
| 1124 | kOsCrOS | kOsWin | kOsMac, |
| 1125 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1126 | autofill::switches::kWalletServiceUseSandbox, "1", |
| 1127 | autofill::switches::kWalletServiceUseSandbox, "0") |
[email protected] | db3178c | 2013-03-21 14:54:54 | [diff] [blame] | 1128 | }, |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1129 | #if defined(USE_AURA) |
| 1130 | { |
| 1131 | "overscroll-history-navigation", |
| 1132 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_NAME, |
| 1133 | IDS_FLAGS_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION, |
| 1134 | kOsAll, |
[email protected] | c38e980 | 2014-02-18 21:32:12 | [diff] [blame] | 1135 | MULTI_VALUE_TYPE(kOverscrollHistoryNavigationChoices) |
[email protected] | 177260c | 2013-04-24 01:47:38 | [diff] [blame] | 1136 | }, |
| 1137 | #endif |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1138 | { |
[email protected] | 888878e8 | 2013-07-24 22:49:40 | [diff] [blame] | 1139 | "scroll-end-effect", |
| 1140 | IDS_FLAGS_SCROLL_END_EFFECT_NAME, |
| 1141 | IDS_FLAGS_SCROLL_END_EFFECT_DESCRIPTION, |
| 1142 | kOsCrOS, |
| 1143 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1144 | switches::kScrollEndEffect, "1", |
| 1145 | switches::kScrollEndEffect, "0") |
| 1146 | }, |
| 1147 | { |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1148 | "enable-touch-drag-drop", |
| 1149 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, |
| 1150 | IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION, |
| 1151 | kOsWin | kOsCrOS, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1152 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchDragDrop, |
| 1153 | switches::kDisableTouchDragDrop) |
[email protected] | edbea62 | 2012-11-28 20:39:38 | [diff] [blame] | 1154 | }, |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1155 | { |
| 1156 | "enable-touch-editing", |
| 1157 | IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME, |
| 1158 | IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION, |
| 1159 | kOsCrOS, |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 1160 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTouchEditing, |
| 1161 | switches::kDisableTouchEditing) |
[email protected] | 0e2f43b6 | 2013-02-21 00:47:15 | [diff] [blame] | 1162 | }, |
[email protected] | 92e12dd9 | 2012-12-11 03:33:20 | [diff] [blame] | 1163 | { |
[email protected] | 06a82ff | 2014-04-25 02:24:46 | [diff] [blame] | 1164 | "enable-suggestions-service", |
| 1165 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME, |
| 1166 | IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION, |
| 1167 | kOsAndroid | kOsCrOS, |
| 1168 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService, |
| 1169 | switches::kDisableSuggestionsService) |
| 1170 | }, |
| 1171 | { |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1172 | "enable-sync-synced-notifications", |
| 1173 | IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME, |
| 1174 | IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 4316893 | 2013-05-24 06:35:18 | [diff] [blame] | 1175 | kOsDesktop, |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1176 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSyncSyncedNotifications, |
| 1177 | switches::kDisableSyncSyncedNotifications) |
| 1178 | }, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1179 | #if defined(ENABLE_APP_LIST) |
| 1180 | { |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1181 | "enable-sync-app-list", |
| 1182 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_NAME, |
| 1183 | IDS_FLAGS_ENABLE_SYNC_APP_LIST_DESCRIPTION, |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1184 | kOsDesktop, |
[email protected] | 4734b90 | 2014-04-03 16:42:10 | [diff] [blame] | 1185 | MULTI_VALUE_TYPE(kEnableSyncAppListChoices) |
[email protected] | 630a27a | 2014-01-15 08:24:09 | [diff] [blame] | 1186 | }, |
| 1187 | #endif |
[email protected] | ddec1aa | 2013-04-28 23:22:45 | [diff] [blame] | 1188 | { |
[email protected] | fd03014 | 2013-02-08 02:04:38 | [diff] [blame] | 1189 | "enable-usermedia-screen-capture", |
| 1190 | IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME, |
| 1191 | IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION, |
| 1192 | kOsDesktop, |
| 1193 | SINGLE_VALUE_TYPE(switches::kEnableUserMediaScreenCapturing) |
| 1194 | }, |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1195 | #if defined(OS_MACOSX) |
| 1196 | { |
[email protected] | 0039b0be | 2014-03-12 20:24:11 | [diff] [blame] | 1197 | "enable-avfoundation", |
| 1198 | IDS_FLAGS_ENABLE_AVFOUNDATION_NAME, |
| 1199 | IDS_FLAGS_ENABLE_AVFOUNDATION_DESCRIPTION, |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1200 | kOsMac, |
[email protected] | 0039b0be | 2014-03-12 20:24:11 | [diff] [blame] | 1201 | SINGLE_VALUE_TYPE(switches::kEnableAVFoundation) |
[email protected] | d41cf1b | 2014-02-21 01:24:35 | [diff] [blame] | 1202 | }, |
| 1203 | #endif |
[email protected] | 5b93e16 | 2013-02-19 06:33:09 | [diff] [blame] | 1204 | { |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1205 | "impl-side-painting", |
| 1206 | IDS_FLAGS_IMPL_SIDE_PAINTING_NAME, |
| 1207 | IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1208 | kOsAll, |
[email protected] | 9323fdd1 | 2013-02-23 00:31:36 | [diff] [blame] | 1209 | MULTI_VALUE_TYPE(kImplSidePaintingChoices) |
| 1210 | }, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1211 | { |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1212 | "lcd-text-aa", |
| 1213 | IDS_FLAGS_LCD_TEXT_NAME, |
| 1214 | IDS_FLAGS_LCD_TEXT_DESCRIPTION, |
| 1215 | kOsDesktop, |
| 1216 | MULTI_VALUE_TYPE(kLCDTextChoices) |
| 1217 | }, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1218 | #ifndef USE_AURA |
[email protected] | 7621af2 | 2013-09-12 23:06:33 | [diff] [blame] | 1219 | { |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1220 | "delegated-renderer", |
| 1221 | IDS_FLAGS_DELEGATED_RENDERER_NAME, |
| 1222 | IDS_FLAGS_DELEGATED_RENDERER_DESCRIPTION, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1223 | kOsAndroid, |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1224 | MULTI_VALUE_TYPE(kDelegatedRendererChoices) |
| 1225 | }, |
[email protected] | 758efb0 | 2014-04-05 07:53:45 | [diff] [blame] | 1226 | #endif |
[email protected] | 0c04d1c | 2013-07-10 00:02:32 | [diff] [blame] | 1227 | { |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1228 | "max-tiles-for-interest-area", |
| 1229 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_NAME, |
| 1230 | IDS_FLAGS_MAX_TILES_FOR_INTEREST_AREA_DESCRIPTION, |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1231 | kOsAll, |
[email protected] | a42c85f | 2013-04-04 18:15:12 | [diff] [blame] | 1232 | MULTI_VALUE_TYPE(kMaxTilesForInterestAreaChoices) |
| 1233 | }, |
[email protected] | 7cf7ccb | 2013-04-20 02:53:08 | [diff] [blame] | 1234 | { |
| 1235 | "enable-offline-mode", |
| 1236 | IDS_FLAGS_ENABLE_OFFLINE_MODE_NAME, |
| 1237 | IDS_FLAGS_ENABLE_OFFLINE_MODE_DESCRIPTION, |
| 1238 | kOsAll, |
| 1239 | SINGLE_VALUE_TYPE(switches::kEnableOfflineCacheAccess) |
| 1240 | }, |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 1241 | { |
[email protected] | 5676e748 | 2013-12-17 08:05:37 | [diff] [blame] | 1242 | "enable-offline-auto-reload", |
| 1243 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_NAME, |
| 1244 | IDS_FLAGS_ENABLE_OFFLINE_AUTO_RELOAD_DESCRIPTION, |
| 1245 | kOsAll, |
| 1246 | SINGLE_VALUE_TYPE(switches::kEnableOfflineAutoReload) |
| 1247 | }, |
| 1248 | { |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1249 | "enable-offline-load-stale-cache", |
| 1250 | IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_NAME, |
| 1251 | IDS_FLAGS_ENABLE_OFFLINE_LOAD_STALE_DESCRIPTION, |
| 1252 | kOsLinux | kOsMac | kOsWin | kOsAndroid, |
[email protected] | e83140a0 | 2014-05-07 14:04:58 | [diff] [blame] | 1253 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflineLoadStaleCache, |
| 1254 | switches::kDisableOfflineLoadStaleCache) |
[email protected] | d8bc913 | 2014-05-02 15:56:37 | [diff] [blame] | 1255 | }, |
| 1256 | { |
[email protected] | a361812 | 2013-04-26 21:15:34 | [diff] [blame] | 1257 | "default-tile-width", |
| 1258 | IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME, |
| 1259 | IDS_FLAGS_DEFAULT_TILE_WIDTH_DESCRIPTION, |
| 1260 | kOsAll, |
| 1261 | MULTI_VALUE_TYPE(kDefaultTileWidthChoices) |
| 1262 | }, |
| 1263 | { |
| 1264 | "default-tile-height", |
| 1265 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_NAME, |
| 1266 | IDS_FLAGS_DEFAULT_TILE_HEIGHT_DESCRIPTION, |
| 1267 | kOsAll, |
| 1268 | MULTI_VALUE_TYPE(kDefaultTileHeightChoices) |
| 1269 | }, |
[email protected] | 8cc71d4 | 2013-03-02 17:26:08 | [diff] [blame] | 1270 | #if defined(OS_ANDROID) |
| 1271 | { |
| 1272 | "disable-gesture-requirement-for-media-playback", |
| 1273 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME, |
| 1274 | IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION, |
| 1275 | kOsAndroid, |
| 1276 | SINGLE_VALUE_TYPE(switches::kDisableGestureRequirementForMediaPlayback) |
| 1277 | }, |
| 1278 | #endif |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1279 | #if defined(OS_CHROMEOS) |
| 1280 | { |
| 1281 | "enable-virtual-keyboard", |
| 1282 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_NAME, |
| 1283 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_DESCRIPTION, |
| 1284 | kOsCrOS, |
| 1285 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableVirtualKeyboard) |
| 1286 | }, |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1287 | { |
[email protected] | bb6378fe | 2014-04-28 21:19:44 | [diff] [blame] | 1288 | "enable-virtual-keyboard-overscroll", |
| 1289 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_NAME, |
| 1290 | IDS_FLAGS_ENABLE_VIRTUAL_KEYBOARD_OVERSCROLL_DESCRIPTION, |
| 1291 | kOsCrOS, |
| 1292 | ENABLE_DISABLE_VALUE_TYPE( |
| 1293 | keyboard::switches::kEnableVirtualKeyboardOverscroll, |
| 1294 | keyboard::switches::kDisableVirtualKeyboardOverscroll) |
| 1295 | }, |
| 1296 | { |
[email protected] | 8b4321e | 2013-10-25 01:16:18 | [diff] [blame] | 1297 | "enable-swipe-selection", |
| 1298 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_NAME, |
| 1299 | IDS_FLAGS_ENABLE_SWIPE_SELECTION_DESCRIPTION, |
| 1300 | kOsCrOS, |
| 1301 | SINGLE_VALUE_TYPE(keyboard::switches::kEnableSwipeSelection) |
| 1302 | }, |
[email protected] | 0e627fb1 | 2014-03-25 18:18:53 | [diff] [blame] | 1303 | { |
| 1304 | "enable-input-view", |
| 1305 | IDS_FLAGS_ENABLE_INPUT_VIEW_NAME, |
| 1306 | IDS_FLAGS_ENABLE_INPUT_VIEW_DESCRIPTION, |
| 1307 | kOsCrOS, |
| 1308 | ENABLE_DISABLE_VALUE_TYPE(keyboard::switches::kEnableInputView, |
| 1309 | keyboard::switches::kDisableInputView) |
| 1310 | }, |
[email protected] | 86459e2c | 2013-04-10 13:39:24 | [diff] [blame] | 1311 | #endif |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1312 | { |
| 1313 | "enable-simple-cache-backend", |
| 1314 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME, |
| 1315 | IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION, |
[email protected] | 957cd5a | 2014-03-27 19:54:17 | [diff] [blame] | 1316 | kOsWin | kOsMac | kOsLinux | kOsCrOS, |
[email protected] | 38484df1 | 2013-04-10 16:42:03 | [diff] [blame] | 1317 | MULTI_VALUE_TYPE(kSimpleCacheBackendChoices) |
| 1318 | }, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1319 | { |
| 1320 | "enable-tcp-fast-open", |
| 1321 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME, |
| 1322 | IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION, |
[email protected] | d0a8a16 | 2013-04-13 01:37:11 | [diff] [blame] | 1323 | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | 717e4e2 | 2013-04-10 20:52:23 | [diff] [blame] | 1324 | SINGLE_VALUE_TYPE(switches::kEnableTcpFastOpen) |
| 1325 | }, |
[email protected] | 8027acd | 2013-04-18 08:35:15 | [diff] [blame] | 1326 | { |
[email protected] | ab00b9b | 2014-05-01 22:20:25 | [diff] [blame] | 1327 | "apps-use-native-frame", |
| 1328 | IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_NAME, |
| 1329 | IDS_FLAGS_ENABLE_NATIVE_FRAMES_FOR_APPS_DESCRIPTION, |
| 1330 | kOsMac, |
| 1331 | SINGLE_VALUE_TYPE(switches::kAppsUseNativeFrame) |
| 1332 | }, |
| 1333 | { |
[email protected] | 896d86b3 | 2013-05-09 19:36:44 | [diff] [blame] | 1334 | "enable-syncfs-directory-operation", |
| 1335 | IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_NAME, |
| 1336 | IDS_FLAGS_ENABLE_SYNC_DIRECTORY_OPERATION_DESCRIPTION, |
| 1337 | kOsAll, |
| 1338 | SINGLE_VALUE_TYPE(switches::kSyncfsEnableDirectoryOperation), |
| 1339 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1340 | #if defined(ENABLE_SERVICE_DISCOVERY) |
[email protected] | a4ed7e1 | 2013-05-24 01:00:28 | [diff] [blame] | 1341 | { |
[email protected] | 2f7992ba | 2013-09-08 23:44:57 | [diff] [blame] | 1342 | "disable-device-discovery", |
| 1343 | IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_NAME, |
| 1344 | IDS_FLAGS_DISABLE_DEVICE_DISCOVERY_DESCRIPTION, |
| 1345 | kOsWin | kOsLinux | kOsCrOS, |
| 1346 | SINGLE_VALUE_TYPE(switches::kDisableDeviceDiscovery) |
[email protected] | 9f94a6c4 | 2013-07-11 18:49:15 | [diff] [blame] | 1347 | }, |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1348 | { |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1349 | "device-discovery-notifications", |
| 1350 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_NAME, |
| 1351 | IDS_FLAGS_DEVICE_DISCOVERY_NOTIFICATIONS_DESCRIPTION, |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1352 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | d394d976 | 2013-09-22 06:00:25 | [diff] [blame] | 1353 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications, |
| 1354 | switches::kDisableDeviceDiscoveryNotifications) |
[email protected] | 9486892 | 2013-09-19 18:00:55 | [diff] [blame] | 1355 | }, |
[email protected] | 53ffe0d | 2013-10-30 01:20:40 | [diff] [blame] | 1356 | { |
[email protected] | f039239 | 2014-03-10 20:07:52 | [diff] [blame] | 1357 | "enable-print-preview-register-promos", |
| 1358 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_NAME, |
| 1359 | IDS_FLAGS_ENABLE_PRINT_PREVIEW_REGISTER_PROMOS_DESCRIPTION, |
| 1360 | kOsWin | kOsLinux | kOsCrOS, |
| 1361 | SINGLE_VALUE_TYPE(switches::kEnablePrintPreviewRegisterPromos) |
| 1362 | }, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1363 | #endif // ENABLE_SERVICE_DISCOVERY |
[email protected] | ca53b14 | 2014-02-25 22:42:23 | [diff] [blame] | 1364 | #if defined(OS_WIN) |
| 1365 | { |
| 1366 | "enable-cloud-print-xps", |
| 1367 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_NAME, |
| 1368 | IDS_FLAGS_ENABLE_CLOUD_PRINT_XPS_DESCRIPTION, |
| 1369 | kOsWin, |
| 1370 | SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps) |
| 1371 | }, |
| 1372 | #endif |
[email protected] | 56d3c6e4 | 2013-05-29 11:28:01 | [diff] [blame] | 1373 | #if defined(OS_MACOSX) |
| 1374 | { |
[email protected] | a9397d6 | 2013-12-30 06:31:36 | [diff] [blame] | 1375 | "disable-app-shims", |
| 1376 | IDS_FLAGS_DISABLE_APP_SHIMS_NAME, |
| 1377 | IDS_FLAGS_DISABLE_APP_SHIMS_DESCRIPTION, |
[email protected] | cb29e16 | 2013-05-31 07:47:02 | [diff] [blame] | 1378 | kOsMac, |
[email protected] | a9397d6 | 2013-12-30 06:31:36 | [diff] [blame] | 1379 | SINGLE_VALUE_TYPE(switches::kDisableAppShims) |
[email protected] | cb29e16 | 2013-05-31 07:47:02 | [diff] [blame] | 1380 | }, |
[email protected] | 6760444 | 2013-06-15 00:04:33 | [diff] [blame] | 1381 | { |
| 1382 | "enable-simplified-fullscreen", |
| 1383 | IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_NAME, |
| 1384 | IDS_FLAGS_ENABLE_SIMPLIFIED_FULLSCREEN_DESCRIPTION, |
| 1385 | kOsMac, |
| 1386 | SINGLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreen) |
| 1387 | }, |
[email protected] | 56d3c6e4 | 2013-05-29 11:28:01 | [diff] [blame] | 1388 | #endif |
[email protected] | 910ecfe | 2013-06-03 23:38:14 | [diff] [blame] | 1389 | #if defined(USE_AURA) |
| 1390 | { |
| 1391 | "tab-capture-upscale-quality", |
| 1392 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_NAME, |
| 1393 | IDS_FLAGS_TAB_CAPTURE_UPSCALE_QUALITY_DESCRIPTION, |
| 1394 | kOsAll, |
| 1395 | MULTI_VALUE_TYPE(kTabCaptureUpscaleQualityChoices) |
| 1396 | }, |
| 1397 | { |
| 1398 | "tab-capture-downscale-quality", |
| 1399 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_NAME, |
| 1400 | IDS_FLAGS_TAB_CAPTURE_DOWNSCALE_QUALITY_DESCRIPTION, |
| 1401 | kOsAll, |
| 1402 | MULTI_VALUE_TYPE(kTabCaptureDownscaleQualityChoices) |
| 1403 | }, |
| 1404 | #endif |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1405 | { |
[email protected] | ba7993d | 2013-11-26 23:44:56 | [diff] [blame] | 1406 | "enable-spelling-feedback-field-trial", |
| 1407 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_NAME, |
| 1408 | IDS_FLAGS_ENABLE_SPELLING_FEEDBACK_FIELD_TRIAL_DESCRIPTION, |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1409 | kOsAll, |
[email protected] | ba7993d | 2013-11-26 23:44:56 | [diff] [blame] | 1410 | SINGLE_VALUE_TYPE(switches::kEnableSpellingFeedbackFieldTrial) |
[email protected] | 5e099c6 | 2013-06-08 05:46:23 | [diff] [blame] | 1411 | }, |
| 1412 | { |
[email protected] | 71d4f60 | 2013-06-04 23:21:10 | [diff] [blame] | 1413 | "enable-webgl-draft-extensions", |
| 1414 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_NAME, |
| 1415 | IDS_FLAGS_ENABLE_WEBGL_DRAFT_EXTENSIONS_DESCRIPTION, |
| 1416 | kOsAll, |
| 1417 | SINGLE_VALUE_TYPE(switches::kEnableWebGLDraftExtensions) |
| 1418 | }, |
[email protected] | deadc49 | 2013-06-07 21:39:28 | [diff] [blame] | 1419 | { |
[email protected] | bc1697a8 | 2013-06-27 15:48:31 | [diff] [blame] | 1420 | "enable-web-midi", |
| 1421 | IDS_FLAGS_ENABLE_WEB_MIDI_NAME, |
| 1422 | IDS_FLAGS_ENABLE_WEB_MIDI_DESCRIPTION, |
[email protected] | 28e56e9 | 2014-01-03 07:52:39 | [diff] [blame] | 1423 | kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
[email protected] | bc1697a8 | 2013-06-27 15:48:31 | [diff] [blame] | 1424 | SINGLE_VALUE_TYPE(switches::kEnableWebMIDI) |
| 1425 | }, |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1426 | { |
| 1427 | "enable-new-profile-management", |
| 1428 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_NAME, |
| 1429 | IDS_FLAGS_ENABLE_NEW_PROFILE_MANAGEMENT_DESCRIPTION, |
[email protected] | 10d817f9 | 2014-04-10 00:15:38 | [diff] [blame] | 1430 | kOsAndroid | kOsMac | kOsWin | kOsLinux, |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1431 | SINGLE_VALUE_TYPE(switches::kNewProfileManagement) |
| 1432 | }, |
| 1433 | { |
[email protected] | 8f56988 | 2014-03-25 21:12:12 | [diff] [blame] | 1434 | "enable-fast-user-switching", |
| 1435 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_NAME, |
| 1436 | IDS_FLAGS_ENABLE_FAST_USER_SWITCHING_DESCRIPTION, |
| 1437 | kOsMac | kOsWin | kOsLinux, |
| 1438 | SINGLE_VALUE_TYPE(switches::kFastUserSwitching) |
| 1439 | }, |
| 1440 | { |
[email protected] | 274171e | 2014-04-11 23:10:08 | [diff] [blame] | 1441 | "enable-new-avatar-menu", |
| 1442 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_NAME, |
| 1443 | IDS_FLAGS_ENABLE_NEW_AVATAR_MENU_DESCRIPTION, |
| 1444 | kOsMac | kOsWin | kOsLinux, |
| 1445 | SINGLE_VALUE_TYPE(switches::kNewAvatarMenu) |
| 1446 | }, |
| 1447 | { |
[email protected] | 85777bc | 2013-12-23 00:07:06 | [diff] [blame] | 1448 | "enable-web-based-signin", |
| 1449 | IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_NAME, |
| 1450 | IDS_FLAGS_ENABLE_WEB_BASED_SIGNIN_DESCRIPTION, |
[email protected] | 2d279f7 | 2013-10-21 23:10:16 | [diff] [blame] | 1451 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 85777bc | 2013-12-23 00:07:06 | [diff] [blame] | 1452 | SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin) |
[email protected] | 2d279f7 | 2013-10-21 23:10:16 | [diff] [blame] | 1453 | }, |
| 1454 | { |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1455 | "enable-google-profile-info", |
| 1456 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME, |
| 1457 | IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION, |
[email protected] | a9bf7d6 | 2013-07-11 22:11:22 | [diff] [blame] | 1458 | kOsMac | kOsWin | kOsLinux, |
[email protected] | 115d5728c | 2013-10-23 18:06:14 | [diff] [blame] | 1459 | SINGLE_VALUE_TYPE(switches::kGoogleProfileInfo) |
[email protected] | 020df79 | 2013-06-29 14:26:21 | [diff] [blame] | 1460 | }, |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1461 | { |
[email protected] | 056ed709 | 2014-01-09 12:57:21 | [diff] [blame] | 1462 | "reset-app-list-install-state", |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1463 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_NAME, |
| 1464 | IDS_FLAGS_RESET_APP_LIST_INSTALL_STATE_DESCRIPTION, |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1465 | kOsMac | kOsWin | kOsLinux, |
[email protected] | a85aa33 | 2013-10-22 11:09:59 | [diff] [blame] | 1466 | SINGLE_VALUE_TYPE(switches::kResetAppListInstallState) |
[email protected] | dcf6cf3 | 2013-07-03 10:53:28 | [diff] [blame] | 1467 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1468 | #if defined(ENABLE_APP_LIST) |
[email protected] | 7199367d | 2014-01-20 04:06:21 | [diff] [blame] | 1469 | #if defined(OS_LINUX) |
| 1470 | { |
| 1471 | // This is compiled out on non-Linux platforms because otherwise it would be |
| 1472 | // visible on Win/Mac/CrOS but not on Linux GTK, which would be confusing. |
| 1473 | // TODO(mgiuca): Remove the #if when Aura is the default on Linux. |
| 1474 | "enable-app-list", |
| 1475 | IDS_FLAGS_ENABLE_APP_LIST_NAME, |
| 1476 | IDS_FLAGS_ENABLE_APP_LIST_DESCRIPTION, |
| 1477 | kOsLinux, |
| 1478 | SINGLE_VALUE_TYPE(switches::kEnableAppList) |
| 1479 | }, |
| 1480 | #endif |
[email protected] | fe2b77f6 | 2013-11-09 04:30:51 | [diff] [blame] | 1481 | { |
[email protected] | 234d110b | 2014-01-16 22:09:15 | [diff] [blame] | 1482 | "disable-app-list-voice-search", |
| 1483 | IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH, |
| 1484 | IDS_FLAGS_DISABLE_APP_LIST_VOICE_SEARCH_DESCRIPTION, |
[email protected] | c879b65 | 2014-01-15 17:53:16 | [diff] [blame] | 1485 | kOsCrOS, |
[email protected] | 234d110b | 2014-01-16 22:09:15 | [diff] [blame] | 1486 | SINGLE_VALUE_TYPE(app_list::switches::kDisableVoiceSearch) |
[email protected] | c879b65 | 2014-01-15 17:53:16 | [diff] [blame] | 1487 | }, |
[email protected] | d6d86722 | 2014-02-06 11:09:58 | [diff] [blame] | 1488 | { |
| 1489 | "enable-app-list-app-info", |
| 1490 | IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST, |
| 1491 | IDS_FLAGS_ENABLE_APP_INFO_IN_APP_LIST_DESCRIPTION, |
| 1492 | kOsLinux | kOsWin | kOsCrOS, |
| 1493 | SINGLE_VALUE_TYPE(app_list::switches::kEnableAppInfo) |
| 1494 | }, |
[email protected] | 919b2f8 | 2013-10-04 03:11:26 | [diff] [blame] | 1495 | #endif |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1496 | #if defined(OS_ANDROID) |
| 1497 | { |
| 1498 | "enable-accessibility-tab-switcher", |
| 1499 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_NAME, |
| 1500 | IDS_FLAGS_ENABLE_ACCESSIBILITY_TAB_SWITCHER_DESCRIPTION, |
| 1501 | kOsAndroid, |
| 1502 | SINGLE_VALUE_TYPE(switches::kEnableAccessibilityTabSwitcher) |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1503 | }, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1504 | { |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1505 | // TODO(dmazzoni): remove this flag when native android accessibility |
| 1506 | // ships in the stable channel. http://crbug.com/356775 |
| 1507 | "enable-accessibility-script-injection", |
| 1508 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_NAME, |
| 1509 | IDS_FLAGS_ENABLE_ACCESSIBILITY_SCRIPT_INJECTION_DESCRIPTION, |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1510 | kOsAndroid, |
[email protected] | 0e17472 | 2014-03-31 21:23:27 | [diff] [blame] | 1511 | // Java-only switch: ContentSwitches.ENABLE_ACCESSIBILITY_SCRIPT_INJECTION. |
| 1512 | SINGLE_VALUE_TYPE("enable-accessibility-script-injection") |
[email protected] | 73838417 | 2013-12-05 01:59:56 | [diff] [blame] | 1513 | }, |
[email protected] | 0e38c325 | 2013-08-14 22:18:51 | [diff] [blame] | 1514 | #endif |
[email protected] | 2e9d79f | 2013-08-16 05:45:56 | [diff] [blame] | 1515 | { |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1516 | "enable-one-copy", |
| 1517 | IDS_FLAGS_ONE_COPY_NAME, |
| 1518 | IDS_FLAGS_ONE_COPY_DESCRIPTION, |
[email protected] | be2e40a | 2013-08-27 02:49:20 | [diff] [blame] | 1519 | kOsAll, |
[email protected] | 2cccfef | 2014-05-01 06:05:16 | [diff] [blame] | 1520 | SINGLE_VALUE_TYPE(switches::kEnableOneCopy) |
| 1521 | }, |
| 1522 | { |
| 1523 | "enable-zero-copy", |
| 1524 | IDS_FLAGS_ZERO_COPY_NAME, |
| 1525 | IDS_FLAGS_ZERO_COPY_DESCRIPTION, |
| 1526 | kOsAll, |
| 1527 | MULTI_VALUE_TYPE(kZeroCopyChoices) |
[email protected] | 4fdc518f | 2013-08-28 21:37:27 | [diff] [blame] | 1528 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1529 | #if defined(OS_CHROMEOS) |
| 1530 | { |
[email protected] | e384a9f | 2013-11-25 11:23:37 | [diff] [blame] | 1531 | "disable-first-run-ui", |
| 1532 | IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME, |
| 1533 | IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1534 | kOsCrOS, |
[email protected] | e384a9f | 2013-11-25 11:23:37 | [diff] [blame] | 1535 | SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI) |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1536 | }, |
[email protected] | 407d82b | 2013-12-13 11:50:59 | [diff] [blame] | 1537 | { |
| 1538 | "enable-first-run-ui-transitions", |
| 1539 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_NAME, |
| 1540 | IDS_FLAGS_ENABLE_FIRST_RUN_UI_TRANSITIONS_DESCRIPTION, |
| 1541 | kOsCrOS, |
| 1542 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUITransitions) |
| 1543 | }, |
[email protected] | bbb4beae | 2013-09-27 17:20:31 | [diff] [blame] | 1544 | #endif |
[email protected] | ed1aab1 | 2013-10-08 14:27:07 | [diff] [blame] | 1545 | { |
| 1546 | "disable-compositor-touch-hit-testing", |
| 1547 | IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME, |
| 1548 | IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION, |
| 1549 | kOsAll, |
| 1550 | SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting), |
| 1551 | }, |
[email protected] | 6dd2053b | 2013-10-09 16:29:54 | [diff] [blame] | 1552 | { |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1553 | "enable-streamlined-hosted-apps", |
| 1554 | IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_NAME, |
| 1555 | IDS_FLAGS_ENABLE_STREAMLINED_HOSTED_APPS_DESCRIPTION, |
[email protected] | abe7f872 | 2013-12-13 11:38:06 | [diff] [blame] | 1556 | kOsWin | kOsCrOS | kOsLinux, |
[email protected] | f95e6df | 2013-10-11 13:05:17 | [diff] [blame] | 1557 | SINGLE_VALUE_TYPE(switches::kEnableStreamlinedHostedApps) |
| 1558 | }, |
[email protected] | a0ef521 | 2013-10-15 18:08:26 | [diff] [blame] | 1559 | { |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1560 | "enable-ephemeral-apps", |
| 1561 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_NAME, |
| 1562 | IDS_FLAGS_ENABLE_EPHEMERAL_APPS_DESCRIPTION, |
[email protected] | b1004995 | 2013-11-28 07:06:26 | [diff] [blame] | 1563 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 912576e | 2013-10-21 10:33:13 | [diff] [blame] | 1564 | SINGLE_VALUE_TYPE(switches::kEnableEphemeralApps) |
| 1565 | }, |
| 1566 | { |
[email protected] | 5ec6705 | 2013-12-19 05:40:21 | [diff] [blame] | 1567 | "enable-linkable-ephemeral-apps", |
| 1568 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_NAME, |
| 1569 | IDS_FLAGS_ENABLE_LINKABLE_EPHEMERAL_APPS_DESCRIPTION, |
| 1570 | kOsWin | kOsLinux | kOsCrOS, |
| 1571 | SINGLE_VALUE_TYPE(switches::kEnableLinkableEphemeralApps) |
| 1572 | }, |
| 1573 | { |
[email protected] | a0ef521 | 2013-10-15 18:08:26 | [diff] [blame] | 1574 | "enable-service-worker", |
| 1575 | IDS_FLAGS_ENABLE_SERVICE_WORKER_NAME, |
| 1576 | IDS_FLAGS_ENABLE_SERVICE_WORKER_DESCRIPTION, |
| 1577 | kOsAll, |
| 1578 | SINGLE_VALUE_TYPE(switches::kEnableServiceWorker) |
| 1579 | }, |
[email protected] | 7d8056d | 2014-04-14 15:55:21 | [diff] [blame] | 1580 | { |
| 1581 | "enable-service-worker-sync", |
| 1582 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_NAME, |
| 1583 | IDS_FLAGS_ENABLE_SERVICE_WORKER_SYNC_DESCRIPTION, |
| 1584 | kOsAll, |
| 1585 | SINGLE_VALUE_TYPE(switches::kEnableServiceWorkerSync) |
| 1586 | }, |
[email protected] | dfb66c52 | 2013-10-22 19:46:32 | [diff] [blame] | 1587 | #if defined(OS_ANDROID) |
| 1588 | { |
| 1589 | "disable-click-delay", |
| 1590 | IDS_FLAGS_DISABLE_CLICK_DELAY_NAME, |
| 1591 | IDS_FLAGS_DISABLE_CLICK_DELAY_DESCRIPTION, |
| 1592 | kOsAndroid, |
| 1593 | // Java-only switch: CommandLine.DISABLE_CLICK_DELAY |
| 1594 | SINGLE_VALUE_TYPE("disable-click-delay") |
| 1595 | }, |
| 1596 | #endif |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1597 | #if defined(OS_MACOSX) |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1598 | { |
| 1599 | "enable-translate-new-ux", |
| 1600 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_NAME, |
| 1601 | IDS_FLAGS_ENABLE_TRANSLATE_NEW_UX_DESCRIPTION, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1602 | kOsMac, |
[email protected] | c2c84ab | 2013-11-18 03:05:09 | [diff] [blame] | 1603 | SINGLE_VALUE_TYPE(switches::kEnableTranslateNewUX) |
| 1604 | }, |
[email protected] | 5a60659 | 2014-01-31 10:32:31 | [diff] [blame] | 1605 | #endif |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1606 | #if defined(TOOLKIT_VIEWS) |
| 1607 | { |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1608 | "disable-views-rect-based-targeting", // FLAGS:RECORD_UMA |
| 1609 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_NAME, |
| 1610 | IDS_FLAGS_DISABLE_VIEWS_RECT_BASED_TARGETING_DESCRIPTION, |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1611 | kOsCrOS | kOsWin, |
[email protected] | 88b47ad7 | 2013-11-21 03:34:38 | [diff] [blame] | 1612 | SINGLE_VALUE_TYPE(views::switches::kDisableViewsRectBasedTargeting) |
[email protected] | c4f51d2 | 2013-11-05 03:11:26 | [diff] [blame] | 1613 | }, |
| 1614 | #endif |
[email protected] | 9f26807 | 2013-11-07 00:02:15 | [diff] [blame] | 1615 | { |
| 1616 | "enable-apps-show-on-first-paint", |
| 1617 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_NAME, |
| 1618 | IDS_FLAGS_ENABLE_APPS_SHOW_ON_FIRST_PAINT_DESCRIPTION, |
| 1619 | kOsDesktop, |
| 1620 | SINGLE_VALUE_TYPE(switches::kEnableAppsShowOnFirstPaint) |
| 1621 | }, |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1622 | { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1623 | "enhanced-bookmarks-experiment", |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1624 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1625 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
| 1626 | kOsDesktop, |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1627 | ENABLE_DISABLE_VALUE_TYPE_AND_VALUE( |
| 1628 | switches::kEnhancedBookmarksExperiment, "1", |
| 1629 | switches::kEnhancedBookmarksExperiment, "0") |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1630 | }, |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1631 | { |
| 1632 | "manual-enhanced-bookmarks", |
| 1633 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1634 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
| 1635 | kOsDesktop, |
| 1636 | SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarks) |
| 1637 | }, |
| 1638 | { |
| 1639 | "manual-enhanced-bookmarks-optout", |
| 1640 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_NAME, |
| 1641 | IDS_FLAGS_ENABLE_ENHANCED_BOOKMARKS_DESCRIPTION, |
| 1642 | kOsDesktop, |
| 1643 | SINGLE_VALUE_TYPE(switches::kManualEnhancedBookmarksOptout) |
| 1644 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1645 | #if defined(OS_ANDROID) |
| 1646 | { |
| 1647 | "enable-zero-suggest-experiment", |
| 1648 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_NAME, |
| 1649 | IDS_FLAGS_ZERO_SUGGEST_EXPERIMENT_DESCRIPTION, |
| 1650 | kOsAndroid, |
| 1651 | MULTI_VALUE_TYPE(kZeroSuggestExperimentsChoices) |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1652 | }, |
[email protected] | d5874f1 | 2013-12-05 04:30:00 | [diff] [blame] | 1653 | #endif |
[email protected] | 1a82f737 | 2013-12-06 12:46:52 | [diff] [blame] | 1654 | { |
| 1655 | "num-raster-threads", |
| 1656 | IDS_FLAGS_NUM_RASTER_THREADS_NAME, |
| 1657 | IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION, |
| 1658 | kOsAll, |
| 1659 | MULTI_VALUE_TYPE(kNumRasterThreadsChoices) |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1660 | }, |
| 1661 | { |
| 1662 | "origin-chip", |
| 1663 | IDS_FLAGS_ORIGIN_CHIP_NAME, |
| 1664 | IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION, |
[email protected] | 393a646 | 2014-04-28 15:28:27 | [diff] [blame] | 1665 | kOsCrOS | kOsWin | kOsLinux, |
[email protected] | 78dd09e | 2014-01-12 02:41:46 | [diff] [blame] | 1666 | MULTI_VALUE_TYPE(kOriginChipChoices) |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1667 | }, |
| 1668 | { |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 1669 | "origin-chip-in-omnibox", |
| 1670 | IDS_FLAGS_ORIGIN_CHIP_V2_NAME, |
| 1671 | IDS_FLAGS_ORIGIN_CHIP_V2_DESCRIPTION, |
[email protected] | 393a646 | 2014-04-28 15:28:27 | [diff] [blame] | 1672 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | 7a54bf4b | 2014-02-06 19:21:54 | [diff] [blame] | 1673 | MULTI_VALUE_TYPE(kOriginChipV2Choices) |
| 1674 | }, |
| 1675 | { |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1676 | "search-button-in-omnibox", |
| 1677 | IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME, |
| 1678 | IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION, |
[email protected] | 266cd0a | 2014-05-07 19:55:05 | [diff] [blame] | 1679 | kOsCrOS | kOsMac | kOsWin | kOsLinux, |
[email protected] | dc920d6 | 2013-12-13 22:12:47 | [diff] [blame] | 1680 | MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices) |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 1681 | }, |
| 1682 | { |
[email protected] | b785898a | 2014-02-05 06:54:43 | [diff] [blame] | 1683 | "disable-ignore-autocomplete-off", |
| 1684 | IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_NAME, |
| 1685 | IDS_FLAGS_DISABLE_IGNORE_AUTOCOMPLETE_OFF_DESCRIPTION, |
[email protected] | 58bc1c3 | 2013-12-16 22:52:07 | [diff] [blame] | 1686 | kOsAll, |
[email protected] | b785898a | 2014-02-05 06:54:43 | [diff] [blame] | 1687 | SINGLE_VALUE_TYPE(autofill::switches::kDisableIgnoreAutocompleteOff) |
[email protected] | 7cffac7 | 2013-12-20 20:21:50 | [diff] [blame] | 1688 | }, |
[email protected] | 7cffac7 | 2013-12-20 20:21:50 | [diff] [blame] | 1689 | { |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1690 | "enable-permissions-bubbles", |
| 1691 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_NAME, |
| 1692 | IDS_FLAGS_ENABLE_PERMISSIONS_BUBBLES_DESCRIPTION, |
[email protected] | 8076a5e3 | 2014-04-17 19:19:20 | [diff] [blame] | 1693 | kOsCrOS | kOsMac | kOsWin, |
[email protected] | 24ad5878 | 2014-01-23 23:43:45 | [diff] [blame] | 1694 | SINGLE_VALUE_TYPE(switches::kEnablePermissionsBubbles) |
| 1695 | }, |
[email protected] | 4d11b08b | 2014-01-27 22:19:07 | [diff] [blame] | 1696 | { |
[email protected] | 546d8d3 | 2014-04-30 15:40:46 | [diff] [blame] | 1697 | "enable-session-crashed-bubble", |
| 1698 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_NAME, |
| 1699 | IDS_FLAGS_ENABLE_SESSION_CRASHED_BUBBLE_DESCRIPTION, |
| 1700 | kOsWin | kOsLinux, |
| 1701 | SINGLE_VALUE_TYPE(switches::kEnableSessionCrashedBubble) |
| 1702 | }, |
| 1703 | { |
[email protected] | 1231adf | 2014-01-31 02:22:33 | [diff] [blame] | 1704 | "out-of-process-pdf", |
| 1705 | IDS_FLAGS_OUT_OF_PROCESS_PDF_NAME, |
| 1706 | IDS_FLAGS_OUT_OF_PROCESS_PDF_DESCRIPTION, |
| 1707 | kOsDesktop, |
| 1708 | SINGLE_VALUE_TYPE(switches::kOutOfProcessPdf) |
| 1709 | }, |
[email protected] | 181624c | 2014-02-04 17:03:34 | [diff] [blame] | 1710 | #if defined(OS_ANDROID) |
| 1711 | { |
[email protected] | 7073b188 | 2014-02-11 23:24:46 | [diff] [blame] | 1712 | "enable-fast-text-autosizing", |
| 1713 | IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_NAME, |
| 1714 | IDS_FLAGS_ENABLE_FAST_TEXT_AUTOSIZING_DESCRIPTION, |
| 1715 | kOsAndroid, |
[email protected] | c40a748 | 2014-03-21 20:27:29 | [diff] [blame] | 1716 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableFastTextAutosizing, |
| 1717 | switches::kDisableFastTextAutosizing) |
[email protected] | 7073b188 | 2014-02-11 23:24:46 | [diff] [blame] | 1718 | }, |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1719 | { |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1720 | "disable-cast", |
| 1721 | IDS_FLAGS_DISABLE_CAST_NAME, |
| 1722 | IDS_FLAGS_DISABLE_CAST_DESCRIPTION, |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1723 | kOsAndroid, |
[email protected] | 276bdfa5 | 2014-02-24 14:03:09 | [diff] [blame] | 1724 | SINGLE_VALUE_TYPE(switches::kDisableCast) |
[email protected] | 30a8cec9 | 2014-02-24 10:09:09 | [diff] [blame] | 1725 | }, |
[email protected] | 181624c | 2014-02-04 17:03:34 | [diff] [blame] | 1726 | #endif |
[email protected] | 99af938 | 2014-02-12 09:02:55 | [diff] [blame] | 1727 | { |
| 1728 | "prefetch-search-results", |
| 1729 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_NAME, |
| 1730 | IDS_FLAGS_PREFETCH_SEARCH_RESULTS_DESCRIPTION, |
| 1731 | kOsDesktop, |
| 1732 | SINGLE_VALUE_TYPE(switches::kPrefetchSearchResults) |
| 1733 | }, |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1734 | #if defined(ENABLE_APP_LIST) |
| 1735 | { |
| 1736 | "enable-experimental-app-list", |
| 1737 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME, |
| 1738 | IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION, |
| 1739 | kOsWin | kOsLinux | kOsCrOS, |
| 1740 | SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList) |
| 1741 | }, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1742 | { |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1743 | "enable-centered-app-list", |
| 1744 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_NAME, |
| 1745 | IDS_FLAGS_ENABLE_CENTERED_APP_LIST_DESCRIPTION, |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1746 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | 61bce699 | 2014-05-02 17:35:57 | [diff] [blame] | 1747 | SINGLE_VALUE_TYPE(app_list::switches::kEnableCenteredAppList) |
[email protected] | b18d5118 | 2014-03-13 10:38:27 | [diff] [blame] | 1748 | }, |
[email protected] | 9bd7657 | 2014-02-17 05:17:31 | [diff] [blame] | 1749 | #endif |
[email protected] | f42cffb | 2014-03-08 18:03:25 | [diff] [blame] | 1750 | { |
| 1751 | "touch-scrolling-mode", |
| 1752 | IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME, |
| 1753 | IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION, |
| 1754 | kOsWin | kOsLinux | kOsCrOS | kOsAndroid, |
| 1755 | MULTI_VALUE_TYPE(kTouchScrollingModeChoices) |
| 1756 | }, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1757 | { |
| 1758 | "bleeding-edge-renderer-mode", |
| 1759 | IDS_FLAGS_BLEEDING_RENDERER_NAME, |
| 1760 | IDS_FLAGS_BLEEDING_RENDERER_DESCRIPTION, |
[email protected] | a8a9751 | 2014-03-24 18:28:20 | [diff] [blame] | 1761 | kOsAndroid, |
[email protected] | 67c5a21 | 2014-03-17 12:28:00 | [diff] [blame] | 1762 | SINGLE_VALUE_TYPE(switches::kEnableBleedingEdgeRenderingFastPaths) |
| 1763 | }, |
[email protected] | 8a585cb | 2014-03-21 17:13:52 | [diff] [blame] | 1764 | { |
| 1765 | "enable-settings-window", |
| 1766 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_NAME, |
| 1767 | IDS_FLAGS_ENABLE_SETTINGS_WINDOW_DESCRIPTION, |
| 1768 | kOsDesktop, |
| 1769 | SINGLE_VALUE_TYPE(switches::kEnableSettingsWindow) |
| 1770 | }, |
[email protected] | 5a7a63a4 | 2014-03-26 04:19:30 | [diff] [blame] | 1771 | #if defined(OS_ANDROID) |
| 1772 | { |
| 1773 | "enable-instant-search-clicks", |
| 1774 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_NAME, |
| 1775 | IDS_FLAGS_ENABLE_INSTANT_SEARCH_CLICKS_DESCRIPTION, |
| 1776 | kOsAndroid, |
| 1777 | SINGLE_VALUE_TYPE(switches::kEnableInstantSearchClicks) |
| 1778 | }, |
| 1779 | #endif |
[email protected] | 4dffb66 | 2014-03-31 11:31:22 | [diff] [blame] | 1780 | { |
| 1781 | "enable-save-password-bubble", |
| 1782 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_NAME, |
| 1783 | IDS_FLAGS_ENABLE_SAVE_PASSWORD_BUBBLE_DESCRIPTION, |
| 1784 | kOsWin | kOsLinux | kOsCrOS, |
[email protected] | ea61c08 | 2014-04-07 16:57:24 | [diff] [blame] | 1785 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSavePasswordBubble, |
| 1786 | switches::kDisableSavePasswordBubble) |
[email protected] | 9804dad910 | 2014-04-01 09:34:18 | [diff] [blame] | 1787 | }, |
| 1788 | #if defined(GOOGLE_CHROME_BUILD) |
| 1789 | { |
| 1790 | "enable-easy-unlock", |
| 1791 | IDS_FLAGS_ENABLE_EASY_UNLOCK_NAME, |
| 1792 | IDS_FLAGS_ENABLE_EASY_UNLOCK_DESCRIPTION, |
| 1793 | kOsCrOS, |
| 1794 | SINGLE_VALUE_TYPE(switches::kEnableEasyUnlock) |
[email protected] | 212c774 | 2014-04-03 14:51:32 | [diff] [blame] | 1795 | }, |
[email protected] | 9804dad910 | 2014-04-01 09:34:18 | [diff] [blame] | 1796 | #endif |
[email protected] | 212c774 | 2014-04-03 14:51:32 | [diff] [blame] | 1797 | { |
[email protected] | 1ea08fc2 | 2014-04-22 14:28:06 | [diff] [blame] | 1798 | "disable-embedded-shared-worker", |
| 1799 | IDS_FLAGS_DISABLE_EMBEDDED_SHARED_WORKER_NAME, |
| 1800 | IDS_FLAGS_DISABLE_EMBEDDED_SHARED_WORKER_DESCRIPTION, |
[email protected] | 212c774 | 2014-04-03 14:51:32 | [diff] [blame] | 1801 | kOsDesktop, |
[email protected] | 1ea08fc2 | 2014-04-22 14:28:06 | [diff] [blame] | 1802 | SINGLE_VALUE_TYPE(switches::kDisableEmbeddedSharedWorker) |
[email protected] | 212c774 | 2014-04-03 14:51:32 | [diff] [blame] | 1803 | }, |
[email protected] | 6279f29 | 2014-04-16 16:59:56 | [diff] [blame] | 1804 | #if defined(OS_CHROMEOS) |
| 1805 | { |
| 1806 | "enable-filemanager-mtp", |
| 1807 | IDS_FLAGS_ENABLE_FILE_MANAGER_MTP_NAME, |
| 1808 | IDS_FLAGS_ENABLE_FILE_MANAGER_MTP_DESCRIPTION, |
| 1809 | kOsCrOS, |
| 1810 | SINGLE_VALUE_TYPE(chromeos::switches::kEnableFileManagerMTP) |
| 1811 | }, |
| 1812 | #endif |
[email protected] | 7fe71f0 | 2014-04-26 00:47:56 | [diff] [blame] | 1813 | // TODO(tyoshino): Remove this temporary flag and command line switch. See |
| 1814 | // crbug.com/366483 for the target milestone. |
| 1815 | { |
| 1816 | "allow-insecure-websocket-from-https-origin", |
| 1817 | IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_NAME, |
| 1818 | IDS_FLAGS_ALLOW_INSECURE_WEBSOCKET_FROM_HTTPS_ORIGIN_DESCRIPTION, |
| 1819 | kOsAll, |
| 1820 | SINGLE_VALUE_TYPE(switches::kAllowInsecureWebSocketFromHttpsOrigin) |
| 1821 | }, |
[email protected] | 425f7a0 | 2014-04-29 01:51:44 | [diff] [blame] | 1822 | #if defined(OS_MACOSX) |
| 1823 | { |
| 1824 | "apps-keep-chrome-alive", |
| 1825 | IDS_FLAGS_APPS_KEEP_CHROME_ALIVE_NAME, |
| 1826 | IDS_FLAGS_APPS_KEEP_CHROME_ALIVE_DESCRIPTION, |
| 1827 | kOsMac, |
| 1828 | SINGLE_VALUE_TYPE(switches::kAppsKeepChromeAlive) |
[email protected] | 64505f7 | 2014-04-29 11:07:52 | [diff] [blame] | 1829 | }, |
[email protected] | 425f7a0 | 2014-04-29 01:51:44 | [diff] [blame] | 1830 | #endif |
[email protected] | 64505f7 | 2014-04-29 11:07:52 | [diff] [blame] | 1831 | { |
| 1832 | "enable-apps-file-associations", |
| 1833 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME, |
| 1834 | IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_DESCRIPTION, |
| 1835 | kOsMac, |
| 1836 | SINGLE_VALUE_TYPE(switches::kEnableAppsFileAssociations) |
| 1837 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1838 | #if defined(OS_ANDROID) |
| 1839 | { |
| 1840 | "enable-embeddedsearch-api", |
| 1841 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_NAME, |
| 1842 | IDS_FLAGS_ENABLE_EMBEDDEDSEARCH_API_DESCRIPTION, |
| 1843 | kOsAndroid, |
| 1844 | SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI) |
| 1845 | }, |
[email protected] | 1d134929 | 2014-05-02 05:22:33 | [diff] [blame] | 1846 | { |
| 1847 | "enable-app-install-alerts", |
| 1848 | IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME, |
| 1849 | IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION, |
| 1850 | kOsAndroid, |
| 1851 | SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts) |
| 1852 | }, |
[email protected] | 0443e08 | 2014-04-30 04:52:50 | [diff] [blame] | 1853 | #endif |
[email protected] | b242b14 | 2014-05-07 14:48:49 | [diff] [blame] | 1854 | { |
| 1855 | "distance-field-text", |
| 1856 | IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME, |
| 1857 | IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION, |
| 1858 | kOsAll, |
| 1859 | MULTI_VALUE_TYPE(kDistanceFieldTextChoices) |
| 1860 | }, |
[email protected] | 8f374ce | 2014-05-08 23:51:52 | [diff] [blame^] | 1861 | #if defined(USE_AURA) |
| 1862 | { |
| 1863 | "text-input-focus-manager", |
| 1864 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_NAME, |
| 1865 | IDS_FLAGS_TEXT_INPUT_FOCUS_MANAGER_DESCRIPTION, |
| 1866 | kOsCrOS | kOsLinux | kOsWin, |
| 1867 | ENABLE_DISABLE_VALUE_TYPE(switches::kEnableTextInputFocusManager, |
| 1868 | switches::kDisableTextInputFocusManager) |
| 1869 | }, |
| 1870 | #endif |
[email protected] | a0e4b07 | 2011-08-17 01:47:07 | [diff] [blame] | 1871 | }; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1872 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1873 | const Experiment* experiments = kExperiments; |
| 1874 | size_t num_experiments = arraysize(kExperiments); |
| 1875 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1876 | // Stores and encapsulates the little state that about:flags has. |
| 1877 | class FlagsState { |
| 1878 | public: |
| 1879 | FlagsState() : needs_restart_(false) {} |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1880 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 1881 | CommandLine* command_line, |
| 1882 | SentinelsMode sentinels); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1883 | bool IsRestartNeededToCommitChanges(); |
| 1884 | void SetExperimentEnabled( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1885 | FlagsStorage* flags_storage, |
| 1886 | const std::string& internal_name, |
| 1887 | bool enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1888 | void RemoveFlagsSwitches( |
| 1889 | std::map<std::string, CommandLine::StringType>* switch_list); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1890 | void ResetAllFlags(FlagsStorage* flags_storage); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1891 | void reset(); |
| 1892 | |
| 1893 | // Returns the singleton instance of this class |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 1894 | static FlagsState* GetInstance() { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1895 | return Singleton<FlagsState>::get(); |
| 1896 | } |
| 1897 | |
| 1898 | private: |
| 1899 | bool needs_restart_; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1900 | std::map<std::string, std::string> flags_switches_; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 1901 | |
| 1902 | DISALLOW_COPY_AND_ASSIGN(FlagsState); |
| 1903 | }; |
| 1904 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1905 | // Adds the internal names for the specified experiment to |names|. |
| 1906 | void AddInternalName(const Experiment& e, std::set<std::string>* names) { |
| 1907 | if (e.type == Experiment::SINGLE_VALUE) { |
| 1908 | names->insert(e.internal_name); |
| 1909 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1910 | DCHECK(e.type == Experiment::MULTI_VALUE || |
| 1911 | e.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1912 | for (int i = 0; i < e.num_choices; ++i) |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1913 | names->insert(e.NameForChoice(i)); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1914 | } |
| 1915 | } |
| 1916 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1917 | // Confirms that an experiment is valid, used in a DCHECK in |
| 1918 | // SanitizeList below. |
| 1919 | bool ValidateExperiment(const Experiment& e) { |
| 1920 | switch (e.type) { |
| 1921 | case Experiment::SINGLE_VALUE: |
| 1922 | DCHECK_EQ(0, e.num_choices); |
| 1923 | DCHECK(!e.choices); |
| 1924 | break; |
| 1925 | case Experiment::MULTI_VALUE: |
| 1926 | DCHECK_GT(e.num_choices, 0); |
| 1927 | DCHECK(e.choices); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 1928 | DCHECK(e.choices[0].command_line_switch); |
| 1929 | DCHECK_EQ('\0', e.choices[0].command_line_switch[0]); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1930 | break; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 1931 | case Experiment::ENABLE_DISABLE_VALUE: |
| 1932 | DCHECK_EQ(3, e.num_choices); |
| 1933 | DCHECK(!e.choices); |
| 1934 | DCHECK(e.command_line_switch); |
| 1935 | DCHECK(e.command_line_value); |
| 1936 | DCHECK(e.disable_command_line_switch); |
| 1937 | DCHECK(e.disable_command_line_value); |
| 1938 | break; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1939 | default: |
| 1940 | NOTREACHED(); |
| 1941 | } |
| 1942 | return true; |
| 1943 | } |
| 1944 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1945 | // Removes all experiments from prefs::kEnabledLabsExperiments that are |
| 1946 | // unknown, to prevent this list to become very long as experiments are added |
| 1947 | // and removed. |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1948 | void SanitizeList(FlagsStorage* flags_storage) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1949 | std::set<std::string> known_experiments; |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1950 | for (size_t i = 0; i < num_experiments; ++i) { |
| 1951 | DCHECK(ValidateExperiment(experiments[i])); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 1952 | AddInternalName(experiments[i], &known_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 1953 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1954 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 1955 | std::set<std::string> enabled_experiments = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1956 | |
| 1957 | std::set<std::string> new_enabled_experiments; |
| 1958 | std::set_intersection( |
| 1959 | known_experiments.begin(), known_experiments.end(), |
| 1960 | enabled_experiments.begin(), enabled_experiments.end(), |
| 1961 | std::inserter(new_enabled_experiments, new_enabled_experiments.begin())); |
| 1962 | |
[email protected] | 07d666d | 2013-07-21 23:56:26 | [diff] [blame] | 1963 | if (new_enabled_experiments != enabled_experiments) |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1964 | flags_storage->SetFlags(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1965 | } |
| 1966 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 1967 | void GetSanitizedEnabledFlags( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1968 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 1969 | SanitizeList(flags_storage); |
| 1970 | *result = flags_storage->GetFlags(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 1971 | } |
| 1972 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1973 | bool SkipConditionalExperiment(const Experiment& experiment) { |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1974 | if (experiment.internal_name == |
| 1975 | std::string("enhanced-bookmarks-experiment")) { |
| 1976 | CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 1977 | // Dont't skip experiment if it has non default value. |
| 1978 | // It means user selected it. |
| 1979 | if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment)) |
| 1980 | return false; |
| 1981 | |
[email protected] | 1153455 | 2013-12-05 02:09:30 | [diff] [blame] | 1982 | return !IsEnhancedBookmarksExperimentEnabled(); |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1983 | } |
[email protected] | cb13d46 | 2014-03-14 21:38:58 | [diff] [blame] | 1984 | if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) || |
| 1985 | (experiment.internal_name == |
| 1986 | std::string("manual-enhanced-bookmarks-optout"))) { |
| 1987 | return true; |
| 1988 | } |
[email protected] | 4d7552f | 2014-03-04 04:53:33 | [diff] [blame] | 1989 | |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 1990 | return false; |
| 1991 | } |
| 1992 | |
| 1993 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1994 | // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 1995 | // enabled on the current platform. |
| 1996 | void GetSanitizedEnabledFlagsForCurrentPlatform( |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 1997 | FlagsStorage* flags_storage, std::set<std::string>* result) { |
| 1998 | GetSanitizedEnabledFlags(flags_storage, result); |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 1999 | |
| 2000 | // Filter out any experiments that aren't enabled on the current platform. We |
| 2001 | // don't remove these from prefs else syncing to a platform with a different |
| 2002 | // set of experiments would be lossy. |
| 2003 | std::set<std::string> platform_experiments; |
| 2004 | int current_platform = GetCurrentPlatform(); |
| 2005 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2006 | if (experiments[i].supported_platforms & current_platform) |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2007 | AddInternalName(experiments[i], &platform_experiments); |
[email protected] | 37736bd | 2013-04-18 11:53:58 | [diff] [blame] | 2008 | #if defined(OS_CHROMEOS) |
| 2009 | if (experiments[i].supported_platforms & kOsCrOSOwnerOnly) |
| 2010 | AddInternalName(experiments[i], &platform_experiments); |
| 2011 | #endif |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2012 | } |
| 2013 | |
| 2014 | std::set<std::string> new_enabled_experiments; |
| 2015 | std::set_intersection( |
| 2016 | platform_experiments.begin(), platform_experiments.end(), |
| 2017 | result->begin(), result->end(), |
| 2018 | std::inserter(new_enabled_experiments, new_enabled_experiments.begin())); |
| 2019 | |
| 2020 | result->swap(new_enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2021 | } |
| 2022 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2023 | // Returns the Value representing the choice data in the specified experiment. |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2024 | base::Value* CreateChoiceData( |
| 2025 | const Experiment& experiment, |
| 2026 | const std::set<std::string>& enabled_experiments) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2027 | DCHECK(experiment.type == Experiment::MULTI_VALUE || |
| 2028 | experiment.type == Experiment::ENABLE_DISABLE_VALUE); |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2029 | base::ListValue* result = new base::ListValue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2030 | for (int i = 0; i < experiment.num_choices; ++i) { |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2031 | base::DictionaryValue* value = new base::DictionaryValue; |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2032 | const std::string name = experiment.NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2033 | value->SetString("internal_name", name); |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2034 | value->SetString("description", experiment.DescriptionForChoice(i)); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2035 | value->SetBoolean("selected", enabled_experiments.count(name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2036 | result->Append(value); |
| 2037 | } |
| 2038 | return result; |
| 2039 | } |
| 2040 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2041 | } // namespace |
| 2042 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2043 | std::string Experiment::NameForChoice(int index) const { |
| 2044 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2045 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2046 | DCHECK_LT(index, num_choices); |
| 2047 | return std::string(internal_name) + testing::kMultiSeparator + |
| 2048 | base::IntToString(index); |
| 2049 | } |
| 2050 | |
[email protected] | 9692015 | 2013-12-04 21:00:16 | [diff] [blame] | 2051 | base::string16 Experiment::DescriptionForChoice(int index) const { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2052 | DCHECK(type == Experiment::MULTI_VALUE || |
| 2053 | type == Experiment::ENABLE_DISABLE_VALUE); |
| 2054 | DCHECK_LT(index, num_choices); |
| 2055 | int description_id; |
| 2056 | if (type == Experiment::ENABLE_DISABLE_VALUE) { |
| 2057 | const int kEnableDisableDescriptionIds[] = { |
| 2058 | IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, |
| 2059 | IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, |
| 2060 | IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, |
| 2061 | }; |
| 2062 | description_id = kEnableDisableDescriptionIds[index]; |
| 2063 | } else { |
| 2064 | description_id = choices[index].description_id; |
| 2065 | } |
| 2066 | return l10n_util::GetStringUTF16(description_id); |
| 2067 | } |
| 2068 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2069 | void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2070 | CommandLine* command_line, |
| 2071 | SentinelsMode sentinels) { |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2072 | FlagsState::GetInstance()->ConvertFlagsToSwitches(flags_storage, |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2073 | command_line, |
| 2074 | sentinels); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2075 | } |
| 2076 | |
[email protected] | 6d98abf | 2013-06-17 23:35:51 | [diff] [blame] | 2077 | bool AreSwitchesIdenticalToCurrentCommandLine( |
| 2078 | const CommandLine& new_cmdline, const CommandLine& active_cmdline) { |
| 2079 | std::set<CommandLine::StringType> new_flags = |
| 2080 | ExtractFlagsFromCommandLine(new_cmdline); |
| 2081 | std::set<CommandLine::StringType> active_flags = |
| 2082 | ExtractFlagsFromCommandLine(active_cmdline); |
| 2083 | |
| 2084 | // Needed because std::equal doesn't check if the 2nd set is empty. |
| 2085 | if (new_flags.size() != active_flags.size()) |
| 2086 | return false; |
| 2087 | |
| 2088 | return std::equal(new_flags.begin(), new_flags.end(), active_flags.begin()); |
| 2089 | } |
| 2090 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2091 | void GetFlagsExperimentsData(FlagsStorage* flags_storage, |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2092 | FlagAccess access, |
| 2093 | base::ListValue* supported_experiments, |
| 2094 | base::ListValue* unsupported_experiments) { |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2095 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2096 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2097 | |
| 2098 | int current_platform = GetCurrentPlatform(); |
| 2099 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2100 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2101 | const Experiment& experiment = experiments[i]; |
[email protected] | 1227163 | 2013-11-26 03:06:39 | [diff] [blame] | 2102 | if (SkipConditionalExperiment(experiment)) |
| 2103 | continue; |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2104 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2105 | base::DictionaryValue* data = new base::DictionaryValue(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2106 | data->SetString("internal_name", experiment.internal_name); |
| 2107 | data->SetString("name", |
| 2108 | l10n_util::GetStringUTF16(experiment.visible_name_id)); |
| 2109 | data->SetString("description", |
| 2110 | l10n_util::GetStringUTF16( |
| 2111 | experiment.visible_description_id)); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2112 | |
[email protected] | 5bcdd99d | 2013-12-23 18:28:30 | [diff] [blame] | 2113 | base::ListValue* supported_platforms = new base::ListValue(); |
[email protected] | cc3e205 | 2011-12-20 01:01:40 | [diff] [blame] | 2114 | AddOsStrings(experiment.supported_platforms, supported_platforms); |
| 2115 | data->Set("supported_platforms", supported_platforms); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2116 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2117 | switch (experiment.type) { |
| 2118 | case Experiment::SINGLE_VALUE: |
| 2119 | data->SetBoolean( |
| 2120 | "enabled", |
| 2121 | enabled_experiments.count(experiment.internal_name) > 0); |
| 2122 | break; |
| 2123 | case Experiment::MULTI_VALUE: |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2124 | case Experiment::ENABLE_DISABLE_VALUE: |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2125 | data->Set("choices", CreateChoiceData(experiment, enabled_experiments)); |
| 2126 | break; |
| 2127 | default: |
| 2128 | NOTREACHED(); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2129 | } |
| 2130 | |
[email protected] | ee28495a | 2013-05-20 04:10:52 | [diff] [blame] | 2131 | bool supported = (experiment.supported_platforms & current_platform) != 0; |
| 2132 | #if defined(OS_CHROMEOS) |
| 2133 | if (access == kOwnerAccessToFlags && |
| 2134 | (experiment.supported_platforms & kOsCrOSOwnerOnly) != 0) { |
| 2135 | supported = true; |
| 2136 | } |
| 2137 | #endif |
| 2138 | if (supported) |
| 2139 | supported_experiments->Append(data); |
| 2140 | else |
| 2141 | unsupported_experiments->Append(data); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2142 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2143 | } |
| 2144 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2145 | bool IsRestartNeededToCommitChanges() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2146 | return FlagsState::GetInstance()->IsRestartNeededToCommitChanges(); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2147 | } |
| 2148 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2149 | void SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2150 | const std::string& internal_name, |
| 2151 | bool enable) { |
| 2152 | FlagsState::GetInstance()->SetExperimentEnabled(flags_storage, |
| 2153 | internal_name, enable); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2154 | } |
| 2155 | |
| 2156 | void RemoveFlagsSwitches( |
| 2157 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2158 | FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2159 | } |
| 2160 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2161 | void ResetAllFlags(FlagsStorage* flags_storage) { |
| 2162 | FlagsState::GetInstance()->ResetAllFlags(flags_storage); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2163 | } |
| 2164 | |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2165 | int GetCurrentPlatform() { |
| 2166 | #if defined(OS_MACOSX) |
| 2167 | return kOsMac; |
| 2168 | #elif defined(OS_WIN) |
| 2169 | return kOsWin; |
| 2170 | #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 2171 | return kOsCrOS; |
[email protected] | c92f4ed | 2011-10-21 19:50:21 | [diff] [blame] | 2172 | #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2173 | return kOsLinux; |
[email protected] | 9c7453d | 2012-01-21 00:45:40 | [diff] [blame] | 2174 | #elif defined(OS_ANDROID) |
| 2175 | return kOsAndroid; |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2176 | #else |
| 2177 | #error Unknown platform |
| 2178 | #endif |
| 2179 | } |
| 2180 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2181 | void RecordUMAStatistics(FlagsStorage* flags_storage) { |
| 2182 | std::set<std::string> flags = flags_storage->GetFlags(); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2183 | for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); |
| 2184 | ++it) { |
| 2185 | std::string action("AboutFlags_"); |
| 2186 | action += *it; |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2187 | content::RecordComputedAction(action); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2188 | } |
| 2189 | // Since flag metrics are recorded every startup, add a tick so that the |
| 2190 | // stats can be made meaningful. |
| 2191 | if (flags.size()) |
[email protected] | 7f6f44c | 2011-12-14 13:23:38 | [diff] [blame] | 2192 | content::RecordAction(UserMetricsAction("AboutFlags_StartupTick")); |
| 2193 | content::RecordAction(UserMetricsAction("StartupTick")); |
[email protected] | 4bc5050c | 2010-11-18 17:55:54 | [diff] [blame] | 2194 | } |
| 2195 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2196 | ////////////////////////////////////////////////////////////////////////////// |
| 2197 | // FlagsState implementation. |
| 2198 | |
| 2199 | namespace { |
| 2200 | |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2201 | typedef std::map<std::string, std::pair<std::string, std::string> > |
| 2202 | NameToSwitchAndValueMap; |
| 2203 | |
| 2204 | void SetFlagToSwitchMapping(const std::string& key, |
| 2205 | const std::string& switch_name, |
| 2206 | const std::string& switch_value, |
| 2207 | NameToSwitchAndValueMap* name_to_switch_map) { |
| 2208 | DCHECK(name_to_switch_map->end() == name_to_switch_map->find(key)); |
| 2209 | (*name_to_switch_map)[key] = std::make_pair(switch_name, switch_value); |
| 2210 | } |
| 2211 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2212 | void FlagsState::ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
| 2213 | CommandLine* command_line, |
| 2214 | SentinelsMode sentinels) { |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2215 | if (command_line->HasSwitch(switches::kNoExperiments)) |
| 2216 | return; |
| 2217 | |
| 2218 | std::set<std::string> enabled_experiments; |
[email protected] | ba816424 | 2010-11-16 21:31:00 | [diff] [blame] | 2219 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2220 | GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage, |
| 2221 | &enabled_experiments); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2222 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2223 | NameToSwitchAndValueMap name_to_switch_map; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2224 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2225 | const Experiment& e = experiments[i]; |
| 2226 | if (e.type == Experiment::SINGLE_VALUE) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2227 | SetFlagToSwitchMapping(e.internal_name, e.command_line_switch, |
| 2228 | e.command_line_value, &name_to_switch_map); |
| 2229 | } else if (e.type == Experiment::MULTI_VALUE) { |
| 2230 | for (int j = 0; j < e.num_choices; ++j) { |
| 2231 | SetFlagToSwitchMapping(e.NameForChoice(j), |
| 2232 | e.choices[j].command_line_switch, |
| 2233 | e.choices[j].command_line_value, |
| 2234 | &name_to_switch_map); |
| 2235 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2236 | } else { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2237 | DCHECK_EQ(e.type, Experiment::ENABLE_DISABLE_VALUE); |
| 2238 | SetFlagToSwitchMapping(e.NameForChoice(0), std::string(), std::string(), |
| 2239 | &name_to_switch_map); |
| 2240 | SetFlagToSwitchMapping(e.NameForChoice(1), e.command_line_switch, |
| 2241 | e.command_line_value, &name_to_switch_map); |
| 2242 | SetFlagToSwitchMapping(e.NameForChoice(2), e.disable_command_line_switch, |
| 2243 | e.disable_command_line_value, &name_to_switch_map); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2244 | } |
| 2245 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2246 | |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2247 | if (sentinels == kAddSentinels) { |
| 2248 | command_line->AppendSwitch(switches::kFlagSwitchesBegin); |
| 2249 | flags_switches_.insert( |
| 2250 | std::pair<std::string, std::string>(switches::kFlagSwitchesBegin, |
| 2251 | std::string())); |
| 2252 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2253 | for (std::set<std::string>::iterator it = enabled_experiments.begin(); |
| 2254 | it != enabled_experiments.end(); |
| 2255 | ++it) { |
| 2256 | const std::string& experiment_name = *it; |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2257 | NameToSwitchAndValueMap::const_iterator name_to_switch_it = |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2258 | name_to_switch_map.find(experiment_name); |
| 2259 | if (name_to_switch_it == name_to_switch_map.end()) { |
| 2260 | NOTREACHED(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2261 | continue; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2262 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2263 | |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2264 | const std::pair<std::string, std::string>& |
| 2265 | switch_and_value_pair = name_to_switch_it->second; |
| 2266 | |
[email protected] | 9737b363 | 2013-08-26 09:23:23 | [diff] [blame] | 2267 | CHECK(!switch_and_value_pair.first.empty()); |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2268 | command_line->AppendSwitchASCII(switch_and_value_pair.first, |
| 2269 | switch_and_value_pair.second); |
| 2270 | flags_switches_[switch_and_value_pair.first] = switch_and_value_pair.second; |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2271 | } |
[email protected] | 578f209 | 2013-09-16 17:16:21 | [diff] [blame] | 2272 | if (sentinels == kAddSentinels) { |
| 2273 | command_line->AppendSwitch(switches::kFlagSwitchesEnd); |
| 2274 | flags_switches_.insert( |
| 2275 | std::pair<std::string, std::string>(switches::kFlagSwitchesEnd, |
| 2276 | std::string())); |
| 2277 | } |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2278 | } |
| 2279 | |
| 2280 | bool FlagsState::IsRestartNeededToCommitChanges() { |
| 2281 | return needs_restart_; |
| 2282 | } |
| 2283 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2284 | void FlagsState::SetExperimentEnabled(FlagsStorage* flags_storage, |
| 2285 | const std::string& internal_name, |
| 2286 | bool enable) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2287 | size_t at_index = internal_name.find(testing::kMultiSeparator); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2288 | if (at_index != std::string::npos) { |
| 2289 | DCHECK(enable); |
| 2290 | // We're being asked to enable a multi-choice experiment. Disable the |
| 2291 | // currently selected choice. |
| 2292 | DCHECK_NE(at_index, 0u); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2293 | const std::string experiment_name = internal_name.substr(0, at_index); |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2294 | SetExperimentEnabled(flags_storage, experiment_name, false); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2295 | |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2296 | // And enable the new choice, if it is not the default first choice. |
| 2297 | if (internal_name != experiment_name + "@0") { |
| 2298 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2299 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2300 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2301 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | 28e35af | 2011-02-09 12:56:22 | [diff] [blame] | 2302 | } |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2303 | return; |
| 2304 | } |
| 2305 | |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2306 | std::set<std::string> enabled_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2307 | GetSanitizedEnabledFlags(flags_storage, &enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2308 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2309 | const Experiment* e = NULL; |
| 2310 | for (size_t i = 0; i < num_experiments; ++i) { |
| 2311 | if (experiments[i].internal_name == internal_name) { |
| 2312 | e = experiments + i; |
| 2313 | break; |
| 2314 | } |
| 2315 | } |
| 2316 | DCHECK(e); |
| 2317 | |
| 2318 | if (e->type == Experiment::SINGLE_VALUE) { |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2319 | if (enable) |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2320 | needs_restart_ |= enabled_experiments.insert(internal_name).second; |
[email protected] | 8a271368 | 2011-08-19 10:36:59 | [diff] [blame] | 2321 | else |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2322 | needs_restart_ |= (enabled_experiments.erase(internal_name) > 0); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2323 | } else { |
| 2324 | if (enable) { |
| 2325 | // Enable the first choice. |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2326 | needs_restart_ |= enabled_experiments.insert(e->NameForChoice(0)).second; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2327 | } else { |
| 2328 | // Find the currently enabled choice and disable it. |
| 2329 | for (int i = 0; i < e->num_choices; ++i) { |
[email protected] | 83e9fa70 | 2013-02-25 19:30:44 | [diff] [blame] | 2330 | std::string choice_name = e->NameForChoice(i); |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2331 | if (enabled_experiments.find(choice_name) != |
| 2332 | enabled_experiments.end()) { |
[email protected] | 147492b | 2013-03-19 23:52:08 | [diff] [blame] | 2333 | needs_restart_ = true; |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2334 | enabled_experiments.erase(choice_name); |
| 2335 | // Continue on just in case there's a bug and more than one |
| 2336 | // experiment for this choice was enabled. |
| 2337 | } |
| 2338 | } |
| 2339 | } |
| 2340 | } |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2341 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2342 | flags_storage->SetFlags(enabled_experiments); |
[email protected] | ad2a3ded | 2010-08-27 13:19:05 | [diff] [blame] | 2343 | } |
| 2344 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2345 | void FlagsState::RemoveFlagsSwitches( |
| 2346 | std::map<std::string, CommandLine::StringType>* switch_list) { |
[email protected] | a8274453 | 2011-02-11 16:15:53 | [diff] [blame] | 2347 | for (std::map<std::string, std::string>::const_iterator |
| 2348 | it = flags_switches_.begin(); it != flags_switches_.end(); ++it) { |
| 2349 | switch_list->erase(it->first); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2350 | } |
| 2351 | } |
| 2352 | |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2353 | void FlagsState::ResetAllFlags(FlagsStorage* flags_storage) { |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2354 | needs_restart_ = true; |
| 2355 | |
| 2356 | std::set<std::string> no_experiments; |
[email protected] | e6d1c4f | 2013-06-12 17:37:40 | [diff] [blame] | 2357 | flags_storage->SetFlags(no_experiments); |
[email protected] | cb93bf5 | 2013-02-20 01:20:00 | [diff] [blame] | 2358 | } |
| 2359 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2360 | void FlagsState::reset() { |
| 2361 | needs_restart_ = false; |
| 2362 | flags_switches_.clear(); |
| 2363 | } |
| 2364 | |
[email protected] | 38e4681 | 2011-05-09 20:49:22 | [diff] [blame] | 2365 | } // namespace |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2366 | |
| 2367 | namespace testing { |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2368 | |
| 2369 | // WARNING: '@' is also used in the html file. If you update this constant you |
| 2370 | // also need to update the html file. |
| 2371 | const char kMultiSeparator[] = "@"; |
| 2372 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2373 | void ClearState() { |
[email protected] | 8e8bb6d | 2010-12-13 08:18:55 | [diff] [blame] | 2374 | FlagsState::GetInstance()->reset(); |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2375 | } |
[email protected] | a314ee5a | 2010-10-26 21:23:28 | [diff] [blame] | 2376 | |
| 2377 | void SetExperiments(const Experiment* e, size_t count) { |
| 2378 | if (!e) { |
| 2379 | experiments = kExperiments; |
| 2380 | num_experiments = arraysize(kExperiments); |
| 2381 | } else { |
| 2382 | experiments = e; |
| 2383 | num_experiments = count; |
| 2384 | } |
| 2385 | } |
| 2386 | |
[email protected] | 8a6ff28d | 2010-12-02 16:35:19 | [diff] [blame] | 2387 | const Experiment* GetExperiments(size_t* count) { |
| 2388 | *count = num_experiments; |
| 2389 | return experiments; |
| 2390 | } |
| 2391 | |
[email protected] | e2ddbc9 | 2010-10-15 20:02:07 | [diff] [blame] | 2392 | } // namespace testing |
| 2393 | |
[email protected] | 1a47d7e | 2010-10-15 00:37:24 | [diff] [blame] | 2394 | } // namespace about_flags |