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