Bug 653010 - Add cookies and logins to Services.jsm. r=gavin
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 26 Apr 2011 19:56:59 -0400
changeset 68784 b446ec38d314bd38e3df86af75a8ca5c4e472175
parent 68783 34e2ee09cbc8a707f3890da4f0fffbe2793e662f
child 68785 8deabe91c24be22a06849ac6d44c8ecd624f5272
push id99
push usereakhgari@mozilla.com
push dateTue, 24 May 2011 18:03:59 +0000
treeherdermozilla-aurora@26d6981b3d6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs653010
milestone6.0a1
Bug 653010 - Add cookies and logins 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
@@ -129,8 +129,16 @@ XPCOMUtils.defineLazyServiceGetter(Servi
 
 XPCOMUtils.defineLazyServiceGetter(Services, "urlFormatter",
                                    "@mozilla.org/toolkit/URLFormatterService;1",
                                    "nsIURLFormatter");
 
 XPCOMUtils.defineLazyServiceGetter(Services, "eTLD",
                                    "@mozilla.org/network/effective-tld-service;1",
                                    "nsIEffectiveTLDService");
+
+XPCOMUtils.defineLazyServiceGetter(Services, "cookies",
+                                   "@mozilla.org/cookiemanager;1",
+                                   "nsICookieManager2");
+
+XPCOMUtils.defineLazyServiceGetter(Services, "logins",
+                                   "@mozilla.org/login-manager;1",
+                                   "nsILoginManager");
--- a/toolkit/content/tests/browser/browser_Services.js
+++ b/toolkit/content/tests/browser/browser_Services.js
@@ -66,9 +66,11 @@ function checkServices() {
   checkService("locale", Ci.nsILocaleService);
   checkService("scriptloader", Ci.mozIJSSubScriptLoader);
   checkService("ww", Ci.nsIWindowWatcher);
   checkService("tm", Ci.nsIThreadManager);
   checkService("droppedLinkHandler", Ci.nsIDroppedLinkHandler);
   checkService("strings", Ci.nsIStringBundleService);
   checkService("urlFormatter", Ci.nsIURLFormatter);
   checkService("eTLD", Ci.nsIEffectiveTLDService);
+  checkService("cookies", Ci.nsICookieManager2);
+  checkService("logins", Ci.nsILoginManager);
 }