| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat
ure_incident.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat
ure_incident.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/safe_browsing/incident_reporting/incident_handler_util.
h" | 8 #include "chrome/browser/safe_browsing/incident_reporting/incident_handler_util.
h" |
| 9 #include "chrome/common/safe_browsing/csd.pb.h" | 9 #include "components/safe_browsing/csd.pb.h" |
| 10 | 10 |
| 11 namespace safe_browsing { | 11 namespace safe_browsing { |
| 12 | 12 |
| 13 VariationsSeedSignatureIncident::VariationsSeedSignatureIncident( | 13 VariationsSeedSignatureIncident::VariationsSeedSignatureIncident( |
| 14 std::unique_ptr< | 14 std::unique_ptr< |
| 15 ClientIncidentReport_IncidentData_VariationsSeedSignatureIncident> | 15 ClientIncidentReport_IncidentData_VariationsSeedSignatureIncident> |
| 16 variations_seed_signature_incident) { | 16 variations_seed_signature_incident) { |
| 17 DCHECK(variations_seed_signature_incident); | 17 DCHECK(variations_seed_signature_incident); |
| 18 DCHECK(variations_seed_signature_incident->has_variations_seed_signature()); | 18 DCHECK(variations_seed_signature_incident->has_variations_seed_signature()); |
| 19 payload()->set_allocated_variations_seed_signature( | 19 payload()->set_allocated_variations_seed_signature( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 std::string VariationsSeedSignatureIncident::GetKey() const { | 30 std::string VariationsSeedSignatureIncident::GetKey() const { |
| 31 return "variations_seed_signature"; | 31 return "variations_seed_signature"; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Returns a digest computed over the payload. | 34 // Returns a digest computed over the payload. |
| 35 uint32_t VariationsSeedSignatureIncident::ComputeDigest() const { | 35 uint32_t VariationsSeedSignatureIncident::ComputeDigest() const { |
| 36 return HashMessage(payload()->variations_seed_signature()); | 36 return HashMessage(payload()->variations_seed_signature()); |
| 37 } | 37 } |
| 38 | 38 |
| 39 } // namespace safe_browsing | 39 } // namespace safe_browsing |
| OLD | NEW |