| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/policy/core/common/cloud/user_cloud_policy_store_base.h" | 5 #include "components/policy/core/common/cloud/user_cloud_policy_store_base.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/sequenced_task_runner.h" |
| 9 #include "components/policy/core/common/cloud/cloud_external_data_manager.h" | 10 #include "components/policy/core/common/cloud/cloud_external_data_manager.h" |
| 10 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 11 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 11 #include "components/policy/core/common/policy_map.h" | 12 #include "components/policy/core/common/policy_map.h" |
| 12 #include "components/policy/proto/cloud_policy.pb.h" | 13 #include "components/policy/proto/cloud_policy.pb.h" |
| 13 | 14 |
| 14 namespace policy { | 15 namespace policy { |
| 15 | 16 |
| 16 // Decodes a CloudPolicySettings object into a policy map. The implementation is | 17 // Decodes a CloudPolicySettings object into a policy map. The implementation is |
| 17 // generated code in policy/cloud_policy_generated.cc. | 18 // generated code in policy/cloud_policy_generated.cc. |
| 18 void DecodePolicy(const enterprise_management::CloudPolicySettings& policy, | 19 void DecodePolicy(const enterprise_management::CloudPolicySettings& policy, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 49 std::unique_ptr<enterprise_management::CloudPolicySettings> payload, | 50 std::unique_ptr<enterprise_management::CloudPolicySettings> payload, |
| 50 const std::string& policy_signature_public_key) { | 51 const std::string& policy_signature_public_key) { |
| 51 // Decode the payload. | 52 // Decode the payload. |
| 52 policy_map_.Clear(); | 53 policy_map_.Clear(); |
| 53 DecodePolicy(*payload, external_data_manager(), &policy_map_); | 54 DecodePolicy(*payload, external_data_manager(), &policy_map_); |
| 54 policy_ = std::move(policy_data); | 55 policy_ = std::move(policy_data); |
| 55 policy_signature_public_key_ = policy_signature_public_key; | 56 policy_signature_public_key_ = policy_signature_public_key; |
| 56 } | 57 } |
| 57 | 58 |
| 58 } // namespace policy | 59 } // namespace policy |
| OLD | NEW |