diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 07:19:11 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 07:19:11 +0000 |
commit | e2589739314a9b8b04f96335af88c7f34e1d34a1 (patch) | |
tree | b47dffc3bd3c11ad643212fb728630d6300d7011 | |
parent | d2fb016be930dadf37a2faf145e73534ef58bb7b (diff) | |
download | chromium_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.cc | 5 |
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( |