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

Unified Diff: webkit/dom_storage/dom_storage_host.cc

Issue 10413018: Add the HasAreaOpen method to DomStorageHost. Intended for use to make event propagation less chatt… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | « webkit/dom_storage/dom_storage_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_host.cc
===================================================================
--- webkit/dom_storage/dom_storage_host.cc (revision 138103)
+++ webkit/dom_storage/dom_storage_host.cc (working copy)
@@ -115,6 +115,18 @@
return true;
}
+bool DomStorageHost::HasAreaOpen(
+ int namespace_id, const GURL& origin) const {
+ AreaMap::const_iterator it = connections_.begin();
+ for (; it != connections_.end(); ++it) {
+ if (namespace_id == it->second.namespace_->namespace_id() &&
+ origin == it->second.area_->origin()) {
+ return true;
+ }
+ }
+ return false;
+}
+
DomStorageArea* DomStorageHost::GetOpenArea(int connection_id) {
AreaMap::iterator found = connections_.find(connection_id);
if (found == connections_.end())
« no previous file with comments | « webkit/dom_storage/dom_storage_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698