Description[Sync] USS: Fix race condition in DeviceInfoService + add error handling
This change sort of grew beyond what it probably should have:
- Fixes a race condition I found in DeviceInfoService where if the
provider didn't initialize before sync started trying to do things, it
would just error out. Instead we now wait for both the data to load
and the provider to init before loading metadata.
- Make ModelTypeChangeProcessor inherit from SyncErrorFactory.
- Replace a lot of SyncErrors in DeviceInfoService with DCHECKS.
- Report a SyncError via OnMetadataLoaded to sync if we encountered a
critical error while starting up. In the future this should probably
be handled differently (nuking the DB and trying again or the like).
- Fix some typos in comments.
BUG=570085
Committed: https://crrev.com/327375a85bf5b1658d5de26d1f0c6ee33c3334e9
Cr-Commit-Position: refs/heads/master@{#394881}
Patch Set 1 #
Messages
Total messages: 8 (3 generated)
|