OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #include "chrome/browser/safe_browsing/incident_reporting/script_request_inciden t.h" | |
6 | |
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" | |
10 | |
11 namespace safe_browsing { | |
12 | |
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()); | |
19 } | |
20 | |
21 ScriptRequestIncident::~ScriptRequestIncident() { | |
22 } | |
23 | |
24 IncidentType ScriptRequestIncident::GetType() const { | |
25 return IncidentType::SCRIPT_REQUEST; | |
26 } | |
27 | |
28 std::string ScriptRequestIncident::GetKey() const { | |
29 return payload()->script_request().script_digest(); | |
30 } | |
31 | |
32 uint32_t ScriptRequestIncident::ComputeDigest() const { | |
33 return 42; | |
mattm
2015/02/11 22:03:55
hmm
robertshield
2015/02/11 22:24:04
Indeed, this is worthy of a comment.
As per the
| |
34 } | |
35 | |
36 } // namespace safe_browsing | |
OLD | NEW |