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

Unified Diff: chrome/browser/safe_browsing/download_feedback_service.cc

Issue 2847353002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: fix Created 3 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/download_feedback_service.cc
diff --git a/chrome/browser/safe_browsing/download_feedback_service.cc b/chrome/browser/safe_browsing/download_feedback_service.cc
index 379bcda41e5c2bc496a194946988fbc83558cf8f..7be796619acec2f83d7a89d5612c916624484be1 100644
--- a/chrome/browser/safe_browsing/download_feedback_service.cc
+++ b/chrome/browser/safe_browsing/download_feedback_service.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/supports_user_data.h"
#include "base/task_runner.h"
@@ -62,9 +63,8 @@ void DownloadFeedbackPings::CreateForDownload(
content::DownloadItem* download,
const std::string& ping_request,
const std::string& ping_response) {
- DownloadFeedbackPings* pings = new DownloadFeedbackPings(ping_request,
- ping_response);
- download->SetUserData(kPingKey, pings);
+ download->SetUserData(kPingKey, base::MakeUnique<DownloadFeedbackPings>(
+ ping_request, ping_response));
}
// static
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698