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