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

Unified Diff: chrome/browser/sync/internal_api/change_reorder_buffer.h

Issue 7918001: [Sync] Move ChangeRecord into its own file (change_record.{h,cc}) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/internal_api/change_reorder_buffer.h
diff --git a/chrome/browser/sync/internal_api/change_reorder_buffer.h b/chrome/browser/sync/internal_api/change_reorder_buffer.h
index 946089373f674f6e4f4b9dbda14fef855c65f482..c78bcaca8dc7ac5fc21c44c1bd753de364f8b7e9 100644
--- a/chrome/browser/sync/internal_api/change_reorder_buffer.h
+++ b/chrome/browser/sync/internal_api/change_reorder_buffer.h
@@ -15,13 +15,13 @@
#include "base/memory/linked_ptr.h"
#include "chrome/browser/sync/internal_api/base_transaction.h"
-#include "chrome/browser/sync/internal_api/sync_manager.h"
+#include "chrome/browser/sync/internal_api/change_record.h"
#include "chrome/browser/sync/protocol/sync.pb.h"
namespace sync_api {
// ChangeReorderBuffer is a utility type which accepts an unordered set
-// of changes (via its Push methods), and yields a vector of ChangeRecords
+// of changes (via its Push methods), and yields an ImmutableChangeRecordList
// (via the GetAllChangesInTreeOrder method) that are in the order that
// the SyncObserver expects them to be. A buffer is initially empty.
//
@@ -39,9 +39,6 @@ namespace sync_api {
// its children.
class ChangeReorderBuffer {
public:
- typedef SyncManager::ChangeRecord ChangeRecord;
- typedef SyncManager::ExtraPasswordChangeRecordData ExtraChangeRecordData;
-
ChangeReorderBuffer();
~ChangeReorderBuffer();
@@ -69,8 +66,8 @@ class ChangeReorderBuffer {
OP_UPDATE_PROPERTIES_ONLY;
}
- void SetExtraDataForId(int64 id, ExtraChangeRecordData* extra) {
- extra_data_[id] = make_linked_ptr<ExtraChangeRecordData>(extra);
+ void SetExtraDataForId(int64 id, ExtraPasswordChangeRecordData* extra) {
+ extra_data_[id] = make_linked_ptr<ExtraPasswordChangeRecordData>(extra);
}
void SetSpecificsForId(int64 id, const sync_pb::EntitySpecifics& specifics) {
@@ -90,8 +87,8 @@ class ChangeReorderBuffer {
// Output a reordered list of changes to |changelist| using the items that
// were pushed into the reorder buffer. |sync_trans| is used to determine the
// ordering.
- void GetAllChangesInTreeOrder(const BaseTransaction* sync_trans,
- std::vector<ChangeRecord>* changelist);
+ ImmutableChangeRecordList
+ GetAllChangesInTreeOrder(const BaseTransaction* sync_trans);
private:
class Traversal;
@@ -103,7 +100,8 @@ class ChangeReorderBuffer {
};
typedef std::map<int64, Operation> OperationMap;
typedef std::map<int64, sync_pb::EntitySpecifics> SpecificsMap;
- typedef std::map<int64, linked_ptr<ExtraChangeRecordData> > ExtraDataMap;
+ typedef std::map<int64, linked_ptr<ExtraPasswordChangeRecordData> >
+ ExtraDataMap;
// Stores the items that have been pushed into the buffer, and the type of
// operation that was associated with them.
« no previous file with comments | « chrome/browser/sync/internal_api/change_record.cc ('k') | chrome/browser/sync/internal_api/change_reorder_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698