[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-60.4.0esr-8.5-1] Revert "Bug 28640 - Push notifications are disabled, so don't clear them"



commit 0b36c3e8a59bf675ac6bd1ae36d38f16c4748884
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Fri Dec 14 20:05:58 2018 +0000

    Revert "Bug 28640 - Push notifications are disabled, so don't clear them"
    
    This reverts commit 1d5d94a68d95f675c108f377a1b9e02ee16b15bb.
---
 mobile/android/modules/Sanitizer.jsm | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/mobile/android/modules/Sanitizer.jsm b/mobile/android/modules/Sanitizer.jsm
index 2940dd81b217..3782c92172f9 100644
--- a/mobile/android/modules/Sanitizer.jsm
+++ b/mobile/android/modules/Sanitizer.jsm
@@ -124,23 +124,18 @@ Sanitizer.prototype = {
         sss.clearAll();
 
         // Clear push subscriptions
-        // Avoid throwing an error because nsIPushService isn't implemented
         yield new Promise((resolve, reject) => {
-            reject(new Error("Error clearing push subscriptions"));
+          let push = Cc["@mozilla.org/push/Service;1"]
+                       .getService(Ci.nsIPushService);
+          push.clearForDomain("*", status => {
+            if (Components.isSuccessCode(status)) {
+              resolve();
+            } else {
+              reject(new Error("Error clearing push subscriptions: " +
+                               status));
+            }
+          });
         });
-
-        //yield new Promise((resolve, reject) => {
-        //  let push = Cc["@mozilla.org/push/Service;1"]
-        //               .getService(Ci.nsIPushService);
-        //  push.clearForDomain("*", status => {
-        //    if (Components.isSuccessCode(status)) {
-        //      resolve();
-        //    } else {
-        //      reject(new Error("Error clearing push subscriptions: " +
-        //                       status));
-        //    }
-        //  });
-        //});
         TelemetryStopwatch.finish("FX_SANITIZE_SITESETTINGS", refObj);
       }),
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits