Chromium Code Reviews| 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; |