Bug 580676 - Add content prefs service service to Services.jsm [r=gavin]
authorVivien Nicolas <21@vvingtetun.org>
Thu, 22 Jul 2010 01:56:15 +0200
changeset 48048 3ccadf6033017152b6f59592fc95fcb9064b7eee
parent 48047 4c8820017f9fd493a5c4cf1c692d9a7e8c497a5c
child 48049 ab7618bb5c484834d4f36b29700e61c93afdc541
push idunknown
push userunknown
push dateunknown
reviewersgavin
bugs580676
milestone2.0b3pre
Bug 580676 - Add content prefs service service to Services.jsm [r=gavin]
toolkit/content/Services.jsm
toolkit/content/tests/browser/browser_Services.js
--- a/toolkit/content/Services.jsm
+++ b/toolkit/content/Services.jsm
@@ -56,16 +56,20 @@ XPCOMUtils.defineLazyGetter(Services, "a
 });
 
 XPCOMUtils.defineLazyGetter(Services, "dirsvc", function () {
   return Cc["@mozilla.org/file/directory_service;1"]
            .getService(Ci.nsIDirectoryService)
            .QueryInterface(Ci.nsIProperties);
 });
 
+XPCOMUtils.defineLazyServiceGetter(Services, "contentPrefs",
+                                   "@mozilla.org/content-pref/service;1",
+                                   "nsIContentPrefService");
+
 XPCOMUtils.defineLazyServiceGetter(Services, "wm",
                                    "@mozilla.org/appshell/window-mediator;1",
                                    "nsIWindowMediator");
 
 XPCOMUtils.defineLazyServiceGetter(Services, "obs",
                                    "@mozilla.org/observer-service;1",
                                    "nsIObserverService");
 
--- a/toolkit/content/tests/browser/browser_Services.js
+++ b/toolkit/content/tests/browser/browser_Services.js
@@ -43,16 +43,17 @@ function test() {
 function checkService(service, interface) {
   ok(service in Services, "Services." + service + " exists");
   ok(Services[service] instanceof interface, "Services." + service + " is an " + interface);
 }
 
 function checkServices() {
   checkService("prefs", Ci.nsIPrefBranch2);
   checkService("prefs", Ci.nsIPrefService);
+  checkService("contentPrefs", Ci.nsIContentPrefService);
   checkService("wm", Ci.nsIWindowMediator);
   checkService("perms", Ci.nsIPermissionManager);
   checkService("io", Ci.nsIIOService);
   checkService("io", Ci.nsIIOService2);
   checkService("appinfo", Ci.nsIXULAppInfo);
   checkService("appinfo", Ci.nsIXULRuntime);
   checkService("dirsvc", Ci.nsIDirectoryService);
   checkService("dirsvc", Ci.nsIProperties);