Bug 1387004 - Part 1: Add credit card enabled pref. r=lchang draft
authorsteveck-chung <schung@mozilla.com>
Wed, 02 Aug 2017 11:51:57 +0800
changeset 620368 6b3fb8330b86e8c89487909e42e6a49436aeb5b8
parent 618186 6d1b50a370b4adffbb1ee73b9f51707c90d6a2b1
child 620369 9ecf34499ae620580d3091e4934ca1f70f7fc557
child 620408 d5cd0a20f8df9d4ad10cb2d413da9ac37f7930d5
push id72012
push userbmo:schung@mozilla.com
push dateThu, 03 Aug 2017 10:30:22 +0000
reviewerslchang
bugs1387004
milestone56.0a1
Bug 1387004 - Part 1: Add credit card enabled pref. r=lchang MozReview-Commit-ID: BvErFOLPZdN
browser/app/profile/firefox.js
browser/extensions/formautofill/FormAutofillPreferences.jsm
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1694,16 +1694,17 @@ pref("browser.crashReports.unsubmittedCh
 // The value of "extensions.formautofill.available" can be "on", "off" and "detect".
 // The "detect" means it's enabled if conditions defined in the extension are met.
 #ifdef NIGHTLY_BUILD
 pref("extensions.formautofill.available", "on");
 #else
 pref("extensions.formautofill.available", "detect");
 #endif
 pref("extensions.formautofill.addresses.enabled", true);
+pref("extensions.formautofill.creditCards.enabled", true);
 pref("extensions.formautofill.firstTimeUse", true);
 pref("extensions.formautofill.heuristics.enabled", true);
 pref("extensions.formautofill.loglevel", "Warn");
 
 // Whether or not to restore a session with lazy-browser tabs.
 pref("browser.sessionstore.restore_tabs_lazily", true);
 
 // Enable safebrowsing v4 tables (suffixed by "-proto") update.
--- a/browser/extensions/formautofill/FormAutofillPreferences.jsm
+++ b/browser/extensions/formautofill/FormAutofillPreferences.jsm
@@ -9,16 +9,20 @@
 "use strict";
 
 this.EXPORTED_SYMBOLS = ["FormAutofillPreferences"];
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 // Add addresses enabled flag in telemetry environment for recording the number of
 // users who disable/enable the address autofill feature.
 const PREF_AUTOFILL_ENABLED = "extensions.formautofill.addresses.enabled";
+// Add credit card enabled flag in telemetry environment for recording the number of
+// users who disable/enable the credit card autofill feature.
+// TODO: Add const PREF_CREDITCARD_ENABLED = "extensions.formautofill.creditCards.enabled";
+//       when the credit card preferences UI is ready
 const BUNDLE_URI = "chrome://formautofill/locale/formautofill.properties";
 const MANAGE_ADDRESSES_URL = "chrome://formautofill/content/manageAddresses.xhtml";
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://formautofill/FormAutofillUtils.jsm");