| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 PrefService* prefs = GetPrefs(); | 1238 PrefService* prefs = GetPrefs(); |
| 1239 if (prefs->GetBoolean(prefs::kEnableSpellCheck)) { | 1239 if (prefs->GetBoolean(prefs::kEnableSpellCheck)) { |
| 1240 // Retrieve the (perhaps updated recently) dictionary name from preferences. | 1240 // Retrieve the (perhaps updated recently) dictionary name from preferences. |
| 1241 spellcheck_host_ = SpellCheckHost::Create( | 1241 spellcheck_host_ = SpellCheckHost::Create( |
| 1242 this, | 1242 this, |
| 1243 prefs->GetString(prefs::kSpellCheckDictionary), | 1243 prefs->GetString(prefs::kSpellCheckDictionary), |
| 1244 GetRequestContext()); | 1244 GetRequestContext()); |
| 1245 } else if (notify) { | 1245 } else if (notify) { |
| 1246 // The spellchecker has been disabled. | 1246 // The spellchecker has been disabled. |
| 1247 SpellCheckHostInitialized(); | 1247 SpellCheckHostInitialized(); |
| 1248 for (RenderProcessHost::iterator |
| 1249 i(RenderProcessHost::AllHostsIterator()); |
| 1250 !i.IsAtEnd(); i.Advance()) { |
| 1251 RenderProcessHost* process = i.GetCurrentValue(); |
| 1252 process->Send(new SpellCheckMsg_Init(IPC::InvalidPlatformFileForTransit(), |
| 1253 std::vector<std::string>(), |
| 1254 std::string(), |
| 1255 false)); |
| 1256 } |
| 1248 } | 1257 } |
| 1249 } | 1258 } |
| 1250 | 1259 |
| 1251 void ProfileImpl::SpellCheckHostInitialized() { | 1260 void ProfileImpl::SpellCheckHostInitialized() { |
| 1252 spellcheck_host_ready_ = spellcheck_host_ && | 1261 spellcheck_host_ready_ = spellcheck_host_ && |
| 1253 (spellcheck_host_->GetDictionaryFile() != | 1262 (spellcheck_host_->GetDictionaryFile() != |
| 1254 base::kInvalidPlatformFileValue || | 1263 base::kInvalidPlatformFileValue || |
| 1255 spellcheck_host_->IsUsingPlatformChecker());; | 1264 spellcheck_host_->IsUsingPlatformChecker()); |
| 1256 } | 1265 } |
| 1257 | 1266 |
| 1258 ExtensionPrefValueMap* ProfileImpl::GetExtensionPrefValueMap() { | 1267 ExtensionPrefValueMap* ProfileImpl::GetExtensionPrefValueMap() { |
| 1259 if (!extension_pref_value_map_.get()) | 1268 if (!extension_pref_value_map_.get()) |
| 1260 extension_pref_value_map_.reset(new ExtensionPrefValueMap); | 1269 extension_pref_value_map_.reset(new ExtensionPrefValueMap); |
| 1261 return extension_pref_value_map_.get(); | 1270 return extension_pref_value_map_.get(); |
| 1262 } | 1271 } |
| 1263 | 1272 |
| 1264 void ProfileImpl::CreateQuotaManagerAndClients() { | 1273 void ProfileImpl::CreateQuotaManagerAndClients() { |
| 1265 if (quota_manager_.get()) { | 1274 if (quota_manager_.get()) { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 return pref_proxy_config_tracker_; | 1601 return pref_proxy_config_tracker_; |
| 1593 } | 1602 } |
| 1594 | 1603 |
| 1595 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1604 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1596 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1605 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
| 1597 return NULL; | 1606 return NULL; |
| 1598 if (!prerender_manager_.get()) | 1607 if (!prerender_manager_.get()) |
| 1599 prerender_manager_.reset(new prerender::PrerenderManager(this)); | 1608 prerender_manager_.reset(new prerender::PrerenderManager(this)); |
| 1600 return prerender_manager_.get(); | 1609 return prerender_manager_.get(); |
| 1601 } | 1610 } |
| OLD | NEW |