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

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

Issue 2459113002: [IDBObservers] Moving options from constructor to .observe call. (Closed)
Patch Set: added more exceptions, fixed tests Created 4 years, 1 month 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/IDBObserver.h
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.h b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.h
index 34a202abc2fb966eb430c50424be3bf49f35b3e6..bcfdee7e82637f61ea53b7873716e6002147bb43 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.h
@@ -11,7 +11,6 @@
#include "platform/heap/Handle.h"
#include "public/platform/WebVector.h"
#include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include <bitset>
namespace blink {
@@ -28,35 +27,26 @@ class MODULES_EXPORT IDBObserver final
DEFINE_WRAPPERTYPEINFO();
public:
- static IDBObserver* create(IDBObserverCallback*, const IDBObserverInit&);
+ static IDBObserver* create(IDBObserverCallback*);
void removeObserver(int32_t id);
void onChange(int32_t id,
const WebVector<WebIDBObservation>&,
const WebVector<int32_t>& observationIndex);
- bool transaction() const { return m_transaction; }
- bool noRecords() const { return m_noRecords; }
- bool values() const { return m_values; }
- const std::bitset<WebIDBOperationTypeCount>& operationTypes() const {
- return m_operationTypes;
- }
-
// Implement the IDBObserver IDL.
- void observe(IDBDatabase*, IDBTransaction*, ExceptionState&);
+ void observe(IDBDatabase*,
+ IDBTransaction*,
+ const IDBObserverInit&,
+ ExceptionState&);
void unobserve(IDBDatabase*, ExceptionState&);
DECLARE_TRACE();
private:
- IDBObserver(IDBObserverCallback*, const IDBObserverInit&);
+ IDBObserver(IDBObserverCallback*);
Member<IDBObserverCallback> m_callback;
- bool m_transaction;
- bool m_values;
- bool m_noRecords;
- // Operation type bits are set corresponding to WebIDBOperationType.
- std::bitset<WebIDBOperationTypeCount> m_operationTypes;
HeapHashMap<int32_t, WeakMember<IDBDatabase>> m_observerIds;
};

Powered by Google App Engine
This is Rietveld 408576698