Allow remote SyncData without valid ID
SyncableServices don't actually consume this field, the only caller to GetId() being GenericChangeProcessor. Changing the API towards SyncableServices would require a huge refactoring, so let's instead allow that SyncData may not be populated, and DCHECK-fail lazily on read (in case a SyncableService implementation is changed in the future to consume this field). The rationale behind is that future patches will integrate SyncableService instantes within the USS framework, where the ID doesn't have any semantics. As implementation detail: because local vs remote was previously implemented verifying id_ != kInvalidId, we need to instead introduce a dedicated bool member. Bug: 870624 Change-Id: I75aa92e69a861ea6af58327a14406bc086233043 Reviewed-on: https://chromium-review.googlesource.com/1205393 Commit-Queue: Mikel Astiz <mastiz@chromium.org> Reviewed-by:Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#594646}
Showing
Please register or sign in to comment