Bug 976002 - Build time flag to enable/disable FxA. r=markh

This commit is contained in:
Fernando Jiménez 2014-03-13 22:00:48 -07:00
parent 03a1061b76
commit 199a4fc756
10 changed files with 39 additions and 8 deletions

View File

@ -907,3 +907,9 @@ pref("browser.autofocus", false);
// Enable wakelock
pref("dom.wakelock.enabled", true);
// Enable sync and mozId with Firefox Accounts.
#ifdef MOZ_SERVICES_FXACCOUNTS
pref("services.sync.fxaccounts.enabled", true);
pref("identity.fxaccounts.enabled", true);
#endif

View File

@ -22,7 +22,7 @@ if CONFIG['ENABLE_MARIONETTE']:
DEFINES['XPCOM_GLUE'] = True
for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER'):
for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER', 'MOZ_SERVICES_FXACCOUNTS'):
DEFINES[var] = CONFIG[var]
GENERATED_INCLUDES += [

View File

@ -23,7 +23,10 @@ Cu.import('resource://gre/modules/NetworkStatsService.jsm');
// Identity
Cu.import('resource://gre/modules/SignInToWebsite.jsm');
SignInToWebsiteController.init();
#ifdef MOZ_SERVICES_FXACCOUNTS
Cu.import('resource://gre/modules/FxAccountsMgmtService.jsm');
#endif
Cu.import('resource://gre/modules/DownloadsAPI.jsm');

View File

@ -72,9 +72,11 @@ component {637b0f77-2429-49a0-915f-abf5d0db8b9a} WebappsUpdateTimer.js
contract @mozilla.org/b2g/webapps-update-timer;1 {637b0f77-2429-49a0-915f-abf5d0db8b9a}
category update-timer WebappsUpdateTimer @mozilla.org/b2g/webapps-update-timer;1,getService,background-update-timer,webapps.update.interval,86400
#ifdef MOZ_SERVICES_FXACCOUNTS
# FxAccountsUIGlue.js
component {51875c14-91d7-4b8c-b65d-3549e101228c} FxAccountsUIGlue.js
contract @mozilla.org/fxaccounts/fxaccounts-ui-glue;1 {51875c14-91d7-4b8c-b65d-3549e101228c}
#endif
# HelperAppDialog.js
component {710322af-e6ae-4b0c-b2c9-1474a87b077e} HelperAppDialog.js

View File

@ -13,7 +13,6 @@ EXTRA_COMPONENTS += [
'ContentHandler.js',
'ContentPermissionPrompt.js',
'FilePicker.js',
'FxAccountsUIGlue.js',
'HelperAppDialog.js',
'MailtoProtocolHandler.js',
'PaymentGlue.js',
@ -37,8 +36,15 @@ if CONFIG['MOZ_UPDATER']:
EXTRA_JS_MODULES += [
'ErrorPage.jsm',
'FxAccountsMgmtService.jsm',
'SignInToWebsite.jsm',
'TelURIParser.jsm',
'WebappsUpdater.jsm',
]
if CONFIG['MOZ_SERVICES_FXACCOUNTS']:
EXTRA_COMPONENTS += [
'FxAccountsUIGlue.js'
]
EXTRA_JS_MODULES += [
'FxAccountsMgmtService.jsm'
]

View File

@ -63,3 +63,5 @@ fi
MOZ_FOLD_LIBS=1
MOZ_JSDOWNLOADS=1
MOZ_SERVICES_FXACCOUNTS=1

View File

@ -783,16 +783,18 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@BINPATH@/components/TelProtocolHandler.js
@BINPATH@/components/B2GAboutRedirector.js
@BINPATH@/components/FilePicker.js
@BINPATH@/components/FxAccountsUIGlue.js
@BINPATH@/components/HelperAppDialog.js
@BINPATH@/components/DownloadsUI.js
#ifdef MOZ_SERVICES_FXACCOUNTS
@BINPATH@/components/FxAccountsUIGlue.js
@BINPATH@/components/services_fxaccounts.xpt
#endif
@BINPATH@/components/DataStore.manifest
@BINPATH@/components/DataStoreService.js
@BINPATH@/components/dom_datastore.xpt
@BINPATH@/components/services_fxaccounts.xpt
#ifdef MOZ_WEBSPEECH
@BINPATH@/components/dom_webspeechsynth.xpt
#endif

View File

@ -28,6 +28,7 @@ MOZ_DISABLE_EXPORT_JS=1
MOZ_SAFE_BROWSING=1
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_CRYPTO=1
MOZ_SERVICES_FXACCOUNTS=1
MOZ_SERVICES_HEALTHREPORT=1
MOZ_SERVICES_METRICS=1
MOZ_SERVICES_SYNC=1
@ -67,4 +68,3 @@ MOZ_JSDOWNLOADS=1
MOZ_WEBM_ENCODER=1
# Enable exact rooting on desktop.
JSGC_USE_EXACT_ROOTING=1

View File

@ -7409,6 +7409,14 @@ if test -n "$MOZ_AUDIO_CHANNEL_MANAGER"; then
fi
AC_SUBST(MOZ_AUDIO_CHANNEL_MANAGER)
dnl ========================================================
dnl = Enable Support for Firefox Accounts in B2G
dnl ========================================================
if test -n "$MOZ_SERVICES_FXACCOUNTS"; then
AC_DEFINE(MOZ_SERVICES_FXACCOUNTS)
fi
AC_SUBST(MOZ_SERVICES_FXACCOUNTS)
dnl ========================================================
dnl = Support for demangling undefined symbols
dnl ========================================================

View File

@ -7,7 +7,6 @@
PARALLEL_DIRS += [
'common',
'crypto',
'fxaccounts',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
@ -22,6 +21,9 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
if CONFIG['MOZ_SERVICES_METRICS']:
PARALLEL_DIRS += ['metrics']
if CONFIG['MOZ_SERVICES_FXACCOUNTS']:
PARALLEL_DIRS += ['fxaccounts']
if CONFIG['MOZ_SERVICES_SYNC']:
PARALLEL_DIRS += ['sync']