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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
877 // Launches URL in new browser window. | 877 // Launches URL in new browser window. |
878 const char kOpenInNewWindow[] = "new-window"; | 878 const char kOpenInNewWindow[] = "new-window"; |
879 | 879 |
880 // Force use of QUIC for requests to the specified origin. | 880 // Force use of QUIC for requests to the specified origin. |
881 const char kOriginToForceQuicOn[] = "origin-to-force-quic-on"; | 881 const char kOriginToForceQuicOn[] = "origin-to-force-quic-on"; |
882 | 882 |
883 // The time that a new chrome process which is delegating to an already running | 883 // The time that a new chrome process which is delegating to an already running |
884 // chrome process started. (See ProcessSingleton for more details.) | 884 // chrome process started. (See ProcessSingleton for more details.) |
885 const char kOriginalProcessStartTime[] = "original-process-start-time"; | 885 const char kOriginalProcessStartTime[] = "original-process-start-time"; |
886 | 886 |
887 // Enable the out of process PDF plugin. | 887 // Enable or disable the out of process PDF plugin. |
Lei Zhang
2014/11/25 22:22:30
Can you keep these in alphabetical order?
raymes
2014/11/25 22:36:56
Done.
| |
888 const char kOutOfProcessPdf[] = "out-of-process-pdf"; | 888 const char kEnableOutOfProcessPdf[] = "enable-out-of-process-pdf"; |
889 const char kDisableOutOfProcessPdf[] = "disable-out-of-process-pdf"; | |
889 | 890 |
890 // Packages an extension to a .crx installable file from a given directory. | 891 // Packages an extension to a .crx installable file from a given directory. |
891 const char kPackExtension[] = "pack-extension"; | 892 const char kPackExtension[] = "pack-extension"; |
892 | 893 |
893 // Optional PEM private key to use in signing packaged .crx. | 894 // Optional PEM private key to use in signing packaged .crx. |
894 const char kPackExtensionKey[] = "pack-extension-key"; | 895 const char kPackExtensionKey[] = "pack-extension-key"; |
895 | 896 |
896 // Specifies the path to the user data folder for the parent profile. | 897 // Specifies the path to the user data folder for the parent profile. |
897 const char kParentProfile[] = "parent-profile"; | 898 const char kParentProfile[] = "parent-profile"; |
898 | 899 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1359 // Enables overriding the path of file manager extension. | 1360 // Enables overriding the path of file manager extension. |
1360 const char kFileManagerExtensionPath[] = "filemgr-ext-path"; | 1361 const char kFileManagerExtensionPath[] = "filemgr-ext-path"; |
1361 #endif | 1362 #endif |
1362 | 1363 |
1363 bool AboutInSettingsEnabled() { | 1364 bool AboutInSettingsEnabled() { |
1364 return SettingsWindowEnabled() && | 1365 return SettingsWindowEnabled() && |
1365 !CommandLine::ForCurrentProcess()->HasSwitch( | 1366 !CommandLine::ForCurrentProcess()->HasSwitch( |
1366 ::switches::kDisableAboutInSettings); | 1367 ::switches::kDisableAboutInSettings); |
1367 } | 1368 } |
1368 | 1369 |
1370 bool OutOfProcessPdfEnabled() { | |
1371 if (CommandLine::ForCurrentProcess()->HasSwitch(kEnableOutOfProcessPdf)) | |
1372 return true; | |
1373 | |
1374 if (CommandLine::ForCurrentProcess()->HasSwitch(kDisableOutOfProcessPdf)) | |
1375 return false; | |
1376 | |
1377 // Default. | |
1378 return false; | |
1379 } | |
1380 | |
1369 bool SettingsWindowEnabled() { | 1381 bool SettingsWindowEnabled() { |
1370 #if defined(OS_CHROMEOS) | 1382 #if defined(OS_CHROMEOS) |
1371 return !CommandLine::ForCurrentProcess()->HasSwitch( | 1383 return !CommandLine::ForCurrentProcess()->HasSwitch( |
1372 ::switches::kDisableSettingsWindow); | 1384 ::switches::kDisableSettingsWindow); |
1373 #else | 1385 #else |
1374 return CommandLine::ForCurrentProcess()->HasSwitch( | 1386 return CommandLine::ForCurrentProcess()->HasSwitch( |
1375 ::switches::kEnableSettingsWindow); | 1387 ::switches::kEnableSettingsWindow); |
1376 #endif | 1388 #endif |
1377 } | 1389 } |
1378 | 1390 |
1379 #if defined(OS_CHROMEOS) | 1391 #if defined(OS_CHROMEOS) |
1380 bool PowerOverlayEnabled() { | 1392 bool PowerOverlayEnabled() { |
1381 return CommandLine::ForCurrentProcess()->HasSwitch( | 1393 return CommandLine::ForCurrentProcess()->HasSwitch( |
1382 ::switches::kEnablePowerOverlay); | 1394 ::switches::kEnablePowerOverlay); |
1383 } | 1395 } |
1384 #endif | 1396 #endif |
1385 | 1397 |
1386 // ----------------------------------------------------------------------------- | 1398 // ----------------------------------------------------------------------------- |
1387 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1399 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
1388 // | 1400 // |
1389 // You were going to just dump your switches here, weren't you? Instead, please | 1401 // You were going to just dump your switches here, weren't you? Instead, please |
1390 // put them in alphabetical order above, or in order inside the appropriate | 1402 // put them in alphabetical order above, or in order inside the appropriate |
1391 // ifdef at the bottom. The order should match the header. | 1403 // ifdef at the bottom. The order should match the header. |
1392 // ----------------------------------------------------------------------------- | 1404 // ----------------------------------------------------------------------------- |
1393 | 1405 |
1394 } // namespace switches | 1406 } // namespace switches |
OLD | NEW |