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

Unified Diff: components/sync_driver/model_association_manager.h

Issue 420633002: [Sync] Cleanup datatype configuration error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix tests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync_driver/model_association_manager.h
diff --git a/components/sync_driver/model_association_manager.h b/components/sync_driver/model_association_manager.h
index f737c5930339983316d789f8dd91df3547cdc85e..a29eea6a0b203a6aabc8cb93081fc3b76b05a006 100644
--- a/components/sync_driver/model_association_manager.h
+++ b/components/sync_driver/model_association_manager.h
@@ -36,7 +36,8 @@ class ModelAssociationManagerDelegate {
// Called when the ModelAssociationManager has decided it must stop |type|,
// likely because it is no longer a desired data type or sync is shutting
// down.
- virtual void OnSingleDataTypeWillStop(syncer::ModelType type) = 0;
+ virtual void OnSingleDataTypeWillStop(syncer::ModelType type,
+ const syncer::SyncError& error) = 0;
// Called when the ModelAssociationManager has tried to perform model
// association for all desired types and has nothing left to do.
@@ -98,7 +99,7 @@ class ModelAssociationManager {
// callback will be invoked when the model association is done.
void TypeStartCallback(syncer::ModelType type,
base::TimeTicks type_start_time,
- DataTypeController::StartResult start_result,
+ DataTypeController::ConfigureResult start_result,
const syncer::SyncMergeResult& local_merge_result,
const syncer::SyncMergeResult& syncer_merge_result);
@@ -106,16 +107,12 @@ class ModelAssociationManager {
// will be passed to |LoadModels| function.
void ModelLoadCallback(syncer::ModelType type, syncer::SyncError error);
- // When a type fails to load or fails associating this method is invoked to
- // do the book keeping and do the UMA reporting.
- void AppendToFailedDatatypesAndLogError(const syncer::SyncError& error);
-
// Called when all requested types are associated or association times out.
// Notify |delegate_| of configuration results.
void ModelAssociationDone();
// A helper to stop an individual datatype.
- void StopDatatype(DataTypeController* dtc);
+ void StopDatatype(const syncer::SyncError& error, DataTypeController* dtc);
State state_;
@@ -136,18 +133,6 @@ class ModelAssociationManager {
// reconfiguration if not disabled.
syncer::ModelTypeSet associated_types_;
- // Data types that are still loading/associating when configuration times
- // out.
- syncer::ModelTypeSet slow_types_;
-
- // Collects the list of errors resulting from failing to start a type. This
- // would eventually be sent to the listeners after all the types have
- // been given a chance to start.
- std::map<syncer::ModelType, syncer::SyncError> failed_data_types_info_;
-
- // The set of types that can't configure due to cryptographer errors.
- syncer::ModelTypeSet needs_crypto_types_;
-
// Time when StartAssociationAsync() is called to associate for a set of data
// types.
base::TimeTicks association_start_time_;

Powered by Google App Engine
This is Rietveld 408576698