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

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

Issue 1024943002: Add domain request detection to incident reporting service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge domain and script incidents, ignore top-level requests, improve unit tests Created 5 years, 9 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
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 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace safe_browsing { 14 namespace safe_browsing {
15 15
16 class ClientIncidentReport_IncidentData; 16 class ClientIncidentReport_IncidentData;
17 17
18 // An incident's type. Values from this enum are used for histograms (hence the 18 // An incident's type. Values from this enum are used for histograms (hence the
19 // making underlying type the same as histogram samples.). Do not re-use 19 // making underlying type the same as histogram samples.). Do not re-use
20 // existing values. 20 // existing values.
21 enum class IncidentType : int32_t { 21 enum class IncidentType : int32_t {
22 // Start with 1 rather than zero; otherwise there won't be enough buckets for 22 // Start with 1 rather than zero; otherwise there won't be enough buckets for
23 // the histogram. 23 // the histogram.
24 TRACKED_PREFERENCE = 1, 24 TRACKED_PREFERENCE = 1,
25 BINARY_INTEGRITY = 2, 25 BINARY_INTEGRITY = 2,
26 BLACKLIST_LOAD = 3, 26 BLACKLIST_LOAD = 3,
27 OMNIBOX_INTERACTION = 4, 27 OMNIBOX_INTERACTION = 4,
28 VARIATIONS_SEED_SIGNATURE = 5, 28 VARIATIONS_SEED_SIGNATURE = 5,
29 SCRIPT_REQUEST = 6, 29 RESOURCE_REQUEST = 6,
30 // Values for new incident types go here. 30 // Values for new incident types go here.
31 NUM_TYPES = 7 31 NUM_TYPES = 7
32 }; 32 };
33 33
34 // An abstract incident. Subclasses provide type-specific functionality to 34 // An abstract incident. Subclasses provide type-specific functionality to
35 // enable logging and pruning by the incident reporting service. 35 // enable logging and pruning by the incident reporting service.
36 class Incident { 36 class Incident {
37 public: 37 public:
38 virtual ~Incident(); 38 virtual ~Incident();
39 39
(...skipping 23 matching lines...) Expand all
63 63
64 private: 64 private:
65 scoped_ptr<ClientIncidentReport_IncidentData> payload_; 65 scoped_ptr<ClientIncidentReport_IncidentData> payload_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(Incident); 67 DISALLOW_COPY_AND_ASSIGN(Incident);
68 }; 68 };
69 69
70 } // namespace safe_browsing 70 } // namespace safe_browsing
71 71
72 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_H_ 72 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698