| 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_RECEIVER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_RECEIVER_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_RECEIVER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_RECEIVER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 | 9 |
| 10 class Profile; | 10 class Profile; |
| 11 | 11 |
| 12 namespace safe_browsing { | 12 namespace safe_browsing { |
| 13 | 13 |
| 14 class Incident; | 14 class Incident; |
| 15 | 15 |
| 16 // An interface by which incidents may be added to the incident reporting | 16 // An interface by which incidents may be added to the incident reporting |
| 17 // service. | 17 // service. |
| 18 class IncidentReceiver { | 18 class IncidentReceiver { |
| 19 public: | 19 public: |
| 20 virtual ~IncidentReceiver() {} | 20 virtual ~IncidentReceiver() {} |
| 21 | 21 |
| 22 // Adds an incident relating to |profile|. Must be called from the UI thread. | 22 // Adds an incident relating to |profile|. Must be called from the UI thread. |
| 23 virtual void AddIncidentForProfile(Profile* profile, | 23 virtual void AddIncidentForProfile(Profile* profile, |
| 24 scoped_ptr<Incident> incident) = 0; | 24 std::unique_ptr<Incident> incident) = 0; |
| 25 | 25 |
| 26 // Adds an incident relating to the entire browser process. May be called from | 26 // Adds an incident relating to the entire browser process. May be called from |
| 27 // any thread. | 27 // any thread. |
| 28 virtual void AddIncidentForProcess(scoped_ptr<Incident> incident) = 0; | 28 virtual void AddIncidentForProcess(std::unique_ptr<Incident> incident) = 0; |
| 29 | 29 |
| 30 // Clears all data associated with the specified |incident| relating to the | 30 // Clears all data associated with the specified |incident| relating to the |
| 31 // entire browser process. May be called from any thread. | 31 // entire browser process. May be called from any thread. |
| 32 virtual void ClearIncidentForProcess(scoped_ptr<Incident> incident) = 0; | 32 virtual void ClearIncidentForProcess(std::unique_ptr<Incident> incident) = 0; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace safe_browsing | 35 } // namespace safe_browsing |
| 36 | 36 |
| 37 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_RECEIVER_H_ | 37 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_RECEIVER_H_ |
| OLD | NEW |