Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident.h

Issue 856543004: Replace incident type handlers with implementations of Incident. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_INCIDEN T_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_INCIDEN T_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/safe_browsing/incident_reporting/incident.h"
10
11 namespace safe_browsing {
12
13 class ClientIncidentReport_IncidentData_BinaryIntegrityIncident;
14
15 // An incident representing binaries with invalid signatures.
16 class BinaryIntegrityIncident : public Incident {
17 public:
18 explicit BinaryIntegrityIncident(
19 scoped_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
20 binary_integrity);
21 ~BinaryIntegrityIncident() override;
22
23 // 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
24
25 // 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
26 IncidentType GetType() const override;
27
28 // Returns the basename of the binary.
29 std::string GetKey() const override;
30
31 // Returns a digest computed over the payload.
32 uint32_t ComputeDigest() const override;
33
34 private:
35 DISALLOW_COPY_AND_ASSIGN(BinaryIntegrityIncident);
36 };
37
38 } // namespace safe_browsing
39
40 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_BINARY_INTEGRITY_INCI DENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698