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

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

Issue 10854213: Added UserCloudPolicyManager::ShutdownAndRemovePolicy() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/browser/policy/mock_cloud_policy_store.h ('k') | chrome/browser/policy/user_cloud_policy_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98c59e2670f508478aa0f54cbefda4edfe388851..3f74a6c52b5efa788c35939fdd34f4a8e2344dcd 100644
--- a/chrome/browser/policy/user_cloud_policy_manager.h
+++ b/chrome/browser/policy/user_cloud_policy_manager.h
@@ -40,13 +40,17 @@ class UserCloudPolicyManager : public ConfigurationPolicyProvider,
bool wait_for_policy_fetch);
// Initializes the cloud connection. |local_prefs| and |service| must stay
- // valid until Shutdown() gets called. Virtual for mocking.
+ // valid until this object is deleted or ShutdownAndRemovePolicy() gets
+ // called. Virtual for mocking.
virtual void Initialize(PrefService* local_prefs,
DeviceManagementService* service,
UserAffiliation user_affiliation);
- // Virtual for mocks.
- virtual void Shutdown();
+ // Shuts down the UserCloudPolicyManager (removes and stops refreshing the
+ // cached cloud policy). This is typically called when a profile is being
+ // disassociated from a given user (e.g. during signout). No policy will be
+ // provided by this object until the next time Initialize() is invoked.
+ void ShutdownAndRemovePolicy();
// Cancels waiting for the policy fetch and flags the
// ConfigurationPolicyProvider ready (assuming all other initialization tasks
@@ -87,6 +91,10 @@ class UserCloudPolicyManager : public ConfigurationPolicyProvider,
// Completion handler for policy refresh operations.
void OnRefreshComplete();
+ // Frees the CloudPolicyService and stops refreshing policy. Any previously
+ // cached policy will continue to be served.
+ void Shutdown();
+
// Whether to wait for a policy fetch to complete before reporting
// IsInitializationComplete().
bool wait_for_policy_fetch_;
« no previous file with comments | « chrome/browser/policy/mock_cloud_policy_store.h ('k') | chrome/browser/policy/user_cloud_policy_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698