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

Side by Side Diff: chrome/browser/policy/cloud/user_policy_signin_service_base.h

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_BASE_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_BASE_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_BASE_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // signs-in and an OAuth2 login refresh token becomes available. 104 // signs-in and an OAuth2 login refresh token becomes available.
105 void InitializeForSignedInUser(const std::string& username); 105 void InitializeForSignedInUser(const std::string& username);
106 106
107 // Initializes the cloud policy manager with the passed |client|. This is 107 // Initializes the cloud policy manager with the passed |client|. This is
108 // called from InitializeForSignedInUser() when the Profile already has a 108 // called from InitializeForSignedInUser() when the Profile already has a
109 // signed in account at startup, and from FetchPolicyForSignedInUser() during 109 // signed in account at startup, and from FetchPolicyForSignedInUser() during
110 // the initial policy fetch after signing in. 110 // the initial policy fetch after signing in.
111 virtual void InitializeUserCloudPolicyManager( 111 virtual void InitializeUserCloudPolicyManager(
112 scoped_ptr<CloudPolicyClient> client); 112 scoped_ptr<CloudPolicyClient> client);
113 113
114 // Prepares for the UserCloudPolicyManager to be shutdown due to
115 // user signout or profile destruction.
116 virtual void PrepareForUserCloudPolicyManagerShutdown();
117
114 // Shuts down the UserCloudPolicyManager (for example, after the user signs 118 // Shuts down the UserCloudPolicyManager (for example, after the user signs
115 // out) and deletes any cached policy. 119 // out) and deletes any cached policy.
116 virtual void ShutdownUserCloudPolicyManager(); 120 virtual void ShutdownUserCloudPolicyManager();
117 121
118 // Convenience helper to get the UserCloudPolicyManager for |profile_|. 122 // Convenience helper to get the UserCloudPolicyManager for |profile_|.
119 UserCloudPolicyManager* GetManager(); 123 UserCloudPolicyManager* GetManager();
120 124
121 Profile* profile() { return profile_; } 125 Profile* profile() { return profile_; }
122 content::NotificationRegistrar* registrar() { return &registrar_; } 126 content::NotificationRegistrar* registrar() { return &registrar_; }
123 127
124 private: 128 private:
125 // Weak pointer to the profile this service is associated with. 129 // Weak pointer to the profile this service is associated with.
126 Profile* profile_; 130 Profile* profile_;
127 131
128 content::NotificationRegistrar registrar_; 132 content::NotificationRegistrar registrar_;
129 133
130 base::WeakPtrFactory<UserPolicySigninServiceBase> weak_factory_; 134 base::WeakPtrFactory<UserPolicySigninServiceBase> weak_factory_;
131 135
132 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninServiceBase); 136 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninServiceBase);
133 }; 137 };
134 138
135 } // namespace policy 139 } // namespace policy
136 140
137 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_BASE_H_ 141 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698