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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
index f6503859ec87dfe19cfb90263149cd2a1e84c0fb..004793d22129fcc14706601cc52fca7a30af799e 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
@@ -32,14 +32,15 @@ IncidentReportUploaderImpl::~IncidentReportUploaderImpl() {
}
// static
-scoped_ptr<IncidentReportUploader> IncidentReportUploaderImpl::UploadReport(
+std::unique_ptr<IncidentReportUploader>
+IncidentReportUploaderImpl::UploadReport(
const OnResultCallback& callback,
const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
const ClientIncidentReport& report) {
std::string post_data;
if (!report.SerializeToString(&post_data))
- return scoped_ptr<IncidentReportUploader>();
- return scoped_ptr<IncidentReportUploader>(new IncidentReportUploaderImpl(
+ return std::unique_ptr<IncidentReportUploader>();
+ return std::unique_ptr<IncidentReportUploader>(new IncidentReportUploaderImpl(
callback, request_context_getter, post_data));
}
@@ -73,13 +74,13 @@ GURL IncidentReportUploaderImpl::GetIncidentReportUrl() {
void IncidentReportUploaderImpl::OnURLFetchComplete(
const net::URLFetcher* source) {
// Take ownership of the fetcher in this scope (source == url_fetcher_).
- scoped_ptr<net::URLFetcher> url_fetcher(std::move(url_fetcher_));
+ std::unique_ptr<net::URLFetcher> url_fetcher(std::move(url_fetcher_));
UMA_HISTOGRAM_TIMES("SBIRS.ReportUploadTime",
base::TimeTicks::Now() - time_begin_);
Result result = UPLOAD_REQUEST_FAILED;
- scoped_ptr<ClientIncidentResponse> response;
+ std::unique_ptr<ClientIncidentResponse> response;
if (source->GetStatus().is_success() &&
source->GetResponseCode() == net::HTTP_OK) {

Powered by Google App Engine
This is Rietveld 408576698