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

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

Issue 11178004: Fix "Please update your sync passphrase" link on Chrome OS settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 6fc7f7868cacf6a215771dae8b73e21c0dd9b66e..607215703d6e93625542086459bee80a2edfa60b 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -86,15 +86,6 @@ cr.define('options', function() {
// 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();
@@ -650,6 +641,18 @@ cr.define('options', function() {
$('sync-action-link').hidden = syncData.actionLinkText.length == 0;
$('sync-action-link').disabled = syncData.managed;
+ if (cr.isChromeOS && syncData.hasError) {
Evan Stade 2012/10/17 22:25:39 you could put this check inside the function inste
+ // 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