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

Unified Diff: chrome/browser/spellchecker/spellcheck_service.cc

Issue 11293241: Cleaning up the custom dictionary code relative to the SpellcheckService to make the custom diction… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_service.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 39a11d5e50f62e77d65a5b37fcaa4ee736440329..e4e79f71b6bb8c7bc412c42ca2f59e4223c3d42b 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -193,37 +193,6 @@ void SpellcheckService::InitForRenderer(content::RenderProcessHost* process) {
prefs->GetBoolean(prefs::kEnableAutoSpellCorrect)));
}
-void SpellcheckService::AddWord(const std::string& word) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- GetCustomDictionary()->CustomWordAddedLocally(word);
-
- // TODO(rlp): pass these on to the correct dictionary.
- BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE,
- base::Bind(&SpellcheckService::WriteWordToCustomDictionary,
- base::Unretained(this), word),
- base::Bind(&SpellcheckService::AddWordComplete,
- weak_ptr_factory_.GetWeakPtr(), word));
-}
-
-const WordList& SpellcheckService::GetCustomWords() {
- return GetCustomDictionary()->GetCustomWords();
-
-}
-
-void SpellcheckService::CustomWordAddedLocally(const std::string& word) {
- GetCustomDictionary()->CustomWordAddedLocally(word);
-}
-
-void SpellcheckService::LoadDictionaryIntoCustomWordList(
- WordList* custom_words){
- GetCustomDictionary()->LoadDictionaryIntoCustomWordList(custom_words);
-}
-
-void SpellcheckService::WriteWordToCustomDictionary(const std::string& word){
- GetCustomDictionary()->WriteWordToCustomDictionary(word);
-}
-
void SpellcheckService::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
@@ -274,16 +243,6 @@ const std::string& SpellcheckService::GetLanguage() const {
return hunspell_dictionary_->GetLanguage();
}
-void SpellcheckService::AddWordComplete(const std::string& word) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- for (content::RenderProcessHost::iterator i(
- content::RenderProcessHost::AllHostsIterator());
- !i.IsAtEnd(); i.Advance()) {
- i.GetCurrentValue()->Send(new SpellCheckMsg_WordAdded(word));
- }
-}
-
// TODO(rlp): rename to something more logical.
void SpellcheckService::InformProfileOfInitializationWithCustomWords(
WordList* custom_words) {
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_service.h ('k') | chrome/browser/spellchecker/spellcheck_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698