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

Unified Diff: chrome/browser/download/download_status_updater_mac.mm

Issue 2845293004: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: 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 | « chrome/browser/download/download_status_updater.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_status_updater_mac.mm
diff --git a/chrome/browser/download/download_status_updater_mac.mm b/chrome/browser/download/download_status_updater_mac.mm
index 574553b641ce23f2d825c80d0a9e3f852405ad0f..ad8a30ec20f57520da1d799c5e2607590c449533 100644
--- a/chrome/browser/download/download_status_updater_mac.mm
+++ b/chrome/browser/download/download_status_updater_mac.mm
@@ -7,6 +7,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h"
#include "base/mac/sdk_forward_declarations.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/supports_user_data.h"
#import "chrome/browser/ui/cocoa/dock_icon.h"
@@ -161,8 +162,9 @@ void CreateNSProgress(content::DownloadItem* download) {
[progress publish];
- download->SetUserData(&kCrNSProgressUserDataKey,
- new CrNSProgressUserData(progress, destination_path));
+ download->SetUserData(
+ &kCrNSProgressUserDataKey,
+ base::MakeUnique<CrNSProgressUserData>(progress, destination_path));
}
void UpdateNSProgress(content::DownloadItem* download,
« no previous file with comments | « chrome/browser/download/download_status_updater.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698