Index: content/browser/indexed_db/indexed_db_factory.h |
diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h |
index ae0d9364f3bc5a08206428031f5025ea6f2bce4b..e42d4fa9180f90c81ca39d19d181877092433b95 100644 |
--- a/content/browser/indexed_db/indexed_db_factory.h |
+++ b/content/browser/indexed_db/indexed_db_factory.h |
@@ -26,6 +26,9 @@ class IndexedDBContextImpl; |
class CONTENT_EXPORT IndexedDBFactory |
: NON_EXPORTED_BASE(public base::RefCountedThreadSafe<IndexedDBFactory>) { |
public: |
+ typedef std::multimap<GURL, IndexedDBDatabase*> OriginDBMap; |
+ typedef OriginDBMap::const_iterator OriginDBMapIterator; |
+ |
explicit IndexedDBFactory(IndexedDBContextImpl* context); |
// Notifications from weak pointers. |
@@ -50,8 +53,7 @@ class CONTENT_EXPORT IndexedDBFactory |
void HandleBackingStoreFailure(const GURL& origin_url); |
- // Iterates over all databases; for diagnostics only. |
- std::vector<IndexedDBDatabase*> GetOpenDatabasesForOrigin( |
+ std::pair<OriginDBMapIterator, OriginDBMapIterator> GetOpenDatabasesForOrigin( |
const GURL& origin_url) const; |
// Called by IndexedDBContext after all connections are closed, to |
@@ -64,6 +66,8 @@ class CONTENT_EXPORT IndexedDBFactory |
// Called by an IndexedDBDatabase when it is actually deleted. |
void DatabaseDeleted(const IndexedDBDatabase::Identifier& identifier); |
+ size_t GetConnectionCount(const GURL& origin_url) const; |
+ |
protected: |
friend class base::RefCountedThreadSafe<IndexedDBFactory>; |
@@ -104,12 +108,14 @@ class CONTENT_EXPORT IndexedDBFactory |
const base::string16& name) const; |
bool IsBackingStoreOpen(const GURL& origin_url) const; |
bool IsBackingStorePendingClose(const GURL& origin_url) const; |
+ void RemoveDatabaseFromMaps(const IndexedDBDatabase::Identifier& identifier); |
IndexedDBContextImpl* context_; |
typedef std::map<IndexedDBDatabase::Identifier, |
IndexedDBDatabase*> IndexedDBDatabaseMap; |
IndexedDBDatabaseMap database_map_; |
+ OriginDBMap origin_dbs_; |
typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> > |
IndexedDBBackingStoreMap; |