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

Unified Diff: content/renderer/render_frame_impl.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/renderer/render_frame_impl.h ('k') | storage/browser/quota/quota_callbacks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 00b1ddcb37051d75b2adf9a064e0e206235ad59d..58023f98cca28a63c69732b276840eae5b0ae035 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3497,6 +3497,22 @@ void RenderFrameImpl::requestStorageQuota(
QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
}
+void RenderFrameImpl::requestDurability(
+ WebLocalFrame* frame,
+ blink::WebStorageQuotaCallbacks callbacks) {
+ DCHECK(!frame_ || frame_ == frame);
+ WebSecurityOrigin origin = frame->document().securityOrigin();
+ if (origin.isUnique()) {
+ // Unique origins cannot store persistent state.
+ callbacks.didFail(blink::WebStorageQuotaErrorAbort);
+ return;
+ }
+ ChildThreadImpl::current()->quota_dispatcher()->RequestDurability(
+ render_view_->GetRoutingID(),
+ GURL(origin.toString()),
+ QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
+};
+
void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle);
impl->set_render_frame_id(routing_id_);
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | storage/browser/quota/quota_callbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698