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

Unified Diff: chrome/browser/resources/sync_setup_overlay.js

Issue 7474023: [Sync] Prevent switching back to "Sync Everything" view if passphrase needed. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review Created 9 years, 5 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/sync_setup_overlay.js
diff --git a/chrome/browser/resources/sync_setup_overlay.js b/chrome/browser/resources/sync_setup_overlay.js
index c41b5a6a52c154bea0543d1974a4ddb435706053..9535ed1badc660dd46b50615ebc6de770ff9cda2 100644
--- a/chrome/browser/resources/sync_setup_overlay.js
+++ b/chrome/browser/resources/sync_setup_overlay.js
@@ -244,6 +244,7 @@ cr.define('options', function() {
// Don't allow the user to tweak the settings once we send the
// configuration to the backend.
this.setInputElementsDisabledState_(true);
+ this.animateDisableLink_($('use-default-link'), true, null);
// These values need to be kept in sync with where they are read in
// SyncSetupFlow::GetDataTypeChoiceData().
@@ -284,10 +285,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 +463,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 +500,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() {
« 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