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

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

Issue 110983004: IndexedDB: More database<->transaction relationship simplification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void DeleteIndex(int64 transaction_id, int64 object_store_id, int64 index_id); 112 void DeleteIndex(int64 transaction_id, int64 object_store_id, int64 index_id);
113 113
114 IndexedDBTransactionCoordinator& transaction_coordinator() { 114 IndexedDBTransactionCoordinator& transaction_coordinator() {
115 return transaction_coordinator_; 115 return transaction_coordinator_;
116 } 116 }
117 const IndexedDBTransactionCoordinator& transaction_coordinator() const { 117 const IndexedDBTransactionCoordinator& transaction_coordinator() const {
118 return transaction_coordinator_; 118 return transaction_coordinator_;
119 } 119 }
120 120
121 void TransactionCreated(IndexedDBTransaction* transaction); 121 void TransactionCreated(IndexedDBTransaction* transaction);
122 void TransactionStarted(IndexedDBTransaction* transaction);
123 void TransactionFinished(IndexedDBTransaction* transaction, bool committed); 122 void TransactionFinished(IndexedDBTransaction* transaction, bool committed);
124 123
125 // Called by transactions to report failure committing to the backing store. 124 // Called by transactions to report failure committing to the backing store.
126 void TransactionCommitFailed(); 125 void TransactionCommitFailed();
127 126
128 void Get(int64 transaction_id, 127 void Get(int64 transaction_id,
129 int64 object_store_id, 128 int64 object_store_id,
130 int64 index_id, 129 int64 index_id,
131 scoped_ptr<IndexedDBKeyRange> key_range, 130 scoped_ptr<IndexedDBKeyRange> key_range,
132 bool key_only, 131 bool key_only,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 284
286 scoped_refptr<IndexedDBBackingStore> backing_store_; 285 scoped_refptr<IndexedDBBackingStore> backing_store_;
287 IndexedDBDatabaseMetadata metadata_; 286 IndexedDBDatabaseMetadata metadata_;
288 287
289 const Identifier identifier_; 288 const Identifier identifier_;
290 // This might not need to be a scoped_refptr since the factory's lifetime is 289 // This might not need to be a scoped_refptr since the factory's lifetime is
291 // that of the page group, but it's better to be conservitive than sorry. 290 // that of the page group, but it's better to be conservitive than sorry.
292 scoped_refptr<IndexedDBFactory> factory_; 291 scoped_refptr<IndexedDBFactory> factory_;
293 292
294 IndexedDBTransactionCoordinator transaction_coordinator_; 293 IndexedDBTransactionCoordinator transaction_coordinator_;
295 IndexedDBTransaction* running_version_change_transaction_;
296 294
297 typedef std::map<int64, IndexedDBTransaction*> TransactionMap; 295 typedef std::map<int64, IndexedDBTransaction*> TransactionMap;
298 TransactionMap transactions_; 296 TransactionMap transactions_;
299 297
300 class PendingOpenCall; 298 class PendingOpenCall;
301 typedef std::list<PendingOpenCall*> PendingOpenCallList; 299 typedef std::list<PendingOpenCall*> PendingOpenCallList;
302 PendingOpenCallList pending_open_calls_; 300 PendingOpenCallList pending_open_calls_;
303 301
304 class PendingUpgradeCall; 302 class PendingUpgradeCall;
305 scoped_ptr<PendingUpgradeCall> pending_run_version_change_transaction_call_; 303 scoped_ptr<PendingUpgradeCall> pending_run_version_change_transaction_call_;
306 class PendingSuccessCall; 304 class PendingSuccessCall;
307 scoped_ptr<PendingSuccessCall> pending_second_half_open_; 305 scoped_ptr<PendingSuccessCall> pending_second_half_open_;
308 306
309 class PendingDeleteCall; 307 class PendingDeleteCall;
310 typedef std::list<PendingDeleteCall*> PendingDeleteCallList; 308 typedef std::list<PendingDeleteCall*> PendingDeleteCallList;
311 PendingDeleteCallList pending_delete_calls_; 309 PendingDeleteCallList pending_delete_calls_;
312 310
313 typedef list_set<IndexedDBConnection*> ConnectionSet; 311 typedef list_set<IndexedDBConnection*> ConnectionSet;
314 ConnectionSet connections_; 312 ConnectionSet connections_;
315 }; 313 };
316 314
317 } // namespace content 315 } // namespace content
318 316
319 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 317 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698