• pavely's avatar
    [Sync] InvalidationService shouldn't CHECK when registering ObjectId for more than one handler · 8131d2b4
    pavely authored
    Before this change InvalidationService CHECKs that object id is only
    registered with one handler. This causes browser crash when object id is
    received from network already registered.
    
    Solution is to let each component that uses InvalidationService decide
    how to react to duplicate registration.
    In this change:
    - InvalidationService::UpdateRegisteredInvalidationIds doesn't CHECK
      inside, but returns boolean that indicates if update was successful.
    - All places that call this function do CHECK to preserve existing
      behavior.
    - Internal implementations and tests are updated accordingly.
    
    BUG=475941
    R=maniscalco@chromium.org
    
    Review URL: https://codereview.chromium.org/1146533005
    
    Cr-Commit-Position: refs/heads/master@{#330654}
    8131d2b4
invalidator_registrar.h 3.72 KB