| 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_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual void Shutdown() OVERRIDE; | 52 virtual void Shutdown() OVERRIDE; |
| 53 virtual bool IsInitializationComplete() const OVERRIDE; | 53 virtual bool IsInitializationComplete() const OVERRIDE; |
| 54 | 54 |
| 55 // CloudPolicyClient::Observer: | 55 // CloudPolicyClient::Observer: |
| 56 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; | 56 virtual void OnPolicyFetched(CloudPolicyClient* client) OVERRIDE; |
| 57 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; | 57 virtual void OnRegistrationStateChanged(CloudPolicyClient* client) OVERRIDE; |
| 58 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; | 58 virtual void OnClientError(CloudPolicyClient* client) OVERRIDE; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 // Completion handler for the explicit policy fetch triggered on startup in | 61 // Completion handler for the explicit policy fetch triggered on startup in |
| 62 // case |wait_for_policy_fetch_| is true. | 62 // case |wait_for_policy_fetch_| is true. |success| is true if the fetch was |
| 63 void OnInitialPolicyFetchComplete(); | 63 // successful. |
| 64 void OnInitialPolicyFetchComplete(bool success); |
| 64 | 65 |
| 65 // Owns the store, note that CloudPolicyManager just keeps a plain pointer. | 66 // Owns the store, note that CloudPolicyManager just keeps a plain pointer. |
| 66 scoped_ptr<CloudPolicyStore> store_; | 67 scoped_ptr<CloudPolicyStore> store_; |
| 67 | 68 |
| 68 // Whether to wait for a policy fetch to complete before reporting | 69 // Whether to wait for a policy fetch to complete before reporting |
| 69 // IsInitializationComplete(). | 70 // IsInitializationComplete(). |
| 70 bool wait_for_policy_fetch_; | 71 bool wait_for_policy_fetch_; |
| 71 | 72 |
| 72 // The pref service to pass to the refresh scheduler on initialization. | 73 // The pref service to pass to the refresh scheduler on initialization. |
| 73 PrefService* local_state_; | 74 PrefService* local_state_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 76 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace policy | 79 } // namespace policy |
| 79 | 80 |
| 80 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 81 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| OLD | NEW |