OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/safe_browsing/incident_reporting/blacklist_load_analyze
r.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyze
r.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/install_verification/win/module_info.h" | 17 #include "chrome/browser/install_verification/win/module_info.h" |
18 #include "chrome/browser/install_verification/win/module_verification_common.h" | 18 #include "chrome/browser/install_verification/win/module_verification_common.h" |
19 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_inciden
t.h" | 19 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_inciden
t.h" |
20 #include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h" | 20 #include "chrome/browser/safe_browsing/incident_reporting/incident_receiver.h" |
21 #include "chrome/browser/safe_browsing/path_sanitizer.h" | 21 #include "chrome/browser/safe_browsing/path_sanitizer.h" |
22 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 22 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
23 #include "chrome/common/safe_browsing/binary_feature_extractor.h" | 23 #include "chrome/common/safe_browsing/binary_feature_extractor.h" |
24 #include "chrome/common/safe_browsing/csd.pb.h" | |
25 #include "chrome_elf/blacklist/blacklist.h" | 24 #include "chrome_elf/blacklist/blacklist.h" |
| 25 #include "components/safe_browsing/csd.pb.h" |
26 | 26 |
27 namespace safe_browsing { | 27 namespace safe_browsing { |
28 | 28 |
29 // Retrieves the set of blacklisted modules that are loaded in the process. | 29 // Retrieves the set of blacklisted modules that are loaded in the process. |
30 // Returns true if successful, false otherwise. | 30 // Returns true if successful, false otherwise. |
31 bool GetLoadedBlacklistedModules(std::vector<base::string16>* module_names) { | 31 bool GetLoadedBlacklistedModules(std::vector<base::string16>* module_names) { |
32 DCHECK(module_names); | 32 DCHECK(module_names); |
33 | 33 |
34 std::set<ModuleInfo> module_info_set; | 34 std::set<ModuleInfo> module_info_set; |
35 if (!GetLoadedModules(&module_info_set)) | 35 if (!GetLoadedModules(&module_info_set)) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 | 106 |
107 // Send the report. | 107 // Send the report. |
108 incident_receiver->AddIncidentForProcess( | 108 incident_receiver->AddIncidentForProcess( |
109 base::MakeUnique<BlacklistLoadIncident>(std::move(blacklist_load))); | 109 base::MakeUnique<BlacklistLoadIncident>(std::move(blacklist_load))); |
110 } | 110 } |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 } // namespace safe_browsing | 114 } // namespace safe_browsing |
OLD | NEW |