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_POLICY_ARC_POLICY_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_POLICY_BRIDGE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_POLICY_BRIDGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_POLICY_BRIDGE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 class ArcPolicyBridge : public ArcService, | 39 class ArcPolicyBridge : public ArcService, |
40 public InstanceHolder<mojom::PolicyInstance>::Observer, | 40 public InstanceHolder<mojom::PolicyInstance>::Observer, |
41 public mojom::PolicyHost, | 41 public mojom::PolicyHost, |
42 public policy::PolicyService::Observer { | 42 public policy::PolicyService::Observer { |
43 public: | 43 public: |
44 explicit ArcPolicyBridge(ArcBridgeService* bridge_service); | 44 explicit ArcPolicyBridge(ArcBridgeService* bridge_service); |
45 ArcPolicyBridge(ArcBridgeService* bridge_service, | 45 ArcPolicyBridge(ArcBridgeService* bridge_service, |
46 policy::PolicyService* policy_service); | 46 policy::PolicyService* policy_service); |
47 ~ArcPolicyBridge() override; | 47 ~ArcPolicyBridge() override; |
48 | 48 |
| 49 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 50 |
49 void OverrideIsManagedForTesting(bool is_managed); | 51 void OverrideIsManagedForTesting(bool is_managed); |
50 | 52 |
51 // InstanceHolder<mojom::PolicyInstance>::Observer overrides. | 53 // InstanceHolder<mojom::PolicyInstance>::Observer overrides. |
52 void OnInstanceReady() override; | 54 void OnInstanceReady() override; |
53 void OnInstanceClosed() override; | 55 void OnInstanceClosed() override; |
54 | 56 |
55 // PolicyHost overrides. | 57 // PolicyHost overrides. |
56 void GetPolicies(const GetPoliciesCallback& callback) override; | 58 void GetPolicies(const GetPoliciesCallback& callback) override; |
57 void ReportCompliance(const std::string& request, | 59 void ReportCompliance(const std::string& request, |
58 const ReportComplianceCallback& callback) override; | 60 const ReportComplianceCallback& callback) override; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 98 |
97 // Must be the last member. | 99 // Must be the last member. |
98 base::WeakPtrFactory<ArcPolicyBridge> weak_ptr_factory_; | 100 base::WeakPtrFactory<ArcPolicyBridge> weak_ptr_factory_; |
99 | 101 |
100 DISALLOW_COPY_AND_ASSIGN(ArcPolicyBridge); | 102 DISALLOW_COPY_AND_ASSIGN(ArcPolicyBridge); |
101 }; | 103 }; |
102 | 104 |
103 } // namespace arc | 105 } // namespace arc |
104 | 106 |
105 #endif // CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_POLICY_BRIDGE_H_ | 107 #endif // CHROME_BROWSER_CHROMEOS_ARC_POLICY_ARC_POLICY_BRIDGE_H_ |
OLD | NEW |