diff options
author | jkummerow@chromium.org <jkummerow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 10:59:08 +0000 |
---|---|---|
committer | jkummerow@chromium.org <jkummerow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 10:59:08 +0000 |
commit | 6ced4e79b6b816022957ca3dbad7712b49aa2f36 (patch) | |
tree | 1ab8d3426c1f5f902745b37d20382a4befdd97f0 /chrome/browser/policy/browser_policy_connector.h | |
parent | 087b8c8ecf6630ab31d30913148e0e613a0ab881 (diff) | |
download | chromium_src-6ced4e79b6b816022957ca3dbad7712b49aa2f36.zip chromium_src-6ced4e79b6b816022957ca3dbad7712b49aa2f36.tar.gz chromium_src-6ced4e79b6b816022957ca3dbad7712b49aa2f36.tar.bz2 |
Provide backend methods for device enrollment UI
BUG=chromium-os:13277
TEST=Existing unit tests
Review URL: http://codereview.chromium.org/6794022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/browser_policy_connector.h')
-rw-r--r-- | chrome/browser/policy/browser_policy_connector.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/chrome/browser/policy/browser_policy_connector.h b/chrome/browser/policy/browser_policy_connector.h index 2271f213..93995c8 100644 --- a/chrome/browser/policy/browser_policy_connector.h +++ b/chrome/browser/policy/browser_policy_connector.h @@ -6,6 +6,8 @@ #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ #pragma once +#include <string> + #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "content/common/notification_observer.h" @@ -21,9 +23,9 @@ class URLRequestContextGetter; namespace policy { -class CloudPolicyIdentityStrategy; class CloudPolicySubsystem; class ConfigurationPolicyProvider; +class DevicePolicyIdentityStrategy; // Manages the lifecycle of browser-global policy infrastructure, such as the // platform policy providers. @@ -40,8 +42,30 @@ class BrowserPolicyConnector : public NotificationObserver { ConfigurationPolicyProvider* GetRecommendedPlatformProvider() const; ConfigurationPolicyProvider* GetRecommendedCloudProvider() const; + // Returns a weak pointer to the CloudPolicySubsystem managed by this + // policy connector, or NULL if no such subsystem exists (i.e. when running + // outside ChromeOS). + CloudPolicySubsystem* cloud_policy_subsystem() { + return cloud_policy_subsystem_.get(); + } + static void RegisterPrefs(PrefService* user_prefs); + // Used to set the credentials stored in the identity strategy associated + // with this policy connector. + void SetCredentials(const std::string& owner_email, + const std::string& gaia_token, + const std::string& machine_id); + + // Returns true if this device is managed by an enterprise (as opposed to + // a local owner). + bool IsEnterpriseManaged(); + + // Exposes the StopAutoRetry() method of the CloudPolicySubsystem managed + // by this connector, which can be used to disable automatic + // retrying behavior. + void StopAutoRetry(); + // NotificationObserver implementation: virtual void Observe(NotificationType type, const NotificationSource& source, @@ -67,7 +91,9 @@ class BrowserPolicyConnector : public NotificationObserver { scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; - scoped_ptr<CloudPolicyIdentityStrategy> identity_strategy_; +#if defined(OS_CHROMEOS) + scoped_ptr<DevicePolicyIdentityStrategy> identity_strategy_; +#endif scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_; NotificationRegistrar registrar_; |