| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Completion handler for the explicit policy fetch triggered on startup in | 101 // Completion handler for the explicit policy fetch triggered on startup in |
| 102 // case |wait_for_policy_fetch_| is true. |success| is true if the fetch was | 102 // case |wait_for_policy_fetch_| is true. |success| is true if the fetch was |
| 103 // successful. | 103 // successful. |
| 104 void OnInitialPolicyFetchComplete(bool success); | 104 void OnInitialPolicyFetchComplete(bool success); |
| 105 | 105 |
| 106 // Cancels waiting for the policy fetch and flags the | 106 // Cancels waiting for the policy fetch and flags the |
| 107 // ConfigurationPolicyProvider ready (assuming all other initialization tasks | 107 // ConfigurationPolicyProvider ready (assuming all other initialization tasks |
| 108 // have completed). | 108 // have completed). |
| 109 void CancelWaitForPolicyFetch(); | 109 void CancelWaitForPolicyFetch(); |
| 110 | 110 |
| 111 void StartRefreshScheduler(); | 111 void StartRefreshSchedulerIfReady(); |
| 112 | 112 |
| 113 // Owns the store, note that CloudPolicyManager just keeps a plain pointer. | 113 // Owns the store, note that CloudPolicyManager just keeps a plain pointer. |
| 114 scoped_ptr<CloudPolicyStore> store_; | 114 scoped_ptr<CloudPolicyStore> store_; |
| 115 | 115 |
| 116 // Handles fetching and storing cloud policy for components. It uses the | 116 // Handles fetching and storing cloud policy for components. It uses the |
| 117 // |store_|, so destroy it first. | 117 // |store_|, so destroy it first. |
| 118 scoped_ptr<ComponentCloudPolicyService> component_policy_service_; | 118 scoped_ptr<ComponentCloudPolicyService> component_policy_service_; |
| 119 | 119 |
| 120 // Whether to wait for a policy fetch to complete before reporting | 120 // Whether to wait for a policy fetch to complete before reporting |
| 121 // IsInitializationComplete(). | 121 // IsInitializationComplete(). |
| 122 bool wait_for_policy_fetch_; | 122 bool wait_for_policy_fetch_; |
| 123 | 123 |
| 124 // The pref service to pass to the refresh scheduler on initialization. | 124 // The pref service to pass to the refresh scheduler on initialization. |
| 125 PrefService* local_state_; | 125 PrefService* local_state_; |
| 126 | 126 |
| 127 // Used to fetch the policy OAuth token, when necessary. This object holds | 127 // Used to fetch the policy OAuth token, when necessary. This object holds |
| 128 // a callback with an unretained reference to the manager, when it exists. | 128 // a callback with an unretained reference to the manager, when it exists. |
| 129 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; | 129 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; |
| 130 | 130 |
| 131 // The OAuth2 login tokens fetched by the |token_fetcher_|, which can be | 131 // The OAuth2 login tokens fetched by the |token_fetcher_|, which can be |
| 132 // retrieved using oauth2_tokens(). | 132 // retrieved using oauth2_tokens(). |
| 133 GaiaAuthConsumer::ClientOAuthResult oauth2_login_tokens_; | 133 GaiaAuthConsumer::ClientOAuthResult oauth2_login_tokens_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 135 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace policy | 138 } // namespace policy |
| 139 | 139 |
| 140 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 140 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| OLD | NEW |