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

Unified Diff: content/browser/indexed_db/indexed_db_transaction.h

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unobserve functionality Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
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 816e84ba0b44bacf25492aff494eda6bcb8057b1..59ce5f8c540d661a175616fad1eed20c11d2b639 100644
--- a/content/browser/indexed_db/indexed_db_transaction.h
+++ b/content/browser/indexed_db/indexed_db_transaction.h
@@ -64,7 +64,7 @@ class CONTENT_EXPORT IndexedDBTransaction
pending_preemptive_events_--;
DCHECK_GE(pending_preemptive_events_, 0);
}
- void AddPendingObserver(std::unique_ptr<IndexedDBObserver> observer);
+ void AddPendingObserver(int64_t observer_id, IndexedDBObserver* observer);
IndexedDBBackingStore::Transaction* BackingStoreTransaction() {
return transaction_.get();
@@ -179,7 +179,7 @@ class CONTENT_EXPORT IndexedDBTransaction
int pending_preemptive_events_;
std::set<IndexedDBCursor*> open_cursors_;
- std::vector<std::unique_ptr<IndexedDBObserver>> pending_observers_;
+ std::map<int64_t, 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

Powered by Google App Engine
This is Rietveld 408576698