Bug 617539 - Fold nsIContentPrefService_MOZILLA_2_0 back into the main interface, r=gavin

This commit is contained in:
Benjamin Smedberg 2011-03-25 11:03:34 -04:00
Родитель 17826d891f
Коммит 2148ea9abe
4 изменённых файлов: 16 добавлений и 21 удалений

Просмотреть файл

@ -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"

Просмотреть файл

@ -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]),

Просмотреть файл

@ -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");

Просмотреть файл

@ -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",