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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: Renderer changes Created 4 years, 5 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: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h
index c93d66d7d5b3d32f7cc40acf222f9e484800ad0e..44aee4ab86c5152db29bb8c2f1a10697e0400386 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h
@@ -8,19 +8,20 @@
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "modules/indexeddb/IDBDatabase.h"
+#include "modules/indexeddb/IDBObservation.h"
#include "modules/indexeddb/IDBTransaction.h"
#include "platform/heap/Handle.h"
+#include "public/platform/WebVector.h"
namespace blink {
class ScriptState;
-class IDBObserverChangesRecord;
-class IDBObserverChanges final : public GarbageCollected<IDBObserverChanges>, public ScriptWrappable {
+class IDBObserverChanges final : public GarbageCollectedFinalized<IDBObserverChanges>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static IDBObserverChanges* create(IDBDatabase*, IDBTransaction*, IDBAny* records);
+ static IDBObserverChanges* create(IDBDatabase*, const WebVector<WebIDBObservation>&, const WebVector<int32_t>& observationIndex);
DECLARE_TRACE();
@@ -30,12 +31,14 @@ public:
ScriptValue records(ScriptState*);
private:
- IDBObserverChanges(IDBDatabase*, IDBTransaction*, IDBAny* records);
+ IDBObserverChanges(IDBDatabase*, const WebVector<WebIDBObservation>&, const WebVector<int32_t>& observationIndex);
+
+ void extractChanges(const WebVector<WebIDBObservation>&, const WebVector<int32_t>& observationIndex);
Member<IDBDatabase> m_database;
Member<IDBTransaction> m_transaction;
- // TODO(palakj) : change to appropriate type Map<String, sequence<IDBObserverChangesRecord>>.
- Member<IDBAny> m_records;
+ // Map objectStoreId to IDBObservation list.
+ HeapHashMap<int64_t, HeapVector<Member<IDBObservation>>> m_records;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698