-
stanisc authored
This change prepares the client to deal with implicit permanent folders in Sync server updates. That includes the following: - Expect type root folders to not come from the server on the initial sync. The client auto-creates type root folders for all types except Bookmarks and Nigori when progress marker changes from empty to non-empty. These folders are created as local nodes (with client IDs) that aren't expected to sync back to the server. - Expect empty parent IDs in updates for both new and existing items. - Because the client code updates first, the client must expect server to override locally created type root folders. To enable that the directory update code that matches update entities to local entities was updated to look at server unique tags in addition to client unique tags. Later when the server stops generating folders we should be able to remove that code. - Added some extra special cases in Directory::CheckTreeInvariants to deal with client side created type root folders. - Added / modified a few tests to cover cases with implicit parent IDs in updates. BUG=438313 Review URL: https://codereview.chromium.org/867793003 Cr-Commit-Position: refs/heads/master@{#313977}
8d4046a9