| Index: components/sync/syncable/directory_backing_store.cc
|
| diff --git a/components/sync/syncable/directory_backing_store.cc b/components/sync/syncable/directory_backing_store.cc
|
| index ac404ecc42c0019a76248d8382ca5512ee21cd92..f9d650a4533c66bc85bd741ef5873c4863f97e0f 100644
|
| --- a/components/sync/syncable/directory_backing_store.cc
|
| +++ b/components/sync/syncable/directory_backing_store.cc
|
| @@ -681,7 +681,7 @@ bool DirectoryBackingStore::LoadEntries(Directory::MetahandlesMap* handles_map,
|
| model_type = kernel->GetServerModelType();
|
| }
|
| ++model_type_entry_count[model_type];
|
| - (*handles_map)[handle] = kernel.release();
|
| + (*handles_map)[handle] = std::move(kernel);
|
| }
|
| }
|
|
|
| @@ -1651,17 +1651,15 @@ bool DirectoryBackingStore::VerifyReferenceIntegrity(
|
| IdsSet ids_set;
|
| bool is_ok = true;
|
|
|
| - for (Directory::MetahandlesMap::const_iterator it = handles_map->begin();
|
| - it != handles_map->end(); ++it) {
|
| - EntryKernel* entry = it->second;
|
| + for (auto it = handles_map->begin(); it != handles_map->end(); ++it) {
|
| + EntryKernel* entry = it->second.get();
|
| bool is_duplicate_id = !(ids_set.insert(entry->ref(ID).value()).second);
|
| is_ok = is_ok && !is_duplicate_id;
|
| }
|
|
|
| IdsSet::iterator end = ids_set.end();
|
| - for (Directory::MetahandlesMap::const_iterator it = handles_map->begin();
|
| - it != handles_map->end(); ++it) {
|
| - EntryKernel* entry = it->second;
|
| + for (auto it = handles_map->begin(); it != handles_map->end(); ++it) {
|
| + EntryKernel* entry = it->second.get();
|
| if (!entry->ref(PARENT_ID).IsNull()) {
|
| bool parent_exists = (ids_set.find(entry->ref(PARENT_ID).value()) != end);
|
| if (!parent_exists) {
|
|
|