Index: sync/syncable/directory.cc |
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc |
index 97e7071e591da8a084cc5971f642bb8cdb23c5be..56822f06e8716f9f27f968f940ac0f62386422c5 100644 |
--- a/sync/syncable/directory.cc |
+++ b/sync/syncable/directory.cc |
@@ -792,6 +792,20 @@ void Directory::IncrementTransactionVersion(ModelType type) { |
kernel_->persisted_info.transaction_version[type]++; |
} |
+void Directory::GetDataTypeContext(ModelType type, |
+ sync_pb::DataTypeContext* context) const { |
rlarocque
2014/04/03 21:17:56
This is better, but I think you'll still want to h
Nicolas Zea
2014/04/03 22:11:49
Done.
|
+ ScopedKernelLock lock(this); |
+ context->CopyFrom(kernel_->persisted_info.datatype_context[type]); |
+} |
+ |
+void Directory::SetDataTypeContext( |
+ ModelType type, |
+ const sync_pb::DataTypeContext& context) { |
+ ScopedKernelLock lock(this); |
+ kernel_->persisted_info.datatype_context[type].CopyFrom(context); |
+ kernel_->info_status = KERNEL_SHARE_INFO_DIRTY; |
+} |
+ |
ModelTypeSet Directory::InitialSyncEndedTypes() { |
syncable::ReadTransaction trans(FROM_HERE, this); |
ModelTypeSet protocol_types = ProtocolTypes(); |