Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: components/sync/syncable/change_reorder_buffer.h

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_ 5 #ifndef COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_
6 #define COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_ 6 #define COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Output a reordered list of changes to |changes| using the items 60 // Output a reordered list of changes to |changes| using the items
61 // that were pushed into the reorder buffer. |sync_trans| is used to 61 // that were pushed into the reorder buffer. |sync_trans| is used to
62 // determine the ordering. Returns true if successful, or false if 62 // determine the ordering. Returns true if successful, or false if
63 // an error was encountered. 63 // an error was encountered.
64 bool GetAllChangesInTreeOrder(const BaseTransaction* sync_trans, 64 bool GetAllChangesInTreeOrder(const BaseTransaction* sync_trans,
65 ImmutableChangeRecordList* changes) 65 ImmutableChangeRecordList* changes)
66 WARN_UNUSED_RESULT; 66 WARN_UNUSED_RESULT;
67 67
68 private: 68 private:
69 class Traversal; 69 class Traversal;
70 typedef std::map<int64_t, ChangeRecord::Action> OperationMap; 70 using OperationMap = std::map<int64_t, ChangeRecord::Action>;
71 typedef std::map<int64_t, sync_pb::EntitySpecifics> SpecificsMap; 71 using SpecificsMap = std::map<int64_t, sync_pb::EntitySpecifics>;
72 typedef std::map<int64_t, linked_ptr<ExtraPasswordChangeRecordData>> 72 using ExtraDataMap =
73 ExtraDataMap; 73 std::map<int64_t, linked_ptr<ExtraPasswordChangeRecordData>>;
74 74
75 // Stores the items that have been pushed into the buffer, and the type of 75 // Stores the items that have been pushed into the buffer, and the type of
76 // operation that was associated with them. 76 // operation that was associated with them.
77 OperationMap operations_; 77 OperationMap operations_;
78 78
79 // Stores entity-specific ChangeRecord data per-ID. 79 // Stores entity-specific ChangeRecord data per-ID.
80 SpecificsMap specifics_; 80 SpecificsMap specifics_;
81 81
82 // Stores type-specific extra data per-ID. 82 // Stores type-specific extra data per-ID.
83 ExtraDataMap extra_data_; 83 ExtraDataMap extra_data_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(ChangeReorderBuffer); 85 DISALLOW_COPY_AND_ASSIGN(ChangeReorderBuffer);
86 }; 86 };
87 87
88 } // namespace syncer 88 } // namespace syncer
89 89
90 #endif // COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_ 90 #endif // COMPONENTS_SYNC_SYNCABLE_CHANGE_REORDER_BUFFER_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/change_record.h ('k') | components/sync/syncable/change_reorder_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698