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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 extern const char kDisableInputImeAPI[] = "disable-input-ime-api"; | 1298 extern const char kDisableInputImeAPI[] = "disable-input-ime-api"; |
1296 extern const char kEnableInputImeAPI[] = "enable-input-ime-api"; | 1299 extern const char kEnableInputImeAPI[] = "enable-input-ime-api"; |
1297 #endif | 1300 #endif |
1298 | 1301 |
1299 bool AboutInSettingsEnabled() { | 1302 bool AboutInSettingsEnabled() { |
1300 return SettingsWindowEnabled() && | 1303 return SettingsWindowEnabled() && |
1301 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1304 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
1302 ::switches::kDisableAboutInSettings); | 1305 ::switches::kDisableAboutInSettings); |
1303 } | 1306 } |
1304 | 1307 |
| 1308 bool ExtensionsDisabled() { |
| 1309 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1310 ::switches::kDisableExtensions) || |
| 1311 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1312 ::switches::kDisableExtensionsExcept); |
| 1313 } |
| 1314 |
1305 bool MdFeedbackEnabled() { | 1315 bool MdFeedbackEnabled() { |
1306 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1316 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1307 ::switches::kEnableMaterialDesignFeedback); | 1317 ::switches::kEnableMaterialDesignFeedback); |
1308 } | 1318 } |
1309 | 1319 |
1310 bool MdPolicyPageEnabled() { | 1320 bool MdPolicyPageEnabled() { |
1311 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1321 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
1312 ::switches::kEnableMaterialDesignPolicyPage); | 1322 ::switches::kEnableMaterialDesignPolicyPage); |
1313 } | 1323 } |
1314 | 1324 |
(...skipping 16 matching lines...) Expand all Loading... |
1331 | 1341 |
1332 // ----------------------------------------------------------------------------- | 1342 // ----------------------------------------------------------------------------- |
1333 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1343 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
1334 // | 1344 // |
1335 // You were going to just dump your switches here, weren't you? Instead, please | 1345 // You were going to just dump your switches here, weren't you? Instead, please |
1336 // put them in alphabetical order above, or in order inside the appropriate | 1346 // put them in alphabetical order above, or in order inside the appropriate |
1337 // ifdef at the bottom. The order should match the header. | 1347 // ifdef at the bottom. The order should match the header. |
1338 // ----------------------------------------------------------------------------- | 1348 // ----------------------------------------------------------------------------- |
1339 | 1349 |
1340 } // namespace switches | 1350 } // namespace switches |
OLD | NEW |