ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / chrome / browser / safe_browsing / incident_reporting / script_request_incident.cc
blob74a6ca323d0e3b0c3176f92056e51050d07d3804
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/safe_browsing/incident_reporting/script_request_incident.h"
7 #include "base/logging.h"
8 #include "chrome/browser/safe_browsing/incident_reporting/incident_handler_util.h"
9 #include "chrome/common/safe_browsing/csd.pb.h"
11 namespace safe_browsing {
13 ScriptRequestIncident::ScriptRequestIncident(
14 scoped_ptr<ClientIncidentReport_IncidentData_ScriptRequestIncident>
15 script_request_incident) {
16 DCHECK(script_request_incident);
17 DCHECK(script_request_incident->has_script_digest());
18 payload()->set_allocated_script_request(script_request_incident.release());
21 ScriptRequestIncident::~ScriptRequestIncident() {
24 IncidentType ScriptRequestIncident::GetType() const {
25 return IncidentType::SCRIPT_REQUEST;
28 std::string ScriptRequestIncident::GetKey() const {
29 // Use a static key in addition to a fixed digest below to ensure that only
30 // one incident per user is reported.
31 return "script_request_incident";
34 uint32_t ScriptRequestIncident::ComputeDigest() const {
35 // Return a constant in addition to a fixed key above to ensure that only one
36 // incident per user is reported.
37 return 42;
40 } // namespace safe_browsing