mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
[Bug 605370] Add Pref to disable desktop notifications r=jonas a=approval2.0
--HG-- extra : rebase_source : 9393634f3df2211feb932111ecf25765be233b59
This commit is contained in:
parent
605fc517e6
commit
e88fb00d51
@ -181,6 +181,9 @@ nsDOMDesktopNotification::HandleAlertServiceNotification(const char *aTopic)
|
||||
NS_IMETHODIMP
|
||||
nsDOMDesktopNotification::Show()
|
||||
{
|
||||
if (nsContentUtils::GetBoolPref("notification.disabled", PR_FALSE))
|
||||
return NS_OK;
|
||||
|
||||
// If we are in testing mode (running mochitests, for example)
|
||||
// and we are suppose to allow requests, then just post an allow event.
|
||||
if (nsContentUtils::GetBoolPref("notification.prompt.testing", PR_FALSE) &&
|
||||
|
Loading…
Reference in New Issue
Block a user