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

Side by Side Diff: content/browser/indexed_db/indexed_db_factory.h

Issue 197333009: Handling LevelDB errors encountered after open. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Commented that DestroyBackingStore leaves non LevelDB files alone Created 6 years, 9 months 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 unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698