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

Side by Side Diff: components/sync/driver/model_association_manager.h

Issue 2644373003: Revert of [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 5 #ifndef COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
6 #define COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 6 #define COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // |ModelAssociationManager| does the heavy lifting for doing the actual model 22 // |ModelAssociationManager| does the heavy lifting for doing the actual model
23 // association. It instructs DataTypeControllers to load models, start 23 // association. It instructs DataTypeControllers to load models, start
24 // associating and stopping. Since the operations are async it uses an 24 // associating and stopping. Since the operations are async it uses an
25 // interface to inform DataTypeManager the results of the operations. 25 // interface to inform DataTypeManager the results of the operations.
26 // This class is owned by DataTypeManager. 26 // This class is owned by DataTypeManager.
27 // |ModelAssociationManager| association functions are async. The results of 27 // |ModelAssociationManager| association functions are async. The results of
28 // those operations are passed back via this interface. 28 // those operations are passed back via this interface.
29 class ModelAssociationManagerDelegate { 29 class ModelAssociationManagerDelegate {
30 public: 30 public:
31 // Called right before ModelAssociationManager calls LoadModels. Allows
32 // directory types to register with sync engine before download starts.
33 virtual void OnSingleDataTypeWillStart(ModelType type) = 0;
34
35 // Called when all desired types are ready to be configured with 31 // Called when all desired types are ready to be configured with
36 // ModelTypeConfigurer. Data type is ready when its progress marker is 32 // ModelTypeConfigurer. Data type is ready when its progress marker is
37 // available to configurer. Directory data types are always ready, their 33 // available to configurer. Directory data types are always ready, their
38 // progress markers are read from directory. USS data type controllers need to 34 // progress markers are read from directory. USS data type controllers need to
39 // load model and read data type context first. 35 // load model and read data type context first.
40 // This function is called at most once after each call to 36 // This function is called at most once after each call to
41 // ModelAssociationManager::Initialize(). 37 // ModelAssociationManager::Initialize().
42 virtual void OnAllDataTypesReadyForConfigure() = 0; 38 virtual void OnAllDataTypesReadyForConfigure() = 0;
43 39
44 // Called when model association (MergeDataAndStartSyncing) has completed 40 // Called when model association (MergeDataAndStartSyncing) has completed
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 bool notified_about_ready_for_configure_; 173 bool notified_about_ready_for_configure_;
178 174
179 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_; 175 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_;
180 176
181 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager); 177 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager);
182 }; 178 };
183 179
184 } // namespace syncer 180 } // namespace syncer
185 181
186 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 182 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
OLDNEW
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl_unittest.cc ('k') | components/sync/driver/model_association_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698