| 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 | 9 |
| 10 namespace switches { | 10 namespace switches { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 "disable-offline-auto-reload-visible-only"; | 295 "disable-offline-auto-reload-visible-only"; |
| 296 | 296 |
| 297 // Disable out-of-process V8 proxy resolver. | 297 // Disable out-of-process V8 proxy resolver. |
| 298 const char kDisableOutOfProcessPac[] = "disable-out-of-process-pac"; | 298 const char kDisableOutOfProcessPac[] = "disable-out-of-process-pac"; |
| 299 | 299 |
| 300 // Disable the setting to prompt the user for their OS account password before | 300 // Disable the setting to prompt the user for their OS account password before |
| 301 // revealing plaintext passwords in the password manager. | 301 // revealing plaintext passwords in the password manager. |
| 302 const char kDisablePasswordManagerReauthentication[] = | 302 const char kDisablePasswordManagerReauthentication[] = |
| 303 "disable-password-manager-reauthentication"; | 303 "disable-password-manager-reauthentication"; |
| 304 | 304 |
| 305 // Disable the new material UI - requires out of process PDF plugin. | |
| 306 const char kDisablePdfMaterialUI[] = "disable-pdf-material-ui"; | |
| 307 | |
| 308 // Disables the Permissions Blacklist, which blocks access to permissions | 305 // Disables the Permissions Blacklist, which blocks access to permissions |
| 309 // for blacklisted sites. | 306 // for blacklisted sites. |
| 310 const char kDisablePermissionsBlacklist[] = "disable-permissions-blacklist"; | 307 const char kDisablePermissionsBlacklist[] = "disable-permissions-blacklist"; |
| 311 | 308 |
| 312 // Disable pop-up blocking. | 309 // Disable pop-up blocking. |
| 313 const char kDisablePopupBlocking[] = "disable-popup-blocking"; | 310 const char kDisablePopupBlocking[] = "disable-popup-blocking"; |
| 314 | 311 |
| 315 // Disable speculative TCP/IP preconnection. | 312 // Disable speculative TCP/IP preconnection. |
| 316 const char kDisablePreconnect[] = "disable-preconnect"; | 313 const char kDisablePreconnect[] = "disable-preconnect"; |
| 317 | 314 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 // Enable auto-reload of error pages if offline. | 456 // Enable auto-reload of error pages if offline. |
| 460 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload"; | 457 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload"; |
| 461 | 458 |
| 462 // Only auto-reload error pages when the tab is visible. | 459 // Only auto-reload error pages when the tab is visible. |
| 463 const char kEnableOfflineAutoReloadVisibleOnly[] = | 460 const char kEnableOfflineAutoReloadVisibleOnly[] = |
| 464 "enable-offline-auto-reload-visible-only"; | 461 "enable-offline-auto-reload-visible-only"; |
| 465 | 462 |
| 466 // Enables panels (always on-top docked pop-up windows). | 463 // Enables panels (always on-top docked pop-up windows). |
| 467 const char kEnablePanels[] = "enable-panels"; | 464 const char kEnablePanels[] = "enable-panels"; |
| 468 | 465 |
| 469 // Enable the new material UI - requires out of process PDF plugin. | |
| 470 const char kEnablePdfMaterialUI[] = "enable-pdf-material-ui"; | |
| 471 | |
| 472 // Enables the Permissions Blacklist, which blocks access to permissions | 466 // Enables the Permissions Blacklist, which blocks access to permissions |
| 473 // for blacklisted sites. | 467 // for blacklisted sites. |
| 474 const char kEnablePermissionsBlacklist[] = "enable-permissions-blacklist"; | 468 const char kEnablePermissionsBlacklist[] = "enable-permissions-blacklist"; |
| 475 | 469 |
| 476 // Enables a number of potentially annoying security features (strict mixed | 470 // Enables a number of potentially annoying security features (strict mixed |
| 477 // content mode, powerful feature restrictions, etc.) | 471 // content mode, powerful feature restrictions, etc.) |
| 478 const char kEnablePotentiallyAnnoyingSecurityFeatures[] = | 472 const char kEnablePotentiallyAnnoyingSecurityFeatures[] = |
| 479 "enable-potentially-annoying-security-features"; | 473 "enable-potentially-annoying-security-features"; |
| 480 | 474 |
| 481 // Enables the Power overlay in Settings. | 475 // Enables the Power overlay in Settings. |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 bool MdHistoryEnabled() { | 1343 bool MdHistoryEnabled() { |
| 1350 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1344 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1351 ::switches::kEnableMaterialDesignHistory); | 1345 ::switches::kEnableMaterialDesignHistory); |
| 1352 } | 1346 } |
| 1353 | 1347 |
| 1354 bool MdPolicyPageEnabled() { | 1348 bool MdPolicyPageEnabled() { |
| 1355 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1349 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1356 ::switches::kEnableMaterialDesignPolicyPage); | 1350 ::switches::kEnableMaterialDesignPolicyPage); |
| 1357 } | 1351 } |
| 1358 | 1352 |
| 1359 bool PdfMaterialUIEnabled() { | |
| 1360 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI)) | |
| 1361 return true; | |
| 1362 | |
| 1363 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI)) | |
| 1364 return false; | |
| 1365 | |
| 1366 // Default. | |
| 1367 return true; | |
| 1368 } | |
| 1369 | |
| 1370 bool SettingsWindowEnabled() { | 1353 bool SettingsWindowEnabled() { |
| 1371 #if defined(OS_CHROMEOS) | 1354 #if defined(OS_CHROMEOS) |
| 1372 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1355 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1373 ::switches::kDisableSettingsWindow); | 1356 ::switches::kDisableSettingsWindow); |
| 1374 #else | 1357 #else |
| 1375 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1358 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1376 ::switches::kEnableSettingsWindow); | 1359 ::switches::kEnableSettingsWindow); |
| 1377 #endif | 1360 #endif |
| 1378 } | 1361 } |
| 1379 | 1362 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1393 | 1376 |
| 1394 // ----------------------------------------------------------------------------- | 1377 // ----------------------------------------------------------------------------- |
| 1395 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1378 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
| 1396 // | 1379 // |
| 1397 // You were going to just dump your switches here, weren't you? Instead, please | 1380 // You were going to just dump your switches here, weren't you? Instead, please |
| 1398 // put them in alphabetical order above, or in order inside the appropriate | 1381 // put them in alphabetical order above, or in order inside the appropriate |
| 1399 // ifdef at the bottom. The order should match the header. | 1382 // ifdef at the bottom. The order should match the header. |
| 1400 // ----------------------------------------------------------------------------- | 1383 // ----------------------------------------------------------------------------- |
| 1401 | 1384 |
| 1402 } // namespace switches | 1385 } // namespace switches |
| OLD | NEW |