| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-people-page' is the settings page containing sign-in settings. | 7 * 'settings-people-page' is the settings page containing sign-in settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-people-page', | 10 is: 'settings-people-page', |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 /** @private */ | 241 /** @private */ |
| 242 onDisconnectCancel_: function() { | 242 onDisconnectCancel_: function() { |
| 243 this.$.disconnectDialog.close(); | 243 this.$.disconnectDialog.close(); |
| 244 }, | 244 }, |
| 245 | 245 |
| 246 /** @private */ | 246 /** @private */ |
| 247 onDisconnectConfirm_: function() { | 247 onDisconnectConfirm_: function() { |
| 248 var deleteProfile = !!this.syncStatus.domain || | 248 var deleteProfile = !!this.syncStatus.domain || |
| 249 (this.$.deleteProfile && this.$.deleteProfile.checked); | 249 (this.$.deleteProfile && this.$.deleteProfile.checked); |
| 250 this.syncBrowserProxy_.signOut(deleteProfile); | 250 // Navigate to previous route before signout so session restore does |
| 251 | 251 // not restore to the signout dialog. Dialog will be automatically |
| 252 this.$.disconnectDialog.close(); | 252 // closed by the route change. |
| 253 settings.navigateToPreviousRoute(); |
| 254 setTimeout(function() { |
| 255 this.syncBrowserProxy_.signOut(deleteProfile); |
| 256 }.bind(this)); |
| 253 }, | 257 }, |
| 254 | 258 |
| 255 /** @private */ | 259 /** @private */ |
| 256 onSyncTap_: function() { | 260 onSyncTap_: function() { |
| 257 assert(this.syncStatus.signedIn); | 261 assert(this.syncStatus.signedIn); |
| 258 assert(this.syncStatus.syncSystemEnabled); | 262 assert(this.syncStatus.syncSystemEnabled); |
| 259 | 263 |
| 260 if (this.syncStatus.managed) | 264 if (this.syncStatus.managed) |
| 261 return; | 265 return; |
| 262 | 266 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 }, | 364 }, |
| 361 | 365 |
| 362 /** | 366 /** |
| 363 * @return {boolean} Whether to show the "Sign in to Chrome" button. | 367 * @return {boolean} Whether to show the "Sign in to Chrome" button. |
| 364 * @private | 368 * @private |
| 365 */ | 369 */ |
| 366 showSignin_: function(syncStatus) { | 370 showSignin_: function(syncStatus) { |
| 367 return !!syncStatus.signinAllowed && !syncStatus.signedIn; | 371 return !!syncStatus.signinAllowed && !syncStatus.signedIn; |
| 368 }, | 372 }, |
| 369 }); | 373 }); |
| OLD | NEW |