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

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

Issue 646733002: Added incident report for variations seed signature mismatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor styling fixes. Created 6 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/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 30e5beb801cd139b7fad3f114dcead603725e136..bcefb9c0e4d13f0adc30a83dd5ab93a4c6f3dbe3 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident_handlers.h"
#include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_handlers.h"
#include "chrome/browser/safe_browsing/incident_reporting/environment_data_collection.h"
+#include "chrome/browser/safe_browsing/incident_reporting/finch_config_signature_incident_handlers.h"
#include "chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.h"
#include "chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h"
#include "chrome/browser/safe_browsing/incident_reporting/tracked_preference_incident_handlers.h"
@@ -49,8 +50,9 @@ enum IncidentType {
TRACKED_PREFERENCE = 1,
BINARY_INTEGRITY = 2,
BLACKLIST_LOAD = 3,
+ FINCH_CONFIG_SIGNATURE = 4,
// Values for new incident types go here.
- NUM_INCIDENT_TYPES = 4
+ NUM_INCIDENT_TYPES = 5
};
// The action taken for an incident; used for user metrics (see
@@ -89,6 +91,8 @@ size_t CountIncidents(const ClientIncidentReport_IncidentData& incident) {
++result;
if (incident.has_blacklist_load())
++result;
+ if (incident.has_finch_config_signature())
+ ++result;
// Add detection for new incident types here.
return result;
}
@@ -102,9 +106,11 @@ IncidentType GetIncidentType(
return BINARY_INTEGRITY;
if (incident_data.has_blacklist_load())
return BLACKLIST_LOAD;
+ if (incident_data.has_finch_config_signature())
+ return FINCH_CONFIG_SIGNATURE;
// Add detection for new incident types here.
- COMPILE_ASSERT(BLACKLIST_LOAD + 1 == NUM_INCIDENT_TYPES,
+ COMPILE_ASSERT(FINCH_CONFIG_SIGNATURE + 1 == NUM_INCIDENT_TYPES,
add_support_for_new_types);
NOTREACHED();
return NUM_INCIDENT_TYPES;
@@ -141,9 +147,13 @@ PersistentIncidentState ComputeIncidentState(
state.key = GetBlacklistLoadIncidentKey(incident);
state.digest = GetBlacklistLoadIncidentDigest(incident);
break;
+ case FINCH_CONFIG_SIGNATURE:
+ state.key = GetFinchConfigSignatureIncidentKey(incident);
+ state.digest = GetFinchConfigSignatureIncidentDigest(incident);
+ break;
// Add handling for new incident types here.
default:
- COMPILE_ASSERT(BLACKLIST_LOAD + 1 == NUM_INCIDENT_TYPES,
+ COMPILE_ASSERT(FINCH_CONFIG_SIGNATURE + 1 == NUM_INCIDENT_TYPES,
add_support_for_new_types);
NOTREACHED();
break;

Powered by Google App Engine
This is Rietveld 408576698