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

Issue 10483015: [Sync] Refactor sync configuration logic. (Closed)

Created:
8 years, 6 months ago by Nicolas Zea
Modified:
8 years, 6 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing)
Visibility:
Public.

Description

[Sync] Refactor sync configuration logic. We remove all the pending download/configure state in SBH, in addition to the split transaction nature of configurations themselves. This allows us to have a single SyncScheduler::ScheduleConfiguration command that is both synchronous (assuming it doesn't fail) and can handle CleanupDisabledTypes and GetKey commands. This also now keys which datatypes need downloading by checking the initial sync ended bits directly. This allows us to recover from a new sync db gracefully. BUG=129665, 133061, 129825 TEST=unit/integration tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=142517

Patch Set 1 #

Total comments: 8

Patch Set 2 : Split off patches and address comments. #

Patch Set 3 : Self review #

Patch Set 4 : Rebase #

Total comments: 37

Patch Set 5 : Address comments #

Patch Set 6 : SetBool -> CallbackCounter #

Total comments: 27

Patch Set 7 : Address comments + rebase #

Total comments: 9

Patch Set 8 : Address comments #

Patch Set 9 : Use mock sync scheduler instead of DoConfigureSyncer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+732 lines, -552 lines) Patch
M chrome/browser/sync/glue/backend_data_type_configurer.h View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl_unittest.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 6 4 chunks +30 lines, -48 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 11 chunks +172 lines, -237 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.h View 1 2 3 4 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 2 3 4 2 chunks +12 lines, -26 lines 0 comments Download
M sync/engine/sync_scheduler.h View 1 2 3 4 5 6 7 8 5 chunks +37 lines, -12 lines 0 comments Download
M sync/engine/sync_scheduler.cc View 1 2 3 4 5 6 7 13 chunks +160 lines, -95 lines 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 2 3 4 5 6 15 chunks +118 lines, -74 lines 0 comments Download
M sync/engine/sync_scheduler_whitebox_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager.h View 1 2 3 4 5 6 7 8 3 chunks +23 lines, -15 lines 0 comments Download
M sync/internal_api/sync_manager.cc View 1 2 3 4 5 6 7 8 7 chunks +45 lines, -32 lines 0 comments Download
M sync/internal_api/syncapi_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +89 lines, -0 lines 0 comments Download
M sync/sync.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A sync/test/callback_counter.h View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Nicolas Zea
Sneak peek at my patch if you're curious. This is not ready for review yet.
8 years, 6 months ago (2012-06-04 22:02:29 UTC) #1
rlarocque
Just a few initial thoughts, not an in-depth review. https://chromiumcodereview.appspot.com/10483015/diff/1/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): https://chromiumcodereview.appspot.com/10483015/diff/1/chrome/browser/sync/glue/sync_backend_host.cc#newcode1165 chrome/browser/sync/glue/sync_backend_host.cc:1165: ...
8 years, 6 months ago (2012-06-04 23:01:38 UTC) #2
tim (not reviewing)
https://chromiumcodereview.appspot.com/10483015/diff/1/sync/engine/sync_scheduler.cc File sync/engine/sync_scheduler.cc (right): https://chromiumcodereview.appspot.com/10483015/diff/1/sync/engine/sync_scheduler.cc#newcode366 sync/engine/sync_scheduler.cc:366: if (params.need_cleanup) { On 2012/06/04 23:01:38, rlarocque wrote: > ...
8 years, 6 months ago (2012-06-05 04:02:08 UTC) #3
Nicolas Zea
Okay, this is now diffed off http://codereview.chromium.org/10542044/, which is itself rebased off the already landed ...
8 years, 6 months ago (2012-06-07 19:25:42 UTC) #4
Nicolas Zea
Most recent patch made tests fail. See my comment below about how to address it. ...
8 years, 6 months ago (2012-06-08 02:25:44 UTC) #5
Nicolas Zea
Removed last patch set. CleanupDisabledTypes is now being removed in https://chromiumcodereview.appspot.com/10541079/
8 years, 6 months ago (2012-06-08 20:17:38 UTC) #6
rlarocque
http://codereview.chromium.org/10483015/diff/17001/chrome/browser/sync/glue/backend_data_type_configurer.h File chrome/browser/sync/glue/backend_data_type_configurer.h (right): http://codereview.chromium.org/10483015/diff/17001/chrome/browser/sync/glue/backend_data_type_configurer.h#newcode36 chrome/browser/sync/glue/backend_data_type_configurer.h:36: const sync_api::ConfigureReason& reason, nit: ConfigureReason is an enum. It's ...
8 years, 6 months ago (2012-06-09 01:44:35 UTC) #7
Nicolas Zea
Comments addressed, PTAL http://codereview.chromium.org/10483015/diff/17001/chrome/browser/sync/glue/backend_data_type_configurer.h File chrome/browser/sync/glue/backend_data_type_configurer.h (right): http://codereview.chromium.org/10483015/diff/17001/chrome/browser/sync/glue/backend_data_type_configurer.h#newcode36 chrome/browser/sync/glue/backend_data_type_configurer.h:36: const sync_api::ConfigureReason& reason, On 2012/06/09 01:44:35, ...
8 years, 6 months ago (2012-06-11 23:05:20 UTC) #8
rlarocque
http://codereview.chromium.org/10483015/diff/17001/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): http://codereview.chromium.org/10483015/diff/17001/chrome/browser/sync/glue/sync_backend_host.cc#newcode164 chrome/browser/sync/glue/sync_backend_host.cc:164: void DoConfigureSyncer( On 2012/06/11 23:05:20, nzea wrote: > On ...
8 years, 6 months ago (2012-06-12 17:45:13 UTC) #9
Nicolas Zea
Comments addressed. http://codereview.chromium.org/10483015/diff/17001/sync/engine/sync_scheduler_unittest.cc File sync/engine/sync_scheduler_unittest.cc (right): http://codereview.chromium.org/10483015/diff/17001/sync/engine/sync_scheduler_unittest.cc#newcode72 sync/engine/sync_scheduler_unittest.cc:72: void SetBool(bool* flag) { On 2012/06/12 17:45:13, ...
8 years, 6 months ago (2012-06-12 20:44:44 UTC) #10
rlarocque
On 2012/06/12 20:44:44, nzea wrote: > Comments addressed. > > http://codereview.chromium.org/10483015/diff/17001/sync/engine/sync_scheduler_unittest.cc > File sync/engine/sync_scheduler_unittest.cc (right): ...
8 years, 6 months ago (2012-06-12 20:59:26 UTC) #11
tim (not reviewing)
https://chromiumcodereview.appspot.com/10483015/diff/12008/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): https://chromiumcodereview.appspot.com/10483015/diff/12008/chrome/browser/sync/glue/sync_backend_host.cc#newcode557 chrome/browser/sync/glue/sync_backend_host.cc:557: // registered types - the set of desired types. ...
8 years, 6 months ago (2012-06-14 00:26:53 UTC) #12
Nicolas Zea
Comments addressed, PTAL. http://codereview.chromium.org/10483015/diff/12008/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): http://codereview.chromium.org/10483015/diff/12008/chrome/browser/sync/glue/sync_backend_host.cc#newcode557 chrome/browser/sync/glue/sync_backend_host.cc:557: // registered types - the set ...
8 years, 6 months ago (2012-06-14 22:35:52 UTC) #13
tim (not reviewing)
Mainly just a test issue / comment left http://codereview.chromium.org/10483015/diff/12008/sync/internal_api/sync_manager.cc File sync/internal_api/sync_manager.cc (right): http://codereview.chromium.org/10483015/diff/12008/sync/internal_api/sync_manager.cc#newcode1149 sync/internal_api/sync_manager.cc:1149: // ...
8 years, 6 months ago (2012-06-15 14:59:36 UTC) #14
Nicolas Zea
http://codereview.chromium.org/10483015/diff/12008/sync/internal_api/sync_manager.cc File sync/internal_api/sync_manager.cc (right): http://codereview.chromium.org/10483015/diff/12008/sync/internal_api/sync_manager.cc#newcode1149 sync/internal_api/sync_manager.cc:1149: // to normal mode. Figure out how to enforce ...
8 years, 6 months ago (2012-06-15 21:23:35 UTC) #15
tim (not reviewing)
I will take a look as soon as I get back online (have to run ...
8 years, 6 months ago (2012-06-15 21:58:24 UTC) #16
Nicolas Zea
Done, committing once trybots go green.
8 years, 6 months ago (2012-06-15 22:31:13 UTC) #17
rlarocque
8 years, 6 months ago (2012-06-15 22:50:56 UTC) #18
Before you commit, could you add crbug.com/129825 to the BUG= list?  This CL
fixes it, too.

Powered by Google App Engine
This is Rietveld 408576698