summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 07:19:11 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 07:19:11 +0000
commite2589739314a9b8b04f96335af88c7f34e1d34a1 (patch)
treeb47dffc3bd3c11ad643212fb728630d6300d7011
parentd2fb016be930dadf37a2faf145e73534ef58bb7b (diff)
downloadchromium_src-e2589739314a9b8b04f96335af88c7f34e1d34a1.zip
chromium_src-e2589739314a9b8b04f96335af88c7f34e1d34a1.tar.gz
chromium_src-e2589739314a9b8b04f96335af88c7f34e1d34a1.tar.bz2
sync: Speculative fix for a possible trigger to bug 48502.
If the user configures data types before the sync backend is initialized, we wind up trying to associate models before a Directory exists, which is badness. BUG=48502 TEST=none Review URL: http://codereview.chromium.org/3028013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53023 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/profile_sync_service.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 3a3ab89..8b21a52 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -650,7 +650,10 @@ void ProfileSyncService::ChangePreferredDataTypes(
preferred_types.count(model_type) != 0);
}
- ConfigureDataTypeManager();
+ // If we haven't initialized yet, don't configure the DTM as it could cause
+ // association to start before a Directory has even been created.
+ if (backend_initialized_)
+ ConfigureDataTypeManager();
}
void ProfileSyncService::GetPreferredDataTypes(