diff options
author | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-16 02:56:58 +0000 |
---|---|---|
committer | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-16 02:56:58 +0000 |
commit | 500263ec2bfa08c78d303eb3966b1971a0ce0617 (patch) | |
tree | b3f7e71d33084b16365f08fd4e872c36f5a61b7a /chrome/browser/tab_contents/render_view_context_menu.cc | |
parent | f3ee2bc3d9d21813b6339f47662ad763ba1c567a (diff) | |
download | chromium_src-500263ec2bfa08c78d303eb3966b1971a0ce0617.zip chromium_src-500263ec2bfa08c78d303eb3966b1971a0ce0617.tar.gz chromium_src-500263ec2bfa08c78d303eb3966b1971a0ce0617.tar.bz2 |
Added UMA histgrams for spellchecking.
Added items are:
- SpellCheck.Enabled
- SpellCheck.CustomWords
- SpellCheck.MisspellRatio
- SpellCheck.ShowSuggestion
- SpellCheck.ReplaceRatio
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6995041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/render_view_context_menu.cc')
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index d7d5633..316dd30 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -1472,11 +1472,17 @@ void RenderViewContextMenu::ExecuteCommand(int id) { case IDC_SPELLCHECK_SUGGESTION_1: case IDC_SPELLCHECK_SUGGESTION_2: case IDC_SPELLCHECK_SUGGESTION_3: - case IDC_SPELLCHECK_SUGGESTION_4: + case IDC_SPELLCHECK_SUGGESTION_4: { source_tab_contents_->render_view_host()->Replace( params_.dictionary_suggestions[id - IDC_SPELLCHECK_SUGGESTION_0]); + SpellCheckHost* spellcheck_host = profile_->GetSpellCheckHost(); + if (!spellcheck_host) { + NOTREACHED(); + break; + } + spellcheck_host->RecordReplacedWordStats(1); break; - + } case IDC_CHECK_SPELLING_OF_THIS_FIELD: { RenderViewHost* view = source_tab_contents_->render_view_host(); view->Send(new SpellCheckMsg_ToggleSpellCheck(view->routing_id())); |