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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 11234051: Merge 162319 - Fix "Please update your sync passphrase" link on Chrome OS settings. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/browser_options.js
===================================================================
--- chrome/browser/resources/options/browser_options.js (revision 163470)
+++ chrome/browser/resources/options/browser_options.js (working copy)
@@ -86,15 +86,6 @@
// Sync (Sign in) section.
this.updateSyncState_(loadTimeData.getValue('syncData'));
- $('sync-action-link').onclick = function(event) {
- if (cr.isChromeOS) {
- // On Chrome OS, sign out the user and sign in again to get fresh
- // credentials on auth errors.
- SyncSetupOverlay.doSignOutOnAuthError();
- } else {
- SyncSetupOverlay.showErrorUI();
- }
- };
$('start-stop-sync').onclick = function(event) {
if (self.syncSetupCompleted)
SyncSetupOverlay.showStopSyncingUI();
@@ -665,6 +656,18 @@
$('sync-action-link').hidden = syncData.actionLinkText.length == 0;
$('sync-action-link').disabled = syncData.managed;
+ if (cr.isChromeOS && syncData.hasError) {
+ // On Chrome OS, sign out the user and sign in again to get fresh
+ // credentials on auth errors.
+ $('sync-action-link').onclick = function(event) {
+ SyncSetupOverlay.doSignOutOnAuthError();
+ };
+ } else {
+ $('sync-action-link').onclick = function(event) {
+ SyncSetupOverlay.showErrorUI();
+ };
+ }
+
if (syncData.hasError)
$('sync-status').classList.add('sync-error');
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698