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

Side by Side Diff: components/signin/core/browser/signin_manager_base.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/signin/core/browser/signin_error_controller.h ('k') | components/storage_monitor/storage_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698