Chromium Code Reviews| Index: components/syncable_prefs/pref_model_associator.h |
| diff --git a/components/syncable_prefs/pref_model_associator.h b/components/syncable_prefs/pref_model_associator.h |
| index 6eaab7ef7bdb17f5a7db3008d0d824323531adfa..203c3e8f4f5e7ed6b0303dad9b12751017cfa98b 100644 |
| --- a/components/syncable_prefs/pref_model_associator.h |
| +++ b/components/syncable_prefs/pref_model_associator.h |
| @@ -9,7 +9,9 @@ |
| #include <memory> |
| #include <set> |
| #include <string> |
| +#include <vector> |
| +#include "base/callback.h" |
| #include "base/compiler_specific.h" |
| #include "base/containers/hash_tables.h" |
| #include "base/macros.h" |
| @@ -120,6 +122,10 @@ class PrefModelAssociator |
| void SetPrefModelAssociatorClientForTesting( |
| const PrefModelAssociatorClient* client); |
| + // Register callback method which will get called at the end of |
| + // PrefModelAssociator::MergeDataAndStartSyncing(). |
| + void RegisterMergeDataFinishedCallback(const base::Closure& callback); |
| + |
| protected: |
| friend class PrefServiceSyncableTest; |
| @@ -193,6 +199,8 @@ class PrefModelAssociator |
| SyncedPrefObserverMap synced_pref_observers_; |
| const PrefModelAssociatorClient* client_; // Weak. |
| + std::vector<base::Closure> callback_list_; |
|
pavely
2016/07/06 22:11:56
Check out CallbackList class. Maybe that's what yo
lshang
2016/07/07 08:26:05
I did try to use CallbackList here at first, and a
|
| + |
| DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); |
| }; |