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

Unified Diff: chrome/browser/resources/settings/people_page/sync_page.js

Issue 2441503002: [MD Settings][People] Visual updates to the sync setup page. (Closed)
Patch Set: Created 4 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
Index: chrome/browser/resources/settings/people_page/sync_page.js
diff --git a/chrome/browser/resources/settings/people_page/sync_page.js b/chrome/browser/resources/settings/people_page/sync_page.js
index 0d9a738b4148e65b8babd4f8aa923f8b2425cfe3..1acbaa02fde4860beb2b9c6655d5855550526b97 100644
--- a/chrome/browser/resources/settings/people_page/sync_page.js
+++ b/chrome/browser/resources/settings/people_page/sync_page.js
@@ -99,6 +99,33 @@ Polymer({
value: false,
},
+ /**
+ * The passphrase input field value.
+ * @private
+ */
+ passphrase_: {
+ type: String,
+ value: '',
+ },
+
+ /**
+ * The passphrase confirmation input field value.
+ * @private
+ */
+ confirmation_: {
tommycli 2016/10/25 18:28:46 since you are now binding the values of these inpu
Moe 2016/10/25 22:30:18 Done.
+ type: String,
+ value: '',
+ },
+
+ /**
+ * The existing passphrase input field value.
+ * @private
+ */
+ existingPassphrase_: {
+ type: String,
+ value: '',
+ },
+
/** @private {!settings.SyncBrowserProxy} */
browserProxy_: {
type: Object,
@@ -260,6 +287,16 @@ Polymer({
},
/**
+ * @param {string} passphrase The passphrase input field value
+ * @param {string} confirmation The passphrase confirmation input field value.
+ * @return {boolean} Whether the passphrase save button should be enabled.
+ * @private
+ */
+ isSaveNewPassphraseEnabled_: function(passphrase, confirmation) {
+ return passphrase !== '' && confirmation !== '';
+ },
+
+ /**
* Sends the newly created custom sync passphrase to the browser.
* @private
*/
@@ -343,14 +380,14 @@ Polymer({
},
/**
- * Computed binding returning the encryption text body.
+ * Computed binding returning text of the prompt for entering the passphrase.
* @private
*/
- encryptWithPassphraseBody_: function() {
- if (this.syncPrefs && this.syncPrefs.fullEncryptionBody)
- return this.syncPrefs.fullEncryptionBody;
+ enterPassphrasePrompt_: function() {
+ if (this.syncPrefs && this.syncPrefs.passphraseTypeIsCustom)
+ return this.syncPrefs.enterPassphraseBody;
- return this.i18n('encryptWithSyncPassphraseLabel');
+ return this.syncPrefs.enterGooglePassphraseBody;
},
/**

Powered by Google App Engine
This is Rietveld 408576698