Bug 879118 - Issue a deprecation warning when nsIFormManager2 is used. r=mak, a=bajaj
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 24 Jun 2013 13:20:20 -0400
changeset 143429 a0836a9de974d74193c80296435fc853f89a4bb2
parent 143428 7b87d1785e56b4c03b2882a127d470fe9f0948aa
child 143430 9a606e0005f146dca25df686d4c5ae6a138e017e
push id3934
push userryanvm@gmail.com
push dateTue, 02 Jul 2013 12:57:32 +0000
treeherdermozilla-aurora@9f5d65c04085 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, bajaj
bugs879118
milestone24.0a2
Bug 879118 - Issue a deprecation warning when nsIFormManager2 is used. r=mak, a=bajaj
toolkit/components/satchel/nsFormHistory.js
toolkit/components/satchel/nsIFormHistory.idl
--- a/toolkit/components/satchel/nsFormHistory.js
+++ b/toolkit/components/satchel/nsFormHistory.js
@@ -5,20 +5,26 @@
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
+XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
+                                  "resource://gre/modules/Deprecated.jsm");
+
 const DB_VERSION = 4;
 const DAY_IN_MS  = 86400000; // 1 day in milliseconds
 
 function FormHistory() {
+    Deprecated.warning(
+        "nsIFormHistory2 is deprecated and will be removed in a future version",
+        "https://bugzilla.mozilla.org/show_bug.cgi?id=879118");
     this.init();
 }
 
 FormHistory.prototype = {
     classID          : Components.ID("{0c1bb408-71a2-403f-854a-3a0659829ded}"),
     QueryInterface   : XPCOMUtils.generateQI([Ci.nsIFormHistory2,
                                               Ci.nsIObserver,
                                               Ci.nsIMessageListener,
--- a/toolkit/components/satchel/nsIFormHistory.idl
+++ b/toolkit/components/satchel/nsIFormHistory.idl
@@ -10,16 +10,18 @@ interface mozIStorageConnection;
  * The nsIFormHistory object is a service which holds a set of name/value
  * pairs.  The names correspond to form field names, and the values correspond
  * to values the user has submitted.  So, several values may exist for a single
  * name.
  *
  * Note: this interface provides no means to access stored values.
  * Stored values are used by the FormFillController to generate
  * autocomplete matches.
+ *
+ * @deprecated use FormHistory.jsm instead.
  */
 
 [scriptable, uuid(5d7d84d1-9798-4016-bf61-a32acf09b29d)]
 interface nsIFormHistory2 : nsISupports
 {
   /**
    * Returns true if the form history has any entries.
    */