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

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

Issue 17543004: Allow the same version plugin to be loaded multiple times on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reverted comment change. Created 7 years, 6 months 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 | « no previous file | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/plugins/npapi/plugin_list.h" 5 #include "webkit/plugins/npapi/plugin_list.h"
6 6
7 #include <set> 7 #include <set>
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 std::vector<webkit::WebPluginInfo>* plugins) { 383 std::vector<webkit::WebPluginInfo>* plugins) {
384 // Version check 384 // Version check
385 for (size_t j = 0; j < plugins->size(); ++j) { 385 for (size_t j = 0; j < plugins->size(); ++j) {
386 base::FilePath::StringType plugin1 = 386 base::FilePath::StringType plugin1 =
387 StringToLowerASCII((*plugins)[j].path.BaseName().value()); 387 StringToLowerASCII((*plugins)[j].path.BaseName().value());
388 base::FilePath::StringType plugin2 = 388 base::FilePath::StringType plugin2 =
389 StringToLowerASCII(info.path.BaseName().value()); 389 StringToLowerASCII(info.path.BaseName().value());
390 if ((plugin1 == plugin2 && HaveSharedMimeType((*plugins)[j], info)) || 390 if ((plugin1 == plugin2 && HaveSharedMimeType((*plugins)[j], info)) ||
391 (plugin1 == kJavaDeploy1 && plugin2 == kJavaDeploy2) || 391 (plugin1 == kJavaDeploy1 && plugin2 == kJavaDeploy2) ||
392 (plugin1 == kJavaDeploy2 && plugin2 == kJavaDeploy1)) { 392 (plugin1 == kJavaDeploy2 && plugin2 == kJavaDeploy1)) {
393 if (!IsNewerVersion((*plugins)[j].version, info.version)) 393 if (IsNewerVersion(info.version, (*plugins)[j].version))
394 return false; // We have loaded a plugin whose version is newer. 394 return false; // We have loaded a plugin whose version is newer.
395 plugins->erase(plugins->begin() + j); 395 plugins->erase(plugins->begin() + j);
396 break; 396 break;
397 } 397 }
398 } 398 }
399 399
400 // The checks below only apply to NPAPI plugins. 400 // The checks below only apply to NPAPI plugins.
401 if (info.type != WebPluginInfo::PLUGIN_TYPE_NPAPI) 401 if (info.type != WebPluginInfo::PLUGIN_TYPE_NPAPI)
402 return true; 402 return true;
403 403
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // The plugin in question could be a 64 bit plugin which we cannot load. 466 // The plugin in question could be a 64 bit plugin which we cannot load.
467 base::FilePath plugin_path(info.path); 467 base::FilePath plugin_path(info.path);
468 if (!IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path))) 468 if (!IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path)))
469 return false; 469 return false;
470 #endif 470 #endif
471 return true; 471 return true;
472 } 472 }
473 473
474 } // namespace npapi 474 } // namespace npapi
475 } // namespace webkit 475 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698