summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 19:37:43 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 19:37:43 +0000
commitc2575be10fd39de8ee674ac21a2c5d0f29cdebe9 (patch)
treea02c94aa6e294ade9d8e649a4b527df4c940d24a /chrome
parent62bdc5125a6059f2116766460d690cb18367c025 (diff)
downloadchromium_src-c2575be10fd39de8ee674ac21a2c5d0f29cdebe9.zip
chromium_src-c2575be10fd39de8ee674ac21a2c5d0f29cdebe9.tar.gz
chromium_src-c2575be10fd39de8ee674ac21a2c5d0f29cdebe9.tar.bz2
[sync] Disable "set up sync" button in the presence of auth errors
If a signed in enterprise user has sync disabled, and then encounters an auth error, the settings page shows two available actions with different flows: the "set up sync" button and the "sign in again" link. This is confusing. This patch disables the "set up sync" button in the presence of an auth error. When the user responds to the auth error and signs in, we automatically take the user through the sync setup dialog. Of courses, the user may cancel sync setup if they wish. BUG=289791 TEST=Sign in with enterprise account; disable sync via dashboard clear; trigger an auth error by changing password / deleting "web data*" files. The "set up sync" button should be disabled, and re-auth should trigger sync setup. Review URL: https://chromiumcodereview.appspot.com/23478030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/resources/options/browser_options.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 2067dd3..83f7986 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -786,7 +786,14 @@ cr.define('options', function() {
else
$('sync-status').classList.remove('sync-error');
- customizeSyncButton.disabled = syncData.hasUnrecoverableError;
+ // Disable the "customize / set up sync" button if sync has an
+ // unrecoverable error. Also disable the button if sync has not been set
+ // up and the user is being presented with a link to re-auth.
+ // See crbug.com/289791.
+ customizeSyncButton.disabled =
+ syncData.hasUnrecoverableError ||
+ (!syncData.setupCompleted && !$('sync-action-link').hidden);
+
// Move #enable-auto-login-checkbox to a different location on CrOS.
if (cr.isChromeOs) {
$('sync-general').insertBefore($('sync-status').nextSibling,