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

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

Issue 1363613004: Implement anonymous, opt-in, collection of OS X binary integrity incidents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ran git cl format Created 5 years, 1 month 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/binary_integrity_analyzer_mac.h
diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.h b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..05ecec249aa4da954bd759b5c281300547513b26
--- /dev/null
+++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac.h
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZER_MAC_H_
+#define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZER_MAC_H_
+
+#include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.h"
+
+#include <string>
+#include <vector>
+
+#include "base/files/file_path.h"
+
+namespace safe_browsing {
+
+class IncidentReceiver;
+
+// Wraps a path to a code object and its specified code requirement.
+struct PathAndRequirement {
+ PathAndRequirement(const base::FilePath& o_path,
+ const std::string& o_requirement)
+ : path(o_path), requirement(o_requirement) {}
+ base::FilePath path;
+ std::string requirement;
+};
+
+// Returns a vector of pairs, each of which contains the paths to the binaries
+// to verify, and the codesign requirement to use when verifying.
+std::vector<PathAndRequirement> GetCriticalPathsAndRequirements();
+
+// This is a helper stub to allow the signature checking code to be tested with
+// custom requirements and files.
+void VerifyBinaryIntegrityForTesting(IncidentReceiver* incident_receiver,
+ const base::FilePath& path,
+ const std::string& requirement);
+
+} // namespace safe_browsing
+
+#endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_ANALYZER_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698