| 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 #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 Loading... |
| 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_ |
| OLD | NEW |