Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_CHANGES_H_ | |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_CHANGES_H_ | |
| 7 | |
| 8 #include <stddef.h> | |
| 9 #include <stdint.h> | |
| 10 | |
| 11 #include <map> | |
| 12 #include <set> | |
| 13 #include <vector> | |
| 14 | |
| 15 #include "base/macros.h" | |
| 16 #include "base/memory/ptr_util.h" | |
| 17 #include "base/stl_util.h" | |
| 18 #include "content/common/content_export.h" | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 class IndexedDBObservation; | |
| 23 | |
| 24 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.
| |
| 25 IndexedDBObserverChanges(); | |
| 26 ~IndexedDBObserverChanges(); | |
| 27 | |
| 28 void AddObservationIndex(int32_t observer_id); | |
| 29 void AddObservation(std::unique_ptr<IndexedDBObservation> observation); | |
| 30 | |
| 31 // map observer_id to corresponding set of indices in observations. | |
| 32 std::map<int32_t, std::vector<int32_t>> observation_index; | |
| 33 std::vector<std::unique_ptr<IndexedDBObservation>> observations; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(IndexedDBObserverChanges); | |
| 36 }; | |
| 37 | |
| 38 } // namespace content | |
| 39 | |
| 40 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_CHANGES_H_ | |
| OLD | NEW |