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

Unified Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h

Issue 144363006: Expand VPD initial_locale to a list of locales. Use the expanded VPD initial_locale on the OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unittests added. Created 6 years, 11 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/ui/webui/options/chromeos/cros_language_options_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h
index 32bf026b16a7813b834a4d6357f6277148c1ce0d..7491eec1741c94f2e011662ead3533b6ab515acc 100644
--- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h
@@ -13,6 +13,11 @@
namespace chromeos {
namespace options {
+// GetUILanguageList() returns concatenated list of list of vendor languages
+// followed by other languages. An entry with "code" attribute set to this value
+// is inserted in between.
+extern const char kVENDOR_OTHER_LANGUAGES_LIST_DIVIDER[];
Nikita (slow) 2014/01/31 15:47:20 nit: Please follow kConstantName naming style.
Alexander Alekseev 2014/01/31 17:21:00 Done.
+
// Language options page UI handler for Chrome OS. For non-Chrome OS,
// see LanguageOptionsHnadler.
class CrosLanguageOptionsHandler
@@ -46,6 +51,8 @@ class CrosLanguageOptionsHandler
// The return value will look like:
// [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'},
// ...]
+ // "most relevant" languages, as set in initial_locale in VPD, will be first
+ // in the list.
static base::ListValue* GetAcceptLanguageList(
const input_method::InputMethodDescriptors& descriptors);
@@ -53,6 +60,11 @@ class CrosLanguageOptionsHandler
// The return value will look like:
// [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'},
// ...]
+ // "most relevant" languages, as set in initial_locale in VPD, will be first
+ // in the list.
+ // An entry with "code" attribute set to
Nikita (slow) 2014/01/31 15:47:20 nit: Drop extra spaces after //
Alexander Alekseev 2014/01/31 17:21:00 Done.
+ // kVENDOR_OTHER_LANGUAGES_LIST_DIVIDER is used as a divider to separate "most
+ // relevant" languages against other.
static base::ListValue* GetUILanguageList(
const input_method::InputMethodDescriptors& descriptors);
@@ -88,9 +100,13 @@ class CrosLanguageOptionsHandler
// Gets the list of languages with |descriptors| based on
// |base_language_codes|.
+ // |insert_divider| means to insert entry with "code" attribute set to
+ // kVENDOR_OTHER_LANGUAGES_LIST_DIVIDER between "most relevant" languages and
+ // other.
static base::ListValue* GetLanguageListInternal(
const input_method::InputMethodDescriptors& descriptors,
- const std::vector<std::string>& base_language_codes);
+ const std::vector<std::string>& base_language_codes,
+ bool insert_divider);
// OptionsPageUIHandler implementation.
virtual void InitializePage() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698