| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/spellchecker/spellcheck_hunspell_dictionary.h" | 5 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 return hunspell::BDict::Verify( | 274 return hunspell::BDict::Verify( |
| 275 reinterpret_cast<const char*>(map.data()), map.length()); | 275 reinterpret_cast<const char*>(map.data()), map.length()); |
| 276 } | 276 } |
| 277 | 277 |
| 278 bool SpellcheckHunspellDictionary::IsReady() const { | 278 bool SpellcheckHunspellDictionary::IsReady() const { |
| 279 return GetDictionaryFile() != | 279 return GetDictionaryFile() != |
| 280 base::kInvalidPlatformFileValue || IsUsingPlatformChecker(); | 280 base::kInvalidPlatformFileValue || IsUsingPlatformChecker(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void SpellcheckHunspellDictionary::InformProfileOfInitialization() { | 283 void SpellcheckHunspellDictionary::InformProfileOfInitialization() { |
| 284 spellcheck_service_->InformProfileOfInitializationWithCustomWords(NULL); | 284 spellcheck_service_->InitForAllRenderers(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 const base::PlatformFile& | 287 const base::PlatformFile& |
| 288 SpellcheckHunspellDictionary::GetDictionaryFile() const { | 288 SpellcheckHunspellDictionary::GetDictionaryFile() const { |
| 289 return file_; | 289 return file_; |
| 290 } | 290 } |
| 291 | 291 |
| 292 const std::string& SpellcheckHunspellDictionary::GetLanguage() const { | 292 const std::string& SpellcheckHunspellDictionary::GetLanguage() const { |
| 293 return language_; | 293 return language_; |
| 294 } | 294 } |
| 295 | 295 |
| 296 bool SpellcheckHunspellDictionary::IsUsingPlatformChecker() const { | 296 bool SpellcheckHunspellDictionary::IsUsingPlatformChecker() const { |
| 297 return use_platform_spellchecker_; | 297 return use_platform_spellchecker_; |
| 298 } | 298 } |
| OLD | NEW |