| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Sets the authenticated user's account id. | 132 // Sets the authenticated user's account id. |
| 133 void SetAuthenticatedAccountId(const std::string& account_id); | 133 void SetAuthenticatedAccountId(const std::string& account_id); |
| 134 | 134 |
| 135 // Used by subclass to clear the authenticated user instead of using | 135 // Used by subclass to clear the authenticated user instead of using |
| 136 // SetAuthenticatedAccountId, which enforces special preconditions due | 136 // SetAuthenticatedAccountId, which enforces special preconditions due |
| 137 // to the fact that it is part of the public API and called by clients. | 137 // to the fact that it is part of the public API and called by clients. |
| 138 void clear_authenticated_user() { authenticated_account_id_.clear(); } | 138 void clear_authenticated_user() { authenticated_account_id_.clear(); } |
| 139 | 139 |
| 140 // List of observers to notify on signin events. | 140 // List of observers to notify on signin events. |
| 141 // Makes sure list is empty on destruction. | 141 // Makes sure list is empty on destruction. |
| 142 ObserverList<Observer, true> observer_list_; | 142 base::ObserverList<Observer, true> observer_list_; |
| 143 | 143 |
| 144 // Helper method to notify all registered diagnostics observers with. | 144 // Helper method to notify all registered diagnostics observers with. |
| 145 void NotifyDiagnosticsObservers( | 145 void NotifyDiagnosticsObservers( |
| 146 const signin_internals_util::TimedSigninStatusField& field, | 146 const signin_internals_util::TimedSigninStatusField& field, |
| 147 const std::string& value); | 147 const std::string& value); |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 friend class FakeSigninManagerBase; | 150 friend class FakeSigninManagerBase; |
| 151 friend class FakeSigninManager; | 151 friend class FakeSigninManager; |
| 152 | 152 |
| 153 SigninClient* client_; | 153 SigninClient* client_; |
| 154 AccountTrackerService* account_tracker_service_; | 154 AccountTrackerService* account_tracker_service_; |
| 155 bool initialized_; | 155 bool initialized_; |
| 156 | 156 |
| 157 // Account id after successful authentication. | 157 // Account id after successful authentication. |
| 158 std::string authenticated_account_id_; | 158 std::string authenticated_account_id_; |
| 159 | 159 |
| 160 // The list of SigninDiagnosticObservers. | 160 // The list of SigninDiagnosticObservers. |
| 161 ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> | 161 base::ObserverList<signin_internals_util::SigninDiagnosticsObserver, true> |
| 162 signin_diagnostics_observers_; | 162 signin_diagnostics_observers_; |
| 163 | 163 |
| 164 base::WeakPtrFactory<SigninManagerBase> weak_pointer_factory_; | 164 base::WeakPtrFactory<SigninManagerBase> weak_pointer_factory_; |
| 165 | 165 |
| 166 DISALLOW_COPY_AND_ASSIGN(SigninManagerBase); | 166 DISALLOW_COPY_AND_ASSIGN(SigninManagerBase); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_BASE_H_ | 169 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_MANAGER_BASE_H_ |
| OLD | NEW |