Chromium Code Reviews| Index: chrome/browser/resources/sync_setup_overlay.js |
| diff --git a/chrome/browser/resources/sync_setup_overlay.js b/chrome/browser/resources/sync_setup_overlay.js |
| index c41b5a6a52c154bea0543d1974a4ddb435706053..66989b84d44fc909e29a7efde625e87a9c2d4b24 100644 |
| --- a/chrome/browser/resources/sync_setup_overlay.js |
| +++ b/chrome/browser/resources/sync_setup_overlay.js |
| @@ -244,6 +244,10 @@ cr.define('options', function() { |
| // Don't allow the user to tweak the settings once we send the |
| // configuration to the backend. |
| this.setInputElementsDisabledState_(true); |
| + var self = this; |
| + this.animateDisableLink_($('use-default-link'), true, function() { |
|
James Hawkins
2011/07/31 23:50:53
No need to specify this callback function since yo
Nicolas Zea
2011/08/01 17:09:59
Done.
|
| + self.showSyncEverythingPage_(); |
| + }); |
| // These values need to be kept in sync with where they are read in |
| // SyncSetupFlow::GetDataTypeChoiceData(). |
| @@ -284,10 +288,6 @@ cr.define('options', function() { |
| this.animateDisableLink_($('customize-link'), disabled, function() { |
| self.showCustomizePage_(null, true); |
| }); |
| - |
| - this.animateDisableLink_($('use-default-link'), disabled, function() { |
| - self.showSyncEverythingPage_(); |
| - }); |
| }, |
| /** |
| @@ -466,6 +466,9 @@ cr.define('options', function() { |
| * @private |
| */ |
| showPassphraseContainer_: function(args) { |
| + // Once we require a passphrase, we prevent the user from returning to |
| + // the Sync Everything pane. |
| + $('use-default-link').hidden = true; |
| $('sync-custom-passphrase-container').hidden = true; |
| $('sync-existing-passphrase-container').hidden = false; |
| @@ -500,8 +503,16 @@ cr.define('options', function() { |
| // set focus before that logic. |
| $('choose-datatypes-ok').focus(); |
| - if (args && args['show_passphrase']) |
| + if (args && args['show_passphrase']) { |
| this.showPassphraseContainer_(args); |
| + } else { |
| + // We only show the "Use Default" link if we're not prompting for an |
| + // existing passphrase. |
| + var self = this; |
| + this.animateDisableLink_($('use-default-link'), false, function() { |
| + self.showSyncEverythingPage_(); |
| + }); |
| + } |
| }, |
| attach_: function() { |