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

Unified Diff: components/signin/core/browser/signin_manager.h

Issue 936503002: SigninManager owns ObserverList for the MergeSessionHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Override! Override! (toro! toro!) Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/signin/core/browser/signin_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/signin_manager.h
diff --git a/components/signin/core/browser/signin_manager.h b/components/signin/core/browser/signin_manager.h
index 4ba0ef05bb00d83aeeb5096c387d8845e3f4d1d1..f8f9f2a0fe55ffa8fad23d3f39e8ead83c84cec7 100644
--- a/components/signin/core/browser/signin_manager.h
+++ b/components/signin/core/browser/signin_manager.h
@@ -46,7 +46,8 @@ class SigninAccountIdHelper;
class SigninClient;
class SigninManager : public SigninManagerBase,
- public AccountTrackerService::Observer {
+ public AccountTrackerService::Observer,
+ public MergeSessionHelper::Observer {
public:
// The callback invoked once the OAuth token has been fetched during signin,
// but before the profile transitions to the "signed-in" state. This allows
@@ -178,6 +179,13 @@ class SigninManager : public SigninManagerBase,
override;
void OnAccountUpdateFailed(const std::string& account_id) override;
+ // MergeSessionHelper::Observer implementation. SigninManager controls the
+ // lifetime if the MergeSessionHelper, so SigninManager takes responsibility
+ // for propogating these notifications.
+ void MergeSessionCompleted(const std::string& account_id,
+ const GoogleServiceAuthError& error) override;
+ void GetCheckConnectionInfoCompleted(bool succeeded) override;
+
// Called when a new request to re-authenticate a user is in progress.
// Will clear in memory data but leaves the db as such so when the browser
// restarts we can use the old token(which might throw a password error).
@@ -229,6 +237,9 @@ class SigninManager : public SigninManagerBase,
// Helper to merge signed in account into the content area.
scoped_ptr<MergeSessionHelper> merge_session_helper_;
+ // Observers of the |merge_session_helper_| across reset()s.
+ ObserverList<MergeSessionHelper::Observer, true> merge_session_observer_list_;
+
// Two gate conditions for when PostSignedIn should be called. Verify
// that the SigninManager has reached OnSignedIn() and the AccountTracker
// has completed calling GetUserInfo.
« no previous file with comments | « no previous file | components/signin/core/browser/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698