Commit aed9c27d authored by proberge's avatar proberge Committed by Commit bot

Add another feature flag which allows SuspiciousModule reports to be sent.

BUG=598736

Review URL: https://codereview.chromium.org/1843663002

Cr-Commit-Position: refs/heads/master@{#383825}
parent cfee0624
......@@ -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{
"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 &&
!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.
......
......@@ -14,7 +14,7 @@
namespace safe_browsing {
#if defined(OS_WIN)
// Enables analysis and reporting of suspicious modules loaded in the process.
// Enables analysis of suspicious modules loaded in the process.
extern const base::Feature kIncidentReportingModuleLoadAnalysis{
"IncidentReportingModuleLoadAnalysis", base::FEATURE_DISABLED_BY_DEFAULT};
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment