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

Side by Side Diff: chrome/browser/spellcheck_host_impl.h

Issue 7121006: Introduced additional spellcheck related histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved code from render_view_host.cc to to rneder_view_context_menu.cc Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ 5 #ifndef CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_
6 #define CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ 6 #define CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Inform |observer_| that initialization has finished. 81 // Inform |observer_| that initialization has finished.
82 void InformObserverOfInitialization(); 82 void InformObserverOfInitialization();
83 83
84 // If |dictionary_file_| is missing, we attempt to download it. 84 // If |dictionary_file_| is missing, we attempt to download it.
85 void DownloadDictionary(); 85 void DownloadDictionary();
86 86
87 // Write a custom dictionary addition to disk. 87 // Write a custom dictionary addition to disk.
88 void WriteWordToCustomDictionary(const std::string& word); 88 void WriteWordToCustomDictionary(const std::string& word);
89 89
90 // Collects a histogram for dictionary corruption rate
91 // to be uploaded via UMA
92 void RecordDictionaryCorruptionStats(bool corrupted);
93
90 // Collects status of spellchecking enabling state, which is 94 // Collects status of spellchecking enabling state, which is
91 // to be uploaded via UMA 95 // to be uploaded via UMA
92 virtual void RecordCheckedWordStats(bool misspell); 96 virtual void RecordCheckedWordStats(bool misspell);
93 97
94 // Collects a histogram for misspelled word replacement 98 // Collects a histogram for misspelled word replacement
95 // to be uploaded via UMA 99 // to be uploaded via UMA
96 virtual void RecordReplacedWordStats(int delta); 100 virtual void RecordReplacedWordStats(int delta);
97 101
102 // Collects a histogram for context menu showing as a spell correction
103 // attempt to be uploaded via UMA
104 virtual void RecordSuggestionStats(int delta);
105
98 // URLFetcher::Delegate implementation. Called when we finish downloading the 106 // URLFetcher::Delegate implementation. Called when we finish downloading the
99 // spellcheck dictionary; saves the dictionary to |data_|. 107 // spellcheck dictionary; saves the dictionary to |data_|.
100 virtual void OnURLFetchComplete(const URLFetcher* source, 108 virtual void OnURLFetchComplete(const URLFetcher* source,
101 const GURL& url, 109 const GURL& url,
102 const net::URLRequestStatus& status, 110 const net::URLRequestStatus& status,
103 int response_code, 111 int response_code,
104 const net::ResponseCookies& cookies, 112 const net::ResponseCookies& cookies,
105 const std::string& data); 113 const std::string& data);
106 114
107 // NotificationObserver implementation. 115 // NotificationObserver implementation.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 154
147 // Used for downloading the dictionary file. 155 // Used for downloading the dictionary file.
148 scoped_ptr<URLFetcher> fetcher_; 156 scoped_ptr<URLFetcher> fetcher_;
149 157
150 NotificationRegistrar registrar_; 158 NotificationRegistrar registrar_;
151 159
152 // Number of corrected words of checked words. 160 // Number of corrected words of checked words.
153 int misspelled_word_count_; 161 int misspelled_word_count_;
154 // Number of checked words. 162 // Number of checked words.
155 int spellchecked_word_count_; 163 int spellchecked_word_count_;
164 // Number of suggestion list showings.
165 int suggestion_count_;
brettw 2011/06/12 13:02:59 How about suggestion_show_count_? Just suggestion_
156 // Number of misspelled words replaced by a user. 166 // Number of misspelled words replaced by a user.
157 int replaced_word_count_; 167 int replaced_word_count_;
158 }; 168 };
159 169
160 #endif // CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_ 170 #endif // CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698