Index: content/browser/indexed_db/indexed_db_observer.h |
diff --git a/content/browser/indexed_db/indexed_db_observer.h b/content/browser/indexed_db/indexed_db_observer.h |
index f7bd95985a3b280865f63303b9e44faaf4578ff7..704b7af9ff22c1fea9c2485c469b329698f27fdd 100644 |
--- a/content/browser/indexed_db/indexed_db_observer.h |
+++ b/content/browser/indexed_db/indexed_db_observer.h |
@@ -8,20 +8,37 @@ |
#include <stddef.h> |
#include <stdint.h> |
+#include <set> |
+#include <vector> |
+ |
#include "base/macros.h" |
+#include "base/stl_util.h" |
#include "content/common/content_export.h" |
namespace content { |
class CONTENT_EXPORT IndexedDBObserver { |
public: |
- IndexedDBObserver(int32_t observer_id); |
+ IndexedDBObserver(int32_t observer_id, std::set<int64_t> object_store_ids); |
~IndexedDBObserver(); |
- int32_t id() const { return observer_id_; } |
+ int32_t id() const { return id_; } |
+ const std::set<int64_t>& GetObjectStoreIds() const { |
+ return object_store_ids_; |
+ } |
+ bool IsRecordingType(int32_t type_index) const { |
+ return operation_type_[type_index]; |
cmumford
2016/07/07 21:14:21
When is operation_type_ set?
palakj1
2016/07/08 17:37:56
Sorry, this is still a wip. I should have mentione
|
+ } |
+ bool IsRecordingObjectStore(int32_t object_store_id) const { |
+ return ContainsValue(object_store_ids_, object_store_id); |
+ } |
private: |
- int32_t observer_id_; |
+ int32_t id_; |
+ std::set<int64_t> object_store_ids_; |
+ // operation_type_ indicates whether each operation type { ADD, PUT, DELETE, |
+ // CLEAR } is to be recorded or not. |
+ bool operation_type_[4] = {false}; |
cmumford
2016/07/07 21:14:21
using a int32_t (above in IsRecordingType) and [4]
palakj1
2016/07/08 17:37:56
Thanks. Done.
|
DISALLOW_COPY_AND_ASSIGN(IndexedDBObserver); |
}; |