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

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

Issue 119343004: IndexedDB: Simplify data loss code/message routing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git cl format Created 7 years 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 | Annotate | Revision Log
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_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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void AddIndex(int64 object_store_id, 69 void AddIndex(int64 object_store_id,
70 const IndexedDBIndexMetadata& metadata, 70 const IndexedDBIndexMetadata& metadata,
71 int64 new_max_index_id); 71 int64 new_max_index_id);
72 void RemoveIndex(int64 object_store_id, int64 index_id); 72 void RemoveIndex(int64 object_store_id, int64 index_id);
73 73
74 void OpenConnection( 74 void OpenConnection(
75 scoped_refptr<IndexedDBCallbacks> callbacks, 75 scoped_refptr<IndexedDBCallbacks> callbacks,
76 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, 76 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
77 int64 transaction_id, 77 int64 transaction_id,
78 int64 version); 78 int64 version);
79 void OpenConnection(
80 scoped_refptr<IndexedDBCallbacks> callbacks,
81 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
82 int64 transaction_id,
83 int64 version,
84 blink::WebIDBDataLoss data_loss,
85 std::string data_loss_message);
86 void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks); 79 void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks);
87 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } 80 const IndexedDBDatabaseMetadata& metadata() const { return metadata_; }
88 81
89 void CreateObjectStore(int64 transaction_id, 82 void CreateObjectStore(int64 transaction_id,
90 int64 object_store_id, 83 int64 object_store_id,
91 const base::string16& name, 84 const base::string16& name,
92 const IndexedDBKeyPath& key_path, 85 const IndexedDBKeyPath& key_path,
93 bool auto_increment); 86 bool auto_increment);
94 void DeleteObjectStore(int64 transaction_id, int64 object_store_id); 87 void DeleteObjectStore(int64 transaction_id, int64 object_store_id);
95 void CreateTransaction(int64 transaction_id, 88 void CreateTransaction(int64 transaction_id,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 IndexedDBTransaction* transaction); 180 IndexedDBTransaction* transaction);
188 void DeleteObjectStoreOperation( 181 void DeleteObjectStoreOperation(
189 const IndexedDBObjectStoreMetadata& object_store_metadata, 182 const IndexedDBObjectStoreMetadata& object_store_metadata,
190 IndexedDBTransaction* transaction); 183 IndexedDBTransaction* transaction);
191 void DeleteObjectStoreAbortOperation( 184 void DeleteObjectStoreAbortOperation(
192 const IndexedDBObjectStoreMetadata& object_store_metadata, 185 const IndexedDBObjectStoreMetadata& object_store_metadata,
193 IndexedDBTransaction* transaction); 186 IndexedDBTransaction* transaction);
194 void VersionChangeOperation(int64 version, 187 void VersionChangeOperation(int64 version,
195 scoped_refptr<IndexedDBCallbacks> callbacks, 188 scoped_refptr<IndexedDBCallbacks> callbacks,
196 scoped_ptr<IndexedDBConnection> connection, 189 scoped_ptr<IndexedDBConnection> connection,
197 blink::WebIDBDataLoss data_loss,
198 std::string data_loss_message,
199 IndexedDBTransaction* transaction); 190 IndexedDBTransaction* transaction);
200 void VersionChangeAbortOperation(const base::string16& previous_version, 191 void VersionChangeAbortOperation(const base::string16& previous_version,
201 int64 previous_int_version, 192 int64 previous_int_version,
202 IndexedDBTransaction* transaction); 193 IndexedDBTransaction* transaction);
203 void CreateIndexOperation(int64 object_store_id, 194 void CreateIndexOperation(int64 object_store_id,
204 const IndexedDBIndexMetadata& index_metadata, 195 const IndexedDBIndexMetadata& index_metadata,
205 IndexedDBTransaction* transaction); 196 IndexedDBTransaction* transaction);
206 void DeleteIndexOperation(int64 object_store_id, 197 void DeleteIndexOperation(int64 object_store_id,
207 const IndexedDBIndexMetadata& index_metadata, 198 const IndexedDBIndexMetadata& index_metadata,
208 IndexedDBTransaction* transaction); 199 IndexedDBTransaction* transaction);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 IndexedDBBackingStore* backing_store, 237 IndexedDBBackingStore* backing_store,
247 IndexedDBFactory* factory, 238 IndexedDBFactory* factory,
248 const Identifier& unique_identifier); 239 const Identifier& unique_identifier);
249 ~IndexedDBDatabase(); 240 ~IndexedDBDatabase();
250 241
251 bool IsOpenConnectionBlocked() const; 242 bool IsOpenConnectionBlocked() const;
252 bool OpenInternal(); 243 bool OpenInternal();
253 void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks, 244 void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks,
254 scoped_ptr<IndexedDBConnection> connection, 245 scoped_ptr<IndexedDBConnection> connection,
255 int64 transaction_id, 246 int64 transaction_id,
256 int64 requested_version, 247 int64 requested_version);
257 blink::WebIDBDataLoss data_loss,
258 std::string data_loss_message);
259 void RunVersionChangeTransactionFinal( 248 void RunVersionChangeTransactionFinal(
260 scoped_refptr<IndexedDBCallbacks> callbacks, 249 scoped_refptr<IndexedDBCallbacks> callbacks,
261 scoped_ptr<IndexedDBConnection> connection, 250 scoped_ptr<IndexedDBConnection> connection,
262 int64 transaction_id, 251 int64 transaction_id,
263 int64 requested_version); 252 int64 requested_version);
264 void RunVersionChangeTransactionFinal(
265 scoped_refptr<IndexedDBCallbacks> callbacks,
266 scoped_ptr<IndexedDBConnection> connection,
267 int64 transaction_id,
268 int64 requested_version,
269 blink::WebIDBDataLoss data_loss,
270 std::string data_loss_message);
271 void ProcessPendingCalls(); 253 void ProcessPendingCalls();
272 254
273 bool IsDeleteDatabaseBlocked() const; 255 bool IsDeleteDatabaseBlocked() const;
274 void DeleteDatabaseFinal(scoped_refptr<IndexedDBCallbacks> callbacks); 256 void DeleteDatabaseFinal(scoped_refptr<IndexedDBCallbacks> callbacks);
275 257
276 IndexedDBTransaction* GetTransaction(int64 transaction_id) const; 258 IndexedDBTransaction* GetTransaction(int64 transaction_id) const;
277 259
278 bool ValidateObjectStoreId(int64 object_store_id) const; 260 bool ValidateObjectStoreId(int64 object_store_id) const;
279 bool ValidateObjectStoreIdAndIndexId(int64 object_store_id, 261 bool ValidateObjectStoreIdAndIndexId(int64 object_store_id,
280 int64 index_id) const; 262 int64 index_id) const;
(...skipping 29 matching lines...) Expand all
310 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; 292 typedef std::list<PendingDeleteCall*> PendingDeleteCallList;
311 PendingDeleteCallList pending_delete_calls_; 293 PendingDeleteCallList pending_delete_calls_;
312 294
313 typedef list_set<IndexedDBConnection*> ConnectionSet; 295 typedef list_set<IndexedDBConnection*> ConnectionSet;
314 ConnectionSet connections_; 296 ConnectionSet connections_;
315 }; 297 };
316 298
317 } // namespace content 299 } // namespace content
318 300
319 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 301 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698