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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc

Issue 11362063: Editing the custom spelling dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Exclude custom dictionary WebUI from mac Created 8 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc ('k') | chrome/browser/spellchecker/spellcheck_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698