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

Unified Diff: components/syncable_prefs/pref_model_associator.h

Issue 2078893002: Add callback list to PrefModelAssociator after sync data is loaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migrate_domain_scoped_settings
Patch Set: minor change Created 4 years, 5 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
« no previous file with comments | « no previous file | components/syncable_prefs/pref_model_associator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
+
DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator);
};
« no previous file with comments | « no previous file | components/syncable_prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698