Chromium Code Reviews| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 int64 object_store_id, | 90 int64 object_store_id, |
| 91 const base::string16& name, | 91 const base::string16& name, |
| 92 const IndexedDBKeyPath& key_path, | 92 const IndexedDBKeyPath& key_path, |
| 93 bool auto_increment); | 93 bool auto_increment); |
| 94 void DeleteObjectStore(int64 transaction_id, int64 object_store_id); | 94 void DeleteObjectStore(int64 transaction_id, int64 object_store_id); |
| 95 void CreateTransaction(int64 transaction_id, | 95 void CreateTransaction(int64 transaction_id, |
| 96 IndexedDBConnection* connection, | 96 IndexedDBConnection* connection, |
| 97 const std::vector<int64>& object_store_ids, | 97 const std::vector<int64>& object_store_ids, |
| 98 uint16 mode); | 98 uint16 mode); |
| 99 void Close(IndexedDBConnection* connection, bool forced); | 99 void Close(IndexedDBConnection* connection, bool forced); |
| 100 virtual void ForceClose(); | |
|
jsbell
2013/12/20 00:24:42
Why is this virtual?
cmumford
2013/12/20 18:09:26
Woops - long story, but it (and the destructor) do
| |
| 100 | 101 |
| 101 void Commit(int64 transaction_id); | 102 void Commit(int64 transaction_id); |
| 102 void Abort(int64 transaction_id); | 103 void Abort(int64 transaction_id); |
| 103 void Abort(int64 transaction_id, const IndexedDBDatabaseError& error); | 104 void Abort(int64 transaction_id, const IndexedDBDatabaseError& error); |
| 104 | 105 |
| 105 void CreateIndex(int64 transaction_id, | 106 void CreateIndex(int64 transaction_id, |
| 106 int64 object_store_id, | 107 int64 object_store_id, |
| 107 int64 index_id, | 108 int64 index_id, |
| 108 const base::string16& name, | 109 const base::string16& name, |
| 109 const IndexedDBKeyPath& key_path, | 110 const IndexedDBKeyPath& key_path, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 scoped_refptr<IndexedDBCallbacks> callbacks, | 240 scoped_refptr<IndexedDBCallbacks> callbacks, |
| 240 IndexedDBTransaction* transaction); | 241 IndexedDBTransaction* transaction); |
| 241 | 242 |
| 242 private: | 243 private: |
| 243 friend class base::RefCounted<IndexedDBDatabase>; | 244 friend class base::RefCounted<IndexedDBDatabase>; |
| 244 | 245 |
| 245 IndexedDBDatabase(const base::string16& name, | 246 IndexedDBDatabase(const base::string16& name, |
| 246 IndexedDBBackingStore* backing_store, | 247 IndexedDBBackingStore* backing_store, |
| 247 IndexedDBFactory* factory, | 248 IndexedDBFactory* factory, |
| 248 const Identifier& unique_identifier); | 249 const Identifier& unique_identifier); |
| 249 ~IndexedDBDatabase(); | 250 virtual ~IndexedDBDatabase(); |
|
jsbell
2013/12/20 00:24:42
Why is this virtual?
| |
| 250 | 251 |
| 251 bool IsOpenConnectionBlocked() const; | 252 bool IsOpenConnectionBlocked() const; |
| 252 bool OpenInternal(); | 253 bool OpenInternal(); |
| 253 void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks, | 254 void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks, |
| 254 scoped_ptr<IndexedDBConnection> connection, | 255 scoped_ptr<IndexedDBConnection> connection, |
| 255 int64 transaction_id, | 256 int64 transaction_id, |
| 256 int64 requested_version, | 257 int64 requested_version, |
| 257 blink::WebIDBDataLoss data_loss, | 258 blink::WebIDBDataLoss data_loss, |
| 258 std::string data_loss_message); | 259 std::string data_loss_message); |
| 259 void RunVersionChangeTransactionFinal( | 260 void RunVersionChangeTransactionFinal( |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 310 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; | 311 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; |
| 311 PendingDeleteCallList pending_delete_calls_; | 312 PendingDeleteCallList pending_delete_calls_; |
| 312 | 313 |
| 313 typedef list_set<IndexedDBConnection*> ConnectionSet; | 314 typedef list_set<IndexedDBConnection*> ConnectionSet; |
| 314 ConnectionSet connections_; | 315 ConnectionSet connections_; |
| 315 }; | 316 }; |
| 316 | 317 |
| 317 } // namespace content | 318 } // namespace content |
| 318 | 319 |
| 319 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 320 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ |
| OLD | NEW |