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

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

Issue 2603283003: [MD Settings][People] Force sign out only in the case of unrecoverable error (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 /** @private */ 285 /** @private */
286 onSyncTap_: function() { 286 onSyncTap_: function() {
287 assert(this.syncStatus.signedIn); 287 assert(this.syncStatus.signedIn);
288 assert(this.syncStatus.syncSystemEnabled); 288 assert(this.syncStatus.syncSystemEnabled);
289 289
290 if (!this.isSyncStatusActionable_(this.syncStatus)) 290 if (!this.isSyncStatusActionable_(this.syncStatus))
291 return; 291 return;
292 292
293 switch (this.syncStatus.statusAction) { 293 switch (this.syncStatus.statusAction) {
294 case settings.StatusAction.REAUTHENTICATE: 294 case settings.StatusAction.REAUTHENTICATE:
295 this.syncBrowserProxy_.startSignIn();
296 break;
297 case settings.StatusAction.SIGNOUT_AND_SIGNIN:
295 <if expr="chromeos"> 298 <if expr="chromeos">
296 this.syncBrowserProxy_.attemptUserExit(); 299 this.syncBrowserProxy_.attemptUserExit();
297 </if> 300 </if>
298 <if expr="not chromeos"> 301 <if expr="not chromeos">
299 if (this.syncStatus.domain) 302 if (this.syncStatus.domain)
300 settings.navigateTo(settings.Route.SIGN_OUT); 303 settings.navigateTo(settings.Route.SIGN_OUT);
301 else { 304 else {
302 // Silently sign the user out without deleting their profile and 305 // Silently sign the user out without deleting their profile and
303 // prompt them to sign back in. 306 // prompt them to sign back in.
304 this.syncBrowserProxy_.signOut(false); 307 this.syncBrowserProxy_.signOut(false);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 453
451 /** 454 /**
452 * @param {!settings.SyncStatus} syncStatus 455 * @param {!settings.SyncStatus} syncStatus
453 * @return {boolean} Whether to show the "Sign in to Chrome" button. 456 * @return {boolean} Whether to show the "Sign in to Chrome" button.
454 * @private 457 * @private
455 */ 458 */
456 showSignin_: function(syncStatus) { 459 showSignin_: function(syncStatus) {
457 return !!syncStatus.signinAllowed && !syncStatus.signedIn; 460 return !!syncStatus.signinAllowed && !syncStatus.signedIn;
458 }, 461 },
459 }); 462 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698