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

Side by Side Diff: webkit/glue/plugins/plugin_list_mac.mm

Issue 211031: Remove the temporary Mac plugin whitelist.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/plugin_instance.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "webkit/glue/plugins/plugin_list.h" 5 #include "webkit/glue/plugins/plugin_list.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/mac_util.h" 10 #include "base/mac_util.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, 70 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
71 std::vector<WebPluginInfo>* plugins) { 71 std::vector<WebPluginInfo>* plugins) {
72 // The Gears plugin is Safari-specific, and causes crashes, so don't load it. 72 // The Gears plugin is Safari-specific, and causes crashes, so don't load it.
73 for (std::vector<WebPluginMimeType>::const_iterator i = 73 for (std::vector<WebPluginMimeType>::const_iterator i =
74 info.mime_types.begin(); i != info.mime_types.end(); ++i) { 74 info.mime_types.begin(); i != info.mime_types.end(); ++i) {
75 if (i->mime_type == "application/x-googlegears") 75 if (i->mime_type == "application/x-googlegears")
76 return false; 76 return false;
77 } 77 }
78 78
79 // For now, only load plugins that we know are working reasonably well.
80 // Anything using QuickDraw-based drawing, for example, would crash
81 // immediately.
82
83 std::string plugin_name = WideToUTF8(info.name);
84 if (!(plugin_name == "WebKit Test PlugIn" ||
85 plugin_name == "Shockwave Flash" ||
86 plugin_name == "Picasa" ||
87 plugin_name == "Google Talk Browser Plugin" ||
88 plugin_name == "Google Talk NPAPI Plugin")) {
89 return false;
90 }
91
92 // Hierarchy check 79 // Hierarchy check
93 // (we're loading plugins hierarchically from Library folders, so plugins we 80 // (we're loading plugins hierarchically from Library folders, so plugins we
94 // encounter earlier must override plugins we encounter later) 81 // encounter earlier must override plugins we encounter later)
95 for (size_t i = 0; i < plugins->size(); ++i) { 82 for (size_t i = 0; i < plugins->size(); ++i) {
96 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { 83 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) {
97 return false; // We already have a loaded plugin higher in the hierarchy. 84 return false; // We already have a loaded plugin higher in the hierarchy.
98 } 85 }
99 } 86 }
100 87
101 return true; 88 return true;
102 } 89 }
103 90
104 } // namespace NPAPI 91 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_instance.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698