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

Unified Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 2652793003: Add login screen locale and input method device policies (Closed)
Patch Set: Rebase. Created 3 years, 10 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/chromeos/settings/device_settings_provider.cc
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.cc b/chrome/browser/chromeos/settings/device_settings_provider.cc
index 423ab66b5fb14591f051740588513db4fa948bc0..e954622d5a3310f6ee4869d43c5eb747c7cb5b13 100644
--- a/chrome/browser/chromeos/settings/device_settings_provider.cc
+++ b/chrome/browser/chromeos/settings/device_settings_provider.cc
@@ -98,6 +98,8 @@ const char* const kKnownSettings[] = {
kTargetVersionPrefix,
kUpdateDisabled,
kVariationsRestrictParameter,
+ kDeviceLoginScreenLocales,
+ kDeviceLoginScreenInputMethods,
};
void DecodeLoginPolicies(
@@ -310,6 +312,26 @@ void DecodeLoginPolicies(
login_apps->AppendString(login_app);
new_values_cache->SetValue(kLoginApps, std::move(login_apps));
}
+
+ if (policy.has_login_screen_locales()) {
+ std::unique_ptr<base::ListValue> locales(new base::ListValue);
+ const em::LoginScreenLocalesProto& login_screen_locales(
+ policy.login_screen_locales());
+ for (const auto& locale : login_screen_locales.login_screen_locales())
+ locales->AppendString(locale);
+ new_values_cache->SetValue(kDeviceLoginScreenLocales, std::move(locales));
+ }
+
+ if (policy.has_login_screen_input_methods()) {
+ std::unique_ptr<base::ListValue> input_methods(new base::ListValue);
+ const em::LoginScreenInputMethodsProto& login_screen_input_methods(
+ policy.login_screen_input_methods());
+ for (const auto& input_method :
+ login_screen_input_methods.login_screen_input_methods())
+ input_methods->AppendString(input_method);
+ new_values_cache->SetValue(kDeviceLoginScreenInputMethods,
+ std::move(input_methods));
+ }
}
void DecodeNetworkPolicies(

Powered by Google App Engine
This is Rietveld 408576698