Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.h

Issue 1083193007: Remove legacy Module Verifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to position 330514; updated histograms.xml Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698