| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // for managed Profiles or an empty string for unmanaged Profiles. You must | 55 // for managed Profiles or an empty string for unmanaged Profiles. You must |
| 56 // call this method only when the policies system is fully initialized. | 56 // call this method only when the policies system is fully initialized. |
| 57 std::string GetManagementDomain() const; | 57 std::string GetManagementDomain() const; |
| 58 | 58 |
| 59 // Returns true if the |policy_key| user policy is currently set via the | 59 // Returns true if the |policy_key| user policy is currently set via the |
| 60 // |configuration_policy_provider_| and isn't being overridden by a | 60 // |configuration_policy_provider_| and isn't being overridden by a |
| 61 // higher-level provider. | 61 // higher-level provider. |
| 62 bool IsProfilePolicy(const char* policy_key) const; | 62 bool IsProfilePolicy(const char* policy_key) const; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // Returns the policy store which is actually used. |
| 66 const CloudPolicyStore* GetActualPolicyStore() const; |
| 67 |
| 65 // Find the policy provider that provides the |policy_key| policy, if any. In | 68 // Find the policy provider that provides the |policy_key| policy, if any. In |
| 66 // case of multiple providers sharing the same policy, the one with the | 69 // case of multiple providers sharing the same policy, the one with the |
| 67 // highest priority will be returned. | 70 // highest priority will be returned. |
| 68 const ConfigurationPolicyProvider* DeterminePolicyProviderForPolicy( | 71 const ConfigurationPolicyProvider* DeterminePolicyProviderForPolicy( |
| 69 const char* policy_key) const; | 72 const char* policy_key) const; |
| 70 | 73 |
| 71 #if defined(OS_CHROMEOS) | 74 #if defined(OS_CHROMEOS) |
| 72 // Some of the user policy configuration affects browser global state, and | 75 // Some of the user policy configuration affects browser global state, and |
| 73 // can only come from one Profile. |is_primary_user_| is true if this | 76 // can only come from one Profile. |is_primary_user_| is true if this |
| 74 // connector belongs to the first signed-in Profile, and in that case that | 77 // connector belongs to the first signed-in Profile, and in that case that |
| (...skipping 21 matching lines...) Expand all Loading... |
| 96 | 99 |
| 97 std::unique_ptr<PolicyService> policy_service_; | 100 std::unique_ptr<PolicyService> policy_service_; |
| 98 std::unique_ptr<bool> is_managed_override_; | 101 std::unique_ptr<bool> is_managed_override_; |
| 99 | 102 |
| 100 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); | 103 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); |
| 101 }; | 104 }; |
| 102 | 105 |
| 103 } // namespace policy | 106 } // namespace policy |
| 104 | 107 |
| 105 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 108 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| OLD | NEW |