Index: chrome/browser/policy/profile_policy_context.h |
diff --git a/chrome/browser/policy/profile_policy_context.h b/chrome/browser/policy/profile_policy_context.h |
index 8650ec54dba262fe5aa6e94647fc1e777fa4ee05..43ee07732804191d40bf2569d9f853b40cfc0c8b 100644 |
--- a/chrome/browser/policy/profile_policy_context.h |
+++ b/chrome/browser/policy/profile_policy_context.h |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -6,22 +6,22 @@ |
#define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONTEXT_H_ |
#pragma once |
+#include "base/basictypes.h" |
#include "base/scoped_ptr.h" |
-#include "chrome/browser/prefs/pref_member.h" |
-#include "chrome/common/notification_observer.h" |
class Profile; |
namespace policy { |
-class DeviceManagementPolicyProvider; |
-class DeviceManagementService; |
+class CloudPolicyContext; |
+class ConfigurationPolicyProvider; |
+class UserPolicyController; |
// This class is a container for the profile-specific policy bits located in the |
// profile. Since the context owns the policy provider, it's vital that it gets |
// initialized before the profile's prefs and destroyed after the prefs are |
// gone. |
-class ProfilePolicyContext : public NotificationObserver { |
+class ProfilePolicyContext { |
public: |
explicit ProfilePolicyContext(Profile* profile); |
~ProfilePolicyContext(); |
@@ -34,35 +34,21 @@ class ProfilePolicyContext : public NotificationObserver { |
// infrastructure in the profile goes away. |
void Shutdown(); |
- // Get the policy provider. |
- DeviceManagementPolicyProvider* GetDeviceManagementPolicyProvider(); |
+ ConfigurationPolicyProvider* GetManagedPolicyProvider(); |
+ ConfigurationPolicyProvider* GetRecommendedPolicyProvider(); |
- // Register preferences. |
- static void RegisterUserPrefs(PrefService* user_prefs); |
+ static void RegisterPrefs(PrefService* user_prefs); |
static const int kDefaultPolicyRefreshRateInMilliseconds = |
3 * 60 * 60 * 1000; // 3 hours. |
private: |
- // Updates the policy provider with a new refresh rate value. |
- void UpdatePolicyRefreshRate(); |
- |
- // NotificationObserver overrides. |
- virtual void Observe(NotificationType type, |
- const NotificationSource& source, |
- const NotificationDetails& details); |
- |
- // The profile this context is associated with. |
Profile* profile_; |
- // Tracks the pref value for the policy refresh rate. |
- IntegerPrefMember policy_refresh_rate_; |
- |
- // The device management service. |
- scoped_ptr<DeviceManagementService> device_management_service_; |
+ scoped_ptr<UserPolicyController> controller_; |
+ scoped_ptr<CloudPolicyContext> cloud_context_; |
- // Our provider. |
- scoped_ptr<DeviceManagementPolicyProvider> device_management_policy_provider_; |
+ DISALLOW_COPY_AND_ASSIGN(ProfilePolicyContext); |
}; |
} // namespace policy |