Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 1991023002: [Sync] USS: Fix race condition in DeviceInfoService + add error handling (Closed)

Created:
4 years, 7 months ago by maxbogue
Modified:
4 years, 7 months ago
Reviewers:
pavely
CC:
chromium-reviews, sync-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -135 lines) Patch
M components/sync_driver/device_info_service.h View 3 chunks +13 lines, -5 lines 0 comments Download
M components/sync_driver/device_info_service.cc View 14 chunks +91 lines, -84 lines 0 comments Download
M components/sync_driver/device_info_service_unittest.cc View 8 chunks +33 lines, -43 lines 0 comments Download
M sync/api/fake_model_type_change_processor.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/api/fake_model_type_change_processor.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M sync/api/model_type_change_processor.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/public/shared_model_type_processor.h View 2 chunks +4 lines, -1 line 0 comments Download
M sync/internal_api/shared_model_type_processor.cc View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
maxbogue
Pavel, PTAL.
4 years, 7 months ago (2016-05-19 00:38:59 UTC) #2
pavely
lgtm
4 years, 7 months ago (2016-05-19 21:24:00 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991023002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1991023002/1
4 years, 7 months ago (2016-05-19 21:47:22 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-19 21:54:30 UTC) #6
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 21:56:29 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/327375a85bf5b1658d5de26d1f0c6ee33c3334e9
Cr-Commit-Position: refs/heads/master@{#394881}

Powered by Google App Engine
This is Rietveld 408576698