Chromium Code Reviews| 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(); |
| }, |