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

Unified Diff: sync/syncable/directory.h

Issue 218623014: [Sync] Add context proto and directory support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add transaction param Created 6 years, 9 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
« no previous file with comments | « sync/protocol/sync.proto ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory.h
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index ca8f4f133a72b3a2b95cfbde32688eda3e09d65e..5efa34836ec0e5e72afa5b4fb0425db9985eeb06 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -120,6 +120,8 @@ class SYNC_EXPORT Directory {
// opaque to the client. This is the serialization of a message of type
// ChipBag defined in sync.proto. It can contains NULL characters.
std::string bag_of_chips;
+ // The per-datatype context.
+ sync_pb::DataTypeContext datatype_context[MODEL_TYPE_COUNT];
};
// What the Directory needs on initialization to create itself and its Kernel.
@@ -196,6 +198,14 @@ class SYNC_EXPORT Directory {
int64 GetTransactionVersion(ModelType type) const;
void IncrementTransactionVersion(ModelType type);
+ // Getter/setters for the per datatype context.
+ void GetDataTypeContext(BaseTransaction* trans,
+ ModelType type,
+ sync_pb::DataTypeContext* context) const;
+ void SetDataTypeContext(BaseWriteTransaction* trans,
+ ModelType type,
+ const sync_pb::DataTypeContext& context);
+
ModelTypeSet InitialSyncEndedTypes();
bool InitialSyncEndedForType(ModelType type);
bool InitialSyncEndedForType(BaseTransaction* trans, ModelType type);
« no previous file with comments | « sync/protocol/sync.proto ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698