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

Issue 11360259: Sync: Add DeviceInfo's ChangeProcessor (Closed)

Created:
8 years, 1 month ago by rlarocque
Modified:
8 years, 1 month ago
CC:
chromium-reviews, Raghu Simha, haitaol1, pam+watch_chromium.org, akalin, tim (not reviewing), nyquist
Visibility:
Public.

Description

Sync: Add DeviceInfo's ChangeProcessor This is the long-awaited change to enable DeviceInfo tracking. Long ago (r161496) we committed code to support the DeviceInfo type, but we had to leave this code disabled until the server was ready to support the new type. That support has now been added. This change includes a very special kind of ChangeProcessor named SyncedDeviceTracker. It is the only ChangeProcessor that is owned by the sync thread. The SyncBackendHost creates and initializes it during backend intialization and deletes it before the UserShare it references is destroyed. As part of its initialization, the SyncedDeviceTracker will update the DeviceInfo entry for the current device. The SyncedDeviceTracker could support sending notifications to any interested listeners when new or update DeviceInfo information arrives, but this functionality has not been implemented yet. Also included are: - Tests for the SyncedDeviceTracker - A MockTransactionObserver to support these tests - A cache_guid() accessor on the SyncManager, used to initialize the SyncedDeviceTracker - Remove support for default constructing a DeviceInfo object BUG=122825 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=168972

Patch Set 1 #

Total comments: 33

Patch Set 2 : Fixes from review #

Patch Set 3 : One more fix #

Patch Set 4 : Refactor SyncedDeviceTracker init #

Patch Set 5 : Fix include ordering #

Patch Set 6 : Rebase #

Patch Set 7 : Fix sync_client.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+650 lines, -88 lines) Patch
M chrome/browser/sync/glue/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/glue/change_processor.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/device_info.h View 1 3 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/device_info.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 4 chunks +22 lines, -12 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 13 chunks +88 lines, -23 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_unittest.cc View 1 2 3 4 5 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_registrar.cc View 5 chunks +10 lines, -9 lines 0 comments Download
A chrome/browser/sync/glue/synced_device_tracker.h View 1 2 3 4 1 chunk +64 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/synced_device_tracker.cc View 1 2 3 1 chunk +120 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/synced_device_tracker_unittest.cc View 1 2 3 1 chunk +156 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_session_unittest.cc View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/base_transaction.cc View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M sync/internal_api/public/base_transaction.h View 1 chunk +11 lines, -3 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 3 chunks +4 lines, -3 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 4 chunks +4 lines, -1 line 0 comments Download
M sync/internal_api/public/test/test_user_share.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 3 chunks +1 line, -5 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 4 chunks +5 lines, -4 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 2 3 4 5 5 chunks +25 lines, -2 lines 0 comments Download
M sync/internal_api/test/test_user_share.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M sync/sync.gyp View 1 2 chunks +3 lines, -1 line 0 comments Download
M sync/test/engine/test_directory_setter_upper.h View 1 2 chunks +8 lines, -2 lines 0 comments Download
M sync/test/engine/test_directory_setter_upper.cc View 1 2 chunks +8 lines, -4 lines 0 comments Download
A sync/test/test_transaction_observer.h View 1 1 chunk +45 lines, -0 lines 0 comments Download
A sync/test/test_transaction_observer.cc View 1 1 chunk +30 lines, -0 lines 0 comments Download
M sync/tools/sync_client.cc View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
rlarocque
Please review. This has been sitting in my git tree for months, so it could ...
8 years, 1 month ago (2012-11-15 01:08:53 UTC) #1
Nicolas Zea
https://codereview.chromium.org/11360259/diff/1/chrome/browser/sync/glue/device_info.h File chrome/browser/sync/glue/device_info.h (right): https://codereview.chromium.org/11360259/diff/1/chrome/browser/sync/glue/device_info.h#newcode57 chrome/browser/sync/glue/device_info.h:57: const sync_pb::SyncEnums::DeviceType device_type_; disallow copy and assign? Or if ...
8 years, 1 month ago (2012-11-16 19:42:27 UTC) #2
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/11360259/diff/1/chrome/browser/sync/glue/device_info.h File chrome/browser/sync/glue/device_info.h (right): https://codereview.chromium.org/11360259/diff/1/chrome/browser/sync/glue/device_info.h#newcode57 chrome/browser/sync/glue/device_info.h:57: const sync_pb::SyncEnums::DeviceType device_type_; On 2012/11/16 19:42:27, ...
8 years, 1 month ago (2012-11-17 00:07:20 UTC) #3
Nicolas Zea
https://codereview.chromium.org/11360259/diff/1/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): https://codereview.chromium.org/11360259/diff/1/chrome/browser/sync/glue/sync_backend_host.cc#newcode1181 chrome/browser/sync/glue/sync_backend_host.cc:1181: registrar_->ActivateDataType(syncer::DEVICE_INFO, On 2012/11/17 00:07:21, rlarocque wrote: > On 2012/11/16 ...
8 years, 1 month ago (2012-11-17 00:31:01 UTC) #4
rlarocque
Patch updated. I don't have access to a real machine right now, so I've only ...
8 years, 1 month ago (2012-11-17 00:58:38 UTC) #5
Nicolas Zea
lgtm
8 years, 1 month ago (2012-11-20 02:43:34 UTC) #6
commit-bot: I haz the power
Failed to request the patch to try. Please note that binary filesare still unsupported at ...
8 years, 1 month ago (2012-11-20 02:56:40 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/11360259/3005
8 years, 1 month ago (2012-11-20 19:50:53 UTC) #8
commit-bot: I haz the power
Presubmit check for 11360259-3005 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 1 month ago (2012-11-20 19:51:12 UTC) #9
rlarocque
+thestig: Please review for chrome/ changes.
8 years, 1 month ago (2012-11-20 20:05:51 UTC) #10
Lei Zhang
chrome gypi files lgtm
8 years, 1 month ago (2012-11-20 22:56:21 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/11360259/2006
8 years, 1 month ago (2012-11-20 22:59:24 UTC) #12
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-20 23:31:28 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/11360259/7041
8 years, 1 month ago (2012-11-21 00:58:32 UTC) #14
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-21 01:34:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/11360259/3010
8 years, 1 month ago (2012-11-21 01:42:26 UTC) #16
commit-bot: I haz the power
8 years, 1 month ago (2012-11-21 04:16:34 UTC) #17
Change committed as 168972

Powered by Google App Engine
This is Rietveld 408576698