Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_observation.h |
| diff --git a/content/browser/indexed_db/indexed_db_observation.h b/content/browser/indexed_db/indexed_db_observation.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bc89835606c7dfc196fe626375a885fad944a41b |
| --- /dev/null |
| +++ b/content/browser/indexed_db/indexed_db_observation.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |
| +#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |
| + |
| +#include "base/macros.h" |
| +#include "content/browser/indexed_db/indexed_db_value.h" |
| +#include "content/common/content_export.h" |
| +#include "content/common/indexed_db/indexed_db_key_range.h" |
| +#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
| + |
| +namespace content { |
| + |
|
jsbell
2016/07/14 20:08:13
Can you add a comment about the purpose of this cl
palakj1
2016/07/15 20:16:04
Done.
|
| +class CONTENT_EXPORT IndexedDBObservation { |
|
jsbell
2016/07/14 20:08:13
Is CONTENT_EXPORT needed here?
palakj1
2016/07/15 20:16:04
Removed.
|
| + public: |
| + using OperationType = blink::WebIDBOperationType; |
| + |
| + IndexedDBObservation(int32_t object_store_id, OperationType); |
| + IndexedDBObservation(int32_t object_store_id, |
| + OperationType, |
| + IndexedDBKeyRange); |
| + IndexedDBObservation(int32_t object_store_id, |
| + OperationType, |
| + IndexedDBKeyRange, |
| + IndexedDBValue); |
| + |
| + ~IndexedDBObservation(); |
| + |
| + int64_t object_store_id() const { return object_store_id_; } |
| + OperationType type() const { return type_; } |
| + IndexedDBKeyRange key_range() const { return key_range_; } |
| + IndexedDBValue value() const { return value_; } |
| + |
| + private: |
| + int64_t object_store_id_; |
| + OperationType type_; |
| + // Populated for ADD, PUT, and DELETE operations. |
| + IndexedDBKeyRange key_range_; |
| + // Populated for ADD and PUT operations if values are requested. |
| + IndexedDBValue value_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(IndexedDBObservation); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_ |