Index: chrome/browser/tab_contents/spelling_menu_observer.cc |
diff --git a/chrome/browser/tab_contents/spelling_menu_observer.cc b/chrome/browser/tab_contents/spelling_menu_observer.cc |
index c1cb88d8434807eaa76e90496cfb22c3c4aaf340..2bb6f121c96da7deb038f9385c3d562ff0f2e848 100644 |
--- a/chrome/browser/tab_contents/spelling_menu_observer.cc |
+++ b/chrome/browser/tab_contents/spelling_menu_observer.cc |
@@ -276,15 +276,17 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) { |
if (command_id == IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION || |
command_id == IDC_SPELLCHECK_ADD_TO_DICTIONARY) { |
- // GetHostForProfile() can return null when the suggested word is |
- // provided by Web SpellCheck API. |
+ // GetHostForProfile() can return null when the suggested word is provided |
+ // by Web SpellCheck API. |
Profile* profile = proxy_->GetProfile(); |
if (profile) { |
- SpellcheckService* spellcheck_service = |
- SpellcheckServiceFactory::GetForProfile(profile); |
- if (spellcheck_service) |
- spellcheck_service->GetCustomDictionary()->AddWord( |
- UTF16ToUTF8(misspelled_word_)); |
+ SpellcheckService* spellcheck = |
+ SpellcheckServiceFactory::GetForProfile(profile); |
+ if (spellcheck) { |
+ spellcheck->GetCustomDictionary()->AddWord(UTF16ToUTF8( |
+ misspelled_word_)); |
+ spellcheck->GetFeedbackSender()->AddedToDictionary(misspelling_hash_); |
+ } |
} |
#if defined(OS_MACOSX) |
spellcheck_mac::AddWord(misspelled_word_); |