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

Issue 1128012: Rewrite DTM to support dynamic data type configuration (Closed)

Created:
10 years, 9 months ago by skrul
Modified:
9 years, 7 months ago
Reviewers:
ncarter (slow)
CC:
chromium-reviews, Paweł Hajdan Jr., ncarter (slow), ben+cc_chromium.org, tim (not reviewing), idana
Visibility:
Public.

Description

This is basically a rewrite of the DataTypeManager to support dynamic data type configuration. DTM::Start() has been replaced with DTM::Configure(). Note that the callback is also gone, replaced with notification service style notifications to tell listeners that configuration has started or finished. I also added some stuff to prepare for adding the "initial download" step for new datatype into the configure process. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42384

Patch Set 1 #

Patch Set 2 : Lint fixes. #

Patch Set 3 : Remove some uneeded ifdef DEBUG. #

Total comments: 5

Patch Set 4 : Address review comments and fix a leak. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+651 lines, -283 lines) Patch
M chrome/browser/sync/glue/data_type_manager.h View 1 2 chunks +36 lines, -32 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl.h View 4 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl.cc View 1 7 chunks +229 lines, -86 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_impl_unittest.cc View 1 2 3 10 chunks +257 lines, -115 lines 0 comments Download
M chrome/browser/sync/glue/data_type_manager_mock.h View 1 chunk +26 lines, -3 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 6 chunks +15 lines, -9 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 8 chunks +49 lines, -17 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_startup_unittest.cc View 1 2 3 8 chunks +17 lines, -14 lines 0 comments Download
M chrome/common/notification_type.h View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
skrul
10 years, 9 months ago (2010-03-23 03:59:56 UTC) #1
ncarter (slow)
LGTM http://codereview.chromium.org/1128012/diff/4001/5001 File chrome/browser/sync/glue/data_type_manager.h (right): http://codereview.chromium.org/1128012/diff/4001/5001#newcode42 chrome/browser/sync/glue/data_type_manager.h:42: typedef std::set<syncable::ModelType> TypeSet; Did you consider and reject ...
10 years, 9 months ago (2010-03-23 20:53:08 UTC) #2
skrul
10 years, 9 months ago (2010-03-23 21:23:44 UTC) #3
http://codereview.chromium.org/1128012/diff/4001/5001
File chrome/browser/sync/glue/data_type_manager.h (right):

http://codereview.chromium.org/1128012/diff/4001/5001#newcode42
chrome/browser/sync/glue/data_type_manager.h:42: typedef
std::set<syncable::ModelType> TypeSet;
On 2010/03/23 20:53:08, nick wrote:
> Did you consider and reject bitset?

I considered it but thought that it would be a bit clumsy in practice -- having
to define it as set::bitset<MODEL_TYPE_COUNT> is odd, and IMHO it does not
really convey that it is a group of syncable::ModelType.  Our use of it just
feels more set-ish than bitset-ish :)

http://codereview.chromium.org/1128012/diff/4001/5008
File chrome/browser/sync/profile_sync_service_startup_unittest.cc (right):

http://codereview.chromium.org/1128012/diff/4001/5008#newcode133
chrome/browser/sync/profile_sync_service_startup_unittest.cc:133: class
ProfileSyncServiceStartupBootstrapTest :  // NOLINT
On 2010/03/23 20:53:08, nick wrote:
> You could put the colon on the next line?
>     : public Foo {

Oh yes that does work :)  Thanks :)

Powered by Google App Engine
This is Rietveld 408576698