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

Unified Diff: content/child/quota_dispatcher.cc

Issue 1102353009: WIP Durable storage, chrome side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 7 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 | « content/child/quota_dispatcher.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « content/child/quota_dispatcher.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698