| Index: chrome/browser/sync/glue/model_association_manager.cc
|
| ===================================================================
|
| --- chrome/browser/sync/glue/model_association_manager.cc (revision 146439)
|
| +++ chrome/browser/sync/glue/model_association_manager.cc (working copy)
|
| @@ -101,12 +101,11 @@
|
|
|
| void ModelAssociationManager::Initialize(
|
| syncable::ModelTypeSet desired_types) {
|
| - DCHECK_EQ(state_, IDLE);
|
| needs_start_.clear();
|
| needs_stop_.clear();
|
| failed_datatypes_info_.clear();
|
| desired_types_ = desired_types;
|
| - state_ = INITIAILIZED_TO_CONFIGURE;
|
| + state_ = INITIALIZED_TO_CONFIGURE;
|
|
|
| DVLOG(1) << "ModelAssociationManager: Initializing";
|
|
|
| @@ -154,14 +153,14 @@
|
| }
|
|
|
| void ModelAssociationManager::StartAssociationAsync() {
|
| - DCHECK_EQ(state_, INITIAILIZED_TO_CONFIGURE);
|
| + DCHECK_EQ(state_, INITIALIZED_TO_CONFIGURE);
|
| state_ = CONFIGURING;
|
| DVLOG(1) << "ModelAssociationManager: Going to start model association";
|
| LoadModelForNextType();
|
| }
|
|
|
| void ModelAssociationManager::ResetForReconfiguration() {
|
| - DCHECK_EQ(state_, INITIAILIZED_TO_CONFIGURE);
|
| + DCHECK_EQ(state_, INITIALIZED_TO_CONFIGURE);
|
| state_ = IDLE;
|
| DVLOG(1) << "ModelAssociationManager: Reseting for reconfiguration";
|
| needs_start_.clear();
|
| @@ -170,7 +169,7 @@
|
| }
|
|
|
| void ModelAssociationManager::StopDisabledTypes() {
|
| - DCHECK_EQ(state_, INITIAILIZED_TO_CONFIGURE);
|
| + DCHECK_EQ(state_, INITIALIZED_TO_CONFIGURE);
|
| DVLOG(1) << "ModelAssociationManager: Stopping disabled types.";
|
| // Stop requested data types.
|
| for (size_t i = 0; i < needs_stop_.size(); ++i) {
|
| @@ -211,7 +210,7 @@
|
|
|
| // Now continue stopping any types that have already started.
|
| DCHECK(state_ == IDLE ||
|
| - state_ == INITIAILIZED_TO_CONFIGURE);
|
| + state_ == INITIALIZED_TO_CONFIGURE);
|
| for (DataTypeController::TypeMap::const_iterator it = controllers_->begin();
|
| it != controllers_->end(); ++it) {
|
| DataTypeController* dtc = (*it).second;
|
| @@ -416,13 +415,18 @@
|
| }
|
| NOTREACHED();
|
| return;
|
| - } else {
|
| + } else if (state_ == IDLE) {
|
| DVLOG(1) << "ModelAssociationManager: Models loaded after configure cycle"
|
| << "Informing DTM";
|
| // This datatype finished loading after the deadline imposed by the
|
| // originating configuration cycle. Inform the DataTypeManager that the
|
| // type has loaded, so that association may begin.
|
| result_processor_->OnTypesLoaded();
|
| + } else {
|
| + // If we're not IDLE or CONFIGURING, we're being invoked as part of an abort
|
| + // process (possibly a reconfiguration, or disabling of a broken data type).
|
| + DVLOG(1) << "ModelAssociationManager: ModelLoadCallback occurred while "
|
| + << "not IDLE or CONFIGURING. Doing nothing.";
|
| }
|
|
|
| }
|
| @@ -502,4 +506,3 @@
|
| }
|
|
|
| } // namespace browser_sync
|
| -
|
|
|