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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.cc

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: Created 5 years, 2 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/binary_integrity_analyzer.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.cc b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.cc
index 4bd547e1e2114a20e60867c3fad4e71592f72bd3..3a63a0b503dd36fab2c7eada93fd9dd6e567901f 100644
--- a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer.cc
@@ -23,27 +23,22 @@
namespace safe_browsing {
-namespace {
-
void RecordSignatureVerificationTime(size_t file_index,
- const base::TimeDelta& verification_time) {
+ const base::TimeDelta& verification_time) {
static const char kHistogramName[] = "SBIRS.VerifyBinaryIntegrity.";
base::HistogramBase* signature_verification_time_histogram =
base::Histogram::FactoryTimeGet(
std::string(kHistogramName) + base::SizeTToString(file_index),
base::TimeDelta::FromMilliseconds(1),
- base::TimeDelta::FromSeconds(20),
- 50,
+ base::TimeDelta::FromSeconds(20), 50,
base::Histogram::kUmaTargetedHistogramFlag);
- signature_verification_time_histogram->AddTime(verification_time);
+ signature_verification_time_histogram->AddTime(verification_time);
}
-} // namespace
-
void RegisterBinaryIntegrityAnalysis() {
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_MACOSX)
scoped_refptr<SafeBrowsingService> safe_browsing_service(
g_browser_process->safe_browsing_service());
@@ -52,6 +47,7 @@ void RegisterBinaryIntegrityAnalysis() {
#endif
}
+#if !defined(OS_MACOSX)
void VerifyBinaryIntegrity(scoped_ptr<IncidentReceiver> incident_receiver) {
scoped_refptr<BinaryFeatureExtractor> binary_feature_extractor(
new BinaryFeatureExtractor());
@@ -84,6 +80,7 @@ void VerifyBinaryIntegrity(scoped_ptr<IncidentReceiver> incident_receiver) {
}
}
}
+#endif // !defined(OS_MACOSX)
#if !defined(OS_WIN)
std::vector<base::FilePath> GetCriticalBinariesPath() {

Powered by Google App Engine
This is Rietveld 408576698