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_TRACKED_PREFERENCE_INCID
ENT_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_TRACKED_PREFERENCE_INCID
ENT_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_TRACKED_PREFERENCE_INCID
ENT_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_TRACKED_PREFERENCE_INCID
ENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" | 13 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
13 | 14 |
14 namespace safe_browsing { | 15 namespace safe_browsing { |
15 | 16 |
16 class ClientIncidentReport_IncidentData_TrackedPreferenceIncident; | 17 class ClientIncidentReport_IncidentData_TrackedPreferenceIncident; |
17 | 18 |
18 // An incident representing a tracked preference that has been modified or | 19 // An incident representing a tracked preference that has been modified or |
19 // cleared. | 20 // cleared. |
20 class TrackedPreferenceIncident : public Incident { | 21 class TrackedPreferenceIncident : public Incident { |
21 public: | 22 public: |
22 TrackedPreferenceIncident( | 23 TrackedPreferenceIncident( |
23 scoped_ptr<ClientIncidentReport_IncidentData_TrackedPreferenceIncident> | 24 std::unique_ptr< |
| 25 ClientIncidentReport_IncidentData_TrackedPreferenceIncident> |
24 tracked_preference, | 26 tracked_preference, |
25 bool is_personal); | 27 bool is_personal); |
26 ~TrackedPreferenceIncident() override; | 28 ~TrackedPreferenceIncident() override; |
27 | 29 |
28 // Incident methods: | 30 // Incident methods: |
29 IncidentType GetType() const override; | 31 IncidentType GetType() const override; |
30 std::string GetKey() const override; | 32 std::string GetKey() const override; |
31 uint32_t ComputeDigest() const override; | 33 uint32_t ComputeDigest() const override; |
32 scoped_ptr<ClientIncidentReport_IncidentData> TakePayload() override; | 34 std::unique_ptr<ClientIncidentReport_IncidentData> TakePayload() override; |
33 | 35 |
34 private: | 36 private: |
35 bool is_personal_; | 37 bool is_personal_; |
36 | 38 |
37 DISALLOW_COPY_AND_ASSIGN(TrackedPreferenceIncident); | 39 DISALLOW_COPY_AND_ASSIGN(TrackedPreferenceIncident); |
38 }; | 40 }; |
39 | 41 |
40 } // namespace safe_browsing | 42 } // namespace safe_browsing |
41 | 43 |
42 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_TRACKED_PREFERENCE_IN
CIDENT_H_ | 44 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_TRACKED_PREFERENCE_IN
CIDENT_H_ |
OLD | NEW |