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

Unified Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 2244733002: Settings Sync: Fix CloseUI logic in both Settings and MD Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix guest mode crash Created 4 years, 4 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 | « chrome/browser/ui/webui/options/sync_setup_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/webui/options/sync_setup_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698