diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 18:47:15 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 18:47:15 +0000 |
commit | 3801e985d672573326e8ab1de6c8f19bbf003494 (patch) | |
tree | 950b040750d45de7e11a1e670d89d6a64753d2bd /chrome/browser/sync/glue | |
parent | 7263dbd86fec864bb9604971aceeeee6b4b32816 (diff) | |
download | chromium_src-3801e985d672573326e8ab1de6c8f19bbf003494.zip chromium_src-3801e985d672573326e8ab1de6c8f19bbf003494.tar.gz chromium_src-3801e985d672573326e8ab1de6c8f19bbf003494.tar.bz2 |
sync: avoid creating a HistoryModelWorker unless it is needed.
We typically add all known workers when Initializing the SyncBackendHost,
but this one is causing crashes and isn't used by default.
BUG=53916,69561
TEST=none
Review URL: http://codereview.chromium.org/6111012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue')
-rw-r--r-- | chrome/browser/sync/glue/sync_backend_host.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index 4dafe24..ed363fc 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -97,12 +97,18 @@ void SyncBackendHost::Initialize( // when a new type is synced as the worker may already exist and you just // need to update routing_info_. registrar_.workers[GROUP_DB] = new DatabaseModelWorker(); - registrar_.workers[GROUP_HISTORY] = - new HistoryModelWorker( - profile_->GetHistoryService(Profile::IMPLICIT_ACCESS)); registrar_.workers[GROUP_UI] = new UIModelWorker(frontend_loop_); registrar_.workers[GROUP_PASSIVE] = new ModelSafeWorker(); + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableSyncTypedUrls) || types.count(syncable::TYPED_URLS)) { + // TODO(tim): Bug 53916. HistoryModelWorker crashes, so avoid adding it + // unless specifically requested until bug is fixed. + registrar_.workers[GROUP_HISTORY] = + new HistoryModelWorker( + profile_->GetHistoryService(Profile::IMPLICIT_ACCESS)); + } + PasswordStore* password_store = profile_->GetPasswordStore(Profile::IMPLICIT_ACCESS); if (password_store) { |