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

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

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Callback passed to each data type controller on starting association. This 112 // Callback passed to each data type controller on starting association. This
113 // callback will be invoked when the model association is done. 113 // callback will be invoked when the model association is done.
114 void TypeStartCallback(syncer::ModelType type, 114 void TypeStartCallback(syncer::ModelType type,
115 base::TimeTicks type_start_time, 115 base::TimeTicks type_start_time,
116 DataTypeController::ConfigureResult start_result, 116 DataTypeController::ConfigureResult start_result,
117 const syncer::SyncMergeResult& local_merge_result, 117 const syncer::SyncMergeResult& local_merge_result,
118 const syncer::SyncMergeResult& syncer_merge_result); 118 const syncer::SyncMergeResult& syncer_merge_result);
119 119
120 // Callback that will be invoked when the models finish loading. This callback 120 // Callback that will be invoked when the models finish loading. This callback
121 // will be passed to |LoadModels| function. 121 // will be passed to |LoadModels| function.
122 void ModelLoadCallback(syncer::ModelType type, syncer::SyncError error); 122 void ModelLoadCallback(syncer::ModelType type,
123 const syncer::SyncError& error);
123 124
124 // Called when all requested types are associated or association times out. 125 // Called when all requested types are associated or association times out.
125 // Will clean up any unfinished types, and update |state_| to be |new_state| 126 // Will clean up any unfinished types, and update |state_| to be |new_state|
126 // Finally, it will notify |delegate_| of the configuration result. 127 // Finally, it will notify |delegate_| of the configuration result.
127 void ModelAssociationDone(State new_state); 128 void ModelAssociationDone(State new_state);
128 129
129 // A helper to stop an individual datatype. 130 // A helper to stop an individual datatype.
130 void StopDatatype(const syncer::SyncError& error, DataTypeController* dtc); 131 void StopDatatype(const syncer::SyncError& error, DataTypeController* dtc);
131 132
132 // Calls delegate's OnAllDataTypesReadyForConfigure when all datatypes from 133 // Calls delegate's OnAllDataTypesReadyForConfigure when all datatypes from
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool notified_about_ready_for_configure_; 174 bool notified_about_ready_for_configure_;
174 175
175 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_; 176 base::WeakPtrFactory<ModelAssociationManager> weak_ptr_factory_;
176 177
177 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager); 178 DISALLOW_COPY_AND_ASSIGN(ModelAssociationManager);
178 }; 179 };
179 180
180 } // namespace sync_driver 181 } // namespace sync_driver
181 182
182 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__ 183 #endif // COMPONENTS_SYNC_DRIVER_MODEL_ASSOCIATION_MANAGER_H__
OLDNEW
« no previous file with comments | « components/sync/driver/generic_change_processor_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