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

Unified Diff: chrome/renderer/spellchecker/spellcheck.cc

Issue 11445002: Sync user's custom spellcheck dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add server-side size limit tests Created 7 years, 12 months 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/renderer/spellchecker/spellcheck.cc
diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc
index 458fda7da6c936d24fa8d2dfca730ee73f9790d2..b69a3a2d3c07ab3f97972284f7dc7b462484afe3 100644
--- a/chrome/renderer/spellchecker/spellcheck.cc
+++ b/chrome/renderer/spellchecker/spellcheck.cc
@@ -97,8 +97,7 @@ bool SpellCheck::OnControlMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(SpellCheck, message)
IPC_MESSAGE_HANDLER(SpellCheckMsg_Init, OnInit)
- IPC_MESSAGE_HANDLER(SpellCheckMsg_WordAdded, OnWordAdded)
- IPC_MESSAGE_HANDLER(SpellCheckMsg_WordRemoved, OnWordRemoved)
+ IPC_MESSAGE_HANDLER(SpellCheckMsg_WordsAddedRemoved, OnWordsAddedRemoved)
IPC_MESSAGE_HANDLER(SpellCheckMsg_EnableAutoSpellCorrect,
OnEnableAutoSpellCorrect)
IPC_MESSAGE_HANDLER(SpellCheckMsg_EnableSpellCheck, OnEnableSpellCheck)
@@ -120,14 +119,11 @@ void SpellCheck::OnInit(IPC::PlatformFileForTransit bdict_file,
#endif
}
-void SpellCheck::OnWordAdded(const std::string& word) {
+void SpellCheck::OnWordsAddedRemoved(
+ const std::vector<std::string>& words_added,
+ const std::vector<std::string>& words_removed) {
if (platform_spelling_engine_.get())
- platform_spelling_engine_->OnWordAdded(word);
-}
-
-void SpellCheck::OnWordRemoved(const std::string& word) {
- if (platform_spelling_engine_.get())
- platform_spelling_engine_->OnWordRemoved(word);
+ platform_spelling_engine_->OnWordsAddedRemoved(words_added, words_removed);
}
void SpellCheck::OnEnableAutoSpellCorrect(bool enable) {

Powered by Google App Engine
This is Rietveld 408576698