Chromium Code Reviews| Index: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc |
| diff --git a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc |
| index a2936a2471834942599730481c75df4f3806024a..31f6ad0068ce12f86a393640ff64a934ec2c8361 100644 |
| --- a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc |
| +++ b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc |
| @@ -273,90 +273,6 @@ void DecodeLoginPolicies(const em::ChromeDeviceSettingsProto& policy, |
| } |
| } |
| -void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, |
| - PolicyMap* policies, |
| - EnterpriseInstallAttributes* install_attributes) { |
| - // No policies if this is not KIOSK. |
| - if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) |
| - return; |
| - |
| - if (policy.has_forced_logout_timeouts()) { |
| - const em::ForcedLogoutTimeoutsProto& container( |
| - policy.forced_logout_timeouts()); |
| - if (container.has_idle_logout_timeout()) { |
| - policies->Set( |
| - key::kDeviceIdleLogoutTimeout, |
| - POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, |
| - DecodeIntegerValue(container.idle_logout_timeout()).release(), |
| - NULL); |
| - } |
| - if (container.has_idle_logout_warning_duration()) { |
| - policies->Set(key::kDeviceIdleLogoutWarningDuration, |
| - POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, |
| - DecodeIntegerValue(container.idle_logout_warning_duration()) |
| - .release(), |
| - NULL); |
| - } |
| - } |
| - |
| - if (policy.has_login_screen_saver()) { |
| - const em::ScreenSaverProto& container( |
| - policy.login_screen_saver()); |
| - if (container.has_screen_saver_extension_id()) { |
| - policies->Set(key::kDeviceLoginScreenSaverId, |
| - POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, |
| - new base::StringValue( |
| - container.screen_saver_extension_id()), |
| - NULL); |
| - } |
| - if (container.has_screen_saver_timeout()) { |
| - policies->Set( |
| - key::kDeviceLoginScreenSaverTimeout, |
| - POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, |
| - DecodeIntegerValue(container.screen_saver_timeout()).release(), |
| - NULL); |
| - } |
| - } |
| - |
| - if (policy.has_app_pack()) { |
| - const em::AppPackProto& container(policy.app_pack()); |
| - base::ListValue* app_pack_list = new base::ListValue(); |
| - for (int i = 0; i < container.app_pack_size(); ++i) { |
| - const em::AppPackEntryProto& entry(container.app_pack(i)); |
| - if (entry.has_extension_id() && entry.has_update_url()) { |
| - base::DictionaryValue* dict = new base::DictionaryValue(); |
| - dict->SetString(chromeos::kAppPackKeyExtensionId, entry.extension_id()); |
| - dict->SetString(chromeos::kAppPackKeyUpdateUrl, entry.update_url()); |
| - app_pack_list->Append(dict); |
| - } |
| - } |
| - policies->Set(key::kDeviceAppPack, |
| - POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, |
| - app_pack_list, |
| - NULL); |
| - } |
| - |
| - if (policy.has_pinned_apps()) { |
| - const em::PinnedAppsProto& container(policy.pinned_apps()); |
| - base::ListValue* pinned_apps_list = new base::ListValue(); |
| - for (int i = 0; i < container.app_id_size(); ++i) { |
| - pinned_apps_list->Append( |
| - new base::StringValue(container.app_id(i))); |
| - } |
| - |
| - policies->Set(key::kPinnedLauncherApps, |
| - POLICY_LEVEL_RECOMMENDED, |
| - POLICY_SCOPE_MACHINE, |
| - pinned_apps_list, |
| - NULL); |
| - } |
| -} |
| - |
| void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, |
| PolicyMap* policies, |
| EnterpriseInstallAttributes* install_attributes) { |
|
bartfab (slow)
2014/10/15 09:52:20
Nit: No longer needed.
rkc
2014/11/20 21:06:33
Since DEVICE_MODE_RETAIL_KIOSK will still exist (a
bartfab (slow)
2014/11/27 16:25:47
If I understand "offline demo mode" correctly, it
rkc
2014/12/01 19:15:04
Ah - I honestly don't completely understand this c
bartfab (slow)
2014/12/02 21:25:26
Proxy settings are documented as a mandatory user
rkc
2014/12/04 19:50:06
I'll leave this behavior as is for now? We can alw
bartfab (slow)
2014/12/10 23:24:39
Please add a TODO and file an M41 bug against me t
rkc
2014/12/15 20:45:57
Done.
|
| @@ -375,14 +291,9 @@ void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, |
| container.proxy_bypass_list()); |
| } |
| - // Figure out the level. Proxy policy is mandatory in kiosk mode. |
| - PolicyLevel level = POLICY_LEVEL_RECOMMENDED; |
| - if (install_attributes->GetMode() == DEVICE_MODE_RETAIL_KIOSK) |
| - level = POLICY_LEVEL_MANDATORY; |
| - |
| if (!proxy_settings->empty()) { |
| policies->Set(key::kProxySettings, |
| - level, |
| + POLICY_LEVEL_RECOMMENDED, |
| POLICY_SCOPE_MACHINE, |
| proxy_settings.release(), |
| NULL); |
| @@ -655,22 +566,6 @@ void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, |
| } |
| } |
| - if (policy.has_start_up_urls()) { |
| - const em::StartUpUrlsProto& container(policy.start_up_urls()); |
| - base::ListValue* urls = new base::ListValue(); |
| - RepeatedPtrField<std::string>::const_iterator entry; |
| - for (entry = container.start_up_urls().begin(); |
| - entry != container.start_up_urls().end(); |
| - ++entry) { |
| - urls->Append(new base::StringValue(*entry)); |
| - } |
| - policies->Set(key::kDeviceStartUpUrls, |
| - POLICY_LEVEL_MANDATORY, |
| - POLICY_SCOPE_MACHINE, |
| - urls, |
| - NULL); |
| - } |
| - |
| if (policy.has_system_timezone()) { |
| if (policy.system_timezone().has_timezone()) { |
| policies->Set(key::kSystemTimezone, |
| @@ -805,7 +700,6 @@ void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
| // Decode the various groups of policies. |
| DecodeLoginPolicies(policy, policies); |
| - DecodeKioskPolicies(policy, policies, install_attributes); |
| DecodeNetworkPolicies(policy, policies, install_attributes); |
| DecodeReportingPolicies(policy, policies); |
| DecodeAutoUpdatePolicies(policy, policies); |