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

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

Issue 93873017: IndexedDBFactory now ForceCloses databases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed {} and ran git cl format. 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_database.cc
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index 881c85985e2e84808300b02a1ce724cb3ad87084..8d39e56dac5372c926e89044d84175363a6690e5 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -1646,6 +1646,12 @@ void IndexedDBDatabase::DeleteDatabaseFinal(
factory_->DatabaseDeleted(identifier_);
}
+void IndexedDBDatabase::ForceClose() {
+ ConnectionSet conns(connections_);
jsbell 2013/12/20 00:24:42 Is this copy necessary?
cmumford 2013/12/20 18:09:26 I can't see an alternative. listset has no front m
jsbell 2013/12/20 18:22:56 A few possibilities: * list_set does have begin()
+ for (ConnectionSet::iterator i = conns.begin(); i != conns.end(); ++i)
jsbell 2013/12/20 00:24:42 Nit: We try not to use single-character variables.
cmumford 2013/12/20 18:09:26 Done.
+ (*i)->ForceClose();
+}
+
void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) {
DCHECK(connections_.count(connection));
DCHECK(connection->IsConnected());

Powered by Google App Engine
This is Rietveld 408576698