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

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

Issue 11415094: Split UserCloudPolicyManager implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Crazy ProfileKeyedService hackery. Created 8 years, 1 month 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 c8b5834d0960f42099940c9ab3f458f574d24dfa..5b5407191fb6b617e44656b630d2e6310fd22e92 100644
--- a/chrome/browser/policy/browser_policy_connector.h
+++ b/chrome/browser/policy/browser_policy_connector.h
@@ -32,7 +32,7 @@ class DeviceManagementService;
class NetworkConfigurationUpdater;
class PolicyService;
class PolicyStatisticsCollector;
-class UserCloudPolicyManager;
+class UserCloudPolicyManagerChromeOS;
class UserPolicyTokenCache;
// Manages the lifecycle of browser-global policy infrastructure, such as the
@@ -62,16 +62,6 @@ class BrowserPolicyConnector : public content::NotificationObserver {
// Returns true if Init() has been called but Shutdown() hasn't been yet.
bool is_initialized() const { return is_initialized_; }
- // Creates a UserCloudPolicyManager for the given profile, or returns NULL if
- // it is not supported on this platform. If |force_immediate_policy_load| is
- // true, then any underlying policy files will be loaded before this routine
- // returns - this is used when the caller (such as
- // CreateProfile(CREATE_MODE_SYNCHRONOUS)) needs to access the policy values
- // immediately without waiting for tasks to complete.
- scoped_ptr<UserCloudPolicyManager> CreateCloudPolicyManager(
- Profile* profile,
- bool force_immediate_policy_load);
-
// Creates a new policy service for the given profile.
scoped_ptr<PolicyService> CreatePolicyService(Profile* profile);
@@ -174,6 +164,9 @@ class BrowserPolicyConnector : public content::NotificationObserver {
DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() {
return device_cloud_policy_manager_.get();
}
+ UserCloudPolicyManagerChromeOS* GetUserCloudPolicyManager() {
+ return user_cloud_policy_manager_.get();
+ }
#endif
// Sets a |provider| that will be included in PolicyServices returned by
@@ -232,8 +225,14 @@ class BrowserPolicyConnector : public content::NotificationObserver {
#if defined(OS_CHROMEOS)
scoped_ptr<EnterpriseInstallAttributes> install_attributes_;
scoped_ptr<DeviceCloudPolicyManagerChromeOS> device_cloud_policy_manager_;
+ scoped_ptr<UserCloudPolicyManagerChromeOS> user_cloud_policy_manager_;
+
+ // This policy provider is used on Chrome OS to feed user policy into the
+ // global PolicyService instance. This works by installing
+ // |user_cloud_policy_manager_| as the delegate once the former is
+ // initialized.
+ ProxyPolicyProvider global_user_cloud_policy_provider_;
#endif
- ProxyPolicyProvider user_cloud_policy_provider_;
// Must be deleted before all the policy providers.
scoped_ptr<PolicyService> policy_service_;

Powered by Google App Engine
This is Rietveld 408576698