Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_observer_changes.h |
| diff --git a/content/browser/indexed_db/indexed_db_observer_changes.h b/content/browser/indexed_db/indexed_db_observer_changes.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1b89138a64d38f727e283ec160605684fafe8d78 |
| --- /dev/null |
| +++ b/content/browser/indexed_db/indexed_db_observer_changes.h |
| @@ -0,0 +1,40 @@ |
| +// 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_OBSERVER_CHANGES_H_ |
| +#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_CHANGES_H_ |
| + |
| +#include <stddef.h> |
| +#include <stdint.h> |
| + |
| +#include <map> |
| +#include <set> |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/ptr_util.h" |
| +#include "base/stl_util.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +class IndexedDBObservation; |
| + |
| +struct CONTENT_EXPORT IndexedDBObserverChanges { |
|
cmumford
2016/07/07 21:14:21
IndexedDBObserverChanges has methods and not just
palakj1
2016/07/08 17:37:56
Done.
|
| + IndexedDBObserverChanges(); |
| + ~IndexedDBObserverChanges(); |
| + |
| + void AddObservationIndex(int32_t observer_id); |
| + void AddObservation(std::unique_ptr<IndexedDBObservation> observation); |
| + |
| + // map observer_id to corresponding set of indices in observations. |
| + std::map<int32_t, std::vector<int32_t>> observation_index; |
| + std::vector<std::unique_ptr<IndexedDBObservation>> observations; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(IndexedDBObserverChanges); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_CHANGES_H_ |