diff options
Diffstat (limited to 'sync/internal_api/write_node.cc')
-rw-r--r-- | sync/internal_api/write_node.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc index cefd6df..1fbe029 100644 --- a/sync/internal_api/write_node.cc +++ b/sync/internal_api/write_node.cc @@ -310,13 +310,12 @@ BaseNode::InitByLookupResult WriteNode::InitByClientTagLookup( return DecryptIfNecessary() ? INIT_OK : INIT_FAILED_DECRYPT_IF_NECESSARY; } -BaseNode::InitByLookupResult WriteNode::InitByTagLookup( - const std::string& tag) { +BaseNode::InitByLookupResult WriteNode::InitTypeRoot(ModelType type) { DCHECK(!entry_) << "Init called twice"; - if (tag.empty()) + if (!IsRealDataType(type)) return INIT_FAILED_PRECONDITION; entry_ = new syncable::MutableEntry(transaction_->GetWrappedWriteTrans(), - syncable::GET_BY_SERVER_TAG, tag); + syncable::GET_TYPE_ROOT, type); if (!entry_->good()) return INIT_FAILED_ENTRY_NOT_GOOD; if (entry_->GetIsDel()) |