Chromium Code Reviews| Index: chrome/common/chrome_switches.cc |
| diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc |
| index 6ddf8c83dc4823eef68acb6bad675a3abf2c415c..3ac4ba445e10452a9d9a3ebffc3d8056eb87ba48 100644 |
| --- a/chrome/common/chrome_switches.cc |
| +++ b/chrome/common/chrome_switches.cc |
| @@ -884,8 +884,9 @@ const char kOriginToForceQuicOn[] = "origin-to-force-quic-on"; |
| // chrome process started. (See ProcessSingleton for more details.) |
| const char kOriginalProcessStartTime[] = "original-process-start-time"; |
| -// Enable the out of process PDF plugin. |
| -const char kOutOfProcessPdf[] = "out-of-process-pdf"; |
| +// 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.
|
| +const char kEnableOutOfProcessPdf[] = "enable-out-of-process-pdf"; |
| +const char kDisableOutOfProcessPdf[] = "disable-out-of-process-pdf"; |
| // Packages an extension to a .crx installable file from a given directory. |
| const char kPackExtension[] = "pack-extension"; |
| @@ -1366,6 +1367,17 @@ bool AboutInSettingsEnabled() { |
| ::switches::kDisableAboutInSettings); |
| } |
| +bool OutOfProcessPdfEnabled() { |
| + if (CommandLine::ForCurrentProcess()->HasSwitch(kEnableOutOfProcessPdf)) |
| + return true; |
| + |
| + if (CommandLine::ForCurrentProcess()->HasSwitch(kDisableOutOfProcessPdf)) |
| + return false; |
| + |
| + // Default. |
| + return false; |
| +} |
| + |
| bool SettingsWindowEnabled() { |
| #if defined(OS_CHROMEOS) |
| return !CommandLine::ForCurrentProcess()->HasSwitch( |