| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const IndexedDBDatabaseError& error); | 54 const IndexedDBDatabaseError& error); |
| 55 | 55 |
| 56 std::pair<OriginDBMapIterator, OriginDBMapIterator> GetOpenDatabasesForOrigin( | 56 std::pair<OriginDBMapIterator, OriginDBMapIterator> GetOpenDatabasesForOrigin( |
| 57 const GURL& origin_url) const; | 57 const GURL& origin_url) const; |
| 58 | 58 |
| 59 void ForceClose(const GURL& origin_url); | 59 void ForceClose(const GURL& origin_url); |
| 60 | 60 |
| 61 // Called by the IndexedDBContext destructor so the factory can do cleanup. | 61 // Called by the IndexedDBContext destructor so the factory can do cleanup. |
| 62 void ContextDestroyed(); | 62 void ContextDestroyed(); |
| 63 | 63 |
| 64 // Called by the IndexedDBActiveBlobRegistry. |
| 65 virtual void ReportOutstandingBlobs(const GURL& origin_url, |
| 66 bool blobs_outstanding); |
| 67 |
| 64 // Called by an IndexedDBDatabase when it is actually deleted. | 68 // Called by an IndexedDBDatabase when it is actually deleted. |
| 65 void DatabaseDeleted(const IndexedDBDatabase::Identifier& identifier); | 69 void DatabaseDeleted(const IndexedDBDatabase::Identifier& identifier); |
| 66 | 70 |
| 67 size_t GetConnectionCount(const GURL& origin_url) const; | 71 size_t GetConnectionCount(const GURL& origin_url) const; |
| 68 | 72 |
| 69 protected: | 73 protected: |
| 70 friend class base::RefCountedThreadSafe<IndexedDBFactory>; | 74 friend class base::RefCountedThreadSafe<IndexedDBFactory>; |
| 71 | 75 |
| 72 virtual ~IndexedDBFactory(); | 76 virtual ~IndexedDBFactory(); |
| 73 | 77 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 typedef std::map<IndexedDBDatabase::Identifier, | 117 typedef std::map<IndexedDBDatabase::Identifier, |
| 114 IndexedDBDatabase*> IndexedDBDatabaseMap; | 118 IndexedDBDatabase*> IndexedDBDatabaseMap; |
| 115 IndexedDBDatabaseMap database_map_; | 119 IndexedDBDatabaseMap database_map_; |
| 116 OriginDBMap origin_dbs_; | 120 OriginDBMap origin_dbs_; |
| 117 | 121 |
| 118 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> > | 122 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> > |
| 119 IndexedDBBackingStoreMap; | 123 IndexedDBBackingStoreMap; |
| 120 IndexedDBBackingStoreMap backing_store_map_; | 124 IndexedDBBackingStoreMap backing_store_map_; |
| 121 | 125 |
| 122 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; | 126 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; |
| 127 IndexedDBBackingStoreMap backing_stores_with_active_blobs_; |
| 123 }; | 128 }; |
| 124 | 129 |
| 125 } // namespace content | 130 } // namespace content |
| 126 | 131 |
| 127 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ | 132 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ |
| OLD | NEW |