diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 22:01:13 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 22:01:13 +0000 |
commit | cceaf8512b4cb70a81db1f371ae094e2f2d3f645 (patch) | |
tree | 5559622f2fd866d232cc5a3f80b03c99073b6d59 /chrome/browser | |
parent | 6a757957bd8d1afbba62a74564ef1ff87838e67d (diff) | |
download | chromium_src-cceaf8512b4cb70a81db1f371ae094e2f2d3f645.zip chromium_src-cceaf8512b4cb70a81db1f371ae094e2f2d3f645.tar.gz chromium_src-cceaf8512b4cb70a81db1f371ae094e2f2d3f645.tar.bz2 |
Fix bug with enabling/disabling the pdf plugin, related to plugin grouping work.
BUG=58329
Review URL: http://codereview.chromium.org/3618015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/plugin_updater.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc index a119c78..e1f1764 100644 --- a/chrome/browser/plugin_updater.cc +++ b/chrome/browser/plugin_updater.cc @@ -10,6 +10,7 @@ #include "base/command_line.h" #include "base/path_service.h" #include "base/scoped_ptr.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "base/version.h" #include "chrome/browser/prefs/pref_service.h" @@ -17,6 +18,7 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" +#include "chrome/common/pepper_plugin_registry.h" #include "chrome/common/pref_names.h" #include "webkit/glue/plugins/plugin_group.h" #include "webkit/glue/plugins/plugin_list.h" @@ -138,7 +140,7 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) { bool found_internal_pdf = false; bool force_enable_internal_pdf = false; - string16 pdf_group_name; + string16 pdf_group_name = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName); FilePath pdf_path; PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path); FilePath::StringType pdf_path_str = pdf_path.value(); @@ -184,7 +186,6 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) { if (FilePath::CompareIgnoreCase(path, pdf_path_str) == 0) { found_internal_pdf = true; - plugin->GetString("name", &pdf_group_name); if (!enabled && force_enable_internal_pdf) { enabled = true; plugin->SetBoolean("enabled", true); @@ -215,6 +216,7 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) { // The internal PDF plugin is disabled by default, and the user hasn't // overridden the default. NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path); + NPAPI::PluginList::Singleton()->EnableGroup(false, pdf_group_name); } if (update_preferences) |