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

Unified Diff: chrome/browser/spellchecker/spellcheck_service.cc

Issue 2177023002: Remove spellchecker feedback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 4 years, 4 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
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_service.h ('k') | chrome/browser/spellchecker/word_trimmer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/spellcheck_service.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index b60944f5234e9ebaa3030a9793d0dcd57851035b..23912082afe9c0166ff32f6a027ab108afd6957b 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -11,7 +11,6 @@
#include "base/supports_user_data.h"
#include "base/synchronization/waitable_event.h"
#include "build/build_config.h"
-#include "chrome/browser/spellchecker/feedback_sender.h"
#include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
#include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"
@@ -81,15 +80,6 @@ SpellcheckService::SpellcheckService(content::BrowserContext* context)
single_dictionary_pref.SetValue("");
#endif // defined(USE_BROWSER_SPELLCHECKER)
- std::string language_code;
- std::string country_code;
- spellcheck::GetISOLanguageCountryCodeFromLocale(
- first_of_dictionaries, &language_code, &country_code);
- feedback_sender_.reset(new spellcheck::FeedbackSender(
- content::BrowserContext::GetDefaultStoragePartition(context)->
- GetURLRequestContext(),
- language_code, country_code));
-
pref_change_registrar_.Add(
prefs::kSpellCheckDictionaries,
base::Bind(&SpellcheckService::OnSpellCheckDictionariesChanged,
@@ -116,7 +106,6 @@ SpellcheckService::SpellcheckService(content::BrowserContext* context)
content::NotificationService::AllSources());
LoadHunspellDictionaries();
- UpdateFeedbackSenderState();
}
SpellcheckService::~SpellcheckService() {
@@ -240,10 +229,6 @@ SpellcheckService::GetHunspellDictionaries() {
return hunspell_dictionaries_;
}
-spellcheck::FeedbackSender* SpellcheckService::GetFeedbackSender() {
- return feedback_sender_.get();
-}
-
bool SpellcheckService::LoadExternalDictionary(std::string language,
std::string locale,
std::string path,
@@ -323,7 +308,6 @@ void SpellcheckService::OnSpellCheckDictionariesChanged() {
// If there are hunspell dictionaries, then fire off notifications to the
// renderers after the dictionaries are finished loading.
LoadHunspellDictionaries();
- UpdateFeedbackSenderState();
// If there are no hunspell dictionaries to load, then immediately let the
// renderers know the new state.
@@ -336,7 +320,6 @@ void SpellcheckService::OnUseSpellingServiceChanged() {
prefs::kSpellCheckUseSpellingService);
if (metrics_)
metrics_->RecordSpellingServiceStats(enabled);
- UpdateFeedbackSenderState();
}
void SpellcheckService::OnAcceptLanguagesChanged() {
@@ -362,20 +345,3 @@ void SpellcheckService::OnAcceptLanguagesChanged() {
dictionaries_pref.SetValue(filtered_dictionaries);
}
-
-void SpellcheckService::UpdateFeedbackSenderState() {
- std::string feedback_language;
- if (!hunspell_dictionaries_.empty())
- feedback_language = hunspell_dictionaries_.front()->GetLanguage();
- std::string language_code;
- std::string country_code;
- spellcheck::GetISOLanguageCountryCodeFromLocale(
- feedback_language, &language_code, &country_code);
- feedback_sender_->OnLanguageCountryChange(language_code, country_code);
- if (SpellingServiceClient::IsAvailable(
- context_, SpellingServiceClient::SPELLCHECK)) {
- feedback_sender_->StartFeedbackCollection();
- } else {
- feedback_sender_->StopFeedbackCollection();
- }
-}
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_service.h ('k') | chrome/browser/spellchecker/word_trimmer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698