| 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. When a user is signed in, a ClientLogin | 6 // which user is signed in. When a user is signed in, a ClientLogin |
| 7 // request is run on their behalf. Auth tokens are fetched from Google | 7 // request is run on their behalf. Auth tokens are fetched from Google |
| 8 // and the results are stored in the TokenService. | 8 // and the results are stored in the TokenService. |
| 9 // | 9 // |
| 10 // **NOTE** on semantics of SigninManager: | 10 // **NOTE** on semantics of SigninManager: |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // ProfileKeyedService implementation. | 188 // ProfileKeyedService implementation. |
| 189 virtual void Shutdown() OVERRIDE; | 189 virtual void Shutdown() OVERRIDE; |
| 190 | 190 |
| 191 // Tells the SigninManager to prohibit signout for this profile. | 191 // Tells the SigninManager to prohibit signout for this profile. |
| 192 void ProhibitSignout(); | 192 void ProhibitSignout(); |
| 193 | 193 |
| 194 // If true, signout is prohibited for this profile (calls to SignOut() are | 194 // If true, signout is prohibited for this profile (calls to SignOut() are |
| 195 // ignored). | 195 // ignored). |
| 196 bool IsSignoutProhibited() const; | 196 bool IsSignoutProhibited() const; |
| 197 | 197 |
| 198 void SetSigninProcess(int process_id); |
| 199 bool IsSigninProcess(int process_id) const; |
| 200 |
| 198 protected: | 201 protected: |
| 199 // Weak pointer to parent profile (protected so FakeSigninManager can access | 202 // Weak pointer to parent profile (protected so FakeSigninManager can access |
| 200 // it). | 203 // it). |
| 201 Profile* profile_; | 204 Profile* profile_; |
| 202 | 205 |
| 203 // Used to show auth errors in the wrench menu. The SigninGlobalError is | 206 // Used to show auth errors in the wrench menu. The SigninGlobalError is |
| 204 // different than most GlobalErrors in that its lifetime is controlled by | 207 // different than most GlobalErrors in that its lifetime is controlled by |
| 205 // SigninManager (so we can expose a reference for use in the wrench menu). | 208 // SigninManager (so we can expose a reference for use in the wrench menu). |
| 206 scoped_ptr<SigninGlobalError> signin_global_error_; | 209 scoped_ptr<SigninGlobalError> signin_global_error_; |
| 207 | 210 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // with credentials. These will be passed to TokenService so that it does | 327 // with credentials. These will be passed to TokenService so that it does |
| 325 // not need to mint new ones. | 328 // not need to mint new ones. |
| 326 ClientOAuthResult temp_oauth_login_tokens_; | 329 ClientOAuthResult temp_oauth_login_tokens_; |
| 327 | 330 |
| 328 // The list of SigninDiagnosticObservers. | 331 // The list of SigninDiagnosticObservers. |
| 329 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> | 332 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> |
| 330 signin_diagnostics_observers_; | 333 signin_diagnostics_observers_; |
| 331 | 334 |
| 332 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; | 335 base::WeakPtrFactory<SigninManager> weak_pointer_factory_; |
| 333 | 336 |
| 337 int signin_process_id_; |
| 334 | 338 |
| 335 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) | 339 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
| 336 // CloudPolicyClient reference we keep while determining whether to create | 340 // CloudPolicyClient reference we keep while determining whether to create |
| 337 // a new profile for an enterprise user or not. | 341 // a new profile for an enterprise user or not. |
| 338 scoped_ptr<policy::CloudPolicyClient> policy_client_; | 342 scoped_ptr<policy::CloudPolicyClient> policy_client_; |
| 339 #endif | 343 #endif |
| 340 | 344 |
| 341 DISALLOW_COPY_AND_ASSIGN(SigninManager); | 345 DISALLOW_COPY_AND_ASSIGN(SigninManager); |
| 342 }; | 346 }; |
| 343 | 347 |
| 344 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ | 348 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_H_ |
| OLD | NEW |