| Index: components/sync_driver/data_type_manager_impl.cc
|
| diff --git a/components/sync_driver/data_type_manager_impl.cc b/components/sync_driver/data_type_manager_impl.cc
|
| index dfffa3c775078403ff6a0a8aa4071e9a9dbfd68a..a12185e2b6b0d90a7447b5e77ce649df82f91813 100644
|
| --- a/components/sync_driver/data_type_manager_impl.cc
|
| +++ b/components/sync_driver/data_type_manager_impl.cc
|
| @@ -260,12 +260,17 @@ void DataTypeManagerImpl::Restart(syncer::ConfigureReason reason) {
|
|
|
| DCHECK(state_ == STOPPED || state_ == CONFIGURED || state_ == RETRYING);
|
|
|
| + const State old_state = state_;
|
| + state_ = DOWNLOAD_PENDING;
|
| +
|
| // Starting from a "steady state" (stopped or configured) state
|
| // should send a start notification.
|
| - if (state_ == STOPPED || state_ == CONFIGURED)
|
| + // Note: NotifyStart() must be called with the updated (non-idle) state,
|
| + // otherwise logic listening for the configuration start might not be aware
|
| + // of the fact that the DTM is in a configuration state.
|
| + if (old_state == STOPPED || old_state == CONFIGURED)
|
| NotifyStart();
|
|
|
| - state_ = DOWNLOAD_PENDING;
|
| download_types_queue_ = PrioritizeTypes(enabled_types);
|
| association_types_queue_ = std::queue<AssociationTypesInfo>();
|
|
|
|
|