diff options
author | jdonnelly <jdonnelly@chromium.org> | 2016-01-15 14:05:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-15 22:06:28 +0000 |
commit | b4ddb6b439ded116b61d77dc6ed0f0e8a3bad4b9 (patch) | |
tree | 08f692d8270dac664bfaefb40aaf86bddba91591 /chrome/browser/resources/options/autofill_options.js | |
parent | 73f33b9bb4e534d75915757b7bf746349f817663 (diff) | |
download | chromium_src-b4ddb6b439ded116b61d77dc6ed0f0e8a3bad4b9.zip chromium_src-b4ddb6b439ded116b61d77dc6ed0f0e8a3bad4b9.tar.gz chromium_src-b4ddb6b439ded116b61d77dc6ed0f0e8a3bad4b9.tar.bz2 |
Move Autofill Payments integration checkbox to the sync settings page.
Based on results of discussions between privacy, pm, and UI review. Mock available at: https://screenshot.googleplex.com/59eiPNOvZAS.png
Notes on the implementation:
The mechanism for handling the availability of the payments integration setting has changed. Previously it was changed by events from the personal data manager and the sync service. This was because it depended on the state of those services and because the setting was on a different page than the sync settings.
With the new upload feature, the availability of the integration setting depends *only* on whether Autofill sync is enabled. (It no longer depends on the rollout flag governed by the sync service nor on whether the user currently has server cards in the personal data manager.)
Because of this and since the setting is on the same page/dialog as the Autofill sync setting, the availability of the integration setting can simply be changed in a click handler on the Autofill sync setting.
"Availability" is also now implemented via disabling (greying out) rather than visibility to avoid a dialog size change and relayout whenever the user clicks the Autofill sync setting.
One final detail: on the Autofill settings dialog, the magic "pref=" mechanism was used to read/write the integration setting. Because the sync settings dialog uses an ok/cancel design, we can't immediately write the value of the checkbox to the setting. Instead, it's manually set along with the rest of the sync settings after the user clicks ok.
BUG=535784
Review URL: https://codereview.chromium.org/1578173005
Cr-Commit-Position: refs/heads/master@{#369857}
Diffstat (limited to 'chrome/browser/resources/options/autofill_options.js')
-rw-r--r-- | chrome/browser/resources/options/autofill_options.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/chrome/browser/resources/options/autofill_options.js b/chrome/browser/resources/options/autofill_options.js index bea6a1a..7f30000 100644 --- a/chrome/browser/resources/options/autofill_options.js +++ b/chrome/browser/resources/options/autofill_options.js @@ -76,9 +76,6 @@ cr.define('options', function() { return true; // Always follow the href }; - this.walletIntegrationAvailableStateChanged_( - loadTimeData.getBoolean('autofillWalletIntegrationAvailable')); - // TODO(jhawkins): What happens when Autofill is disabled whilst on the // Autofill options page? }, @@ -187,16 +184,6 @@ cr.define('options', function() { AutofillEditCreditCardOverlay.loadCreditCard(creditCard); PageManager.showPageByName('autofillEditCreditCard'); }, - - /** - * Toggles the visibility of the Wallet integration checkbox. - * @param {boolean} available Whether the user has the option of using - * Wallet data. - * @private - */ - walletIntegrationAvailableStateChanged_: function(available) { - $('autofill-wallet-setting-area').hidden = !available; - }, }; AutofillOptions.setAddressList = function(entries) { @@ -215,11 +202,6 @@ cr.define('options', function() { AutofillOptions.getInstance().showEditAddressOverlay_(address); }; - AutofillOptions.walletIntegrationAvailableStateChanged = function(available) { - AutofillOptions.getInstance(). - walletIntegrationAvailableStateChanged_(available); - }; - /** * @param {CreditCardData} creditCard */ |