We currently only try to reconcile after loading metadata, see https://cs.chromium.org/chromium/src/components/sync/device_info/device_info_sync_bridge.cc?l=369
The problem is that when disabled and re-enabled, we know metadata should be empty, and the base ModelTypeSyncBridge class takes care of metadata, see https://cs.chromium.org/chromium/src/components/sync/model/model_type_sync_bridge.cc?l=47
Because ModelTypeSyncBridge also clears out all data when sync is disabled, see https://cs.chromium.org/chromium/src/components/sync/device_info/device_info_sync_bridge.cc?l=248 , we are guaranteed to not have a local copy of ourselves during re-enable, and thus merge will happen without committing ourselves. This isn't fixed in a timely manner either, instead we have to wait until the pulse timer goes off next, which luckily is still be running.
I think the impact here is minor, we're vending slightly inaccurate data from DeviceInfoTracker. But remember that we keep around old clients for many days anyways, accuracy is not really critical. We should definitely fix this eventually.
Comment 1 by s...@chromium.org
, Jan 17 2018