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

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

Issue 11151023: Merge 161535 - Fix the spelling client not to use the spelling service yet. Also disabling some tes… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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 | « no previous file | chrome/browser/spellchecker/spelling_service_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/spelling_service_client.cc
===================================================================
--- chrome/browser/spellchecker/spelling_service_client.cc (revision 161902)
+++ chrome/browser/spellchecker/spelling_service_client.cc (working copy)
@@ -111,9 +111,6 @@
// The spellchecking service should be avilable only when asynchronous
// spellchecking is enabled because this service depends on it.
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kDisableAsynchronousSpellChecking))
- return type == SUGGEST;
// Enable the suggest service only on languages not supported by the
// spellcheck service. When this client calls the spellcheck service, it
@@ -121,6 +118,12 @@
// by the suggest service. That is, it is not useful to use the suggest
// service when this client can use the spellcheck service.
std::string locale = pref->GetString(prefs::kSpellCheckDictionary);
+
+ // This means we are in a test.
+ if (locale.empty()) return false;
+
+ // Otherwise only suggest is currently valid.
+ return type == SUGGEST;
#if defined(OS_MACOSX)
bool spellcheck_available = locale.empty();
#else
« no previous file with comments | « no previous file | chrome/browser/spellchecker/spelling_service_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698