Index: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc |
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc |
index 18f91f5effbcf14929154155adc245c226948529..49f2f77adfa41aee5ccd178af23d246110bd2f0b 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc |
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc |
@@ -10,6 +10,7 @@ |
#include <utility> |
#include <vector> |
+#include "base/feature_list.h" |
#include "base/macros.h" |
#include "base/metrics/field_trial.h" |
#include "base/metrics/histogram.h" |
@@ -42,6 +43,12 @@ |
namespace safe_browsing { |
+// Enables reporting of suspicious modules loaded in the process. If this |
+// feature is disabled, incidents get pruned instead of reported. |
+extern const base::Feature kIncidentReportingSuspiciousModuleReporting{ |
grt (UTC plus 2)
2016/03/29 20:37:58
nit: omit extern?
nit: space before { (unless git
|
+ "IncidentReportingSuspiciousModuleReporting", |
+ base::FEATURE_DISABLED_BY_DEFAULT}; |
+ |
namespace { |
// The action taken for an incident; used for user metrics (see |
@@ -973,6 +980,12 @@ void IncidentReportingService::ProcessIncidentsIfCollectionComplete() { |
// Drop the incident and mark for future pruning since no executable |
// download was found. |
transaction.MarkAsReported(state.type, state.key, state.digest); |
+ } else if (incident->GetType() == IncidentType::SUSPICIOUS_MODULE && |
grt (UTC plus 2)
2016/03/29 20:37:58
can't say i like having the service know intimate
proberge
2016/03/29 20:47:10
Yeah, it's not great. We'll get rid of this piece
|
+ !base::FeatureList::IsEnabled( |
+ kIncidentReportingSuspiciousModuleReporting)) { |
+ LogIncidentDataType(PRUNED, *incident); |
+ // Drop the incident and mark for future pruning. |
+ transaction.MarkAsReported(state.type, state.key, state.digest); |
} else { |
LogIncidentDataType(ACCEPTED, *incident); |
// Ownership of the payload is passed to the report. |