diff --git a/browser/build.mk b/browser/build.mk index f8fcbd0f130..24425f1c90c 100644 --- a/browser/build.mk +++ b/browser/build.mk @@ -50,7 +50,7 @@ tier_app_dirs += $(MOZ_BRANDING_DIRECTORY) tier_app_dirs += toolkit/components/console/hudservice ifdef MOZ_SERVICES_SYNC -tier_app_dirs += services/sync +tier_app_dirs += services endif tier_app_dirs += browser diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 828f88424ae..1d50220618c 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -230,6 +230,7 @@ #ifdef MOZ_SERVICES_SYNC @BINPATH@/components/services-crypto.xpt #endif +@BINPATH@/components/services-crypto-component.xpt @BINPATH@/components/shellservice.xpt @BINPATH@/components/shistory.xpt @BINPATH@/components/spellchecker.xpt diff --git a/services/crypto/Makefile.in b/services/crypto/Makefile.in index 53a9b0a5cbc..d50c3c72a69 100644 --- a/services/crypto/Makefile.in +++ b/services/crypto/Makefile.in @@ -48,19 +48,6 @@ XPIDL_MODULE = services-crypto XPIDLSRCS = \ IWeaveCrypto.idl \ - nsISyncJPAKE.idl \ - $(NULL) - -LIBRARY_NAME = services-crypto -EXPORT_LIBRARY = 1 -IS_COMPONENT = 1 -MODULE_NAME = nsServicesCryptoModule -LIBXUL_LIBRARY = 1 -FORCE_USE_PIC = 1 -MOZILLA_INTERNAL_API = 1 - -CPPSRCS = \ - nsSyncJPAKE.cpp \ $(NULL) libs:: @@ -71,9 +58,3 @@ DIRS += tests endif include $(topsrcdir)/config/rules.mk - -EXTRA_DSO_LDOPTS += \ - $(MOZ_COMPONENT_LIBS) \ - $(NSPR_LIBS) \ - $(NSS_LIBS) \ - $(NULL) diff --git a/services/crypto/component/Makefile.in b/services/crypto/component/Makefile.in new file mode 100644 index 00000000000..122969c2bee --- /dev/null +++ b/services/crypto/component/Makefile.in @@ -0,0 +1,75 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# the Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2010 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Philipp von Weitershausen +# +# Alternatively, the contents of this file may be used under the terms of +# either of the GNU General Public License Version 2 or later (the "GPL"), +# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = services-crypto +XPIDL_MODULE = services-crypto-component + +XPIDLSRCS = \ + nsISyncJPAKE.idl \ + $(NULL) + +LIBRARY_NAME = services-crypto +EXPORT_LIBRARY = 1 +IS_COMPONENT = 1 +MODULE_NAME = nsServicesCryptoModule +LIBXUL_LIBRARY = 1 +FORCE_USE_PIC = 1 +MOZILLA_INTERNAL_API = 1 + +CPPSRCS = \ + nsSyncJPAKE.cpp \ + $(NULL) + +ifdef ENABLE_TESTS +DIRS += tests +endif + +include $(topsrcdir)/config/rules.mk + +EXTRA_DSO_LDOPTS += \ + $(MOZ_COMPONENT_LIBS) \ + $(NSPR_LIBS) \ + $(NSS_LIBS) \ + $(NULL) diff --git a/services/crypto/nsISyncJPAKE.idl b/services/crypto/component/nsISyncJPAKE.idl similarity index 100% rename from services/crypto/nsISyncJPAKE.idl rename to services/crypto/component/nsISyncJPAKE.idl diff --git a/services/crypto/nsSyncJPAKE.cpp b/services/crypto/component/nsSyncJPAKE.cpp similarity index 100% rename from services/crypto/nsSyncJPAKE.cpp rename to services/crypto/component/nsSyncJPAKE.cpp diff --git a/services/crypto/nsSyncJPAKE.h b/services/crypto/component/nsSyncJPAKE.h similarity index 100% rename from services/crypto/nsSyncJPAKE.h rename to services/crypto/component/nsSyncJPAKE.h diff --git a/services/crypto/component/tests/Makefile.in b/services/crypto/component/tests/Makefile.in new file mode 100644 index 00000000000..f781ecc6d64 --- /dev/null +++ b/services/crypto/component/tests/Makefile.in @@ -0,0 +1,50 @@ +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# the Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2010 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Philipp von Weitershausen +# +# Alternatively, the contents of this file may be used under the terms of +# either of the GNU General Public License Version 2 or later (the "GPL"), +# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = services/crypto/components/tests + +include $(DEPTH)/config/autoconf.mk + +MODULE = test_services_crypto +XPCSHELL_TESTS = unit + +include $(topsrcdir)/config/rules.mk diff --git a/services/crypto/tests/unit/test_jpake.js b/services/crypto/component/tests/unit/test_jpake.js similarity index 98% rename from services/crypto/tests/unit/test_jpake.js rename to services/crypto/component/tests/unit/test_jpake.js index 7979f4fba5b..b82c92b120b 100644 --- a/services/crypto/tests/unit/test_jpake.js +++ b/services/crypto/component/tests/unit/test_jpake.js @@ -1,3 +1,6 @@ +const Cc = Components.classes; +const Ci = Components.interfaces; + // Ensure PSM is initialized. Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports); diff --git a/toolkit/toolkit-tiers.mk b/toolkit/toolkit-tiers.mk index 8f0f187009c..5c381a287d9 100644 --- a/toolkit/toolkit-tiers.mk +++ b/toolkit/toolkit-tiers.mk @@ -235,7 +235,7 @@ ifdef MOZ_PREF_EXTENSIONS tier_platform_dirs += extensions/pref endif -tier_platform_dirs += services/crypto +tier_platform_dirs += services/crypto/component # JavaXPCOM JNI code is compiled into libXUL ifdef MOZ_JAVAXPCOM