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

Unified Diff: content/child/quota_dispatcher.cc

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (Closed)
Patch Set: Fix typo breaking a bunch of trybot builds, oops Created 4 years, 1 month 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: content/child/quota_dispatcher.cc
diff --git a/content/child/quota_dispatcher.cc b/content/child/quota_dispatcher.cc
index f61aa027fa3fd980cdd302d95a3483643f8010f4..99b9ecf9c56dfbaaa0c99c3754fe9931133f886b 100644
--- a/content/child/quota_dispatcher.cc
+++ b/content/child/quota_dispatcher.cc
@@ -4,6 +4,8 @@
#include "content/child/quota_dispatcher.h"
+#include <memory>
+
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/threading/thread_local.h"
@@ -111,7 +113,8 @@ void QuotaDispatcher::QueryStorageUsageAndQuota(
Callback* callback) {
danakj 2016/11/18 00:15:33 and this
DCHECK(callback);
int request_id = quota_message_filter_->GenerateRequestID(CurrentWorkerId());
- pending_quota_callbacks_.AddWithID(callback, request_id);
+ pending_quota_callbacks_.AddWithID(
+ std::unique_ptr<Callback>(callback), request_id);
thread_safe_sender_->Send(new QuotaHostMsg_QueryStorageUsageAndQuota(
request_id, origin_url, type));
}
@@ -124,7 +127,8 @@ void QuotaDispatcher::RequestStorageQuota(int render_view_id,
DCHECK(callback);
DCHECK(CurrentWorkerId() == 0);
int request_id = quota_message_filter_->GenerateRequestID(CurrentWorkerId());
- pending_quota_callbacks_.AddWithID(callback, request_id);
+ pending_quota_callbacks_.AddWithID(
+ std::unique_ptr<Callback>(callback), request_id);
StorageQuotaParams params;
params.render_view_id = render_view_id;

Powered by Google App Engine
This is Rietveld 408576698