| 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 15 matching lines...) Expand all Loading... |
| 26 public CloudPolicyClient::Observer { | 26 public CloudPolicyClient::Observer { |
| 27 public: | 27 public: |
| 28 // If |wait_for_policy_fetch| is true, IsInitializationComplete() will return | 28 // If |wait_for_policy_fetch| is true, IsInitializationComplete() will return |
| 29 // false as long as there hasn't been a successful policy fetch. | 29 // false as long as there hasn't been a successful policy fetch. |
| 30 UserCloudPolicyManagerChromeOS(scoped_ptr<CloudPolicyStore> store, | 30 UserCloudPolicyManagerChromeOS(scoped_ptr<CloudPolicyStore> store, |
| 31 bool wait_for_policy_fetch); | 31 bool wait_for_policy_fetch); |
| 32 virtual ~UserCloudPolicyManagerChromeOS(); | 32 virtual ~UserCloudPolicyManagerChromeOS(); |
| 33 | 33 |
| 34 // Initializes the cloud connection. |local_state| and | 34 // Initializes the cloud connection. |local_state| and |
| 35 // |device_management_service| must stay valid until this object is deleted. | 35 // |device_management_service| must stay valid until this object is deleted. |
| 36 void Initialize(PrefService* local_state, | 36 void Connect(PrefService* local_state, |
| 37 DeviceManagementService* device_management_service, | 37 DeviceManagementService* device_management_service, |
| 38 UserAffiliation user_affiliation); | 38 UserAffiliation user_affiliation); |
| 39 | 39 |
| 40 // Cancels waiting for the policy fetch and flags the | 40 // Cancels waiting for the policy fetch and flags the |
| 41 // ConfigurationPolicyProvider ready (assuming all other initialization tasks | 41 // ConfigurationPolicyProvider ready (assuming all other initialization tasks |
| 42 // have completed). | 42 // have completed). |
| 43 void CancelWaitForPolicyFetch(); | 43 void CancelWaitForPolicyFetch(); |
| 44 | 44 |
| 45 // Register the CloudPolicyClient using the passed OAuth token. | 45 // Register the CloudPolicyClient using the passed OAuth token. |
| 46 void RegisterClient(const std::string& access_token); | 46 void RegisterClient(const std::string& access_token); |
| 47 | 47 |
| 48 // Returns true if the underlying CloudPolicyClient is already registered. | 48 // Returns true if the underlying CloudPolicyClient is already registered. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 71 | 71 |
| 72 // The pref service to pass to the refresh scheduler on initialization. | 72 // The pref service to pass to the refresh scheduler on initialization. |
| 73 PrefService* local_state_; | 73 PrefService* local_state_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 75 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace policy | 78 } // namespace policy |
| 79 | 79 |
| 80 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 80 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
| OLD | NEW |