Index: content/browser/download/download_request_core.cc |
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc |
index 7e8d102d55c6b7b99df107aa0e86eb7f542ffa76..b3c576278403fcdb1eebfe7c4ae42b3febf4ee8f 100644 |
--- a/content/browser/download/download_request_core.cc |
+++ b/content/browser/download/download_request_core.cc |
@@ -83,13 +83,13 @@ const int DownloadRequestData::kKey = 0; |
void DownloadRequestData::Attach(net::URLRequest* request, |
DownloadUrlParameters* parameters, |
uint32_t download_id) { |
- DownloadRequestData* request_data = new DownloadRequestData; |
+ auto request_data = base::MakeUnique<DownloadRequestData>(); |
request_data->save_info_.reset( |
new DownloadSaveInfo(parameters->GetSaveInfo())); |
request_data->download_id_ = download_id; |
request_data->transient_ = parameters->is_transient(); |
request_data->on_started_callback_ = parameters->callback(); |
- request->SetUserData(&kKey, request_data); |
+ request->SetUserData(&kKey, std::move(request_data)); |
} |
// static |