OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Defines ChangeReorderBuffer, which can be used to sort a list of item | 5 // Defines ChangeReorderBuffer, which can be used to sort a list of item |
6 // actions to achieve the ordering constraint required by the SyncObserver | 6 // actions to achieve the ordering constraint required by the SyncObserver |
7 // interface of the SyncAPI. | 7 // interface of the SyncAPI. |
8 | 8 |
9 #ifndef COMPONENTS_SYNC_CORE_IMPL_CHANGE_REORDER_BUFFER_H_ | 9 #ifndef COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_ |
10 #define COMPONENTS_SYNC_CORE_IMPL_CHANGE_REORDER_BUFFER_H_ | 10 #define COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_ |
11 | 11 |
12 #include <stdint.h> | 12 #include <stdint.h> |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "components/sync/core/change_record.h" | |
21 #include "components/sync/protocol/sync.pb.h" | 20 #include "components/sync/protocol/sync.pb.h" |
| 21 #include "components/sync/syncable/change_record.h" |
22 | 22 |
23 namespace syncer { | 23 namespace syncer { |
24 | 24 |
25 class BaseTransaction; | 25 class BaseTransaction; |
26 | 26 |
27 // ChangeReorderBuffer is a utility type which accepts an unordered set | 27 // ChangeReorderBuffer is a utility type which accepts an unordered set |
28 // of changes (via its Push methods), and yields an ImmutableChangeRecordList | 28 // of changes (via its Push methods), and yields an ImmutableChangeRecordList |
29 // (via the GetAllChangesInTreeOrder method) that are in the order that | 29 // (via the GetAllChangesInTreeOrder method) that are in the order that |
30 // the SyncObserver expects them to be. A buffer is initially empty. | 30 // the SyncObserver expects them to be. A buffer is initially empty. |
31 // | 31 // |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 SpecificsMap specifics_; | 84 SpecificsMap specifics_; |
85 | 85 |
86 // Stores type-specific extra data per-ID. | 86 // Stores type-specific extra data per-ID. |
87 ExtraDataMap extra_data_; | 87 ExtraDataMap extra_data_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(ChangeReorderBuffer); | 89 DISALLOW_COPY_AND_ASSIGN(ChangeReorderBuffer); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace syncer | 92 } // namespace syncer |
93 | 93 |
94 #endif // COMPONENTS_SYNC_CORE_IMPL_CHANGE_REORDER_BUFFER_H_ | 94 #endif // COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_ |
OLD | NEW |