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

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

Issue 1156473007: Enables the user to select multiple languages for spellchecking (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments, clarified code. Created 5 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
Index: chrome/browser/spellchecker/spellcheck_service.h
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
index c7229e8b468b03a55676e5ad7ab141c84c5f89cb..06f6956b58128c4ab4c040294d3cdc8d7c483670 100644
--- a/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chrome/browser/spellchecker/spellcheck_service.h
@@ -63,20 +63,18 @@ class SpellcheckService : public KeyedService,
base::WeakPtr<SpellcheckService> GetWeakPtr();
- // This function computes a vector of strings which are to be displayed in
- // the context menu over a text area for changing spell check languages. It
- // returns the index of the current spell check language in the vector.
+ // This function computes a vector of strings, |languages|, which are to be
please use gerrit instead 2015/06/05 17:50:05 // Computes |languages| to display in the context
Julius 2015/06/05 21:38:33 Done.
+ // displayed in the context menu over a text area for changing spell check
please use gerrit instead 2015/06/05 17:50:05 s/spell check/spellcheck Stick with your own conv
Julius 2015/06/05 21:38:33 Done.
+ // languages. It returns the number of enabled spellcheck languages in
please use gerrit instead 2015/06/05 17:50:05 Not sure how to say this better, but let me try to
Julius 2015/06/05 21:38:33 Done.
+ // |languages|.
+ // |languages| will begin with all enabled spellcheck languages, followed by
+ // all other |accept_languages| not currently enabled for spellchecking.
+ // Therefore, it is only necessary to know how many of the first elements in
+ // |languages| are enabled dictionary languages.
// TODO(port): this should take a vector of base::string16, but the
// implementation has some dependencies in l10n util that need porting first.
- static int GetSpellCheckLanguages(content::BrowserContext* context,
- std::vector<std::string>* languages);
-
- // Computes a vector of strings which are to be displayed in the context
- // menu from |accept_languages| and |dictionary_language|.
- static void GetSpellCheckLanguagesFromAcceptLanguages(
- const std::vector<std::string>& accept_languages,
- const std::string& dictionary_language,
- std::vector<std::string>* languages);
+ static size_t GetSpellCheckLanguages(const content::BrowserContext* context,
+ std::vector<std::string>* languages);
// Signals the event attached by AttachTestEvent() to report the specified
// event to browser tests. This function is called by this class and its

Powered by Google App Engine
This is Rietveld 408576698