Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6343)

Unified Diff: chrome/browser/policy/browser_policy_connector.h

Issue 10693022: Add support for loading user cloud policy on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaked some comments after self-review. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/browser_policy_connector.h
diff --git a/chrome/browser/policy/browser_policy_connector.h b/chrome/browser/policy/browser_policy_connector.h
index 818c2bfaec921ad072a21d122ef03b625e9a0db9..69abbfce4636b21f3189f4a3c47509ae34ac83a9 100644
--- a/chrome/browser/policy/browser_policy_connector.h
+++ b/chrome/browser/policy/browser_policy_connector.h
@@ -50,7 +50,7 @@ class BrowserPolicyConnector : public content::NotificationObserver {
// Creates a new policy service for the given profile, or a global one if
// it is NULL. Ownership is transferred to the caller.
- PolicyService* CreatePolicyService(Profile* profile);
+ scoped_ptr<PolicyService> CreatePolicyService(Profile* profile);
// Returns a weak pointer to the CloudPolicySubsystem corresponding to the
// device policy managed by this policy connector, or NULL if no such
@@ -140,6 +140,10 @@ class BrowserPolicyConnector : public content::NotificationObserver {
AppPackUpdater* GetAppPackUpdater();
+ DeviceManagementService* device_management_service() {
+ return device_management_service_.get();
+ }
+
// Sets a |provider| that will be included in PolicyServices returned by
// CreatePolicyService. This is a static method because local state is
// created immediately after the connector, and tests don't have a chance to
@@ -148,6 +152,10 @@ class BrowserPolicyConnector : public content::NotificationObserver {
static void SetPolicyProviderForTesting(
ConfigurationPolicyProvider* provider);
+ // Gets the URL of the DM server (either the default or a URL provided via the
+ // command line).
+ static std::string GetDeviceManagementUrl();
+
private:
// content::NotificationObserver method overrides:
virtual void Observe(int type,
@@ -190,7 +198,6 @@ class BrowserPolicyConnector : public content::NotificationObserver {
scoped_ptr<DeviceManagementService> device_management_service_;
ProxyPolicyProvider user_cloud_policy_provider_;
- scoped_ptr<UserCloudPolicyManager> user_cloud_policy_manager_;
// Used to initialize the device policy subsystem once the message loops
// are spinning.

Powered by Google App Engine
This is Rietveld 408576698