OLD | NEW |
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 // The signin manager encapsulates some functionality tracking | 5 // The signin manager encapsulates some functionality tracking |
6 // which user is signed in. See SigninManagerBase for full description of | 6 // which user is signed in. See SigninManagerBase for full description of |
7 // responsibilities. The class defined in this file provides functionality | 7 // responsibilities. The class defined in this file provides functionality |
8 // required by all platforms except Chrome OS. | 8 // required by all platforms except Chrome OS. |
9 // | 9 // |
10 // When a user is signed in, a ClientLogin request is run on their behalf. | 10 // When a user is signed in, a ClientLogin request is run on their behalf. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // be invoked on the IO thread, and can be used to check if signin is enabled | 179 // be invoked on the IO thread, and can be used to check if signin is enabled |
180 // on that thread. | 180 // on that thread. |
181 static bool IsSigninAllowedOnIOThread(ProfileIOData* io_data); | 181 static bool IsSigninAllowedOnIOThread(ProfileIOData* io_data); |
182 | 182 |
183 // Allows the SigninManager to track the privileged signin process | 183 // Allows the SigninManager to track the privileged signin process |
184 // identified by |process_id| so that we can later ask (via IsSigninProcess) | 184 // identified by |process_id| so that we can later ask (via IsSigninProcess) |
185 // if it is safe to sign the user in from the current context (see | 185 // if it is safe to sign the user in from the current context (see |
186 // OneClickSigninHelper). All of this tracking state is reset once the | 186 // OneClickSigninHelper). All of this tracking state is reset once the |
187 // renderer process terminates. | 187 // renderer process terminates. |
188 void SetSigninProcess(int process_id); | 188 void SetSigninProcess(int process_id); |
| 189 void ClearSigninProcess(); |
189 bool IsSigninProcess(int process_id) const; | 190 bool IsSigninProcess(int process_id) const; |
190 bool HasSigninProcess() const; | 191 bool HasSigninProcess() const; |
191 | 192 |
192 protected: | 193 protected: |
193 // If user was signed in, load tokens from DB if available. | 194 // If user was signed in, load tokens from DB if available. |
194 virtual void InitTokenService() OVERRIDE; | 195 virtual void InitTokenService() OVERRIDE; |
195 | 196 |
196 // Flag saying whether signing out is allowed. | 197 // Flag saying whether signing out is allowed. |
197 bool prohibit_signout_; | 198 bool prohibit_signout_; |
198 | 199 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 298 |
298 // Helper object to listen for changes to the signin allowed preference. | 299 // Helper object to listen for changes to the signin allowed preference. |
299 BooleanPrefMember signin_allowed_; | 300 BooleanPrefMember signin_allowed_; |
300 | 301 |
301 DISALLOW_COPY_AND_ASSIGN(SigninManager); | 302 DISALLOW_COPY_AND_ASSIGN(SigninManager); |
302 }; | 303 }; |
303 | 304 |
304 #endif // !defined(OS_CHROMEOS) | 305 #endif // !defined(OS_CHROMEOS) |
305 | 306 |
306 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ | 307 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ |
OLD | NEW |