Index: sync/syncable/directory.cc |
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc |
index 97e7071e591da8a084cc5971f642bb8cdb23c5be..85b0a172b1fe9100af246927d45f83031914ca68 100644 |
--- a/sync/syncable/directory.cc |
+++ b/sync/syncable/directory.cc |
@@ -792,6 +792,19 @@ void Directory::IncrementTransactionVersion(ModelType type) { |
kernel_->persisted_info.transaction_version[type]++; |
} |
+void Directory::GetDataTypeContext(ModelType type, |
+ sync_pb::DataTypeContext* context) const { |
+ kernel_->transaction_mutex.AssertAcquired(); |
maniscalco
2014/04/03 16:59:37
I noticed that in some methods we acquire a lock (
Nicolas Zea
2014/04/03 21:01:11
It has to do with whether it's expected that a tra
|
+ context->CopyFrom(kernel_->persisted_info.datatype_context[type]); |
+} |
+ |
+void Directory::SetDataTypeContext( |
+ ModelType type, |
+ const sync_pb::DataTypeContext& context) { |
+ kernel_->transaction_mutex.AssertAcquired(); |
rlarocque
2014/04/03 17:36:55
What's up with this pattern? I thought the tradit
Nicolas Zea
2014/04/03 21:01:11
This is actually wrong, see above comment. I've up
|
+ kernel_->persisted_info.datatype_context[type].CopyFrom(context); |
+} |
+ |
ModelTypeSet Directory::InitialSyncEndedTypes() { |
syncable::ReadTransaction trans(FROM_HERE, this); |
ModelTypeSet protocol_types = ProtocolTypes(); |