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 <vector> | 10 #include <vector> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void AddIndex(int64 object_store_id, | 61 void AddIndex(int64 object_store_id, |
62 const IndexedDBIndexMetadata& metadata, | 62 const IndexedDBIndexMetadata& metadata, |
63 int64 new_max_index_id); | 63 int64 new_max_index_id); |
64 void RemoveIndex(int64 object_store_id, int64 index_id); | 64 void RemoveIndex(int64 object_store_id, int64 index_id); |
65 | 65 |
66 void OpenConnection( | 66 void OpenConnection( |
67 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, | 67 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, |
68 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, | 68 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, |
69 int64 transaction_id, | 69 int64 transaction_id, |
70 int64 version); | 70 int64 version); |
| 71 void OpenConnection( |
| 72 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, |
| 73 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, |
| 74 int64 transaction_id, |
| 75 int64 version, |
| 76 WebKit::WebIDBCallbacks::DataLoss data_loss); |
71 void DeleteDatabase(scoped_refptr<IndexedDBCallbacksWrapper> callbacks); | 77 void DeleteDatabase(scoped_refptr<IndexedDBCallbacksWrapper> callbacks); |
72 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } | 78 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } |
73 | 79 |
74 void CreateObjectStore(int64 transaction_id, | 80 void CreateObjectStore(int64 transaction_id, |
75 int64 object_store_id, | 81 int64 object_store_id, |
76 const string16& name, | 82 const string16& name, |
77 const IndexedDBKeyPath& key_path, | 83 const IndexedDBKeyPath& key_path, |
78 bool auto_increment); | 84 bool auto_increment); |
79 void DeleteObjectStore(int64 transaction_id, int64 object_store_id); | 85 void DeleteObjectStore(int64 transaction_id, int64 object_store_id); |
80 void CreateTransaction( | 86 void CreateTransaction( |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 IndexedDBFactory* factory, | 163 IndexedDBFactory* factory, |
158 const string16& unique_identifier); | 164 const string16& unique_identifier); |
159 ~IndexedDBDatabase(); | 165 ~IndexedDBDatabase(); |
160 | 166 |
161 bool IsOpenConnectionBlocked() const; | 167 bool IsOpenConnectionBlocked() const; |
162 bool OpenInternal(); | 168 bool OpenInternal(); |
163 void RunVersionChangeTransaction( | 169 void RunVersionChangeTransaction( |
164 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, | 170 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, |
165 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, | 171 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, |
166 int64 transaction_id, | 172 int64 transaction_id, |
| 173 int64 requested_version, |
| 174 WebKit::WebIDBCallbacks::DataLoss data_loss); |
| 175 void RunVersionChangeTransactionFinal( |
| 176 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, |
| 177 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, |
| 178 int64 transaction_id, |
167 int64 requested_version); | 179 int64 requested_version); |
168 void RunVersionChangeTransactionFinal( | 180 void RunVersionChangeTransactionFinal( |
169 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, | 181 scoped_refptr<IndexedDBCallbacksWrapper> callbacks, |
170 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, | 182 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks, |
171 int64 transaction_id, | 183 int64 transaction_id, |
172 int64 requested_version); | 184 int64 requested_version, |
| 185 WebKit::WebIDBCallbacks::DataLoss data_loss); |
173 size_t ConnectionCount() const; | 186 size_t ConnectionCount() const; |
174 void ProcessPendingCalls(); | 187 void ProcessPendingCalls(); |
175 | 188 |
176 bool IsDeleteDatabaseBlocked() const; | 189 bool IsDeleteDatabaseBlocked() const; |
177 void DeleteDatabaseFinal(scoped_refptr<IndexedDBCallbacksWrapper> callbacks); | 190 void DeleteDatabaseFinal(scoped_refptr<IndexedDBCallbacksWrapper> callbacks); |
178 | 191 |
179 class VersionChangeOperation; | 192 class VersionChangeOperation; |
180 | 193 |
181 // When a "versionchange" transaction aborts, these restore the back-end | 194 // When a "versionchange" transaction aborts, these restore the back-end |
182 // object hierarchy. | 195 // object hierarchy. |
(...skipping 26 matching lines...) Expand all Loading... |
209 typedef list_set<scoped_refptr<IndexedDBDatabaseCallbacksWrapper> > | 222 typedef list_set<scoped_refptr<IndexedDBDatabaseCallbacksWrapper> > |
210 DatabaseCallbacksSet; | 223 DatabaseCallbacksSet; |
211 DatabaseCallbacksSet database_callbacks_set_; | 224 DatabaseCallbacksSet database_callbacks_set_; |
212 | 225 |
213 bool closing_connection_; | 226 bool closing_connection_; |
214 }; | 227 }; |
215 | 228 |
216 } // namespace content | 229 } // namespace content |
217 | 230 |
218 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 231 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ |
OLD | NEW |