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

Unified Diff: chrome/browser/resources/options/autofill_options.js

Issue 1014913003: Hide Wallet checkbox when user signs out of sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle null service Created 5 years, 9 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 | chrome/browser/ui/webui/options/autofill_options_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/autofill_options.js
diff --git a/chrome/browser/resources/options/autofill_options.js b/chrome/browser/resources/options/autofill_options.js
index aee75d577d939e1ff3aee94e00ab9fc9362ad3b9..ce8dd1fd5d91f713524209199183d29fd700c679 100644
--- a/chrome/browser/resources/options/autofill_options.js
+++ b/chrome/browser/resources/options/autofill_options.js
@@ -89,9 +89,8 @@ cr.define('options', function() {
return true; // Always follow the href
};
- var enableWalletIntegration =
- loadTimeData.getBoolean('enableAutofillWalletIntegration');
- $('autofill-wallet-setting-area').hidden = !enableWalletIntegration;
+ this.walletIntegrationAvailableStateChanged_(
+ loadTimeData.getBoolean('autofillWalletIntegrationAvailable'));
// TODO(jhawkins): What happens when Autofill is disabled whilst on the
// Autofill options page?
@@ -229,6 +228,16 @@ 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) {
@@ -255,6 +264,11 @@ cr.define('options', function() {
AutofillOptions.getInstance().showEditAddressOverlay_(address);
};
+ AutofillOptions.walletIntegrationAvailableStateChanged = function(available) {
+ AutofillOptions.getInstance().
+ walletIntegrationAvailableStateChanged_(available);
+ };
+
/**
* @param {CreditCardData} creditCard
*/
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/autofill_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698