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

Unified Diff: chrome/browser/tab_contents/spelling_menu_observer.cc

Issue 10536141: Add SpellingServiceClient::IsAvailable(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/spellchecker/spelling_service_client_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/spelling_menu_observer.cc
===================================================================
--- chrome/browser/tab_contents/spelling_menu_observer.cc (revision 142020)
+++ chrome/browser/tab_contents/spelling_menu_observer.cc (working copy)
@@ -59,12 +59,9 @@
}
// Append a placeholder item for the suggestion from the Spelling serivce and
- // send a request to the service if we have enabled the spellchecking and
- // integrated the Spelling service.
- PrefService* pref = profile->GetPrefs();
- if (params.spellcheck_enabled &&
- pref->GetBoolean(prefs::kEnableSpellCheck) &&
- pref->GetBoolean(prefs::kSpellCheckUseSpellingService)) {
+ // send a request to the service if we can retrieve suggestions from it.
+ if (SpellingServiceClient::IsAvailable(profile,
+ SpellingServiceClient::SUGGEST)) {
// Retrieve the misspelled word to be sent to the Spelling service.
string16 text = params.misspelled_word;
if (!text.empty()) {
« no previous file with comments | « chrome/browser/spellchecker/spelling_service_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698