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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 2846413002: 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 | « no previous file | chrome/browser/extensions/api/tab_capture/offscreen_tab.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/downloads/downloads_api.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index b933c693a9a7abbaee25e8ee0a95e031cc68d837..b1d8dd3b57a9747e316b83a4cf7e477400a08e58 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -620,7 +620,7 @@ class ExtensionDownloadsEventRouterData : public base::SupportsUserData::Data {
determined_conflict_action_(
downloads::FILENAME_CONFLICT_ACTION_UNIQUIFY) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- download_item->SetUserData(kKey, this);
+ download_item->SetUserData(kKey, base::WrapUnique(this));
}
~ExtensionDownloadsEventRouterData() override {
@@ -954,7 +954,7 @@ DownloadedByExtension::DownloadedByExtension(
const std::string& name)
: id_(id),
name_(name) {
- item->SetUserData(kKey, this);
+ item->SetUserData(kKey, base::WrapUnique(this));
}
DownloadsDownloadFunction::DownloadsDownloadFunction() {}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tab_capture/offscreen_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698