| Index: chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.h
|
| diff --git a/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.h b/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.h
|
| index 1482efb6bd318a243bc8fb5d835db939f1209aa7..cfd730e273508c58977b9b480e578c595fb24c5a 100644
|
| --- a/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.h
|
| +++ b/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.h
|
| @@ -7,11 +7,6 @@
|
|
|
| #include <stdint.h>
|
|
|
| -#include <set>
|
| -#include <string>
|
| -
|
| -#include "chrome/common/safe_browsing/csd.pb.h"
|
| -
|
| namespace base {
|
| namespace win {
|
| class PEImage;
|
| @@ -21,21 +16,7 @@ class PEImageAsData;
|
|
|
| namespace safe_browsing {
|
|
|
| -// This enum defines the possible module states VerifyModule can return.
|
| -enum ModuleState {
|
| - MODULE_STATE_UNKNOWN,
|
| - MODULE_STATE_UNMODIFIED,
|
| - MODULE_STATE_MODIFIED,
|
| -};
|
| -
|
| -struct VerificationResult {
|
| - ModuleState state;
|
| - // The number of bytes with different values on disk and in memory.
|
| - int num_bytes_different;
|
| - // True if the relocations were ordered and the verification was fully
|
| - // completed.
|
| - bool verification_completed;
|
| -};
|
| +class ClientIncidentReport_EnvironmentData_Process_ModuleState;
|
|
|
| // Helper to grab the addresses and size of the code section of a PEImage.
|
| // Returns two addresses: one for the dll loaded as a library, the other for the
|
| @@ -47,17 +28,14 @@ bool GetCodeAddrsAndSize(const base::win::PEImage& mem_peimage,
|
| uint32_t* code_size);
|
|
|
| // Examines the code section of the given module in memory and on disk, looking
|
| -// for unexpected differences. Returns a ModuleState and and a set of the
|
| -// possibly modified exports.
|
| -ModuleState VerifyModule(const wchar_t* module_name,
|
| - std::set<std::string>* modified_exports,
|
| - int* num_bytes_different);
|
| -
|
| -// Examines the code section of the given module in memory and on disk, looking
|
| // for unexpected differences and populating |module_state| in the process.
|
| -VerificationResult NewVerifyModule(
|
| +// Returns true if the entire image was scanned. |num_bytes_different| is
|
| +// populated with the number of differing bytes found, even if the scan failed
|
| +// to complete.
|
| +bool VerifyModule(
|
| const wchar_t* module_name,
|
| - ClientIncidentReport_EnvironmentData_Process_ModuleState* module_state);
|
| + ClientIncidentReport_EnvironmentData_Process_ModuleState* module_state,
|
| + int* num_bytes_different);
|
|
|
| } // namespace safe_browsing
|
|
|
|
|