• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_PROTO_DECODERS_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_PROTO_DECODERS_H_
7 
8 #include <string>
9 
10 #include "base/memory/weak_ptr.h"
11 #include "components/policy/core/common/policy_types.h"
12 
13 namespace enterprise_management {
14 class CloudPolicySettings;
15 }  // namespace enterprise_management
16 
17 namespace policy {
18 
19 class CloudExternalDataManager;
20 class PolicyMap;
21 
22 // Decode all of the fields in |policy| which are recognized (see the metadata
23 // in policy_constants.cc) and store them in the given |map|, with the given
24 // |source| and |scope|.
25 void DecodeProtoFields(
26     const enterprise_management::CloudPolicySettings& policy,
27     base::WeakPtr<CloudExternalDataManager> external_data_manager,
28     PolicySource source,
29     PolicyScope scope,
30     PolicyMap* map);
31 
32 }  // namespace policy
33 
34 #endif  // COMPONENTS_POLICY_CORE_COMMON_POLICY_PROTO_DECODERS_H_
35