OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // disassociated from a given user (e.g. during signout). No policy will be | 66 // disassociated from a given user (e.g. during signout). No policy will be |
67 // provided by this object until the next time Initialize() is invoked. | 67 // provided by this object until the next time Initialize() is invoked. |
68 void DisconnectAndRemovePolicy(); | 68 void DisconnectAndRemovePolicy(); |
69 | 69 |
70 // Returns true if the underlying CloudPolicyClient is already registered. | 70 // Returns true if the underlying CloudPolicyClient is already registered. |
71 // Virtual for mocking. | 71 // Virtual for mocking. |
72 virtual bool IsClientRegistered() const; | 72 virtual bool IsClientRegistered() const; |
73 | 73 |
74 // Creates a CloudPolicyClient for this client. Used in situations where | 74 // Creates a CloudPolicyClient for this client. Used in situations where |
75 // callers want to create a DMToken without actually initializing the | 75 // callers want to create a DMToken without actually initializing the |
76 // profile's policy infrastructure. | 76 // profile's policy infrastructure (for example, during signin when we |
| 77 // want to check if the user's domain requires policy). |
77 static scoped_ptr<CloudPolicyClient> CreateCloudPolicyClient( | 78 static scoped_ptr<CloudPolicyClient> CreateCloudPolicyClient( |
78 DeviceManagementService* device_management_service, | 79 DeviceManagementService* device_management_service, |
79 scoped_refptr<net::URLRequestContextGetter> request_context); | 80 scoped_refptr<net::URLRequestContextGetter> request_context); |
80 | 81 |
81 private: | 82 private: |
82 // Typed pointer to the store owned by UserCloudPolicyManager. Note that | 83 // Typed pointer to the store owned by UserCloudPolicyManager. Note that |
83 // CloudPolicyManager only keeps a plain CloudPolicyStore pointer. | 84 // CloudPolicyManager only keeps a plain CloudPolicyStore pointer. |
84 scoped_ptr<UserCloudPolicyStore> store_; | 85 scoped_ptr<UserCloudPolicyStore> store_; |
85 | 86 |
86 // Path where policy for components will be cached. | 87 // Path where policy for components will be cached. |
87 base::FilePath component_policy_cache_path_; | 88 base::FilePath component_policy_cache_path_; |
88 | 89 |
89 // Manages external data referenced by policies. | 90 // Manages external data referenced by policies. |
90 scoped_ptr<CloudExternalDataManager> external_data_manager_; | 91 scoped_ptr<CloudExternalDataManager> external_data_manager_; |
91 | 92 |
92 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); | 93 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); |
93 }; | 94 }; |
94 | 95 |
95 } // namespace policy | 96 } // namespace policy |
96 | 97 |
97 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 98 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
OLD | NEW |