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