Chromium Code Reviews| 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; |
| }, |
| /** |