| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/profile.h" | 5 #include "chrome/browser/profile.h" |
| 6 | 6 |
| 7 #include "app/theme_provider.h" | 7 #include "app/theme_provider.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 spellcheck_host_ = new SpellCheckHost(this, | 1332 spellcheck_host_ = new SpellCheckHost(this, |
| 1333 WideToASCII(prefs->GetString(prefs::kSpellCheckDictionary)), | 1333 WideToASCII(prefs->GetString(prefs::kSpellCheckDictionary)), |
| 1334 GetRequestContext()); | 1334 GetRequestContext()); |
| 1335 } else if (notify) { | 1335 } else if (notify) { |
| 1336 // The spellchecker has been disabled. | 1336 // The spellchecker has been disabled. |
| 1337 SpellCheckHostInitialized(); | 1337 SpellCheckHostInitialized(); |
| 1338 } | 1338 } |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 void ProfileImpl::SpellCheckHostInitialized() { | 1341 void ProfileImpl::SpellCheckHostInitialized() { |
| 1342 spellcheck_host_ready_ = spellcheck_host_ && | 1342 spellcheck_host_ready_ = |
| 1343 spellcheck_host_->bdict_file() != base::kInvalidPlatformFileValue; | 1343 spellcheck_host_ && spellcheck_host_->bdict_fd().fd != -1; |
| 1344 NotificationService::current()->Notify( | 1344 NotificationService::current()->Notify( |
| 1345 NotificationType::SPELLCHECK_HOST_REINITIALIZED, | 1345 NotificationType::SPELLCHECK_HOST_REINITIALIZED, |
| 1346 Source<Profile>(this), NotificationService::NoDetails()); | 1346 Source<Profile>(this), NotificationService::NoDetails()); |
| 1347 } | 1347 } |
| 1348 #endif | 1348 #endif |
| 1349 | 1349 |
| 1350 void ProfileImpl::NotifySpellCheckerChanged() { | 1350 void ProfileImpl::NotifySpellCheckerChanged() { |
| 1351 SpellcheckerReinitializedDetails scoped_spellchecker; | 1351 SpellcheckerReinitializedDetails scoped_spellchecker; |
| 1352 scoped_spellchecker.spellchecker = spellchecker_; | 1352 scoped_spellchecker.spellchecker = spellchecker_; |
| 1353 ChromeThread::PostTask( | 1353 ChromeThread::PostTask( |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 } | 1444 } |
| 1445 if (!sync_service_.get()) | 1445 if (!sync_service_.get()) |
| 1446 InitSyncService(); | 1446 InitSyncService(); |
| 1447 return sync_service_.get(); | 1447 return sync_service_.get(); |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 void ProfileImpl::InitSyncService() { | 1450 void ProfileImpl::InitSyncService() { |
| 1451 sync_service_.reset(new ProfileSyncService(this)); | 1451 sync_service_.reset(new ProfileSyncService(this)); |
| 1452 sync_service_->Initialize(); | 1452 sync_service_->Initialize(); |
| 1453 } | 1453 } |
| OLD | NEW |