Chromium Code Reviews| 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 b17ff27522c08c7659bf0c44585193f1cd4dfe93..05414bf324ac6e0c93ff372c28c276c5c2690b81 100644 |
| --- a/components/sync/syncable/directory_backing_store.cc |
| +++ b/components/sync/syncable/directory_backing_store.cc |
| @@ -1642,6 +1642,7 @@ bool DirectoryBackingStore::CreateShareInfoTableVersion71( |
| // This function checks to see if the given list of Metahandles has any nodes |
| // whose PARENT_ID values refer to ID values that do not actually exist. |
| +// This function also checks that the root node exists in the set. |
|
pavely
2016/09/15 22:50:15
I would say "that root node with correct id exists
|
| // Returns true on success. |
| bool DirectoryBackingStore::VerifyReferenceIntegrity( |
| const Directory::MetahandlesMap* handles_map) { |
| @@ -1667,6 +1668,9 @@ bool DirectoryBackingStore::VerifyReferenceIntegrity( |
| } |
| } |
| } |
| + if (ids_set.find(Id::GetRoot().value()) == ids_set.end()) { |
|
pavely
2016/09/15 22:50:15
nit: Since you are using Id class directly could y
|
| + return false; |
| + } |
| return is_ok; |
| } |