| Index: webkit/plugins/npapi/plugin_list_win.cc
|
| diff --git a/webkit/plugins/npapi/plugin_list_win.cc b/webkit/plugins/npapi/plugin_list_win.cc
|
| index a7e3d022ce4bd26c5813de46c5b8bc0c1b9c47a6..c5e3af4eeab8c29bb9c64749a597116a0a83ee86 100644
|
| --- a/webkit/plugins/npapi/plugin_list_win.cc
|
| +++ b/webkit/plugins/npapi/plugin_list_win.cc
|
| @@ -335,115 +335,6 @@ bool IsNewerVersion(const std::wstring& a, const std::wstring& b) {
|
| return false;
|
| }
|
|
|
| -// TODO(ibraaaa): DELETE. http://crbug.com/124396
|
| -bool PluginList::ShouldLoadPlugin(
|
| - const webkit::WebPluginInfo& info,
|
| - ScopedVector<PluginGroup>* plugin_groups) {
|
| - // Version check
|
| -
|
| - for (size_t i = 0; i < plugin_groups->size(); ++i) {
|
| - const std::vector<webkit::WebPluginInfo>& plugins =
|
| - (*plugin_groups)[i]->web_plugin_infos();
|
| - for (size_t j = 0; j < plugins.size(); ++j) {
|
| - std::wstring plugin1 =
|
| - StringToLowerASCII(plugins[j].path.BaseName().value());
|
| - std::wstring plugin2 =
|
| - StringToLowerASCII(info.path.BaseName().value());
|
| - if ((plugin1 == plugin2 && HaveSharedMimeType(plugins[j], info)) ||
|
| - (plugin1 == kJavaDeploy1 && plugin2 == kJavaDeploy2) ||
|
| - (plugin1 == kJavaDeploy2 && plugin2 == kJavaDeploy1)) {
|
| - if (!IsNewerVersion(plugins[j].version, info.version))
|
| - return false; // We have loaded a plugin whose version is newer.
|
| - (*plugin_groups)[i]->RemovePlugin(plugins[j].path);
|
| - break;
|
| - }
|
| - }
|
| - }
|
| -
|
| - // Troublemakers
|
| -
|
| - std::wstring filename = StringToLowerASCII(info.path.BaseName().value());
|
| - // Depends on XPCOM.
|
| - if (filename == kMozillaActiveXPlugin)
|
| - return false;
|
| -
|
| - // Disable the Yahoo Application State plugin as it crashes the plugin
|
| - // process on return from NPObjectStub::OnInvoke. Please refer to
|
| - // http://b/issue?id=1372124 for more information.
|
| - if (filename == kYahooApplicationStatePlugin)
|
| - return false;
|
| -
|
| - // Disable the WangWang protocol handler plugin (npww.dll) as it crashes
|
| - // chrome during shutdown. Firefox also disables this plugin.
|
| - // Please refer to http://code.google.com/p/chromium/issues/detail?id=3953
|
| - // for more information.
|
| - if (filename == kWanWangProtocolHandlerPlugin)
|
| - return false;
|
| -
|
| - // We only work with newer versions of the Java plugin which use NPAPI only
|
| - // and don't depend on XPCOM.
|
| - if (filename == kJavaPlugin1 || filename == kJavaPlugin2) {
|
| - std::vector<std::wstring> ver;
|
| - base::SplitString(info.version, '.', &ver);
|
| - int major, minor, update;
|
| - if (ver.size() == 4 &&
|
| - base::StringToInt(ver[0], &major) &&
|
| - base::StringToInt(ver[1], &minor) &&
|
| - base::StringToInt(ver[2], &update)) {
|
| - if (major == 6 && minor == 0 && update < 120)
|
| - return false; // Java SE6 Update 11 or older.
|
| - }
|
| - }
|
| -
|
| - if (base::win::IsMetroProcess()) {
|
| - // In metro mode we only allow pepper plugins.
|
| - if (info.type == WebPluginInfo::PLUGIN_TYPE_NPAPI)
|
| - return false;
|
| - }
|
| -
|
| - // Special WMP handling
|
| -
|
| - // If both the new and old WMP plugins exist, only load the new one.
|
| - if (filename == kNewWMPPlugin) {
|
| - if (dont_load_new_wmp_)
|
| - return false;
|
| -
|
| - for (size_t i = 0; i < plugin_groups->size(); ++i) {
|
| - const std::vector<webkit::WebPluginInfo>& plugins =
|
| - (*plugin_groups)[i]->web_plugin_infos();
|
| - for (size_t j = 0; j < plugins.size(); ++j) {
|
| - if (plugins[j].path.BaseName().value() == kOldWMPPlugin) {
|
| - (*plugin_groups)[i]->RemovePlugin(plugins[j].path);
|
| - break;
|
| - }
|
| - }
|
| - }
|
| - } else if (filename == kOldWMPPlugin) {
|
| - for (size_t i = 0; i < plugin_groups->size(); ++i) {
|
| - const std::vector<webkit::WebPluginInfo>& plugins =
|
| - (*plugin_groups)[i]->web_plugin_infos();
|
| - for (size_t j = 0; j < plugins.size(); ++j) {
|
| - if (plugins[j].path.BaseName().value() == kNewWMPPlugin)
|
| - return false;
|
| - }
|
| - }
|
| - }
|
| -
|
| - HMODULE plugin_dll = NULL;
|
| - bool load_plugin = true;
|
| -
|
| - // The plugin list could contain a 64 bit plugin which we cannot load.
|
| - for (size_t i = 0; i < internal_plugins_.size(); ++i) {
|
| - if (info.path == internal_plugins_[i].info.path)
|
| - continue;
|
| -
|
| - if (file_util::PathExists(info.path) && (!IsValid32BitImage(info.path)))
|
| - load_plugin = false;
|
| - break;
|
| - }
|
| - return load_plugin;
|
| -}
|
| -
|
| bool PluginList::ShouldLoadPluginUsingPluginList(
|
| const webkit::WebPluginInfo& info,
|
| std::vector<webkit::WebPluginInfo>* plugins) {
|
|
|