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

Unified Diff: chrome/browser/download/download_history.cc

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
Index: chrome/browser/download/download_history.cc
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 2d73992a9f80f67978d38e34233388ebeac1899e..ec8170426acc0a2e8b70f5f8f856d179cc794fb7 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -31,6 +31,7 @@
#include <utility>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "chrome/browser/download/download_crx_util.h"
#include "components/history/content/browser/download_conversions.h"
@@ -77,7 +78,7 @@ class DownloadHistoryData : public base::SupportsUserData::Data {
explicit DownloadHistoryData(content::DownloadItem* item)
: state_(NOT_PERSISTED),
was_restored_from_history_(false) {
- item->SetUserData(kKey, this);
+ item->SetUserData(kKey, base::WrapUnique(this));
}
~DownloadHistoryData() override {}
« no previous file with comments | « chrome/browser/download/download_danger_prompt_browsertest.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698