From 416634b04ddba855a8d41ee234a691b462270b25 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Fri, 7 Nov 2008 01:52:39 +0000 Subject: =?UTF-8?q?This=20fixes=20bug=20http://code.google.com/p/chromium/?= =?UTF-8?q?issues/detail=3Fid=3D4137,=20which=20was=20an=20issue=20with=20?= =?UTF-8?q?the=20site=20failing=20to=20detect=20Windows=20media=20player.?= =?UTF-8?q?=20The=20site=20would=20run=20a=20script=20which=20would=20enum?= =?UTF-8?q?erate=20the=20list=20of=20plugins=20from=20the=20navigator=20ob?= =?UTF-8?q?ject=20and=20compare=20each=20plugin=20name=20for=20"Windows=20?= =?UTF-8?q?Media"=20and=20"Plug".=20This=20is=20under=20the=20assumption?= =?UTF-8?q?=20that=20the=20windows=20media=20player=20plugin=20is=20typica?= =?UTF-8?q?lly=20named=20as=20Microsoft=C3=AF=C2=BF=C2=BD=20Windows=20Medi?= =?UTF-8?q?a=20Player=20Firefox=20Plugin=20and=20it=20would=20find=20both?= =?UTF-8?q?=20the=20strings=20in=20the=20name.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I had changed the name of activex shim instance for media player previously to Windows Media to fix a similar issue with bloomberg.com. Should have changed it to the full name at that point. The fix is to fully match the windows media player plugin name in the shim. The other change is to perform a case insensitive comparison of the plugin file names while looking for matching plugins. R=jam Bug=4137 Review URL: http://codereview.chromium.org/9482 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4950 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/plugin_lib.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'webkit/glue/plugins/plugin_lib.cc') diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc index f02cb91..c79d2cf 100644 --- a/webkit/glue/plugins/plugin_lib.cc +++ b/webkit/glue/plugins/plugin_lib.cc @@ -59,7 +59,7 @@ PluginLib* PluginLib::CreatePluginLib(const std::wstring& filename) { activex_shim::ActiveX_Shim_NP_Shutdown }; - static const InternalPluginInfo activex_shim_windows_media_player = { + static const InternalPluginInfo activex_shim_wmplayer = { {kActivexShimFileNameForMediaPlayer, kActivexShimFileNameForMediaPlayer, L"Windows Media Player", @@ -75,7 +75,7 @@ PluginLib* PluginLib::CreatePluginLib(const std::wstring& filename) { activex_shim::ActiveX_Shim_NP_Shutdown }; - static const InternalPluginInfo default_null_plugin_info = { + static const InternalPluginInfo default_plugin_info = { {kDefaultPluginDllName, L"Default Plug-in", L"Provides functionality for installing third-party plug-ins", @@ -91,16 +91,19 @@ PluginLib* PluginLib::CreatePluginLib(const std::wstring& filename) { WebPluginInfo* info = NULL; const InternalPluginInfo* internal_plugin_info = NULL; - if (filename == activex_shim_info_generic.version_info.file_name) { + if (!_wcsicmp(filename.c_str(), + activex_shim_info_generic.version_info.file_name.c_str())) { info = CreateWebPluginInfo(activex_shim_info_generic.version_info); internal_plugin_info = &activex_shim_info_generic; - } else if (filename == - activex_shim_windows_media_player.version_info.file_name) { - info = CreateWebPluginInfo(activex_shim_windows_media_player.version_info); - internal_plugin_info = &activex_shim_windows_media_player; - } else if (filename == default_null_plugin_info.version_info.file_name) { - info = CreateWebPluginInfo(default_null_plugin_info.version_info); - internal_plugin_info = &default_null_plugin_info; + } else if (!_wcsicmp(filename.c_str(), + activex_shim_wmplayer.version_info.file_name.c_str())) { + info = CreateWebPluginInfo(activex_shim_wmplayer.version_info); + internal_plugin_info = &activex_shim_wmplayer; + } else if (!_wcsicmp( + filename.c_str(), + default_plugin_info.version_info.file_name.c_str())) { + info = CreateWebPluginInfo(default_plugin_info.version_info); + internal_plugin_info = &default_plugin_info; } else { info = ReadWebPluginInfo(filename); if (!info) { -- cgit v1.1