summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_process_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-22 00:14:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-22 00:14:28 +0000
commit7bf795d901efbf80cdb36f2faa35e016aaeb82b6 (patch)
treec3616e2e1be420605438202cb04c8a198786eb52 /chrome/renderer/render_process_impl.cc
parent438c97d23785f28465304e1cb521b5125e9ea469 (diff)
downloadchromium_src-7bf795d901efbf80cdb36f2faa35e016aaeb82b6.zip
chromium_src-7bf795d901efbf80cdb36f2faa35e016aaeb82b6.tar.gz
chromium_src-7bf795d901efbf80cdb36f2faa35e016aaeb82b6.tar.bz2
Don't use command line flags for enabling the internal pdf plugin. Instead, disable it by default using the same mechanism that we use for about:plugins. Once we enable it by default, we just need to flip a boolean in the code and it'll be enabled for everyone.
Review URL: http://codereview.chromium.org/2080016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_process_impl.cc')
-rw-r--r--chrome/renderer/render_process_impl.cc32
1 files changed, 15 insertions, 17 deletions
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index 321f0d0..02c3697 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -163,26 +163,24 @@ RenderProcessImpl::RenderProcessImpl()
#endif
// Load the pdf plugin before the sandbox is turned on.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalPDF)) {
- FilePath pdf;
- if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf)) {
- static scoped_refptr<NPAPI::PluginLib> pdf_lib =
- NPAPI::PluginLib::CreatePluginLib(pdf);
- // Actually load the plugin.
- pdf_lib->NP_Initialize();
- // Keep an instance around to prevent the plugin unloading after a pdf is
- // closed.
- // Don't use scoped_ptr here because then get asserts on process shut down
- // when running in --single-process.
- static NPAPI::PluginInstance* instance = pdf_lib->CreateInstance("");
- instance->plugin_lib(); // Quiet unused variable warnings in gcc.
+ FilePath pdf;
+ if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf)) {
+ static scoped_refptr<NPAPI::PluginLib> pdf_lib =
+ NPAPI::PluginLib::CreatePluginLib(pdf);
+ // Actually load the plugin.
+ pdf_lib->NP_Initialize();
+ // Keep an instance around to prevent the plugin unloading after a pdf is
+ // closed.
+ // Don't use scoped_ptr here because then get asserts on process shut down
+ // when running in --single-process.
+ static NPAPI::PluginInstance* instance = pdf_lib->CreateInstance("");
+ instance->plugin_lib(); // Quiet unused variable warnings in gcc.
#if defined(OS_WIN)
- g_iat_patch_createdca.Patch(
- pdf_lib->plugin_info().path.value().c_str(),
- "gdi32.dll", "CreateDCA", CreateDCAPatch);
+ g_iat_patch_createdca.Patch(
+ pdf_lib->plugin_info().path.value().c_str(),
+ "gdi32.dll", "CreateDCA", CreateDCAPatch);
#endif
- }
}
}