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