| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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. | 6 // which user is signed in. |
| 7 // | 7 // |
| 8 // **NOTE** on semantics of SigninManager: | 8 // **NOTE** on semantics of SigninManager: |
| 9 // | 9 // |
| 10 // Once a signin is successful, the username becomes "established" and will not | 10 // Once a signin is successful, the username becomes "established" and will not |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class SigninClient; | 41 class SigninClient; |
| 42 | 42 |
| 43 class SigninManagerBase : public KeyedService { | 43 class SigninManagerBase : public KeyedService { |
| 44 public: | 44 public: |
| 45 class Observer { | 45 class Observer { |
| 46 public: | 46 public: |
| 47 // Called when a user fails to sign into Google services such as sync. | 47 // Called when a user fails to sign into Google services such as sync. |
| 48 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) {} | 48 virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) {} |
| 49 | 49 |
| 50 // Called when a user signs into Google services such as sync. | 50 // Called when a user signs into Google services such as sync. |
| 51 virtual void GoogleSigninSucceeded(const std::string& username, | 51 virtual void GoogleSigninSucceeded(const std::string& account_id, |
| 52 const std::string& username, |
| 52 const std::string& password) {} | 53 const std::string& password) {} |
| 53 | 54 |
| 54 // Called when the currently signed-in user for a user has been signed out. | 55 // Called when the currently signed-in user for a user has been signed out. |
| 55 virtual void GoogleSignedOut(const std::string& username) {} | 56 virtual void GoogleSignedOut(const std::string& account_id, |
| 57 const std::string& username) {} |
| 56 | 58 |
| 57 protected: | 59 protected: |
| 58 virtual ~Observer() {} | 60 virtual ~Observer() {} |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 SigninManagerBase(SigninClient* client); | 63 SigninManagerBase(SigninClient* client); |
| 62 virtual ~SigninManagerBase(); | 64 virtual ~SigninManagerBase(); |
| 63 | 65 |
| 64 // If user was signed in, load tokens from DB if available. | 66 // If user was signed in, load tokens from DB if available. |
| 65 virtual void Initialize(PrefService* local_state); | 67 virtual void Initialize(PrefService* local_state); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // The list of SigninDiagnosticObservers. | 152 // The list of SigninDiagnosticObservers. |
| 151 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> | 153 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> |
| 152 signin_diagnostics_observers_; | 154 signin_diagnostics_observers_; |
| 153 | 155 |
| 154 base::WeakPtrFactory<SigninManagerBase> weak_pointer_factory_; | 156 base::WeakPtrFactory<SigninManagerBase> weak_pointer_factory_; |
| 155 | 157 |
| 156 DISALLOW_COPY_AND_ASSIGN(SigninManagerBase); | 158 DISALLOW_COPY_AND_ASSIGN(SigninManagerBase); |
| 157 }; | 159 }; |
| 158 | 160 |
| 159 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_BASE_H_ | 161 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_BASE_H_ |
| OLD | NEW |