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

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

Issue 11445002: Sync user's custom spellcheck dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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 5c41f374c9200312919094e84c4ad1b2b3fc357c..0e7239a92817ca740b20614cf70d780c6fde1b6c 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -229,10 +229,22 @@ void SpellcheckService::OnCustomDictionaryLoaded() {
InitForAllRenderers();
}
-void SpellcheckService::OnCustomDictionaryWordAdded(const std::string& word) {
+void SpellcheckService::OnCustomDictionaryWordsAdded(
+ const chrome::spellcheck_common::WordList& words) {
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance()) {
+ i.GetCurrentValue()->Send(new SpellCheckMsg_WordsAdded(words));
+ }
}
-void SpellcheckService::OnCustomDictionaryWordRemoved(const std::string& word) {
+void SpellcheckService::OnCustomDictionaryWordsRemoved(
+ const chrome::spellcheck_common::WordList& words) {
+ for (content::RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance()) {
+ i.GetCurrentValue()->Send(new SpellCheckMsg_WordsRemoved(words));
+ }
}
// static

Powered by Google App Engine
This is Rietveld 408576698