Remove unused prefs and imports. (Bug 524916)
authorEdward Lee <edilee@mozilla.com>
Wed, 25 Nov 2009 17:49:15 -0800
changeset 45892 65679b9f9db29c444cac2caf128de187d0bb9d21
parent 45891 e04e1f80e3dbdbccb77335bd2903d15abc9fb2e0
child 45893 4be4c251bd8f64631b42be5479537f908c38bb67
push idunknown
push userunknown
push dateunknown
bugs524916
Remove unused prefs and imports. (Bug 524916)
services/sync/modules/auth.js
services/sync/modules/base_records/collection.js
services/sync/modules/base_records/crypto.js
services/sync/modules/engines.js
services/sync/modules/engines/bookmarks.js
services/sync/modules/engines/clients.js
services/sync/modules/engines/forms.js
services/sync/modules/engines/history.js
services/sync/modules/engines/passwords.js
services/sync/modules/engines/prefs.js
services/sync/modules/engines/tabs.js
services/sync/modules/identity.js
services/sync/modules/stores.js
services/sync/modules/trackers.js
services/sync/modules/type_records/bookmark.js
services/sync/modules/type_records/clients.js
services/sync/modules/type_records/forms.js
services/sync/modules/type_records/history.js
services/sync/modules/type_records/passwords.js
services/sync/modules/type_records/prefs.js
services/sync/modules/type_records/tabs.js
services/sync/modules/util.js
services/sync/services-sync.js
--- a/services/sync/modules/auth.js
+++ b/services/sync/modules/auth.js
@@ -36,18 +36,16 @@
 
 const EXPORTED_SYMBOLS = ['Auth', 'BasicAuthenticator', 'NoOpAuthenticator'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
-Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 
 Utils.lazy(this, 'Auth', AuthMgr);
 
 // XXX: the authenticator api will probably need to be changed to support
 // other methods (digest, oauth, etc)
 
 function NoOpAuthenticator() {}
--- a/services/sync/modules/base_records/collection.js
+++ b/services/sync/modules/base_records/collection.js
@@ -36,23 +36,18 @@
 
 const EXPORTED_SYMBOLS = ['Collection'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
-Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/resource.js");
-Cu.import("resource://weave/base_records/wbo.js");
-Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function Collection(uri, recordObj) {
   this._Coll_init(uri);
   this._recordObj = recordObj;
 }
 Collection.prototype = {
   __proto__: Resource.prototype,
   _logName: "Collection",
--- a/services/sync/modules/base_records/crypto.js
+++ b/services/sync/modules/base_records/crypto.js
@@ -36,18 +36,16 @@
 
 const EXPORTED_SYMBOLS = ['CryptoWrapper', 'CryptoMeta', 'CryptoMetas'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
-Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/keys.js");
 
 function CryptoWrapper(uri) {
   this._CryptoWrap_init(uri);
 }
 CryptoWrapper.prototype = {
--- a/services/sync/modules/engines.js
+++ b/services/sync/modules/engines.js
@@ -37,17 +37,16 @@
 
 const EXPORTED_SYMBOLS = ['Engines', 'Engine', 'SyncEngine'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://weave/ext/Observers.js");
 Cu.import("resource://weave/ext/Sync.js");
 Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/resource.js");
 Cu.import("resource://weave/identity.js");
 Cu.import("resource://weave/stores.js");
--- a/services/sync/modules/engines/bookmarks.js
+++ b/services/sync/modules/engines/bookmarks.js
@@ -43,24 +43,20 @@ const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 const PARENT_ANNO = "weave/parent";
 const PREDECESSOR_ANNO = "weave/predecessor";
 const SERVICE_NOT_SUPPORTED = "Service not supported on this platform";
 
 Cu.import("resource://gre/modules/utils.js");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
-Cu.import("resource://weave/identity.js");
-Cu.import("resource://weave/notifications.js");
-Cu.import("resource://weave/resource.js");
 Cu.import("resource://weave/type_records/bookmark.js");
 
 // Lazily initialize the special top level folders
 let kSpecialIds = {};
 [["menu", "bookmarksMenuFolder"],
  ["places", "placesRoot"],
  ["tags", "tagsFolder"],
  ["toolbar", "toolbarFolder"],
--- a/services/sync/modules/engines/clients.js
+++ b/services/sync/modules/engines/clients.js
@@ -35,20 +35,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 const EXPORTED_SYMBOLS = ['Clients'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-Cu.import("resource://weave/log4moz.js");
-Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
 Cu.import("resource://weave/type_records/clientData.js");
 
 Utils.lazy(this, 'Clients', ClientEngine);
 
--- a/services/sync/modules/engines/forms.js
+++ b/services/sync/modules/engines/forms.js
@@ -36,23 +36,20 @@
 
 const EXPORTED_SYMBOLS = ['FormEngine'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
-Cu.import("resource://weave/base_records/collection.js");
 Cu.import("resource://weave/type_records/forms.js");
 
 function FormEngine() {
   this._init();
 }
 FormEngine.prototype = {
   __proto__: SyncEngine.prototype,
   name: "forms",
--- a/services/sync/modules/engines/history.js
+++ b/services/sync/modules/engines/history.js
@@ -38,22 +38,20 @@ const EXPORTED_SYMBOLS = ['HistoryEngine
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 const GUID_ANNO = "weave/guid";
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
-Cu.import("resource://weave/base_records/collection.js");
 Cu.import("resource://weave/type_records/history.js");
 
 // Create some helper functions to handle GUIDs
 function setGUID(uri, guid) {
   if (arguments.length == 1)
     guid = Utils.makeGUID();
   Utils.anno(uri, GUID_ANNO, guid, "WITH_HISTORY");
   return guid;
--- a/services/sync/modules/engines/passwords.js
+++ b/services/sync/modules/engines/passwords.js
@@ -36,17 +36,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 const EXPORTED_SYMBOLS = ['PasswordEngine'];
 
 const Cu = Components.utils;
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
 Cu.import("resource://weave/ext/Observers.js");
 Cu.import("resource://weave/type_records/passwords.js");
 
 function PasswordEngine() {
--- a/services/sync/modules/engines/prefs.js
+++ b/services/sync/modules/engines/prefs.js
@@ -38,19 +38,16 @@ const EXPORTED_SYMBOLS = ['PrefsEngine']
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 const WEAVE_SYNC_PREFS = "extensions.weave.prefs.sync";
 const WEAVE_PREFS_GUID = "preferences";
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
 Cu.import("resource://weave/type_records/prefs.js");
 
 function PrefsEngine() {
   this._init();
--- a/services/sync/modules/engines/tabs.js
+++ b/services/sync/modules/engines/tabs.js
@@ -41,17 +41,16 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/engines.js");
 Cu.import("resource://weave/stores.js");
 Cu.import("resource://weave/trackers.js");
-Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/type_records/tabs.js");
 Cu.import("resource://weave/engines/clientData.js");
 
 function TabEngine() {
   this._init();
 }
 TabEngine.prototype = {
   __proto__: SyncEngine.prototype,
--- a/services/sync/modules/identity.js
+++ b/services/sync/modules/identity.js
@@ -36,17 +36,16 @@
 
 const EXPORTED_SYMBOLS = ['Identity', 'ID'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://weave/ext/Sync.js");
 Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 
 Utils.lazy(this, 'ID', IDManager);
 
 // For storing identities we'll use throughout Weave
--- a/services/sync/modules/stores.js
+++ b/services/sync/modules/stores.js
@@ -37,17 +37,16 @@
 const EXPORTED_SYMBOLS = ['Store',
                           'SnapshotStore'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 
 /*
  * Data Stores
  * These can wrap, serialize items and apply commands
  */
--- a/services/sync/modules/trackers.js
+++ b/services/sync/modules/trackers.js
@@ -36,17 +36,16 @@
 
 const EXPORTED_SYMBOLS = ['Tracker'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/ext/Observers.js");
 
 /*
  * Trackers are associated with a single engine and deal with
  * listening for changes to their particular data type.
--- a/services/sync/modules/type_records/bookmark.js
+++ b/services/sync/modules/type_records/bookmark.js
@@ -37,21 +37,18 @@
 const EXPORTED_SYMBOLS = ["PlacesItem", "Bookmark", "BookmarkFolder",
   "BookmarkMicsum", "BookmarkQuery", "Livemark", "BookmarkSeparator"];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
-Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function PlacesItem(uri) {
   this._PlacesItem_init(uri);
 }
 PlacesItem.prototype = {
   decrypt: function PlacesItem_decrypt(passphrase) {
     // Do the normal CryptoWrapper decrypt, but change types before returning
     let clear = CryptoWrapper.prototype.decrypt.apply(this, arguments);
--- a/services/sync/modules/type_records/clients.js
+++ b/services/sync/modules/type_records/clients.js
@@ -36,17 +36,16 @@
 
 const EXPORTED_SYMBOLS = ['ClientRecord'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
 Cu.import("resource://weave/base_records/wbo.js");
 
 function ClientRecord(uri) {
   this._ClientRec_init(uri);
 }
 ClientRecord.prototype = {
   __proto__: WBORecord.prototype,
--- a/services/sync/modules/type_records/forms.js
+++ b/services/sync/modules/type_records/forms.js
@@ -36,21 +36,18 @@
 
 const EXPORTED_SYMBOLS = ['FormRec'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
-Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function FormRec(uri) {
   this._FormRec_init(uri);
 }
 FormRec.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Record.Form",
 
--- a/services/sync/modules/type_records/history.js
+++ b/services/sync/modules/type_records/history.js
@@ -36,21 +36,18 @@
 
 const EXPORTED_SYMBOLS = ['HistoryRec'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
-Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function HistoryRec(uri) {
   this._HistoryRec_init(uri);
 }
 HistoryRec.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Record.History",
 
--- a/services/sync/modules/type_records/passwords.js
+++ b/services/sync/modules/type_records/passwords.js
@@ -36,21 +36,18 @@
 
 const EXPORTED_SYMBOLS = ['LoginRec'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
-Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function LoginRec(uri) {
   this._LoginRec_init(uri);
 }
 LoginRec.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Record.Login",
 
--- a/services/sync/modules/type_records/prefs.js
+++ b/services/sync/modules/type_records/prefs.js
@@ -36,21 +36,18 @@
 
 const EXPORTED_SYMBOLS = ['PrefRec'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
-Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function PrefRec(uri) {
   this._PrefRec_init(uri);
 }
 PrefRec.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Record.Pref",
 
--- a/services/sync/modules/type_records/tabs.js
+++ b/services/sync/modules/type_records/tabs.js
@@ -36,21 +36,18 @@
 
 const EXPORTED_SYMBOLS = ['TabSetRecord'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://weave/log4moz.js");
 Cu.import("resource://weave/util.js");
-Cu.import("resource://weave/base_records/wbo.js");
 Cu.import("resource://weave/base_records/crypto.js");
-Cu.import("resource://weave/base_records/keys.js");
 
 function TabSetRecord(uri) {
   this._TabSetRecord_init(uri);
 }
 TabSetRecord.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Record.Tabs",
 
--- a/services/sync/modules/util.js
+++ b/services/sync/modules/util.js
@@ -36,17 +36,16 @@
 
 const EXPORTED_SYMBOLS = ['Utils', 'Svc', 'Str'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://weave/ext/Preferences.js");
 Cu.import("resource://weave/ext/Observers.js");
 Cu.import("resource://weave/ext/StringBundle.js");
 Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/log4moz.js");
 
 /*
  * Utility functions
--- a/services/sync/services-sync.js
+++ b/services/sync/services-sync.js
@@ -1,52 +1,40 @@
 pref("extensions.weave.serverURL", "@server_url@");
 pref("extensions.weave.storageAPI", "1.0");
 pref("extensions.weave.userURL", "user/");
 pref("extensions.weave.miscURL", "misc/");
 pref("extensions.weave.pwChangeURL", "https://services.mozilla.com/pw/forgot.php");
 pref("extensions.weave.termsURL", "https://mozillalabs.com/weave/tos/");
 
-pref("extensions.weave.encryption", "aes-256-cbc");
 pref("extensions.weave.client.name", "Firefox");
 pref("extensions.weave.lastversion", "firstrun");
-
-pref("extensions.weave.rememberpassword", true);
 pref("extensions.weave.autoconnect", true);
 
-pref("extensions.weave.syncOnQuit.enabled", true);
-
 pref("extensions.weave.engine.bookmarks", true);
 pref("extensions.weave.engine.forms", true);
 pref("extensions.weave.engine.history", true);
 pref("extensions.weave.engine.passwords", true);
 pref("extensions.weave.engine.prefs", true);
 pref("extensions.weave.engine.tabs", true);
 pref("extensions.weave.engine.tabs.backup", true);
 
 pref("extensions.weave.log.appender.console", "Warn");
 pref("extensions.weave.log.appender.dump", "Error");
 pref("extensions.weave.log.appender.debugLog", "Trace");
-
 pref("extensions.weave.log.rootLogger", "Trace");
 pref("extensions.weave.log.logger.service.main", "Debug");
-pref("extensions.weave.log.logger.async", "Debug");
 pref("extensions.weave.log.logger.authenticator", "Debug");
 pref("extensions.weave.log.logger.network.resources", "Debug");
 pref("extensions.weave.log.logger.engine.bookmarks", "Debug");
 pref("extensions.weave.log.logger.engine.clients", "Debug");
 pref("extensions.weave.log.logger.engine.forms", "Debug");
 pref("extensions.weave.log.logger.engine.history", "Debug");
 pref("extensions.weave.log.logger.engine.passwords", "Debug");
 pref("extensions.weave.log.logger.engine.tabs", "Debug");
-pref("extensions.weave.log.logger.authenticator", "Debug");
-
-pref("extensions.weave.network.numRetries", 2);
-
-pref("extensions.weave.tabs.sortMode", "recency");
 
 // Preferences to be synced by default
 pref("extensions.weave.prefs.sync.accessibility.blockautorefresh", true);
 pref("extensions.weave.prefs.sync.accessibility.browsewithcaret", true);
 pref("extensions.weave.prefs.sync.accessibility.typeaheadfind", true);
 pref("extensions.weave.prefs.sync.accessibility.typeaheadfind.linksonly", true);
 pref("extensions.weave.prefs.sync.app.update.mode", true);
 pref("extensions.weave.prefs.sync.browser.download.manager.closeWhenDone", true);