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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl.cc

Issue 2622603002: Delete session area when session storage for an origin is deleted. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_context_impl.cc
diff --git a/content/browser/dom_storage/dom_storage_context_impl.cc b/content/browser/dom_storage/dom_storage_context_impl.cc
index 2b945dea40fc23536b5d7a92c92dc133fcad4fa0..69a6a999ee3005dd60d4609a08c34693fa1919f4 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl.cc
@@ -256,6 +256,13 @@ void DOMStorageContextImpl::DeleteSessionStorage(
dom_storage_namespace = GetStorageNamespace(namespace_id);
}
dom_storage_namespace->DeleteSessionStorageOrigin(usage_info.origin);
+ if (session_storage_database_.get()) {
+ task_runner_->PostShutdownBlockingTask(
+ FROM_HERE, DOMStorageTaskRunner::COMMIT_SEQUENCE,
+ base::Bind(base::IgnoreResult(&SessionStorageDatabase::DeleteArea),
+ session_storage_database_,
+ usage_info.persistent_namespace_id, usage_info.origin));
+ }
// Synthesize a 'cleared' event if the area is open so CachedAreas in
// renderers get emptied out too.
DOMStorageArea* area =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698