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

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

Issue 1006953003: Revert "Remove spellcheck feedback." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: chrome/browser/spellchecker/spellcheck_service.h
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
index 46a081bc1faed06a2c4c59c6f8dc590f65c34113..84db1ce6a96de45d3b7c4bf3941af42344a22b56 100644
--- a/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chrome/browser/spellchecker/spellcheck_service.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_change_registrar.h"
+#include "chrome/browser/spellchecker/feedback_sender.h"
#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
#include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"
#include "chrome/common/spellcheck_common.h"
@@ -93,6 +94,9 @@ class SpellcheckService : public KeyedService,
// Returns the instance of the Hunspell dictionary.
SpellcheckHunspellDictionary* GetHunspellDictionary();
+ // Returns the instance of the spelling service feedback sender.
+ spellcheck::FeedbackSender* GetFeedbackSender();
+
// Load a dictionary from a given path. Format specifies how the dictionary
// is stored. Return value is true if successful.
bool LoadExternalDictionary(std::string language,
@@ -143,6 +147,10 @@ class SpellcheckService : public KeyedService,
// Notification handler for changes to prefs::kSpellCheckUseSpellingService.
void OnUseSpellingServiceChanged();
+ // Enables the feedback sender if spelling server is available and enabled.
+ // Otherwise disables the feedback sender.
+ void UpdateFeedbackSenderState();
+
PrefChangeRegistrar pref_change_registrar_;
content::NotificationRegistrar registrar_;
@@ -155,6 +163,8 @@ class SpellcheckService : public KeyedService,
scoped_ptr<SpellcheckHunspellDictionary> hunspell_dictionary_;
+ scoped_ptr<spellcheck::FeedbackSender> feedback_sender_;
+
base::WeakPtrFactory<SpellcheckService> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(SpellcheckService);
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc ('k') | chrome/browser/spellchecker/spellcheck_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698