OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "components/arc/arc_bridge_service.h" | 11 #include "components/arc/arc_bridge_service.h" |
10 #include "components/arc/arc_service.h" | 12 #include "components/arc/arc_service.h" |
11 #include "components/policy/core/common/policy_service.h" | 13 #include "components/policy/core/common/policy_service.h" |
12 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
13 | 15 |
14 namespace policy { | 16 namespace policy { |
15 class PolicyMap; | 17 class PolicyMap; |
16 } // namespace policy | 18 } // namespace policy |
17 | 19 |
(...skipping 16 matching lines...) Expand all Loading... |
34 // PolicyHost overrides. | 36 // PolicyHost overrides. |
35 void GetPolicies(const GetPoliciesCallback& callback) override; | 37 void GetPolicies(const GetPoliciesCallback& callback) override; |
36 | 38 |
37 // PolicyService::Observer overrides. | 39 // PolicyService::Observer overrides. |
38 void OnPolicyUpdated(const policy::PolicyNamespace& ns, | 40 void OnPolicyUpdated(const policy::PolicyNamespace& ns, |
39 const policy::PolicyMap& previous, | 41 const policy::PolicyMap& previous, |
40 const policy::PolicyMap& current) override; | 42 const policy::PolicyMap& current) override; |
41 | 43 |
42 private: | 44 private: |
43 void InitializePolicyService(); | 45 void InitializePolicyService(); |
| 46 std::string GetFilteredJSONPolicies(const policy::PolicyMap& policy_map); |
44 | 47 |
45 mojo::Binding<PolicyHost> binding_; | 48 mojo::Binding<PolicyHost> binding_; |
46 policy::PolicyService* policy_service_ = nullptr; | 49 policy::PolicyService* policy_service_ = nullptr; |
47 | 50 |
48 DISALLOW_COPY_AND_ASSIGN(ArcPolicyBridge); | 51 DISALLOW_COPY_AND_ASSIGN(ArcPolicyBridge); |
49 }; | 52 }; |
50 | 53 |
51 } // namespace arc | 54 } // namespace arc |
52 | 55 |
53 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ |
OLD | NEW |