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

Unified Diff: content/child/indexed_db/webidbdatabase_impl.cc

Issue 2062203004: IDBObserver: Lifetime Management: Adding Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding Observer 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/child/indexed_db/webidbdatabase_impl.cc
diff --git a/content/child/indexed_db/webidbdatabase_impl.cc b/content/child/indexed_db/webidbdatabase_impl.cc
index fedb0e7333974ecdce6127249739b0b4ea4ccdae..28408b7c32facfd6d381f350e2f39ef57d4cb5a9 100644
--- a/content/child/indexed_db/webidbdatabase_impl.cc
+++ b/content/child/indexed_db/webidbdatabase_impl.cc
@@ -19,7 +19,9 @@
#include "third_party/WebKit/public/platform/WebVector.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyPath.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBMetadata.h"
+// #include "third_party/WebKit/Source/modules/indexeddb/IDBObserver.h"
+using blink::IDBObserver;
using blink::WebBlobInfo;
using blink::WebIDBCallbacks;
using blink::WebIDBCursor;
@@ -100,6 +102,13 @@ void WebIDBDatabaseImpl::versionChangeIgnored() {
dispatcher->NotifyIDBDatabaseVersionChangeIgnored(ipc_database_id_);
}
+void WebIDBDatabaseImpl::observe(blink::IDBObserver* observer,
+ long long transaction_id) {
+ IndexedDBDispatcher* dispatcher =
+ IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
+ dispatcher->AddIDBObserver(ipc_database_id_, transaction_id, observer);
+}
+
void WebIDBDatabaseImpl::get(long long transaction_id,
long long object_store_id,
long long index_id,

Powered by Google App Engine
This is Rietveld 408576698