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

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 2591093002: [MD Settings][People] Force sign out only in the case of unrecoverable error (Closed)
Patch Set: Fixed compilation error Created 4 years 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/resources/settings/people_page/people_page.js » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{actionLinkText: (string|undefined), 8 * @typedef {{actionLinkText: (string|undefined),
9 * accountInfo: (string|undefined), 9 * accountInfo: (string|undefined),
10 * childUser: (boolean|undefined), 10 * childUser: (boolean|undefined),
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 1219
1220 $('sync-action-link').textContent = syncData.actionLinkText; 1220 $('sync-action-link').textContent = syncData.actionLinkText;
1221 // Don't show the action link if it is empty or undefined. 1221 // Don't show the action link if it is empty or undefined.
1222 $('sync-action-link').hidden = syncData.actionLinkText.length == 0; 1222 $('sync-action-link').hidden = syncData.actionLinkText.length == 0;
1223 $('sync-action-link').disabled = syncData.managed || 1223 $('sync-action-link').disabled = syncData.managed ||
1224 !syncData.syncSystemEnabled; 1224 !syncData.syncSystemEnabled;
1225 1225
1226 $('sync-action-link').onclick = function(event) { 1226 $('sync-action-link').onclick = function(event) {
1227 switch (syncData.statusAction) { 1227 switch (syncData.statusAction) {
1228 case 'reauthenticate': 1228 case 'reauthenticate':
1229 SyncSetupOverlay.startSignIn(false /* creatingSupervisedUser */);
1230 break;
1231 case 'signOutAndSignIn':
1229 <if expr="chromeos"> 1232 <if expr="chromeos">
1230 // On Chrome OS, sign out the user and sign in again to get fresh 1233 // On Chrome OS, sign out the user and sign in again to get fresh
1231 // credentials on auth errors. 1234 // credentials on auth errors.
1232 SyncSetupOverlay.doSignOutOnAuthError(); 1235 SyncSetupOverlay.doSignOutOnAuthError();
1233 </if> 1236 </if>
1234 <if expr="not chromeos"> 1237 <if expr="not chromeos">
1235 if (syncData.signoutAllowed) { 1238 if (syncData.signoutAllowed) {
1236 // Silently sign the user out without deleting their profile and 1239 // Silently sign the user out without deleting their profile and
1237 // prompt them to sign back in. 1240 // prompt them to sign back in.
1238 chrome.send('SyncSetupStopSyncing', [false /* deleteProfile */]); 1241 chrome.send('SyncSetupStopSyncing', [false /* deleteProfile */]);
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 2471
2469 settings.hidden = !isVisible; 2472 settings.hidden = !isVisible;
2470 }; 2473 };
2471 } 2474 }
2472 2475
2473 // Export 2476 // Export
2474 return { 2477 return {
2475 BrowserOptions: BrowserOptions 2478 BrowserOptions: BrowserOptions
2476 }; 2479 };
2477 }); 2480 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/people_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698