| 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 | 8 | 
| 9 #include "base/callback.h" | 9 #include "base/callback.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 137               chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 137               chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 
| 138               entry->account_id()); | 138               entry->account_id()); | 
| 139         } | 139         } | 
| 140         entry_dict->SetIntegerWithoutPathExpansion( | 140         entry_dict->SetIntegerWithoutPathExpansion( | 
| 141             chromeos::kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); | 141             chromeos::kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); | 
| 142         if (entry->kiosk_app().has_app_id()) { | 142         if (entry->kiosk_app().has_app_id()) { | 
| 143           entry_dict->SetStringWithoutPathExpansion( | 143           entry_dict->SetStringWithoutPathExpansion( | 
| 144               chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId, | 144               chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId, | 
| 145               entry->kiosk_app().app_id()); | 145               entry->kiosk_app().app_id()); | 
| 146         } | 146         } | 
| 147         if (entry->kiosk_app().has_update_url()) { |  | 
| 148           entry_dict->SetStringWithoutPathExpansion( |  | 
| 149               chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL, |  | 
| 150               entry->kiosk_app().update_url()); |  | 
| 151         } |  | 
| 152       } else if (entry->has_deprecated_public_session_id()) { | 147       } else if (entry->has_deprecated_public_session_id()) { | 
| 153         // Deprecated public session specification. | 148         // Deprecated public session specification. | 
| 154         entry_dict->SetStringWithoutPathExpansion( | 149         entry_dict->SetStringWithoutPathExpansion( | 
| 155             chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 150             chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 
| 156             entry->deprecated_public_session_id()); | 151             entry->deprecated_public_session_id()); | 
| 157         entry_dict->SetIntegerWithoutPathExpansion( | 152         entry_dict->SetIntegerWithoutPathExpansion( | 
| 158             chromeos::kAccountsPrefDeviceLocalAccountsKeyType, | 153             chromeos::kAccountsPrefDeviceLocalAccountsKeyType, | 
| 159             DeviceLocalAccount::TYPE_PUBLIC_SESSION); | 154             DeviceLocalAccount::TYPE_PUBLIC_SESSION); | 
| 160       } | 155       } | 
| 161       account_list->Append(entry_dict.release()); | 156       account_list->Append(entry_dict.release()); | 
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 452         if (value) | 447         if (value) | 
| 453           allowed_connection_types->Append(value); | 448           allowed_connection_types->Append(value); | 
| 454       } | 449       } | 
| 455       policies->Set(key::kDeviceUpdateAllowedConnectionTypes, | 450       policies->Set(key::kDeviceUpdateAllowedConnectionTypes, | 
| 456                     POLICY_LEVEL_MANDATORY, | 451                     POLICY_LEVEL_MANDATORY, | 
| 457                     POLICY_SCOPE_MACHINE, | 452                     POLICY_SCOPE_MACHINE, | 
| 458                     allowed_connection_types, | 453                     allowed_connection_types, | 
| 459                     NULL); | 454                     NULL); | 
| 460     } | 455     } | 
| 461 | 456 | 
|  | 457     if (container.has_http_downloads_enabled()) { | 
|  | 458       policies->Set( | 
|  | 459           key::kDeviceUpdateHttpDownloadsEnabled, | 
|  | 460           POLICY_LEVEL_MANDATORY, | 
|  | 461           POLICY_SCOPE_MACHINE, | 
|  | 462           Value::CreateBooleanValue(container.http_downloads_enabled()), | 
|  | 463           NULL); | 
|  | 464     } | 
|  | 465 | 
| 462     if (container.has_reboot_after_update()) { | 466     if (container.has_reboot_after_update()) { | 
| 463       policies->Set(key::kRebootAfterUpdate, | 467       policies->Set(key::kRebootAfterUpdate, | 
| 464                     POLICY_LEVEL_MANDATORY, | 468                     POLICY_LEVEL_MANDATORY, | 
| 465                     POLICY_SCOPE_MACHINE, | 469                     POLICY_SCOPE_MACHINE, | 
| 466                     Value::CreateBooleanValue(container.reboot_after_update()), | 470                     Value::CreateBooleanValue(container.reboot_after_update()), | 
| 467                     NULL); | 471                     NULL); | 
| 468     } | 472     } | 
| 469   } | 473   } | 
| 470 } | 474 } | 
| 471 | 475 | 
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 674   DecodeLoginPolicies(policy, policies); | 678   DecodeLoginPolicies(policy, policies); | 
| 675   DecodeKioskPolicies(policy, policies, install_attributes); | 679   DecodeKioskPolicies(policy, policies, install_attributes); | 
| 676   DecodeNetworkPolicies(policy, policies, install_attributes); | 680   DecodeNetworkPolicies(policy, policies, install_attributes); | 
| 677   DecodeReportingPolicies(policy, policies); | 681   DecodeReportingPolicies(policy, policies); | 
| 678   DecodeAutoUpdatePolicies(policy, policies); | 682   DecodeAutoUpdatePolicies(policy, policies); | 
| 679   DecodeAccessibilityPolicies(policy, policies); | 683   DecodeAccessibilityPolicies(policy, policies); | 
| 680   DecodeGenericPolicies(policy, policies); | 684   DecodeGenericPolicies(policy, policies); | 
| 681 } | 685 } | 
| 682 | 686 | 
| 683 }  // namespace policy | 687 }  // namespace policy | 
| OLD | NEW | 
|---|