Chromium Code Reviews| Index: chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident.h |
| diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident.h b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..76046ebc7dd91b3b80a4d17dbc2db4bf6dd50b5d |
| --- /dev/null |
| +++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_INCIDENT_H_ |
| +#define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_INCIDENT_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
| + |
| +namespace safe_browsing { |
| + |
| +class ClientIncidentReport_IncidentData_BinaryIntegrityIncident; |
| + |
| +// An incident representing binaries with invalid signatures. |
| +class BinaryIntegrityIncident : public Incident { |
| + public: |
| + explicit BinaryIntegrityIncident( |
| + scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> |
| + binary_integrity); |
| + ~BinaryIntegrityIncident() override; |
| + |
| + // Incident: |
|
robertshield
2015/01/16 13:14:54
nit: maybe "Incident overrides:" to make it slight
grt (UTC plus 2)
2015/01/17 00:22:29
Someone (I don't remember who) asked me to do it t
|
| + |
| + // Returns IncidentType::BINARY_INTEGRITY. |
|
robertshield
2015/01/16 13:14:54
moar nit: are these methods used by anyone other t
grt (UTC plus 2)
2015/01/17 00:22:29
Indeed these are documenting the implementation. M
|
| + IncidentType GetType() const override; |
| + |
| + // Returns the basename of the binary. |
| + std::string GetKey() const override; |
| + |
| + // Returns a digest computed over the payload. |
| + uint32_t ComputeDigest() const override; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(BinaryIntegrityIncident); |
| +}; |
| + |
| +} // namespace safe_browsing |
| + |
| +#endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_INCIDENT_H_ |