| Index: content/child/quota_dispatcher.cc
|
| diff --git a/content/child/quota_dispatcher.cc b/content/child/quota_dispatcher.cc
|
| index fa766dba12768662171606dde3d76374f8133b5d..946a54d45351bae9163ac102e74b32e1e895c0e9 100644
|
| --- a/content/child/quota_dispatcher.cc
|
| +++ b/content/child/quota_dispatcher.cc
|
| @@ -138,6 +138,27 @@ void QuotaDispatcher::RequestStorageQuota(
|
| thread_safe_sender_->Send(new QuotaHostMsg_RequestStorageQuota(params));
|
| }
|
|
|
| +void QuotaDispatcher::RequestDurability(
|
| + int render_view_id,
|
| + const GURL& origin_url,
|
| + Callback* callback) {
|
| + DCHECK(callback);
|
| + DCHECK(CurrentWorkerId() == 0);
|
| + int request_id = quota_message_filter_->GenerateRequestID(CurrentWorkerId());
|
| + LOG(ERROR) << "Got into QuotaDispatcher::RequestDurability request_id = "
|
| + << request_id;
|
| + pending_quota_callbacks_.AddWithID(callback, request_id);
|
| +
|
| + StorageQuotaParams params;
|
| + params.render_view_id = render_view_id;
|
| + params.request_id = request_id;
|
| + params.origin_url = origin_url;
|
| + params.storage_type = storage::kStorageTypeDurable;
|
| + params.user_gesture =
|
| + blink::WebUserGestureIndicator::isProcessingUserGesture();
|
| + thread_safe_sender_->Send(new QuotaHostMsg_RequestStorageQuota(params));
|
| +}
|
| +
|
| // static
|
| QuotaDispatcher::Callback*
|
| QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(
|
| @@ -170,6 +191,7 @@ void QuotaDispatcher::DidFail(
|
| QuotaStatusCode error) {
|
| Callback* callback = pending_quota_callbacks_.Lookup(request_id);
|
| DCHECK(callback);
|
| + LOG(ERROR) << "Got a DidFail error for request_id " << request_id;
|
| callback->DidFail(error);
|
| pending_quota_callbacks_.Remove(request_id);
|
| }
|
|
|