OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
8 #include <dlfcn.h> | 8 #include <dlfcn.h> |
9 #if defined(OS_OPENBSD) | 9 #if defined(OS_OPENBSD) |
10 #include <sys/exec_elf.h> | 10 #include <sys/exec_elf.h> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 { 7040036, "0c4b3768a6d4bfba003088e4b9090d381de1af2b", PLUGIN_QUIRK_NONE }, | 101 { 7040036, "0c4b3768a6d4bfba003088e4b9090d381de1af2b", PLUGIN_QUIRK_NONE }, |
102 // Flash 11.2.202.236, 32-bit - http://crbug.com/140086 | 102 // Flash 11.2.202.236, 32-bit - http://crbug.com/140086 |
103 { 17406436, "1e07eac912faf9426c52a288c76c3b6238f90b6b", | 103 { 17406436, "1e07eac912faf9426c52a288c76c3b6238f90b6b", |
104 PLUGIN_QUIRK_MISSING_SSE2_CHECK }, | 104 PLUGIN_QUIRK_MISSING_SSE2_CHECK }, |
105 // Flash 11.2.202.238, 32-bit - http://crbug.com/140086 | 105 // Flash 11.2.202.238, 32-bit - http://crbug.com/140086 |
106 { 17410532, "e9401097e97c8443a7d9156be62184ffe1addd5c", | 106 { 17410532, "e9401097e97c8443a7d9156be62184ffe1addd5c", |
107 PLUGIN_QUIRK_MISSING_SSE2_CHECK }, | 107 PLUGIN_QUIRK_MISSING_SSE2_CHECK }, |
108 }; | 108 }; |
109 | 109 |
110 int64 size; | 110 int64 size; |
111 if (!file_util::GetFileSize(path, &size)) | 111 if (!base::GetFileSize(path, &size)) |
112 return false; | 112 return false; |
113 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(bad_entries); i++) { | 113 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(bad_entries); i++) { |
114 if (bad_entries[i].size != size) | 114 if (bad_entries[i].size != size) |
115 continue; | 115 continue; |
116 | 116 |
117 std::string file_content; | 117 std::string file_content; |
118 if (!base::ReadFileToString(path, &file_content)) | 118 if (!base::ReadFileToString(path, &file_content)) |
119 continue; | 119 continue; |
120 std::string sha1 = base::SHA1HashString(file_content); | 120 std::string sha1 = base::SHA1HashString(file_content); |
121 std::string sha1_readable; | 121 std::string sha1_readable; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 } | 584 } |
585 | 585 |
586 // TODO(evanm): prefer the newest version of flash, etc. here? | 586 // TODO(evanm): prefer the newest version of flash, etc. here? |
587 | 587 |
588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); | 588 VLOG_IF(1, PluginList::DebugPluginLoading()) << "Using " << info.path.value(); |
589 | 589 |
590 return true; | 590 return true; |
591 } | 591 } |
592 | 592 |
593 } // namespace content | 593 } // namespace content |
OLD | NEW |