| Index: content/browser/indexed_db/indexed_db_transaction.cc
|
| diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
|
| index a7f17b6178c24bf5c0675393ed399c392177d648..67677a46d11097dcb0c458399aea2145a47e81b2 100644
|
| --- a/content/browser/indexed_db/indexed_db_transaction.cc
|
| +++ b/content/browser/indexed_db/indexed_db_transaction.cc
|
| @@ -14,6 +14,7 @@
|
| #include "content/browser/indexed_db/indexed_db_cursor.h"
|
| #include "content/browser/indexed_db/indexed_db_database.h"
|
| #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
|
| +#include "content/browser/indexed_db/indexed_db_observer.h"
|
| #include "content/browser/indexed_db/indexed_db_tracing.h"
|
| #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
|
| #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseException.h"
|
| @@ -314,6 +315,9 @@ leveldb::Status IndexedDBTransaction::CommitPhaseTwo() {
|
| database_->transaction_coordinator().DidFinishTransaction(this);
|
|
|
| if (committed) {
|
| + // TODO (palakj) : Send Observations to observers
|
| + if (!pending_observers_.empty())
|
| + ActivatePendingObserver();
|
| abort_task_stack_.clear();
|
| {
|
| IDB_TRACE1(
|
| @@ -420,4 +424,14 @@ void IndexedDBTransaction::CloseOpenCursors() {
|
| open_cursors_.clear();
|
| }
|
|
|
| +void IndexedDBTransaction::AddPendingObserver(int64_t observer_id,
|
| + IndexedDBObserver* observer) {
|
| + pending_observers_[observer_id] = observer;
|
| +}
|
| +
|
| +void IndexedDBTransaction::ActivatePendingObserver() {
|
| + database_->active_observers_.insert(pending_observers_.begin(),
|
| + pending_observers_.end());
|
| +}
|
| +
|
| } // namespace content
|
|
|