Index: components/signin/core/browser/about_signin_internals.cc |
diff --git a/components/signin/core/browser/about_signin_internals.cc b/components/signin/core/browser/about_signin_internals.cc |
index 982e0e23dc683d09181e724dc213ddf6b2a47713..ca959386527cae7c502194b06c9b6805800c964c 100644 |
--- a/components/signin/core/browser/about_signin_internals.cc |
+++ b/components/signin/core/browser/about_signin_internals.cc |
@@ -209,8 +209,10 @@ void AboutSigninInternals::Initialize(SigninClient* client) { |
signin_manager_->AddSigninDiagnosticsObserver(this); |
token_service_->AddDiagnosticsObserver(this); |
cookie_changed_subscription_ = client_->AddCookieChangedCallback( |
- base::Bind(&AboutSigninInternals::OnCookieChanged, |
- base::Unretained(this))); |
+ GaiaUrls::GetInstance()->gaia_url(), |
+ "LSID", |
+ base::Bind(&AboutSigninInternals::OnCookieChanged, |
+ base::Unretained(this))); |
} |
void AboutSigninInternals::Shutdown() { |
@@ -285,12 +287,11 @@ void AboutSigninInternals::OnAuthenticationResultReceived(std::string status) { |
NotifySigninValueChanged(AUTHENTICATION_RESULT_RECEIVED, status); |
} |
-void AboutSigninInternals::OnCookieChanged( |
- const net::CanonicalCookie* cookie) { |
- if (cookie->Name() == "LSID" && |
- cookie->Domain() == GaiaUrls::GetInstance()->gaia_url().host() && |
- cookie->IsSecure() && |
- cookie->IsHttpOnly()) { |
+void AboutSigninInternals::OnCookieChanged(const net::CanonicalCookie& cookie, |
+ bool removed) { |
+ DCHECK_EQ("LSID", cookie.Name()); |
+ DCHECK_EQ(GaiaUrls::GetInstance()->gaia_url().host(), cookie.Domain()); |
+ if (cookie.IsSecure() && cookie.IsHttpOnly()) { |
GetCookieAccountsAsync(); |
} |
} |