Bug 856440 - Push Notification startup regression. r=nsm

--HG--
extra : rebase_source : 5e56eddbab9a85c2a1fe7196e407a7b9d4c123d0
This commit is contained in:
Doug Turner 2013-04-01 18:03:53 -07:00
parent 9db82b9b6d
commit 8641f1450b
4 changed files with 10 additions and 0 deletions

View File

@ -389,6 +389,7 @@ pref("dom.mozContacts.enabled", true);
pref("dom.mozAlarms.enabled", true);
// SimplePush
pref("services.push.enabled", true);
// serverURL to be assigned by services team
pref("services.push.serverURL", "");
pref("services.push.userAgentID", "");

View File

@ -39,6 +39,9 @@ Push.prototype = {
init: function(aWindow) {
debug("init()");
if (!Services.prefs.getBoolPref("services.push.enabled"))
return null;
let principal = aWindow.document.nodePrincipal;
this._pageURL = principal.URI;

View File

@ -280,6 +280,9 @@ PushService.prototype = {
observe: function observe(aSubject, aTopic, aData) {
switch (aTopic) {
case "app-startup":
if (!this._prefs.get("enabled"))
return;
Services.obs.addObserver(this, "final-ui-startup", false);
Services.obs.addObserver(this, "profile-change-teardown", false);
Services.obs.addObserver(this,

View File

@ -4048,6 +4048,9 @@ pref("dom.mozContacts.enabled", false);
// WebAlarms
pref("dom.mozAlarms.enabled", false);
// SimplePush
pref("services.push.enabled", false);
// WebNetworkStats
pref("dom.mozNetworkStats.enabled", false);