OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/chrome_switches.h" | 5 #include "chrome/common/chrome_switches.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // Disables device discovery notifications. | 214 // Disables device discovery notifications. |
215 const char kDisableDeviceDiscoveryNotifications[] = | 215 const char kDisableDeviceDiscoveryNotifications[] = |
216 "disable-device-discovery-notifications"; | 216 "disable-device-discovery-notifications"; |
217 | 217 |
218 // Disables Domain Reliability Monitoring. | 218 // Disables Domain Reliability Monitoring. |
219 const char kDisableDomainReliability[] = "disable-domain-reliability"; | 219 const char kDisableDomainReliability[] = "disable-domain-reliability"; |
220 | 220 |
221 // Disable extensions. | 221 // Disable extensions. |
222 const char kDisableExtensions[] = "disable-extensions"; | 222 const char kDisableExtensions[] = "disable-extensions"; |
223 | 223 |
| 224 // Disable extensions except those specified in a comma-separated list. |
| 225 const char kDisableExtensionsExcept[] = "disable-extensions-except"; |
| 226 |
224 // Disable checking for user opt-in for extensions that want to inject script | 227 // Disable checking for user opt-in for extensions that want to inject script |
225 // into file URLs (ie, always allow it). This is used during automated testing. | 228 // into file URLs (ie, always allow it). This is used during automated testing. |
226 const char kDisableExtensionsFileAccessCheck[] = | 229 const char kDisableExtensionsFileAccessCheck[] = |
227 "disable-extensions-file-access-check"; | 230 "disable-extensions-file-access-check"; |
228 | 231 |
229 // Disable the net::URLRequestThrottlerManager functionality for | 232 // Disable the net::URLRequestThrottlerManager functionality for |
230 // requests originating from extensions. | 233 // requests originating from extensions. |
231 const char kDisableExtensionsHttpThrottling[] = | 234 const char kDisableExtensionsHttpThrottling[] = |
232 "disable-extensions-http-throttling"; | 235 "disable-extensions-http-throttling"; |
233 | 236 |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 extern const char kDisableInputImeAPI[] = "disable-input-ime-api"; | 1287 extern const char kDisableInputImeAPI[] = "disable-input-ime-api"; |
1285 extern const char kEnableInputImeAPI[] = "enable-input-ime-api"; | 1288 extern const char kEnableInputImeAPI[] = "enable-input-ime-api"; |
1286 #endif | 1289 #endif |
1287 | 1290 |
1288 bool AboutInSettingsEnabled() { | 1291 bool AboutInSettingsEnabled() { |
1289 return SettingsWindowEnabled() && | 1292 return SettingsWindowEnabled() && |
1290 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1293 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
1291 ::switches::kDisableAboutInSettings); | 1294 ::switches::kDisableAboutInSettings); |
1292 } | 1295 } |
1293 | 1296 |
| 1297 bool ExtensionsDisabled(const base::CommandLine& command_line) { |
| 1298 return command_line.HasSwitch(switches::kDisableExtensions) || |
| 1299 command_line.HasSwitch(switches::kDisableExtensionsExcept); |
| 1300 } |
| 1301 |
1294 bool MdFeedbackEnabled() { | 1302 bool MdFeedbackEnabled() { |
1295 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1303 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1296 ::switches::kEnableMaterialDesignFeedback); | 1304 ::switches::kEnableMaterialDesignFeedback); |
1297 } | 1305 } |
1298 | 1306 |
1299 bool MdPolicyPageEnabled() { | 1307 bool MdPolicyPageEnabled() { |
1300 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1308 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1301 ::switches::kEnableMaterialDesignPolicyPage); | 1309 ::switches::kEnableMaterialDesignPolicyPage); |
1302 } | 1310 } |
1303 | 1311 |
(...skipping 16 matching lines...) Expand all Loading... |
1320 | 1328 |
1321 // ----------------------------------------------------------------------------- | 1329 // ----------------------------------------------------------------------------- |
1322 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1330 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
1323 // | 1331 // |
1324 // You were going to just dump your switches here, weren't you? Instead, please | 1332 // You were going to just dump your switches here, weren't you? Instead, please |
1325 // put them in alphabetical order above, or in order inside the appropriate | 1333 // put them in alphabetical order above, or in order inside the appropriate |
1326 // ifdef at the bottom. The order should match the header. | 1334 // ifdef at the bottom. The order should match the header. |
1327 // ----------------------------------------------------------------------------- | 1335 // ----------------------------------------------------------------------------- |
1328 | 1336 |
1329 } // namespace switches | 1337 } // namespace switches |
OLD | NEW |