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

Unified Diff: chrome/browser/chromeos/options/language_config_view.h

Issue 2764001: Sort input methods names in the language selector by language names. (Closed)
Patch Set: fixed all Created 10 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 | « no previous file | chrome/browser/chromeos/options/language_config_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/options/language_config_view.h
diff --git a/chrome/browser/chromeos/options/language_config_view.h b/chrome/browser/chromeos/options/language_config_view.h
index 0a67fc67bdfee7f5f6813e6e9a13c900077d3866..72f636ad90ec88a3f0bd54546d1cfc5a0b97f649 100644
--- a/chrome/browser/chromeos/options/language_config_view.h
+++ b/chrome/browser/chromeos/options/language_config_view.h
@@ -136,10 +136,16 @@ class LanguageConfigView : public TableModel,
const std::string& language_code);
// Sorts the given language codes by their corresponding language names,
- // using the unicode string comparator.
+ // using the unicode string comparator. Uses unstable sorting.
static void SortLanguageCodesByNames(
std::vector<std::string>* language_codes);
+ // Sorts the given input method ids by their corresponding language names,
+ // using the unicode string comparator. Uses stable sorting.
+ static void SortInputMethodIdsByNames(
+ const std::map<std::string, std::string>& id_to_language_code_map,
+ std::vector<std::string>* input_method_ids);
+
// Reorders the given input method ids for the language code. For
// example, if |language_codes| is "fr" and |input_method_ids| contains
// ["xkb:be::fra", and "xkb:fr::fra"], the list is reordered to
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/language_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698