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