| Index: chrome/browser/ui/webui/settings/people_handler.cc
|
| diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
|
| index 6cf9f3971a0b8be0130fed3b18ba98c7c9202d06..4f8a50d72bb904ceea80352893da234809ccaf0d 100644
|
| --- a/chrome/browser/ui/webui/settings/people_handler.cc
|
| +++ b/chrome/browser/ui/webui/settings/people_handler.cc
|
| @@ -562,12 +562,13 @@ void PeopleHandler::CloseSyncSetup() {
|
| // LoginUIService can be nullptr if page is brought up in incognito mode
|
| // (i.e. if the user is running in guest mode in cros and brings up settings).
|
| LoginUIService* service = GetLoginUIService();
|
| - if (service && (service->current_login_ui() == this)) {
|
| + if (service) {
|
| // Don't log a cancel event if the sync setup dialog is being
|
| // automatically closed due to an auth error.
|
| - if (!sync_service || (!sync_service->IsFirstSetupComplete() &&
|
| - sync_service->GetAuthError().state() ==
|
| - GoogleServiceAuthError::NONE)) {
|
| + if ((service->current_login_ui() == this) &&
|
| + (!sync_service || (!sync_service->IsFirstSetupComplete() &&
|
| + sync_service->GetAuthError().state() ==
|
| + GoogleServiceAuthError::NONE))) {
|
| if (configuring_sync_) {
|
| ProfileSyncService::SyncEvent(
|
| ProfileSyncService::CANCEL_DURING_CONFIGURE);
|
| @@ -595,7 +596,7 @@ void PeopleHandler::CloseSyncSetup() {
|
| }
|
| }
|
|
|
| - GetLoginUIService()->LoginUIClosed(this);
|
| + service->LoginUIClosed(this);
|
| }
|
|
|
| // Alert the sync service anytime the sync setup dialog is closed. This can
|
|
|