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

Side by Side Diff: webkit/glue/plugins/plugin_list_win.cc

Issue 371001: Don't load the Java plugin prior to update 12, since they don't work in Chrom... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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_constants_win.h ('k') | no next file » | 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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <tchar.h> 5 #include <tchar.h>
6 6
7 #include "webkit/glue/plugins/plugin_list.h" 7 #include "webkit/glue/plugins/plugin_list.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 if (filename == kYahooApplicationStatePlugin) 310 if (filename == kYahooApplicationStatePlugin)
311 return false; 311 return false;
312 312
313 // Disable the WangWang protocol handler plugin (npww.dll) as it crashes 313 // Disable the WangWang protocol handler plugin (npww.dll) as it crashes
314 // chrome during shutdown. Firefox also disables this plugin. 314 // chrome during shutdown. Firefox also disables this plugin.
315 // Please refer to http://code.google.com/p/chromium/issues/detail?id=3953 315 // Please refer to http://code.google.com/p/chromium/issues/detail?id=3953
316 // for more information. 316 // for more information.
317 if (filename == kWanWangProtocolHandlerPlugin) 317 if (filename == kWanWangProtocolHandlerPlugin)
318 return false; 318 return false;
319 319
320 // We only work with newer versions of the Java plugin which use NPAPI only
321 // and don't depend on XPCOM.
322 if (filename == kJavaPlugin1 || filename == kJavaPlugin2) {
323 std::vector<std::wstring> ver;
324 SplitString(info.version, '.', &ver);
325 int major, minor, update;
326 if (ver.size() == 4 &&
327 StringToInt(ver[0], &major) &&
328 StringToInt(ver[1], &minor) &&
329 StringToInt(ver[2], &update)) {
330 if (major == 6 && minor == 0 && update < 120)
Peter Kasting 2009/11/05 23:27:16 Shouldn't this be: if ((major < 6) || ((major == 6
331 return false; // Java SE6 Update 12 or older.
Peter Kasting 2009/11/05 23:27:16 This comment doesn't match the code, does it? In
332 }
333 }
334
320 // Special WMP handling 335 // Special WMP handling
321 336
322 // If both the new and old WMP plugins exist, only load the new one. 337 // If both the new and old WMP plugins exist, only load the new one.
323 if (filename == kNewWMPPlugin) { 338 if (filename == kNewWMPPlugin) {
324 if (dont_load_new_wmp_) 339 if (dont_load_new_wmp_)
325 return false; 340 return false;
326 341
327 for (size_t i = 0; i < plugins->size(); ++i) { 342 for (size_t i = 0; i < plugins->size(); ++i) {
328 if ((*plugins)[i].path.BaseName().value() == kOldWMPPlugin) { 343 if ((*plugins)[i].path.BaseName().value() == kOldWMPPlugin) {
329 plugins->erase(plugins->begin() + i); 344 plugins->erase(plugins->begin() + i);
330 break; 345 break;
331 } 346 }
332 } 347 }
333 } else if (filename == kOldWMPPlugin) { 348 } else if (filename == kOldWMPPlugin) {
334 for (size_t i = 0; i < plugins->size(); ++i) { 349 for (size_t i = 0; i < plugins->size(); ++i) {
335 if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin) 350 if ((*plugins)[i].path.BaseName().value() == kNewWMPPlugin)
336 return false; 351 return false;
337 } 352 }
338 } 353 }
339 354
340 return true; 355 return true;
341 } 356 }
342 357
343 } // namespace NPAPI 358 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_constants_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698