diff --git a/dom/interfaces/base/nsIContentPrefService.idl b/dom/interfaces/base/nsIContentPrefService.idl index 3a2a997a5d8..0217c9831f9 100644 --- a/dom/interfaces/base/nsIContentPrefService.idl +++ b/dom/interfaces/base/nsIContentPrefService.idl @@ -71,7 +71,7 @@ interface nsIContentPrefCallback : nsISupports void onResult(in nsIVariant aResult); }; -[scriptable, uuid(36715960-de39-457b-9d02-b800d5d3079b)] +[scriptable, uuid(0014e2b4-1bab-4946-9211-7d28fc8df4d7)] interface nsIContentPrefService : nsISupports { /** @@ -131,6 +131,19 @@ interface nsIContentPrefService : nsISupports */ boolean hasPref(in nsIVariant aGroup, in AString aName); + /** + * Check whether or not the value of a pref (or its non-existance) is cached. + * + * @param aGroup the group for which to check for the pref, as an nsIURI + * from which the hostname will be used, a string + * (typically in the format of a hostname), or null + * to check for the global pref (applies to all sites) + * @param aName the name of the pref to check for + * @throws NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null + * @throws NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string + */ + boolean hasCachedPref(in nsIVariant aGroup, in AString aName); + /** * Remove a pref. * @@ -217,23 +230,6 @@ interface nsIContentPrefService : nsISupports readonly attribute mozIStorageConnection DBConnection; }; -[scriptable, uuid(126f07cb-edfe-497e-87dd-ba906506b287)] -interface nsIContentPrefService_MOZILLA_2_0 : nsIContentPrefService -{ - /** - * Check whether or not the value of a pref (or its non-existance) is cached. - * - * @param aGroup the group for which to check for the pref, as an nsIURI - * from which the hostname will be used, a string - * (typically in the format of a hostname), or null - * to check for the global pref (applies to all sites) - * @param aName the name of the pref to check for - * @throws NS_ERROR_ILLEGAL_VALUE if aGroup is not a string, nsIURI, or null - * @throws NS_ERROR_ILLEGAL_VALUE if aName is null or an empty string - */ - boolean hasCachedPref(in nsIVariant aGroup, in AString aName); -}; - %{C++ // The contractID for the generic implementation built in to xpcom. #define NS_CONTENT_PREF_SERVICE_CONTRACTID "@mozilla.org/content-pref/service;1" diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js index 144a11633aa..a5f417ff171 100644 --- a/toolkit/components/contentprefs/nsContentPrefService.js +++ b/toolkit/components/contentprefs/nsContentPrefService.js @@ -143,7 +143,6 @@ ContentPrefService.prototype = { classID: Components.ID("{e6a3f533-4ffa-4615-8eb4-d4e72d883fa7}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPrefService, - Ci.nsIContentPrefService_MOZILLA_2_0, Ci.nsIFrameMessageListener]), diff --git a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js b/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js index 2b5fbd75d47..dd931c8f046 100644 --- a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js +++ b/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js @@ -4,7 +4,7 @@ */ let cps = Cc["@mozilla.org/content-pref/service;1"]. - getService(Ci.nsIContentPrefService_MOZILLA_2_0); + getService(Ci.nsIContentPrefService); function run_test() { testCacheWorks("test1.example.com", "test-pref1"); diff --git a/toolkit/content/Services.jsm b/toolkit/content/Services.jsm index d96008a2be5..86ad255edd2 100644 --- a/toolkit/content/Services.jsm +++ b/toolkit/content/Services.jsm @@ -63,7 +63,7 @@ XPCOMUtils.defineLazyGetter(Services, "dirsvc", function () { XPCOMUtils.defineLazyServiceGetter(Services, "contentPrefs", "@mozilla.org/content-pref/service;1", - "nsIContentPrefService_MOZILLA_2_0"); + "nsIContentPrefService"); XPCOMUtils.defineLazyServiceGetter(Services, "wm", "@mozilla.org/appshell/window-mediator;1",