]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/interceptors/UrlRequestInterceptor.cpp
Finish block list implementation.
[PrivacyBrowserPC.git] / src / interceptors / UrlRequestInterceptor.cpp
index 3b47e7e052d41066d4d23157982940bb9e89b5d4..18944ea5ae0587bb06940c9f2286bd7a4e6b7358 100644 (file)
@@ -45,10 +45,10 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &urlReques
     requestStructPointer->urlString = urlRequestInfo.requestUrl().toString();
 
     // Check the filter lists.
-    bool requestNotHandled = globalFilterListHelperPointer->checkFilterLists(urlRequestInfo, requestStructPointer);
+    bool continueProcessing = globalFilterListHelperPointer->checkFilterLists(urlRequestInfo, requestStructPointer);
 
     // Further process the request if it hasn't already been handled.
-    if (requestNotHandled) {
+    if (continueProcessing) {
         // Handle the request according to the resource type.
         switch (urlRequestInfo.resourceType())
         {
@@ -61,6 +61,9 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &urlReques
                 // Mark the request struct as blocked.
                 requestStructPointer->dispositionInt = FilterListHelper::BLOCKED;
 
+                // Mark the ping as blocked by the default behavior.
+                requestStructPointer->filterListTitle = i18nc("Default HTTP ping blocking", "Default blocking of all HTTP ping requests.");
+
                 // Display the HTTP Ping blocked dialog.
                 emit displayHttpPingDialog(urlRequestInfo.requestUrl().toString());