Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_transaction.h |
| diff --git a/content/browser/indexed_db/indexed_db_transaction.h b/content/browser/indexed_db/indexed_db_transaction.h |
| index ae1863b151f161ab6fc82e3ca1b575171d784568..07db2c32a03e8ab1e29c8103567ae37c4c2b03e7 100644 |
| --- a/content/browser/indexed_db/indexed_db_transaction.h |
| +++ b/content/browser/indexed_db/indexed_db_transaction.h |
| @@ -27,6 +27,7 @@ namespace content { |
| class BlobWriteCallbackImpl; |
| class IndexedDBCursor; |
| class IndexedDBDatabaseCallbacks; |
| +class IndexedDBObserver; |
| class CONTENT_EXPORT IndexedDBTransaction |
| : public NON_EXPORTED_BASE(base::RefCounted<IndexedDBTransaction>) { |
| @@ -63,6 +64,8 @@ class CONTENT_EXPORT IndexedDBTransaction |
| pending_preemptive_events_--; |
| DCHECK_GE(pending_preemptive_events_, 0); |
| } |
| + void AddPendingObserver(std::unique_ptr<IndexedDBObserver> observer); |
| + |
| IndexedDBBackingStore::Transaction* BackingStoreTransaction() { |
| return transaction_.get(); |
| } |
| @@ -123,6 +126,8 @@ class CONTENT_EXPORT IndexedDBTransaction |
| leveldb::Status CommitPhaseTwo(); |
| void Timeout(); |
| + void AddActiveObserver(); |
|
dmurph
2016/06/15 12:49:43
what about 'MaybeActivatePendingObservers()'
palakj1
2016/06/16 07:05:40
yaa, that's a lot more intutive. changed.
|
| + |
| const int64_t id_; |
| const std::set<int64_t> object_store_ids_; |
| const blink::WebIDBTransactionMode mode_; |
| @@ -174,6 +179,7 @@ class CONTENT_EXPORT IndexedDBTransaction |
| int pending_preemptive_events_; |
| std::set<IndexedDBCursor*> open_cursors_; |
| + std::vector<std::unique_ptr<IndexedDBObserver>> pending_observers_; |
| // This timer is started after requests have been processed. If no subsequent |
| // requests are processed before the timer fires, assume the script is |