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_DATABASE_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Identifier is pair of (origin url, database name). | 53 // Identifier is pair of (origin url, database name). |
54 typedef std::pair<GURL, base::string16> Identifier; | 54 typedef std::pair<GURL, base::string16> Identifier; |
55 | 55 |
56 static const int64 kInvalidId = 0; | 56 static const int64 kInvalidId = 0; |
57 static const int64 kMinimumIndexId = 30; | 57 static const int64 kMinimumIndexId = 30; |
58 | 58 |
59 static scoped_refptr<IndexedDBDatabase> Create( | 59 static scoped_refptr<IndexedDBDatabase> Create( |
60 const base::string16& name, | 60 const base::string16& name, |
61 IndexedDBBackingStore* backing_store, | 61 IndexedDBBackingStore* backing_store, |
62 IndexedDBFactory* factory, | 62 IndexedDBFactory* factory, |
63 const Identifier& unique_identifier); | 63 const Identifier& unique_identifier, |
| 64 leveldb::Status& s); |
64 | 65 |
65 const Identifier& identifier() const { return identifier_; } | 66 const Identifier& identifier() const { return identifier_; } |
66 IndexedDBBackingStore* backing_store() { return backing_store_.get(); } | 67 IndexedDBBackingStore* backing_store() { return backing_store_.get(); } |
67 | 68 |
68 int64 id() const { return metadata_.id; } | 69 int64 id() const { return metadata_.id; } |
69 const base::string16& name() const { return metadata_.name; } | 70 const base::string16& name() const { return metadata_.name; } |
70 | 71 |
71 void AddObjectStore(const IndexedDBObjectStoreMetadata& metadata, | 72 void AddObjectStore(const IndexedDBObjectStoreMetadata& metadata, |
72 int64 new_max_object_store_id); | 73 int64 new_max_object_store_id); |
73 void RemoveObjectStore(int64 object_store_id); | 74 void RemoveObjectStore(int64 object_store_id); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; | 292 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; |
292 PendingDeleteCallList pending_delete_calls_; | 293 PendingDeleteCallList pending_delete_calls_; |
293 | 294 |
294 typedef list_set<IndexedDBConnection*> ConnectionSet; | 295 typedef list_set<IndexedDBConnection*> ConnectionSet; |
295 ConnectionSet connections_; | 296 ConnectionSet connections_; |
296 }; | 297 }; |
297 | 298 |
298 } // namespace content | 299 } // namespace content |
299 | 300 |
300 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 301 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ |
OLD | NEW |