| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 policy.login_video_capture_allowed_urls()); | 322 policy.login_video_capture_allowed_urls()); |
| 323 std::unique_ptr<base::ListValue> urls(new base::ListValue()); | 323 std::unique_ptr<base::ListValue> urls(new base::ListValue()); |
| 324 for (const auto& entry : container.urls()) { | 324 for (const auto& entry : container.urls()) { |
| 325 urls->AppendString(entry); | 325 urls->AppendString(entry); |
| 326 } | 326 } |
| 327 policies->Set(key::kLoginVideoCaptureAllowedUrls, POLICY_LEVEL_MANDATORY, | 327 policies->Set(key::kLoginVideoCaptureAllowedUrls, POLICY_LEVEL_MANDATORY, |
| 328 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, std::move(urls), | 328 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, std::move(urls), |
| 329 nullptr); | 329 nullptr); |
| 330 } | 330 } |
| 331 | 331 |
| 332 if (policy.has_login_apps()) { | 332 if (policy.has_device_login_screen_app_install_list()) { |
| 333 const em::LoginAppsProto& login_apps_proto(policy.login_apps()); | 333 const em::DeviceLoginScreenAppInstallListProto& proto( |
| 334 std::unique_ptr<base::ListValue> login_apps(new base::ListValue); | 334 policy.device_login_screen_app_install_list()); |
| 335 for (const auto& login_app : login_apps_proto.login_apps()) | 335 std::unique_ptr<base::ListValue> apps(new base::ListValue); |
| 336 login_apps->AppendString(login_app); | 336 for (const auto& app : proto.device_login_screen_app_install_list()) |
| 337 policies->Set(key::kLoginApps, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 337 apps->AppendString(app); |
| 338 POLICY_SOURCE_CLOUD, std::move(login_apps), nullptr); | 338 policies->Set(key::kDeviceLoginScreenAppInstallList, POLICY_LEVEL_MANDATORY, |
| 339 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, std::move(apps), |
| 340 nullptr); |
| 339 } | 341 } |
| 340 | 342 |
| 341 if (policy.has_login_screen_power_management()) { | 343 if (policy.has_login_screen_power_management()) { |
| 342 const em::LoginScreenPowerManagementProto& container( | 344 const em::LoginScreenPowerManagementProto& container( |
| 343 policy.login_screen_power_management()); | 345 policy.login_screen_power_management()); |
| 344 if (container.has_login_screen_power_management()) { | 346 if (container.has_login_screen_power_management()) { |
| 345 std::unique_ptr<base::Value> decoded_json; | 347 std::unique_ptr<base::Value> decoded_json; |
| 346 decoded_json = DecodeJsonStringAndDropUnknownBySchema( | 348 decoded_json = DecodeJsonStringAndDropUnknownBySchema( |
| 347 container.login_screen_power_management(), | 349 container.login_screen_power_management(), |
| 348 key::kDeviceLoginScreenPowerManagement); | 350 key::kDeviceLoginScreenPowerManagement); |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 // Decode the various groups of policies. | 892 // Decode the various groups of policies. |
| 891 DecodeLoginPolicies(policy, policies); | 893 DecodeLoginPolicies(policy, policies); |
| 892 DecodeNetworkPolicies(policy, policies); | 894 DecodeNetworkPolicies(policy, policies); |
| 893 DecodeReportingPolicies(policy, policies); | 895 DecodeReportingPolicies(policy, policies); |
| 894 DecodeAutoUpdatePolicies(policy, policies); | 896 DecodeAutoUpdatePolicies(policy, policies); |
| 895 DecodeAccessibilityPolicies(policy, policies); | 897 DecodeAccessibilityPolicies(policy, policies); |
| 896 DecodeGenericPolicies(policy, policies); | 898 DecodeGenericPolicies(policy, policies); |
| 897 } | 899 } |
| 898 | 900 |
| 899 } // namespace policy | 901 } // namespace policy |
| OLD | NEW |