summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/plugin_lib.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 01:52:39 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 01:52:39 +0000
commit416634b04ddba855a8d41ee234a691b462270b25 (patch)
tree6c34eadca3efbb0eb380479b53a8141ff0a9899a /webkit/glue/plugins/plugin_lib.cc
parent2414e84fdc99feb8e3a674a1776cddf5d24529fd (diff)
downloadchromium_src-416634b04ddba855a8d41ee234a691b462270b25.zip
chromium_src-416634b04ddba855a8d41ee234a691b462270b25.tar.gz
chromium_src-416634b04ddba855a8d41ee234a691b462270b25.tar.bz2
This fixes bug http://code.google.com/p/chromium/issues/detail?id=4137,
which was an issue with the site failing to detect Windows media player. The site would run a script which would enumerate the list of plugins from the navigator object and compare each plugin name for "Windows Media" and "Plug". This is under the assumption that the windows media player plugin is typically named as Microsoft� Windows Media Player Firefox Plugin and it would find both the strings in the name. 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
Diffstat (limited to 'webkit/glue/plugins/plugin_lib.cc')
-rw-r--r--webkit/glue/plugins/plugin_lib.cc23
1 files changed, 13 insertions, 10 deletions
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) {