Commit b15a406c authored by jeremy@chromium.org's avatar jeremy@chromium.org

Remove code to collect spellchecker stats

These stats were originally introduced to gauge the use of Hunspell vs the native spellchecker on OS X.  Now that we know that Hunspell is hardly used, the code can be removed.

BUG=69944
TEST=None


Review URL: http://codereview.chromium.org/8805025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113218 0039d316-1c4b-4281-b951-d872f2087c98
parent d0488cac
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_context_getter.h"
#include "third_party/hunspell/google/bdict.h" #include "third_party/hunspell/google/bdict.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#if defined(OS_MACOSX)
#include "base/metrics/histogram.h"
#endif
using content::BrowserThread; using content::BrowserThread;
...@@ -48,32 +45,6 @@ FilePath GetFirstChoiceFilePath(const std::string& language) { ...@@ -48,32 +45,6 @@ FilePath GetFirstChoiceFilePath(const std::string& language) {
return SpellCheckCommon::GetVersionedFileName(language, dict_dir); return SpellCheckCommon::GetVersionedFileName(language, dict_dir);
} }
#if defined(OS_MACOSX)
// Collect metrics on how often Hunspell is used on OS X vs the native
// spellchecker.
void RecordSpellCheckStats(bool native_spellchecker_used,
const std::string& language) {
CR_DEFINE_STATIC_LOCAL(std::set<std::string>, languages_seen, ());
// Only count a language code once for each session..
if (languages_seen.find(language) != languages_seen.end()) {
return;
}
languages_seen.insert(language);
enum {
SPELLCHECK_OSX_NATIVE_SPELLCHECKER_USED = 0,
SPELLCHECK_HUNSPELL_USED = 1
};
bool engine_used = native_spellchecker_used ?
SPELLCHECK_OSX_NATIVE_SPELLCHECKER_USED :
SPELLCHECK_HUNSPELL_USED;
UMA_HISTOGRAM_COUNTS("SpellCheck.OSXEngineUsed", engine_used);
}
#endif
#if defined(OS_WIN) #if defined(OS_WIN)
FilePath GetFallbackFilePath(const FilePath& first_choice) { FilePath GetFallbackFilePath(const FilePath& first_choice) {
FilePath dict_dir; FilePath dict_dir;
...@@ -132,9 +103,6 @@ void SpellCheckHostImpl::Initialize() { ...@@ -132,9 +103,6 @@ void SpellCheckHostImpl::Initialize() {
if (SpellCheckerPlatform::SpellCheckerAvailable() && if (SpellCheckerPlatform::SpellCheckerAvailable() &&
SpellCheckerPlatform::PlatformSupportsLanguage(language_)) { SpellCheckerPlatform::PlatformSupportsLanguage(language_)) {
#if defined(OS_MACOSX)
RecordSpellCheckStats(true, language_);
#endif
use_platform_spellchecker_ = true; use_platform_spellchecker_ = true;
SpellCheckerPlatform::SetLanguage(language_); SpellCheckerPlatform::SetLanguage(language_);
MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::current()->PostTask(FROM_HERE,
...@@ -143,10 +111,6 @@ void SpellCheckHostImpl::Initialize() { ...@@ -143,10 +111,6 @@ void SpellCheckHostImpl::Initialize() {
return; return;
} }
#if defined(OS_MACOSX)
RecordSpellCheckStats(false, language_);
#endif
BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE, BrowserThread::PostTaskAndReply(BrowserThread::FILE, FROM_HERE,
base::Bind(&SpellCheckHostImpl::InitializeDictionaryLocation, base::Bind(&SpellCheckHostImpl::InitializeDictionaryLocation,
base::Unretained(this)), base::Unretained(this)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment