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

Unified Diff: chrome/browser/signin/about_signin_internals.cc

Issue 196783002: Export a private webstore API to call into the new inline sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add API tests Created 6 years, 9 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
Index: chrome/browser/signin/about_signin_internals.cc
diff --git a/chrome/browser/signin/about_signin_internals.cc b/chrome/browser/signin/about_signin_internals.cc
index 294391768d2c78222bb63763d3932f65c3abcb85..263d3325fb1d5741a295c2b3f3e9790492f07426 100644
--- a/chrome/browser/signin/about_signin_internals.cc
+++ b/chrome/browser/signin/about_signin_internals.cc
@@ -156,6 +156,14 @@ void AboutSigninInternals::NotifySigninValueChanged(
NotifyObservers();
}
+void AboutSigninInternals::SigninManagerCreated(SigninManagerBase* manager) {
+ manager->AddSigninDiagnosticsObserver(this);
+}
+
+void AboutSigninInternals::SigninManagerShutdown(SigninManagerBase* manager) {
+ manager->RemoveSigninDiagnosticsObserver(this);
+}
+
void AboutSigninInternals::RefreshSigninPrefs() {
// Return if no profile exists. Can occur in unit tests.
if (!profile_)
@@ -191,6 +199,7 @@ void AboutSigninInternals::Initialize(Profile* profile) {
RefreshSigninPrefs();
+ SigninManagerFactory::GetInstance()->AddObserver(this);
SigninManagerFactory::GetForProfile(profile)->
AddSigninDiagnosticsObserver(this);
ProfileOAuth2TokenServiceFactory::GetForProfile(profile)->
@@ -198,6 +207,7 @@ void AboutSigninInternals::Initialize(Profile* profile) {
}
void AboutSigninInternals::Shutdown() {
+ SigninManagerFactory::GetInstance()->RemoveObserver(this);
SigninManagerFactory::GetForProfile(profile_)->
RemoveSigninDiagnosticsObserver(this);
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->

Powered by Google App Engine
This is Rietveld 408576698