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

Unified Diff: content/browser/indexed_db/indexed_db_factory.cc

Issue 93873017: IndexedDBFactory now ForceCloses databases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
Index: content/browser/indexed_db/indexed_db_factory.cc
diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc
index fb46b8f2c13db55737bc6e617d90f52415f67b13..723a162ec3a17ebd742b937996389eaade283671 100644
--- a/content/browser/indexed_db/indexed_db_factory.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -90,6 +90,12 @@ bool IndexedDBFactory::HasLastBackingStoreReference(const GURL& origin_url)
}
void IndexedDBFactory::ForceClose(const GURL& origin_url) {
+ std::vector<IndexedDBDatabase*> dbs = GetOpenDatabasesForOrigin(origin_url);
+ std::vector<IndexedDBDatabase*>::iterator i;
+ for (i = dbs.begin(); i != dbs.end(); ++i) {
jsbell 2013/12/19 22:35:34 Nit: no need for braces with single-line loop body
+ (*i)->ForceClose();
+ }
+
if (backing_store_map_.find(origin_url) != backing_store_map_.end())
ReleaseBackingStore(origin_url, true /* immediate */);
}

Powered by Google App Engine
This is Rietveld 408576698