Index: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h |
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h |
index d3d073099e510d02e1974d63ab1de5f527654466..a002b376455294e71aeb02cf8f61386601268c6f 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h |
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h |
@@ -8,12 +8,12 @@ |
#include <stdint.h> |
#include <map> |
+#include <memory> |
#include <vector> |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
-#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/threading/thread_checker.h" |
#include "base/time/time.h" |
@@ -86,14 +86,14 @@ class IncidentReportingService : public content::NotificationObserver { |
// Returns an object by which external components can add an incident to the |
// service. The object may outlive the service, but will no longer have any |
// effect after the service is deleted. |
- scoped_ptr<IncidentReceiver> GetIncidentReceiver(); |
+ std::unique_ptr<IncidentReceiver> GetIncidentReceiver(); |
// Returns a preference validation delegate that adds incidents to the service |
// for validation failures in |profile|. The delegate may outlive the service, |
// but incidents reported by it will no longer have any effect after the |
// service is deleted. |
- scoped_ptr<TrackedPreferenceValidationDelegate> |
- CreatePreferenceValidationDelegate(Profile* profile); |
+ std::unique_ptr<TrackedPreferenceValidationDelegate> |
+ CreatePreferenceValidationDelegate(Profile* profile); |
// Registers |callback| to be run after some delay following process launch. |
void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); |
@@ -142,11 +142,11 @@ class IncidentReportingService : public content::NotificationObserver { |
// Initiates a search for the most recent binary download. Overriden by unit |
// tests to provide a fake finder. |
- virtual scoped_ptr<LastDownloadFinder> CreateDownloadFinder( |
+ virtual std::unique_ptr<LastDownloadFinder> CreateDownloadFinder( |
const LastDownloadFinder::LastDownloadCallback& callback); |
// Initiates an upload. Overridden by unit tests to provide a fake uploader. |
- virtual scoped_ptr<IncidentReportUploader> StartReportUpload( |
+ virtual std::unique_ptr<IncidentReportUploader> StartReportUpload( |
const IncidentReportUploader::OnResultCallback& callback, |
const scoped_refptr<net::URLRequestContextGetter>& request_context_getter, |
const ClientIncidentReport& report); |
@@ -177,11 +177,11 @@ class IncidentReportingService : public content::NotificationObserver { |
Profile* FindEligibleProfile() const; |
// Adds |incident_data| relating to the optional |profile| to the service. |
- void AddIncident(Profile* profile, scoped_ptr<Incident> incident); |
+ void AddIncident(Profile* profile, std::unique_ptr<Incident> incident); |
// Clears all data associated with the |incident| relating to the optional |
// |profile|. |
- void ClearIncident(Profile* profile, scoped_ptr<Incident> incident); |
+ void ClearIncident(Profile* profile, std::unique_ptr<Incident> incident); |
// Returns true if there are incidents waiting to be sent. |
bool HasIncidentsToUpload() const; |
@@ -221,7 +221,7 @@ class IncidentReportingService : public content::NotificationObserver { |
// complete. Incident report processing continues, either by waiting for the |
// collection timeout or by sending an incident report. |
void OnEnvironmentDataCollected( |
- scoped_ptr<ClientIncidentReport_EnvironmentData> environment_data); |
+ std::unique_ptr<ClientIncidentReport_EnvironmentData> environment_data); |
// Starts the asynchronous process of finding the most recent executable |
// download if one is not currently being search for and/or has not already |
@@ -240,8 +240,9 @@ class IncidentReportingService : public content::NotificationObserver { |
// search for the most recent binary download and most recent non-binary |
// download is complete. |
void OnLastDownloadFound( |
- scoped_ptr<ClientIncidentReport_DownloadDetails> last_binary_download, |
- scoped_ptr<ClientIncidentReport_NonBinaryDownloadDetails> |
+ std::unique_ptr<ClientIncidentReport_DownloadDetails> |
+ last_binary_download, |
+ std::unique_ptr<ClientIncidentReport_NonBinaryDownloadDetails> |
last_non_binary_download); |
// Processes all received incidents once all data collection is |
@@ -263,7 +264,7 @@ class IncidentReportingService : public content::NotificationObserver { |
// IncidentReportUploader::OnResultCallback implementation. |
void OnReportUploadResult(UploadContext* context, |
IncidentReportUploader::Result result, |
- scoped_ptr<ClientIncidentResponse> response); |
+ std::unique_ptr<ClientIncidentResponse> response); |
// DownloadProtectionService::ClientDownloadRequestCallback implementation. |
void OnClientDownloadRequest(content::DownloadItem* download, |
@@ -317,7 +318,7 @@ class IncidentReportingService : public content::NotificationObserver { |
// The report currently being assembled. This becomes non-NULL when an initial |
// incident is reported, and returns to NULL when the report is sent for |
// upload. |
- scoped_ptr<ClientIncidentReport> report_; |
+ std::unique_ptr<ClientIncidentReport> report_; |
// The time at which the initial incident is reported. |
base::Time first_incident_time_; |
@@ -345,11 +346,11 @@ class IncidentReportingService : public content::NotificationObserver { |
DownloadMetadataManager download_metadata_manager_; |
// The collection of uploads in progress. |
- std::vector<scoped_ptr<UploadContext>> uploads_; |
+ std::vector<std::unique_ptr<UploadContext>> uploads_; |
// An object that asynchronously searches for the most recent binary download. |
// Non-NULL while such a search is outstanding. |
- scoped_ptr<LastDownloadFinder> last_download_finder_; |
+ std::unique_ptr<LastDownloadFinder> last_download_finder_; |
// True if IncidentReportingService is enabled at the process level, by a |
// field trial. |