OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/install_verification/win/imported_module_verification.h
" | 5 #include "chrome/browser/install_verification/win/imported_module_verification.h
" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <Windows.h> | 8 #include <Windows.h> |
8 | 9 |
9 #include <algorithm> | 10 #include <algorithm> |
10 #include <iterator> | 11 #include <iterator> |
11 #include <string> | 12 #include <string> |
12 #include <vector> | 13 #include <vector> |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" |
14 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
15 #include "chrome/browser/install_verification/win/module_info.h" | 17 #include "chrome/browser/install_verification/win/module_info.h" |
16 | 18 |
17 namespace { | 19 namespace { |
18 | 20 |
19 #if !defined(_WIN64) | 21 #if !defined(_WIN64) |
20 // We must make sure not to include modules here that are likely to get unloaded | 22 // We must make sure not to include modules here that are likely to get unloaded |
21 // because the scanning of the module is not done within a loader lock, so is | 23 // because the scanning of the module is not done within a loader lock, so is |
22 // not resilient to changes made to the modules list. | 24 // not resilient to changes made to the modules list. |
23 const wchar_t* const kModulesToScan[] = { | 25 const wchar_t* const kModulesToScan[] = { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 95 } |
94 | 96 |
95 std::vector<std::string> module_name_digests; | 97 std::vector<std::string> module_name_digests; |
96 std::transform(imported_module_names.begin(), | 98 std::transform(imported_module_names.begin(), |
97 imported_module_names.end(), | 99 imported_module_names.end(), |
98 std::back_inserter(module_name_digests), | 100 std::back_inserter(module_name_digests), |
99 &CalculateModuleNameDigest); | 101 &CalculateModuleNameDigest); |
100 ReportModuleMatches(module_name_digests, module_ids, delegate); | 102 ReportModuleMatches(module_name_digests, module_ids, delegate); |
101 #endif | 103 #endif |
102 } | 104 } |
OLD | NEW |