summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/plugin_service.cc3
-rw-r--r--chrome/browser/zygote_main_linux.cc14
-rw-r--r--chrome/common/pepper_plugin_registry.cc3
-rw-r--r--chrome/renderer/render_process_impl.cc24
-rw-r--r--webkit/glue/plugins/plugin_lib.cc11
-rw-r--r--webkit/glue/plugins/plugin_lib.h4
6 files changed, 7 insertions, 52 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 5d92a06..b7f0489 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -103,9 +103,6 @@ PluginService::PluginService()
NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
}
- if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path))
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
-
#ifndef DISABLE_NACL
if (command_line->HasSwitch(switches::kInternalNaCl))
RegisterInternalNaClPlugin();
diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc
index 5717390..51a658e 100644
--- a/chrome/browser/zygote_main_linux.cc
+++ b/chrome/browser/zygote_main_linux.cc
@@ -21,7 +21,6 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/eintr_wrapper.h"
-#include "base/file_util.h"
#include "base/global_descriptors_posix.h"
#include "base/hash_tables.h"
#include "base/linux_util.h"
@@ -35,7 +34,6 @@
#include "chrome/browser/zygote_host_linux.h"
#include "chrome/common/chrome_descriptors.h"
-#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/main_function_params.h"
#include "chrome/common/process_watcher.h"
@@ -49,8 +47,6 @@
#include "unicode/timezone.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-
#if defined(ARCH_CPU_X86_FAMILY) && !defined(CHROMIUM_SELINUX)
// The seccomp sandbox is enabled on all ia32 and x86-64 processor as long as
// we aren't using SELinux.
@@ -550,16 +546,6 @@ static void PreSandboxInit() {
FilePath module_path;
if (PathService::Get(base::DIR_MODULE, &module_path))
media::InitializeMediaLibrary(module_path);
-
- // Load the PDF plugin before the sandbox is turned on.
- FilePath pdf;
- if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) &&
- file_util::PathExists(pdf)) {
- static scoped_refptr<NPAPI::PluginLib> pdf_lib =
- NPAPI::PluginLib::CreatePluginLib(pdf);
- bool rv = pdf_lib && pdf_lib->EnsureAlwaysLoaded();
- DCHECK(rv) << "Couldn't load PDF plugin";
- }
}
#if !defined(CHROMIUM_SELINUX)
diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc
index 10b0311..c6ed963 100644
--- a/chrome/common/pepper_plugin_registry.cc
+++ b/chrome/common/pepper_plugin_registry.cc
@@ -67,8 +67,6 @@ void PepperPluginRegistry::GetPluginInfoFromSwitch(
// static
void PepperPluginRegistry::GetExtraPlugins(
std::vector<PepperPluginInfo>* plugins) {
- /*
- // Pepper v2 plugin isn't ready yet.
FilePath path;
if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path) &&
file_util::PathExists(path)) {
@@ -80,7 +78,6 @@ void PepperPluginRegistry::GetExtraPlugins(
pdf.type_descriptions = "Portable Document Format";
plugins->push_back(pdf);
}
- */
}
// static
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index b1b6bc6..e610df9 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -180,27 +180,15 @@ RenderProcessImpl::RenderProcessImpl()
}
#endif
-#if defined(OS_WIN) || defined(OS_MACOSX)
- // Load the pdf plugin before the sandbox is turned on. This is for Mac and
- // Windows. On Linux, this needs to be done in the zygote process.
+#if defined(OS_WIN)
+ // Need to patch a few functions for font loading to work correctly.
FilePath pdf;
if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) &&
file_util::PathExists(pdf)) {
- static scoped_refptr<NPAPI::PluginLib> pdf_lib =
- NPAPI::PluginLib::CreatePluginLib(pdf);
- bool rv = pdf_lib && pdf_lib->EnsureAlwaysLoaded();
- DCHECK(rv) << "Couldn't load PDF plugin";
-
-#if defined(OS_WIN)
- if (rv) {
- g_iat_patch_createdca.Patch(
- pdf_lib->plugin_info().path.value().c_str(),
- "gdi32.dll", "CreateDCA", CreateDCAPatch);
- g_iat_patch_get_font_data.Patch(
- pdf_lib->plugin_info().path.value().c_str(),
- "gdi32.dll", "GetFontData", GetFontDataPatch);
- }
-#endif
+ g_iat_patch_createdca.Patch(
+ pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch);
+ g_iat_patch_get_font_data.Patch(
+ pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch);
}
#endif
}
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc
index a79513d..877548e 100644
--- a/webkit/glue/plugins/plugin_lib.cc
+++ b/webkit/glue/plugins/plugin_lib.cc
@@ -71,8 +71,7 @@ PluginLib::PluginLib(const WebPluginInfo& info,
initialized_(false),
saved_data_(0),
instance_count_(0),
- skip_unload_(false),
- always_loaded_(false) {
+ skip_unload_(false) {
StatsCounter(kPluginLibrariesLoadedCounter).Increment();
memset(static_cast<void*>(&plugin_funcs_), 0, sizeof(plugin_funcs_));
g_loaded_libs->push_back(this);
@@ -139,11 +138,6 @@ void PluginLib::PreventLibraryUnload() {
skip_unload_ = true;
}
-bool PluginLib::EnsureAlwaysLoaded() {
- always_loaded_ = true;
- return Load();
-}
-
PluginInstance* PluginLib::CreateInstance(const std::string& mime_type) {
PluginInstance* new_instance = new PluginInstance(this, mime_type);
instance_count_++;
@@ -264,9 +258,6 @@ class FreePluginLibraryTask : public Task {
};
void PluginLib::Unload() {
- if (always_loaded_)
- return;
-
if (!internal_ && library_) {
// In case of single process mode, a plugin can delete itself
// by executing a script. So delay the unloading of the library
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h
index 32d8a14..647916e 100644
--- a/webkit/glue/plugins/plugin_lib.h
+++ b/webkit/glue/plugins/plugin_lib.h
@@ -78,9 +78,6 @@ class PluginLib : public base::RefCounted<PluginLib> {
// some plugins crash if unloaded).
void PreventLibraryUnload();
- // Loads the library now and ensures it's never unloaded.
- bool EnsureAlwaysLoaded();
-
// protected for testability.
protected:
friend class base::RefCounted<PluginLib>;
@@ -111,7 +108,6 @@ class PluginLib : public base::RefCounted<PluginLib> {
NPSavedData *saved_data_; // Persisted plugin info for NPAPI.
int instance_count_; // Count of plugins in use.
bool skip_unload_; // True if library_ should not be unloaded.
- bool always_loaded_; // True if should always keep this loaded.
// Function pointers to entry points into the plugin.
PluginEntryPoints entry_points_;