• Mikel Astiz's avatar
    Allow remote SyncData without valid ID · 76ea70c9
    Mikel Astiz authored
    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: default avatarMarc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#594646}
    76ea70c9
sync_data_unittest.cc 2.46 KB