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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 317453002: sync: cut a few profile deps from DataTypeControllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more missing files... Created 6 years, 6 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: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index c60ec4614c27492b8a95d7f75b3c5b7af1a47224..d918c9d95e17cb7ad15e17369571ef75ba79d81a 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1013,6 +1013,14 @@ void ProfileSyncService::PostBackendInitialization() {
SetSyncSetupCompleted();
}
+ // Give the DataTypeControllers a handle to the now initialized backend
+ // as a UserShare.
+ for (DataTypeController::TypeMap::iterator it =
haitaol1 2014/06/05 22:07:04 This should be called at the beginning to set user
tim (not reviewing) 2014/06/06 18:52:53 Uh oh! Good catch. Are there backup/restore tests
haitaol1 2014/06/06 20:44:33 The integration test I'm submitting should be able
+ directory_data_type_controllers_.begin();
+ it != directory_data_type_controllers_.end(); ++it) {
+ it->second->OnUserShareReady(GetUserShare());
+ }
+
// Check HasSyncSetupCompleted() before NotifyObservers() to avoid spurious
// data type configuration because observer may flag setup as complete and
// trigger data type configuration.

Powered by Google App Engine
This is Rietveld 408576698