Index: chrome/browser/policy/user_cloud_policy_manager.h |
diff --git a/chrome/browser/policy/user_cloud_policy_manager.h b/chrome/browser/policy/user_cloud_policy_manager.h |
index 8db19d03274f47c1be9e8bba9c9c2ca67fa578bc..98c59e2670f508478aa0f54cbefda4edfe388851 100644 |
--- a/chrome/browser/policy/user_cloud_policy_manager.h |
+++ b/chrome/browser/policy/user_cloud_policy_manager.h |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/policy/configuration_policy_provider.h" |
class PrefService; |
+class Profile; |
namespace policy { |
@@ -33,23 +34,32 @@ class UserCloudPolicyManager : public ConfigurationPolicyProvider, |
bool wait_for_policy_fetch); |
virtual ~UserCloudPolicyManager(); |
-#if defined(OS_CHROMEOS) |
- // Creates a UserCloudPolicyService instance for the Chrome OS platform. |
- static scoped_ptr<UserCloudPolicyManager> Create(bool wait_for_policy_fetch); |
-#endif |
+ // Creates a UserCloudPolicyService instance associated with the passed |
+ // |profile|. |
+ static scoped_ptr<UserCloudPolicyManager> Create(Profile* profile, |
+ bool wait_for_policy_fetch); |
- // Initializes the cloud connection. |prefs| and |service| must stay valid |
- // until Shutdown() gets called. |
- void Initialize(PrefService* prefs, |
- DeviceManagementService* service, |
- UserAffiliation user_affiliation); |
- void Shutdown(); |
+ // Initializes the cloud connection. |local_prefs| and |service| must stay |
+ // valid until Shutdown() gets called. Virtual for mocking. |
+ virtual void Initialize(PrefService* local_prefs, |
+ DeviceManagementService* service, |
+ UserAffiliation user_affiliation); |
+ |
+ // Virtual for mocks. |
+ virtual void Shutdown(); |
// Cancels waiting for the policy fetch and flags the |
// ConfigurationPolicyProvider ready (assuming all other initialization tasks |
// have completed). |
void CancelWaitForPolicyFetch(); |
+ // Returns true if the underlying CloudPolicyClient is already registered. |
+ // Virtual for mocking. |
+ virtual bool IsClientRegistered() const; |
+ |
+ // Register the CloudPolicyClient using the passed OAuth token. |
+ void RegisterClient(const std::string& access_token); |
+ |
CloudPolicyService* cloud_policy_service() { return service_.get(); } |
// ConfigurationPolicyProvider: |