diff options
Diffstat (limited to 'chrome/browser/sync/chrome_sync_client.cc')
-rw-r--r-- | chrome/browser/sync/chrome_sync_client.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc index b826216..9cf8938 100644 --- a/chrome/browser/sync/chrome_sync_client.cc +++ b/chrome/browser/sync/chrome_sync_client.cc @@ -214,9 +214,7 @@ void ChromeSyncClient::Initialize(sync_driver::SyncService* sync_service) { } sync_driver::SyncService* ChromeSyncClient::GetSyncService() { - // TODO(zea): bring back this DCHECK after Typed URLs are converted to - // SyncableService. - // DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK_CURRENTLY_ON(BrowserThread::UI); return sync_service_; } @@ -354,6 +352,13 @@ ChromeSyncClient::GetSyncableServiceForType(syncer::ModelType type) { return history ? history->AsWeakPtr() : base::WeakPtr<history::HistoryService>(); } + case syncer::TYPED_URLS: { + history::HistoryService* history = HistoryServiceFactory::GetForProfile( + profile_, ServiceAccessType::EXPLICIT_ACCESS); + if (!history) + return base::WeakPtr<history::TypedUrlSyncableService>(); + return history->GetTypedUrlSyncableService()->AsWeakPtr(); + } #if defined(ENABLE_SPELLCHECK) case syncer::DICTIONARY: return SpellcheckServiceFactory::GetForContext(profile_)-> |