| 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/module_integrity_verif
ier_win.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/module_integrity_verif
ier_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/memory_mapped_file.h" | 14 #include "base/files/memory_mapped_file.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/metrics/sparse_histogram.h" | 16 #include "base/metrics/histogram_macros.h" |
| 17 #include "base/scoped_native_library.h" | 17 #include "base/scoped_native_library.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/win/pe_image.h" | 19 #include "base/win/pe_image.h" |
| 20 #include "chrome/common/safe_browsing/csd.pb.h" | 20 #include "chrome/common/safe_browsing/csd.pb.h" |
| 21 | 21 |
| 22 namespace safe_browsing { | 22 namespace safe_browsing { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 // The maximum amount of bytes that can be reported as modified by VerifyModule. | 26 // The maximum amount of bytes that can be reported as modified by VerifyModule. |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // entire module was scanned and understood. | 381 // entire module was scanned and understood. |
| 382 if (state.bytes_different) | 382 if (state.bytes_different) |
| 383 module_state->set_modified_state(ModuleState::MODULE_STATE_MODIFIED); | 383 module_state->set_modified_state(ModuleState::MODULE_STATE_MODIFIED); |
| 384 else if (!state.unknown_reloc_type && scan_complete) | 384 else if (!state.unknown_reloc_type && scan_complete) |
| 385 module_state->set_modified_state(ModuleState::MODULE_STATE_UNMODIFIED); | 385 module_state->set_modified_state(ModuleState::MODULE_STATE_UNMODIFIED); |
| 386 | 386 |
| 387 return scan_complete; | 387 return scan_complete; |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace safe_browsing | 390 } // namespace safe_browsing |
| OLD | NEW |