Dont send ADD for implicitly created app list folders during inital sync
When processing the initial list of sync items, an item with parent_id
set to non-empty may trigger the creation of a new folder item, which
may trigger sending a sync ADD event for a sync item that already exists
(later in the list). The sync code treats an ADD request for an existing
item as a fatal error.
To prevent that, this CL disables sending ADD events while processing the
initial list; when the item is processed the newly created folder
SyncItem will be updated to reflect the initial sync list entry.
Note: An alternative approach would be to process the initial list twice,
creating folder items first then other items. Even though the change in
this CL is somewhat subtle, it is a much smaller change than processing
the list twice twice would be, and I think that processing the list twice
would ultimately be more error prone. That said, I could be convinced
otherwise.
BUG=380537
Review URL: https://codereview.chromium.org/
580653002
Cr-Commit-Position: refs/heads/master@{#295300}