summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 23:26:43 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 23:26:43 +0000
commit90fe71b4dd786fc659b7eea281dddddad8312f1a (patch)
tree380b552d7c7a6f24d58e899d8a2efd41c0e5ffeb
parent87917191279ce98397d40aee5e27f8fbe6239a20 (diff)
downloadchromium_src-90fe71b4dd786fc659b7eea281dddddad8312f1a.zip
chromium_src-90fe71b4dd786fc659b7eea281dddddad8312f1a.tar.gz
chromium_src-90fe71b4dd786fc659b7eea281dddddad8312f1a.tar.bz2
Don't load the Java plugin prior to update 12, since they don't work in Chrome anymore. By blocking loading them, the plugin installer UI is triggered.
BUG=26451 Review URL: http://codereview.chromium.org/371001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31159 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/plugins/plugin_constants_win.h2
-rw-r--r--webkit/glue/plugins/plugin_list_win.cc15
2 files changed, 17 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_constants_win.h b/webkit/glue/plugins/plugin_constants_win.h
index 7357369..b708706 100644
--- a/webkit/glue/plugins/plugin_constants_win.h
+++ b/webkit/glue/plugins/plugin_constants_win.h
@@ -33,5 +33,7 @@
#define kAcrobatReaderPlugin L"nppdf32.dll"
#define kRealPlayerPlugin L"nppl3260.dll"
#define kSilverlightPlugin L"npctrl.dll"
+#define kJavaPlugin1 L"npjp2.dll"
+#define kJavaPlugin2 L"npdeploytk.dll"
#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H_
diff --git a/webkit/glue/plugins/plugin_list_win.cc b/webkit/glue/plugins/plugin_list_win.cc
index bdf4b07..c7fd5d02 100644
--- a/webkit/glue/plugins/plugin_list_win.cc
+++ b/webkit/glue/plugins/plugin_list_win.cc
@@ -317,6 +317,21 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
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;
+ SplitString(info.version, '.', &ver);
+ int major, minor, update;
+ if (ver.size() == 4 &&
+ StringToInt(ver[0], &major) &&
+ StringToInt(ver[1], &minor) &&
+ StringToInt(ver[2], &update)) {
+ if (major == 6 && minor == 0 && update < 120)
+ return false; // Java SE6 Update 12 or older.
+ }
+ }
+
// Special WMP handling
// If both the new and old WMP plugins exist, only load the new one.