Commit 91b055f0 authored by robertshield's avatar robertshield Committed by Commit bot

Throttle script request incidents to one per user.

BUG=461979
TEST=NONE

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

Cr-Commit-Position: refs/heads/master@{#318192}
parent daadc715
...@@ -26,11 +26,14 @@ IncidentType ScriptRequestIncident::GetType() const { ...@@ -26,11 +26,14 @@ IncidentType ScriptRequestIncident::GetType() const {
} }
std::string ScriptRequestIncident::GetKey() 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";
} }
uint32_t ScriptRequestIncident::ComputeDigest() const { uint32_t ScriptRequestIncident::ComputeDigest() const {
// Return a constant to ensure that only one incident per digest is reported. // Return a constant in addition to a fixed key above to ensure that only one
// incident per user is reported.
return 42; return 42;
} }
......
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