Bug 791869 - Remove services/notifications; r=rnewman

This commit is contained in:
Gregory Szorc 2013-01-06 12:04:59 -08:00
Родитель 2a5ae000e2
Коммит 97aca5f790
16 изменённых файлов: 2 добавлений и 114 удалений

Просмотреть файл

@ -29,7 +29,6 @@ MOZ_SERVICES_AITC=1
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_CRYPTO=1
MOZ_SERVICES_METRICS=1
MOZ_SERVICES_NOTIFICATIONS=1
MOZ_SERVICES_SYNC=1
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_EXTENSIONS_DEFAULT=" gio"

Просмотреть файл

@ -473,9 +473,6 @@
@BINPATH@/components/HealthReportComponents.manifest
@BINPATH@/components/HealthReportService.js
#endif
#ifdef MOZ_SERVICES_NOTIFICATIONS
@BINPATH@/components/NotificationsComponents.manifest
#endif
#ifdef MOZ_SERVICES_SYNC
@BINPATH@/components/SyncComponents.manifest
@BINPATH@/components/Weave.js

Просмотреть файл

@ -900,6 +900,7 @@ xpicleanup@BIN_SUFFIX@
components/interfaces.manifest
components/jsconsole-clhandler.js
components/NetworkGeolocationProvider.js
components/NotificationsComponents.manifest
components/nsBadCertHandler.js
components/nsBlocklistService.js
components/nsBrowserContentHandler.js
@ -1056,6 +1057,7 @@ xpicleanup@BIN_SUFFIX@
modules/services-common/rest.js
modules/services-common/stringbundle.js
modules/services-common/utils.js
modules/services-notifications/service.js
modules/services-sync/auth.js
modules/services-sync/base_records/collection.js
modules/services-sync/base_records/crypto.js

Просмотреть файл

@ -25,10 +25,6 @@ ifdef MOZ_SERVICES_METRICS
PARALLEL_DIRS += metrics
endif
ifdef MOZ_SERVICES_NOTIFICATIONS
PARALLEL_DIRS += notifications
endif
ifdef MOZ_SERVICES_SYNC
PARALLEL_DIRS += sync
endif

Просмотреть файл

@ -10,7 +10,6 @@ add_makefiles "
services/crypto/component/Makefile
services/healthreport/Makefile
services/metrics/Makefile
services/notifications/Makefile
services/sync/Makefile
services/sync/locales/Makefile
"
@ -22,7 +21,6 @@ if [ "$ENABLE_TESTS" ]; then
services/crypto/tests/Makefile
services/healthreport/tests/Makefile
services/metrics/tests/Makefile
services/notifications/tests/Makefile
services/sync/tests/Makefile
"
fi

Просмотреть файл

@ -1,28 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH := @DEPTH@
topsrcdir := @top_srcdir@
srcdir := @srcdir@
VPATH := @srcdir@
include $(DEPTH)/config/autoconf.mk
EXTRA_COMPONENTS := \
NotificationsComponents.manifest \
$(NULL)
PREF_JS_EXPORTS := $(srcdir)/services-notifications.js
modules := \
service.js \
$(NULL)
NOTIFICATION_MODULE_FILES := $(modules)
NOTIFICATION_MODULE_DEST = $(FINAL_TARGET)/modules/services-notifications
INSTALL_TARGETS += NOTIFICATION_MODULE
TEST_DIRS += tests
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1,2 +0,0 @@
# Register resource aliases
resource services-notifications resource://gre/modules/services-notifications/

Просмотреть файл

@ -1,11 +0,0 @@
Here lies most of the moving parts for push notifcations in the browser. DOM
and UI bindings will live elsewhere; these files deal with talking to the API,
storing messages, and creating persistent connections to the notification
server.
Structure:
services.js::Service
This is a singleton that manages API calls and message storage. It's an
instance of the NotificationSvc class. Messages and state are persisted to a
JSON file on disk.

Просмотреть файл

@ -1,28 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
this.EXPORTED_SYMBOLS = ["Service"];
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
Cu.import("resource://services-common/preferences.js");
const PREFS_BRANCH = "services.notifications.";
function NotificationSvc() {
this.ready = false;
this.prefs = new Preferences(PREFS_BRANCH);
}
NotificationSvc.prototype = {
get serverURL() this.prefs.get("serverURL"),
onStartup: function onStartup() {
this.ready = true;
}
};
this.Service = new NotificationSvc();
Service.onStartup();

Просмотреть файл

@ -1 +0,0 @@
pref("services.notifications.serverURL", "https://notifications.mozilla.org/");

Просмотреть файл

@ -1,16 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = test_services_notifications
XPCSHELL_TESTS = unit
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1,3 +0,0 @@
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
let _ = function() print(Array.slice(arguments).join(" "));

Просмотреть файл

@ -1,8 +0,0 @@
// Check that everything is getting hooked together properly.
function run_test() {
_("When imported, Service.onStartup is called.");
Cu.import("resource://services-notifications/service.js");
do_check_eq(Service.serverURL, "https://notifications.mozilla.org/");
do_check_eq(Service.ready, true);
}

Просмотреть файл

@ -1,5 +0,0 @@
[DEFAULT]
head = head_helpers.js
tail =
[test_service_start.js]

Просмотреть файл

@ -90,7 +90,6 @@ skip-if = os == "android"
[include:services/crypto/components/tests/unit/xpcshell.ini]
[include:services/healthreport/tests/xpcshell/xpcshell.ini]
[include:services/metrics/tests/xpcshell/xpcshell.ini]
[include:services/notifications/tests/unit/xpcshell.ini]
[include:services/sync/tests/unit/xpcshell.ini]
# Bug 676978: tests hang on Android
skip-if = os == "android"

Просмотреть файл

@ -16,5 +16,4 @@ MOZ_SERVICES_AITC=1
MOZ_SERVICES_COMMON=1
MOZ_SERVICES_CRYPTO=1
MOZ_SERVICES_METRICS=1
MOZ_SERVICES_NOTIFICATIONS=1
MOZ_SERVICES_SYNC=1