summaryrefslogtreecommitdiffstats
path: root/sync/syncable/model_neutral_mutable_entry.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/syncable/model_neutral_mutable_entry.cc')
-rw-r--r--sync/syncable/model_neutral_mutable_entry.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sync/syncable/model_neutral_mutable_entry.cc b/sync/syncable/model_neutral_mutable_entry.cc
index 02cdcbb..ca05bdd 100644
--- a/sync/syncable/model_neutral_mutable_entry.cc
+++ b/sync/syncable/model_neutral_mutable_entry.cc
@@ -48,7 +48,10 @@ ModelNeutralMutableEntry::ModelNeutralMutableEntry(BaseWriteTransaction* trans,
CreateNewTypeRoot,
ModelType type)
: Entry(trans), base_write_transaction_(trans) {
- DCHECK(IsTypeWithClientGeneratedRoot(type));
+ // We allow NIGORI because we allow SyncEncryptionHandler to restore a nigori
+ // across Directory instances (see SyncEncryptionHandler::RestoreNigori).
+ if (type != NIGORI)
+ DCHECK(IsTypeWithClientGeneratedRoot(type));
Entry same_type_root(trans, GET_TYPE_ROOT, type);
kernel_ = NULL;
if (same_type_root.good()) {