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

Side by Side Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 2442843002: Override SigninManager::SignOut if force-signin is enabled. (Closed)
Patch Set: fix try bot Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/signin/chrome_signin_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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() {
tommycli 2016/11/01 17:28:54 Thinking further on this: I think using setTimeout
Dan Beam 2016/11/01 18:51:38 see also: listenOnce()
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 365
362 /** 366 /**
363 * @param {!settings.SyncStatus} syncStatus 367 * @param {!settings.SyncStatus} syncStatus
364 * @return {boolean} Whether to show the "Sign in to Chrome" button. 368 * @return {boolean} Whether to show the "Sign in to Chrome" button.
365 * @private 369 * @private
366 */ 370 */
367 showSignin_: function(syncStatus) { 371 showSignin_: function(syncStatus) {
368 return !!syncStatus.signinAllowed && !syncStatus.signedIn; 372 return !!syncStatus.signinAllowed && !syncStatus.signedIn;
369 }, 373 },
370 }); 374 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/chrome_signin_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698