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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 const IndexedDBPendingConnection& connection, | 43 const IndexedDBPendingConnection& connection, |
44 const GURL& origin_url, | 44 const GURL& origin_url, |
45 const base::FilePath& data_directory); | 45 const base::FilePath& data_directory); |
46 | 46 |
47 void DeleteDatabase(const base::string16& name, | 47 void DeleteDatabase(const base::string16& name, |
48 scoped_refptr<IndexedDBCallbacks> callbacks, | 48 scoped_refptr<IndexedDBCallbacks> callbacks, |
49 const GURL& origin_url, | 49 const GURL& origin_url, |
50 const base::FilePath& data_directory); | 50 const base::FilePath& data_directory); |
51 | 51 |
52 void HandleBackingStoreFailure(const GURL& origin_url); | 52 void HandleBackingStoreFailure(const GURL& origin_url); |
| 53 void HandleBackingStoreCorruption(const GURL& origin_url, |
| 54 const IndexedDBDatabaseError& error); |
53 | 55 |
54 std::pair<OriginDBMapIterator, OriginDBMapIterator> GetOpenDatabasesForOrigin( | 56 std::pair<OriginDBMapIterator, OriginDBMapIterator> GetOpenDatabasesForOrigin( |
55 const GURL& origin_url) const; | 57 const GURL& origin_url) const; |
56 | 58 |
57 // Called by IndexedDBContext after all connections are closed, to | |
58 // ensure the backing store closed immediately. | |
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 an IndexedDBDatabase when it is actually deleted. | 64 // Called by an IndexedDBDatabase when it is actually deleted. |
65 void DatabaseDeleted(const IndexedDBDatabase::Identifier& identifier); | 65 void DatabaseDeleted(const IndexedDBDatabase::Identifier& identifier); |
66 | 66 |
67 size_t GetConnectionCount(const GURL& origin_url) const; | 67 size_t GetConnectionCount(const GURL& origin_url) const; |
68 | 68 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> > | 118 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> > |
119 IndexedDBBackingStoreMap; | 119 IndexedDBBackingStoreMap; |
120 IndexedDBBackingStoreMap backing_store_map_; | 120 IndexedDBBackingStoreMap backing_store_map_; |
121 | 121 |
122 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; | 122 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; |
123 }; | 123 }; |
124 | 124 |
125 } // namespace content | 125 } // namespace content |
126 | 126 |
127 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ | 127 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ |
OLD | NEW |