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

Side by Side Diff: chrome/browser/policy/user_policy_signin_service.h

Issue 12310009: Merge 182705 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/policy/user_policy_signin_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_USER_POLICY_SIGNIN_SERVICE_H_ 5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_H_
6 #define CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_H_ 6 #define CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Fetches an OAuth token to allow the cloud policy service to register with 98 // Fetches an OAuth token to allow the cloud policy service to register with
99 // the cloud policy server. |oauth_login_token| should contain an OAuth login 99 // the cloud policy server. |oauth_login_token| should contain an OAuth login
100 // refresh token that can be downscoped to get an access token for the 100 // refresh token that can be downscoped to get an access token for the
101 // device_management service. 101 // device_management service.
102 void RegisterCloudPolicyService(std::string oauth_login_token); 102 void RegisterCloudPolicyService(std::string oauth_login_token);
103 103
104 // Callback invoked when policy registration has finished. 104 // Callback invoked when policy registration has finished.
105 void OnRegistrationComplete(); 105 void OnRegistrationComplete();
106 106
107 // Helper routine which prohibits user signout if the user is registered for
108 // cloud policy.
109 void ProhibitSignoutIfNeeded();
110
107 // Helper routines to (un)register for CloudPolicyService and 111 // Helper routines to (un)register for CloudPolicyService and
108 // CloudPolicyClient notifications. 112 // CloudPolicyClient notifications.
109 void StartObserving(); 113 void StartObserving();
110 void StopObserving(); 114 void StopObserving();
111 115
112 // Shuts down the UserCloudPolicyManager (for example, after the user signs 116 // Shuts down the UserCloudPolicyManager (for example, after the user signs
113 // out) and deletes any cached policy. 117 // out) and deletes any cached policy.
114 void ShutdownUserCloudPolicyManager(); 118 void ShutdownUserCloudPolicyManager();
115 119
116 // Invoked when a policy registration request is complete. 120 // Invoked when a policy registration request is complete.
117 void CallPolicyRegistrationCallback(scoped_ptr<CloudPolicyClient> client, 121 void CallPolicyRegistrationCallback(scoped_ptr<CloudPolicyClient> client,
118 PolicyRegistrationCallback callback); 122 PolicyRegistrationCallback callback);
119 123
120 // Convenience helper to get the UserCloudPolicyManager for |profile_|. 124 // Convenience helper to get the UserCloudPolicyManager for |profile_|.
121 UserCloudPolicyManager* GetManager(); 125 UserCloudPolicyManager* GetManager();
122 126
123 // Weak pointer to the profile this service is associated with. 127 // Weak pointer to the profile this service is associated with.
124 Profile* profile_; 128 Profile* profile_;
125 129
126 content::NotificationRegistrar registrar_; 130 content::NotificationRegistrar registrar_;
127 131
128 scoped_ptr<CloudPolicyClientRegistrationHelper> registration_helper_; 132 scoped_ptr<CloudPolicyClientRegistrationHelper> registration_helper_;
129 133
130 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninService); 134 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninService);
131 }; 135 };
132 136
133 } // namespace policy 137 } // namespace policy
134 138
135 #endif // CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_H_ 139 #endif // CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/user_policy_signin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698