OLD | NEW |
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 Loading... |
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 |
OLD | NEW |