| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 class IndexedDBConnection; | 27 class IndexedDBConnection; |
| 28 class IndexedDBDatabaseCallbacks; | 28 class IndexedDBDatabaseCallbacks; |
| 29 class IndexedDBFactory; | 29 class IndexedDBFactory; |
| 30 class IndexedDBKey; | 30 class IndexedDBKey; |
| 31 class IndexedDBKeyPath; | 31 class IndexedDBKeyPath; |
| 32 class IndexedDBKeyRange; | 32 class IndexedDBKeyRange; |
| 33 class IndexedDBTransaction; | 33 class IndexedDBTransaction; |
| 34 struct IndexedDBValue; |
| 34 | 35 |
| 35 class CONTENT_EXPORT IndexedDBDatabase | 36 class CONTENT_EXPORT IndexedDBDatabase |
| 36 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { | 37 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { |
| 37 public: | 38 public: |
| 38 enum TaskType { | 39 enum TaskType { |
| 39 NORMAL_TASK = 0, | 40 NORMAL_TASK = 0, |
| 40 PREEMPTIVE_TASK | 41 PREEMPTIVE_TASK |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 enum PutMode { | 44 enum PutMode { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void TransactionCommitFailed(); | 120 void TransactionCommitFailed(); |
| 120 | 121 |
| 121 void Get(int64 transaction_id, | 122 void Get(int64 transaction_id, |
| 122 int64 object_store_id, | 123 int64 object_store_id, |
| 123 int64 index_id, | 124 int64 index_id, |
| 124 scoped_ptr<IndexedDBKeyRange> key_range, | 125 scoped_ptr<IndexedDBKeyRange> key_range, |
| 125 bool key_only, | 126 bool key_only, |
| 126 scoped_refptr<IndexedDBCallbacks> callbacks); | 127 scoped_refptr<IndexedDBCallbacks> callbacks); |
| 127 void Put(int64 transaction_id, | 128 void Put(int64 transaction_id, |
| 128 int64 object_store_id, | 129 int64 object_store_id, |
| 129 std::string* value, | 130 IndexedDBValue* value, |
| 130 scoped_ptr<IndexedDBKey> key, | 131 scoped_ptr<IndexedDBKey> key, |
| 131 PutMode mode, | 132 PutMode mode, |
| 132 scoped_refptr<IndexedDBCallbacks> callbacks, | 133 scoped_refptr<IndexedDBCallbacks> callbacks, |
| 133 const std::vector<IndexKeys>& index_keys); | 134 const std::vector<IndexKeys>& index_keys); |
| 134 void SetIndexKeys(int64 transaction_id, | 135 void SetIndexKeys(int64 transaction_id, |
| 135 int64 object_store_id, | 136 int64 object_store_id, |
| 136 scoped_ptr<IndexedDBKey> primary_key, | 137 scoped_ptr<IndexedDBKey> primary_key, |
| 137 const std::vector<IndexKeys>& index_keys); | 138 const std::vector<IndexKeys>& index_keys); |
| 138 void SetIndexesReady(int64 transaction_id, | 139 void SetIndexesReady(int64 transaction_id, |
| 139 int64 object_store_id, | 140 int64 object_store_id, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; | 291 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; |
| 291 PendingDeleteCallList pending_delete_calls_; | 292 PendingDeleteCallList pending_delete_calls_; |
| 292 | 293 |
| 293 typedef list_set<IndexedDBConnection*> ConnectionSet; | 294 typedef list_set<IndexedDBConnection*> ConnectionSet; |
| 294 ConnectionSet connections_; | 295 ConnectionSet connections_; |
| 295 }; | 296 }; |
| 296 | 297 |
| 297 } // namespace content | 298 } // namespace content |
| 298 | 299 |
| 299 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 300 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ |
| OLD | NEW |