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