summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_updater.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-21 03:57:05 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-21 03:57:05 +0000
commita027e512621b7aa1ec09a28864d67e24f99b5ef3 (patch)
treed2d3fec725119e3468ed09bbef99919ada2379e8 /chrome/browser/plugin_updater.cc
parent09f4020b86bb376613a17579a61d80bac30b5296 (diff)
downloadchromium_src-a027e512621b7aa1ec09a28864d67e24f99b5ef3.zip
chromium_src-a027e512621b7aa1ec09a28864d67e24f99b5ef3.tar.gz
chromium_src-a027e512621b7aa1ec09a28864d67e24f99b5ef3.tar.bz2
Plugins: Force enable the internal PDF plugin if there is no saved plugin list.
BUG=86256 TEST=Run chrome with a new profile; immediately close chrome; launch chrome and visit about:plugins and make sure there's only 1 PDF plugin enabled. Review URL: http://codereview.chromium.org/7189077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_updater.cc')
-rw-r--r--chrome/browser/plugin_updater.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc
index 6033c73..afe399d 100644
--- a/chrome/browser/plugin_updater.cc
+++ b/chrome/browser/plugin_updater.cc
@@ -157,7 +157,7 @@ void PluginUpdater::SetProfile(Profile* profile) {
{ // Scoped update of prefs::kPluginsPluginsList.
ListPrefUpdate update(profile->GetPrefs(), prefs::kPluginsPluginsList);
ListValue* saved_plugins_list = update.Get();
- if (saved_plugins_list) {
+ if (saved_plugins_list && !saved_plugins_list->empty()) {
for (ListValue::const_iterator it = saved_plugins_list->begin();
it != saved_plugins_list->end();
++it) {
@@ -208,6 +208,11 @@ void PluginUpdater::SetProfile(Profile* profile) {
EnablePluginGroup(false, group_name);
}
}
+ } else {
+ // If the saved plugin list is empty, then the call to UpdatePreferences()
+ // below failed in an earlier run, possibly because the user closed the
+ // browser too quickly. Try to force enable the internal PDF plugin again.
+ force_enable_internal_pdf = true;
}
} // Scoped update of prefs::kPluginsPluginsList.