| 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..501225313a6afd7b01bcfc847f43163b150f5125 100644
|
| --- a/content/browser/indexed_db/indexed_db_transaction.h
|
| +++ b/content/browser/indexed_db/indexed_db_transaction.h
|
| @@ -18,6 +18,7 @@
|
| #include "base/time/time.h"
|
| #include "base/timer/timer.h"
|
| #include "content/browser/indexed_db/indexed_db_backing_store.h"
|
| +#include "content/browser/indexed_db/indexed_db_connection.h"
|
| #include "content/browser/indexed_db/indexed_db_database.h"
|
| #include "content/browser/indexed_db/indexed_db_database_error.h"
|
| #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
|
| @@ -27,6 +28,7 @@ namespace content {
|
| class BlobWriteCallbackImpl;
|
| class IndexedDBCursor;
|
| class IndexedDBDatabaseCallbacks;
|
| +class IndexedDBObserver;
|
|
|
| class CONTENT_EXPORT IndexedDBTransaction
|
| : public NON_EXPORTED_BASE(base::RefCounted<IndexedDBTransaction>) {
|
| @@ -63,13 +65,16 @@ class CONTENT_EXPORT IndexedDBTransaction
|
| pending_preemptive_events_--;
|
| DCHECK_GE(pending_preemptive_events_, 0);
|
| }
|
| + void AddPendingObserver(int32_t observer_id);
|
| +
|
| IndexedDBBackingStore::Transaction* BackingStoreTransaction() {
|
| return transaction_.get();
|
| }
|
| int64_t id() const { return id_; }
|
|
|
| IndexedDBDatabase* database() const { return database_.get(); }
|
| - IndexedDBDatabaseCallbacks* connection() const { return callbacks_.get(); }
|
| + IndexedDBDatabaseCallbacks* callbacks() const { return callbacks_.get(); }
|
| + IndexedDBConnection* connection() const { return connection_.get(); }
|
|
|
| State state() const { return state_; }
|
| bool IsTimeoutTimerRunning() const { return timeout_timer_.IsRunning(); }
|
| @@ -82,12 +87,14 @@ class CONTENT_EXPORT IndexedDBTransaction
|
| };
|
|
|
| const Diagnostics& diagnostics() const { return diagnostics_; }
|
| + void RemovePendingObservers(const std::vector<int32_t>& pending_observer_ids);
|
|
|
| protected:
|
| // Test classes may derive, but most creation should be done via
|
| // IndexedDBClassFactory.
|
| IndexedDBTransaction(
|
| int64_t id,
|
| + base::WeakPtr<IndexedDBConnection> connection,
|
| scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
|
| const std::set<int64_t>& object_store_ids,
|
| blink::WebIDBTransactionMode mode,
|
| @@ -130,9 +137,12 @@ class CONTENT_EXPORT IndexedDBTransaction
|
| bool used_;
|
| State state_;
|
| bool commit_pending_;
|
| + base::WeakPtr<IndexedDBConnection> connection_;
|
| scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;
|
| scoped_refptr<IndexedDBDatabase> database_;
|
|
|
| + std::vector<std::unique_ptr<IndexedDBObserver>> pending_observers_;
|
| +
|
| class TaskQueue {
|
| public:
|
| TaskQueue();
|
|
|