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

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

Issue 11194047: Simplify onclick action code. (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 607215703d6e93625542086459bee80a2edfa60b..5b4f542b10282fa4c312aaa5b419957db6687aaa 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -641,17 +641,15 @@ cr.define('options', function() {
$('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) {
+ // On Chrome OS, sign out the user and sign in again to get fresh
+ // credentials on auth errors.
+ $('sync-action-link').onclick = function(event) {
+ if (cr.isChromeOS && syncData.hasError) {
SyncSetupOverlay.doSignOutOnAuthError();
- };
- } else {
- $('sync-action-link').onclick = function(event) {
+ } else {
Evan Stade 2012/10/18 23:35:41 no curlies
kochi 2012/10/19 01:10:27 Done.
SyncSetupOverlay.showErrorUI();
- };
- }
+ }
+ };
if (syncData.hasError)
$('sync-status').classList.add('sync-error');
« 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