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

Unified Diff: webkit/glue/plugins/plugin_list_mac.mm

Issue 165345: Merge 22951 - Only load whitelisted plugins on the Mac... (Closed) Base URL: svn://chrome-svn/chrome/branches/198/src/
Patch Set: Created 11 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_list_mac.mm
===================================================================
--- webkit/glue/plugins/plugin_list_mac.mm (revision 23113)
+++ webkit/glue/plugins/plugin_list_mac.mm (working copy)
@@ -8,6 +8,7 @@
#include "base/file_util.h"
#include "base/mac_util.h"
+#include "base/string_util.h"
#include "webkit/glue/plugins/plugin_lib.h"
namespace {
@@ -66,12 +67,18 @@
}
bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) {
+ // For now, only load plugins that we know are working reasonably well.
+ // Anything using QuickDraw-based drawing, for example, would crash
+ // immediately.
+ std::string plugin_name = WideToUTF8(info.name);
+ if (!(plugin_name == "Shockwave Flash" || // CG drawing + Carbon events.
+ plugin_name == "Picasa")) { // No drawing or event handling.
+ return false;
+ }
+
// Hierarchy check
// (we're loading plugins hierarchically from Library folders, so plugins we
// encounter earlier must override plugins we encounter later)
-
- // first, test to make sure the user really wants plugins
-
for (size_t i = 0; i < plugins_.size(); ++i) {
if (plugins_[i].path.BaseName() == info.path.BaseName()) {
return false; // We already have a loaded plugin higher in the hierarchy.
Property changes on: webkit\glue\plugins\plugin_list_mac.mm
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/src/webkit/glue/plugins/plugin_list_mac.mm:r3734-4217,4606-5108,5177-5263
Merged /trunk/src/webkit/glue/plugins/plugin_list_mac.mm:r22951
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698