| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/plugin_updater.h" | 5 #include "chrome/browser/plugin_updater.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 if (FilePath::CompareIgnoreCase(path, pdf_path_str) == 0) { | 150 if (FilePath::CompareIgnoreCase(path, pdf_path_str) == 0) { |
| 151 found_internal_pdf = true; | 151 found_internal_pdf = true; |
| 152 if (!enabled && force_enable_internal_pdf) { | 152 if (!enabled && force_enable_internal_pdf) { |
| 153 enabled = true; | 153 enabled = true; |
| 154 plugin->SetBoolean("enabled", true); | 154 plugin->SetBoolean("enabled", true); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 if (!enabled) | 157 if (!enabled) |
| 158 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path); | 158 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path); |
| 159 } else if (!enabled && plugin->GetStringAsUTF16("name", &group_name)) { | 159 } else if (!enabled && plugin->GetString("name", &group_name)) { |
| 160 // Otherwise this is a list of groups. | 160 // Otherwise this is a list of groups. |
| 161 EnablePluginGroup(false, group_name); | 161 EnablePluginGroup(false, group_name); |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 // Build the set of policy-disabled plugins once and cache it. | 166 // Build the set of policy-disabled plugins once and cache it. |
| 167 // Don't do this in the constructor, there's no profile available there. | 167 // Don't do this in the constructor, there's no profile available there. |
| 168 std::set<string16> policy_disabled_plugins; | 168 std::set<string16> policy_disabled_plugins; |
| 169 const ListValue* plugin_blacklist = | 169 const ListValue* plugin_blacklist = |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 it != plugin_groups.end(); | 233 it != plugin_groups.end(); |
| 234 ++it) { | 234 ++it) { |
| 235 // Don't save preferences for vulnerable pugins. | 235 // Don't save preferences for vulnerable pugins. |
| 236 if (!(*it)->IsVulnerable()) { | 236 if (!(*it)->IsVulnerable()) { |
| 237 plugins_list->Append((*it)->GetSummary()); | 237 plugins_list->Append((*it)->GetSummary()); |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace plugin_updater | 242 } // namespace plugin_updater |
| OLD | NEW |