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

Unified Diff: chrome/renderer/render_process_impl.cc

Issue 2080016: Don't use command line flags for enabling the internal pdf plugin. Instead, ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months 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/pref_names.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_process_impl.cc
===================================================================
--- chrome/renderer/render_process_impl.cc (revision 47861)
+++ chrome/renderer/render_process_impl.cc (working copy)
@@ -163,26 +163,24 @@
#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
- }
}
}
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698