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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 6111012: sync: avoid creating a HistoryModelWorker unless it is needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 9 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 4dafe249d9d0a50de14532a140b73c135cfdcf2f..80cbb9c3bdfeec89d7712aaa944e3a56e1031ecd 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))) {
lipalani 2011/01/12 22:06:51 Also is this code compiling. It looks like you nee
tim (not reviewing) 2011/01/12 23:41:28 Doh. Hadn't uploaded the patch set with this fixed
+ // 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));
+ }
lipalani 2011/01/12 22:02:53 may be HasSwitch check alone is sufficient. The ty
tim (not reviewing) 2011/01/12 23:41:28 The reason for the types check is unittests. See t
lipalani 2011/01/13 00:31:46 sounds good. On 2011/01/12 23:41:28, timsteele wro
+
PasswordStore* password_store =
profile_->GetPasswordStore(Profile::IMPLICIT_ACCESS);
if (password_store) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698