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

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

Issue 502343002: Add account_id to signin manager notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@isauth
Patch Set: rebased Created 6 years, 3 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
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
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) {}
guohui 2014/08/27 17:57:42 Why have both account_id and username in the signa
Roger Tawa OOO till Jul 10th 2014/08/27 18:51:01 Because that would require observers to keep a poi
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
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_
OLDNEW
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698