| OLD | NEW |
| 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 | 1217 |
| 1218 $('sync-action-link').textContent = syncData.actionLinkText; | 1218 $('sync-action-link').textContent = syncData.actionLinkText; |
| 1219 // Don't show the action link if it is empty or undefined. | 1219 // Don't show the action link if it is empty or undefined. |
| 1220 $('sync-action-link').hidden = syncData.actionLinkText.length == 0; | 1220 $('sync-action-link').hidden = syncData.actionLinkText.length == 0; |
| 1221 $('sync-action-link').disabled = syncData.managed || | 1221 $('sync-action-link').disabled = syncData.managed || |
| 1222 !syncData.syncSystemEnabled; | 1222 !syncData.syncSystemEnabled; |
| 1223 | 1223 |
| 1224 $('sync-action-link').onclick = function(event) { | 1224 $('sync-action-link').onclick = function(event) { |
| 1225 switch (syncData.statusAction) { | 1225 switch (syncData.statusAction) { |
| 1226 case 'reauthenticate': | 1226 case 'reauthenticate': |
| 1227 SyncSetupOverlay.startSignIn(false /* creatingSupervisedUser */); |
| 1228 break; |
| 1229 case 'signOutAndSignIn': |
| 1227 <if expr="chromeos"> | 1230 <if expr="chromeos"> |
| 1228 // On Chrome OS, sign out the user and sign in again to get fresh | 1231 // On Chrome OS, sign out the user and sign in again to get fresh |
| 1229 // credentials on auth errors. | 1232 // credentials on auth errors. |
| 1230 SyncSetupOverlay.doSignOutOnAuthError(); | 1233 SyncSetupOverlay.doSignOutOnAuthError(); |
| 1231 </if> | 1234 </if> |
| 1232 <if expr="not chromeos"> | 1235 <if expr="not chromeos"> |
| 1233 if (syncData.signoutAllowed) { | 1236 if (syncData.signoutAllowed) { |
| 1234 // Silently sign the user out without deleting their profile and | 1237 // Silently sign the user out without deleting their profile and |
| 1235 // prompt them to sign back in. | 1238 // prompt them to sign back in. |
| 1236 chrome.send('SyncSetupStopSyncing', [false /* deleteProfile */]); | 1239 chrome.send('SyncSetupStopSyncing', [false /* deleteProfile */]); |
| (...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 | 2469 |
| 2467 settings.hidden = !isVisible; | 2470 settings.hidden = !isVisible; |
| 2468 }; | 2471 }; |
| 2469 } | 2472 } |
| 2470 | 2473 |
| 2471 // Export | 2474 // Export |
| 2472 return { | 2475 return { |
| 2473 BrowserOptions: BrowserOptions | 2476 BrowserOptions: BrowserOptions |
| 2474 }; | 2477 }; |
| 2475 }); | 2478 }); |
| OLD | NEW |