Index: chrome/browser/safe_browsing/incident_reporting/script_request_incident.cc |
diff --git a/chrome/browser/safe_browsing/incident_reporting/script_request_incident.cc b/chrome/browser/safe_browsing/incident_reporting/script_request_incident.cc |
index 6aa4598083b99c2ecf8fbd7af8e99663866e84f5..7f635ea1d67091e24da4f5e7e5010c2e2cb0c871 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting/script_request_incident.cc |
+++ b/chrome/browser/safe_browsing/incident_reporting/script_request_incident.cc |
@@ -26,11 +26,14 @@ IncidentType ScriptRequestIncident::GetType() const { |
} |
std::string ScriptRequestIncident::GetKey() const { |
- return payload()->script_request().script_digest(); |
+ // Use a static key in addition to a fixed digest below to ensure that only |
+ // one incident per user is reported. |
+ return "script_request_incident_key"; |
grt (UTC plus 2)
2015/02/26 03:21:37
i prefer simply "script_request_incident" so that
robertshield
2015/02/26 04:27:52
Those other preferences sound like jerks to me.
grt (UTC plus 2)
2015/02/26 04:47:18
Their mothers didn't raise them right.
|
} |
uint32_t ScriptRequestIncident::ComputeDigest() const { |
- // Return a constant to ensure that only one incident per digest is reported. |
+ // Return a constant to ensure in addition to a fixed key above to ensure that |
grt (UTC plus 2)
2015/02/26 03:21:37
please reduce the ensure-factor of this comment
robertshield
2015/02/26 04:27:52
You can never be too sure.
grt (UTC plus 2)
2015/02/26 04:47:18
Indubitably.
|
+ // only one incident per user is reported. |
return 42; |
} |