change chrome url for weave passwords in login manager to chrome://weave
authorDan Mills <thunder@mozilla.com>
Mon, 01 Dec 2008 19:04:49 -0800
changeset 45070 ea32b42e6bc20915332b8b8770a18b86a161a2fa
parent 45069 fe24db73a6943cf9d06cedcb5036c9e5ff95d5fb
child 45071 e648ea4665b1a5f11a52395525c3076ae5cd9051
push idunknown
push userunknown
push dateunknown
change chrome url for weave passwords in login manager to chrome://weave
services/sync/modules/util.js
--- a/services/sync/modules/util.js
+++ b/services/sync/modules/util.js
@@ -100,42 +100,42 @@ let Utils = {
     );
   },
 
   findPassword: function findPassword(realm, username) {
     // fixme: make a request and get the realm ?
     let password;
     let lm = Cc["@mozilla.org/login-manager;1"]
              .getService(Ci.nsILoginManager);
-    let logins = lm.findLogins({}, 'chrome://sync', null, realm);
+    let logins = lm.findLogins({}, 'chrome://weave', null, realm);
 
     for (let i = 0; i < logins.length; i++) {
       if (logins[i].username == username) {
         password = logins[i].password;
         break;
       }
     }
     return password;
   },
 
   setPassword: function setPassword(realm, username, password) {
     // cleanup any existing passwords
     let lm = Cc["@mozilla.org/login-manager;1"]
              .getService(Ci.nsILoginManager);
-    let logins = lm.findLogins({}, 'chrome://sync', null, realm);
+    let logins = lm.findLogins({}, 'chrome://weave', null, realm);
     for (let i = 0; i < logins.length; i++)
       lm.removeLogin(logins[i]);
 
     if (!password)
       return;
 
     // save the new one
     let nsLoginInfo = new Components.Constructor(
       "@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo, "init");
-    let login = new nsLoginInfo('chrome://sync', null, realm,
+    let login = new nsLoginInfo('chrome://weave', null, realm,
                                 username, password, "", "");
     lm.addLogin(login);
   },
 
   // lazy load objects from a constructor on first access.  It will
   // work with the global object ('this' in the global context).
   lazy: function Weave_lazy(dest, prop, ctr) {
     let getter = function() {