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

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

Issue 11415094: Split UserCloudPolicyManager implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DeviceCloudPolicyManagerChromeOSTest.EnrolledDevice failure. 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/user_policy_signin_service.h
diff --git a/chrome/browser/policy/user_policy_signin_service.h b/chrome/browser/policy/user_policy_signin_service.h
index c39bd48197188724d0435997224d1d129e1a3d94..8fab6fa3f524a95aa8130eea06201c99b2c2f432 100644
--- a/chrome/browser/policy/user_policy_signin_service.h
+++ b/chrome/browser/policy/user_policy_signin_service.h
@@ -35,7 +35,7 @@ class UserPolicySigninService
public content::NotificationObserver {
public:
// Creates a UserPolicySigninService associated with the passed |profile|.
- UserPolicySigninService(Profile* profile, UserCloudPolicyManager* manager);
+ explicit UserPolicySigninService(Profile* profile);
virtual ~UserPolicySigninService();
// content::NotificationObserver implementation.
@@ -51,6 +51,9 @@ class UserPolicySigninService
const base::Time& expiration_time) OVERRIDE;
virtual void OnGetTokenFailure(const GoogleServiceAuthError& error) OVERRIDE;
+ // ProfileKeyedService implementation:
+ virtual void Shutdown() OVERRIDE;
+
private:
// Initializes the UserCloudPolicyManager to reflect the currently-signed-in
// user.
@@ -63,16 +66,15 @@ class UserPolicySigninService
// Helper routine to unregister for CloudPolicyService notifications.
void StopObserving();
+ // Convenience helper to get the UserCloudPolicyManager for |profile_|.
+ UserCloudPolicyManager* GetManager();
+
// Weak pointer to the profile this service is associated with.
Profile* profile_;
content::NotificationRegistrar registrar_;
scoped_ptr<OAuth2AccessTokenFetcher> oauth2_access_token_fetcher_;
- // Weak pointer to the UserCloudPolicyManager (allows dependency injection
- // for tests).
- UserCloudPolicyManager* manager_;
-
DISALLOW_COPY_AND_ASSIGN(UserPolicySigninService);
};
« no previous file with comments | « chrome/browser/policy/user_cloud_policy_store_chromeos.cc ('k') | chrome/browser/policy/user_policy_signin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698