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

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

Issue 12398008: Purge in-memory localStorage areas if the # of areas exceeds the limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 7 years, 9 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 | webkit/dom_storage/dom_storage_area.h » ('j') | webkit/dom_storage/dom_storage_context.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_message_filter.cc
diff --git a/content/browser/dom_storage/dom_storage_message_filter.cc b/content/browser/dom_storage/dom_storage_message_filter.cc
index 9479cc9ae1e1e5c39a73d44eaa66db75b840ccbc..7580973cc73edd320a9a644a14e3f8f20ba6acef 100644
--- a/content/browser/dom_storage/dom_storage_message_filter.cc
+++ b/content/browser/dom_storage/dom_storage_message_filter.cc
@@ -125,6 +125,10 @@ void DOMStorageMessageFilter::OnSetItem(
DCHECK_EQ(0, connection_dispatching_message_for_);
base::AutoReset<int> auto_reset(&connection_dispatching_message_for_,
connection_id);
+ if (!context_->CanSetItem(host_.get(), connection_id, key, value)) {
+ Send(new DOMStorageMsg_AsyncOperationComplete(false));
+ return;
+ }
Mike West 2013/03/06 13:41:11 This would likely be fairly easy to move to DomSto
NullableString16 not_used;
bool success = host_->SetAreaItem(connection_id, key, value,
page_url, &not_used);
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_area.h » ('j') | webkit/dom_storage/dom_storage_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698