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

Side by Side Diff: content/common/plugin_list_win.cc

Issue 327983002: Do not attempt to load 32-bit NPAPI plugins on 64-bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 "content/common/plugin_list.h" 5 #include "content/common/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/file_util.h" 10 #include "base/file_util.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 } 457 }
458 458
459 } else if (filename == kOldWMPPlugin) { 459 } else if (filename == kOldWMPPlugin) {
460 for (size_t j = 0; j < plugins->size(); ++j) { 460 for (size_t j = 0; j < plugins->size(); ++j) {
461 if ((*plugins)[j].path.BaseName().value() == kNewWMPPlugin) 461 if ((*plugins)[j].path.BaseName().value() == kNewWMPPlugin)
462 return false; 462 return false;
463 } 463 }
464 } 464 }
465 465
466 #if !defined(ARCH_CPU_X86_64) 466 base::FilePath plugin_path(info.path);
467 #if defined(ARCH_CPU_X86_64)
468 // The plugin in question could be a 32 bit plugin which we cannot load.
469 if (IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path)))
470 return false;
471 #else
467 // The plugin in question could be a 64 bit plugin which we cannot load. 472 // The plugin in question could be a 64 bit plugin which we cannot load.
468 base::FilePath plugin_path(info.path);
469 if (!IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path))) 473 if (!IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path)))
470 return false; 474 return false;
471 #endif 475 #endif
472 return true; 476 return true;
473 } 477 }
474 478
475 } // namespace content 479 } // namespace content
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