| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 5 #ifndef CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // A KeyedService that creates and manages the per-Profile policy components. | 27 // A KeyedService that creates and manages the per-Profile policy components. |
| 28 class ProfilePolicyConnector : public KeyedService { | 28 class ProfilePolicyConnector : public KeyedService { |
| 29 public: | 29 public: |
| 30 ProfilePolicyConnector(); | 30 ProfilePolicyConnector(); |
| 31 ~ProfilePolicyConnector() override; | 31 ~ProfilePolicyConnector() override; |
| 32 | 32 |
| 33 // |user| is only used in Chrome OS builds and should be set to nullptr | 33 // |user| is only used in Chrome OS builds and should be set to nullptr |
| 34 // otherwise. |configuration_policy_provider| and |policy_store| are nullptr | 34 // otherwise. |configuration_policy_provider| and |policy_store| are nullptr |
| 35 // for non-regular users. | 35 // for non-regular users. |
| 36 // If |force_immediate_load| is true, DeviceLocalAccountPolicy is loaded |
| 37 // synchronously. |
| 36 void Init(const user_manager::User* user, | 38 void Init(const user_manager::User* user, |
| 37 SchemaRegistry* schema_registry, | 39 SchemaRegistry* schema_registry, |
| 38 ConfigurationPolicyProvider* configuration_policy_provider, | 40 ConfigurationPolicyProvider* configuration_policy_provider, |
| 39 const CloudPolicyStore* policy_store); | 41 const CloudPolicyStore* policy_store, |
| 42 bool force_immediate_load); |
| 40 | 43 |
| 41 void InitForTesting(std::unique_ptr<PolicyService> service); | 44 void InitForTesting(std::unique_ptr<PolicyService> service); |
| 42 void OverrideIsManagedForTesting(bool is_managed); | 45 void OverrideIsManagedForTesting(bool is_managed); |
| 43 | 46 |
| 44 // KeyedService: | 47 // KeyedService: |
| 45 void Shutdown() override; | 48 void Shutdown() override; |
| 46 | 49 |
| 47 // This is never NULL. | 50 // This is never NULL. |
| 48 PolicyService* policy_service() const { return policy_service_.get(); } | 51 PolicyService* policy_service() const { return policy_service_.get(); } |
| 49 | 52 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 102 |
| 100 std::unique_ptr<PolicyService> policy_service_; | 103 std::unique_ptr<PolicyService> policy_service_; |
| 101 std::unique_ptr<bool> is_managed_override_; | 104 std::unique_ptr<bool> is_managed_override_; |
| 102 | 105 |
| 103 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); | 106 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 } // namespace policy | 109 } // namespace policy |
| 107 | 110 |
| 108 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 111 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| OLD | NEW |