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

Unified Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 2442843002: Override SigninManager::SignOut if force-signin is enabled. (Closed)
Patch Set: fixup Created 4 years, 2 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/BUILD.gn ('k') | chrome/browser/signin/force_signin_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/people_page/people_page.js
diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js
index 400bb0f1f90c0a6620709ebaf8a0513da7e44cde..be02e3f9ac8ebaaf799b790bba07c98831beb96a 100644
--- a/chrome/browser/resources/settings/people_page/people_page.js
+++ b/chrome/browser/resources/settings/people_page/people_page.js
@@ -138,6 +138,7 @@ Polymer({
this.handleEasyUnlockEnabledStatusChanged_.bind(this));
}
</if>
+ this.needSignout = false;
},
/** @protected */
@@ -229,8 +230,15 @@ Polymer({
/** @private */
onDisconnectClosed_: function() {
tommycli 2016/10/25 18:20:21 This is fired when a Javascript dialog closes, so
zmin 2016/10/25 18:52:12 Browser window closing is triggered by signout whe
tommycli 2016/10/25 19:03:30 I see. If that's all you need, I suggest within th
zmin 2016/10/25 21:02:58 Done.
- if (settings.getCurrentRoute() == settings.Route.SIGN_OUT)
+ if (settings.getCurrentRoute() == settings.Route.SIGN_OUT) {
settings.navigateToPreviousRoute();
+ // Do the signout in the end because it will close all windows when force
+ // signin enabled.
+ setTimeout(function() {
+ if (this.needSignout)
+ this.syncBrowserProxy_.signOut(this.deleteProfile);
+ }.bind(this));
+ }
},
/** @private */
@@ -247,8 +255,8 @@ Polymer({
onDisconnectConfirm_: function() {
var deleteProfile = !!this.syncStatus.domain ||
(this.$.deleteProfile && this.$.deleteProfile.checked);
- this.syncBrowserProxy_.signOut(deleteProfile);
-
+ this.needSignout = true;
+ this.deleteProfile = deleteProfile;
this.$.disconnectDialog.close();
},
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/signin/force_signin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698