Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: chrome/common/chrome_switches.cc

Issue 756653005: Change the flag which enables OOP PDF to an enable/disable flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_switches.h ('k') | chrome/renderer/printing/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « chrome/common/chrome_switches.h ('k') | chrome/renderer/printing/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698