diff options
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/urlinterceptor.cpp | 14 | ||||
-rw-r--r-- | src/webengine/urlinterceptor.h | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp index da2925c..3ffcb44 100644 --- a/src/webengine/urlinterceptor.cpp +++ b/src/webengine/urlinterceptor.cpp @@ -19,7 +19,11 @@ ******************************************************************************/ #include "urlinterceptor.h" -#include "blocker/filtercollection.h" +#include "filter/filtercollection.h" + +#ifdef DEBUG_VERBOSE +#include <QTime> +#endif UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent) : QWebEngineUrlRequestInterceptor(parent) @@ -29,7 +33,9 @@ UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent) : void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { #ifdef DEBUG_VERBOSE + QTime time; qDebug("%s --> [%i] %s", qUtf8Printable(info.firstPartyUrl().toString()), info.resourceType(), qUtf8Printable(info.requestUrl().toString())); + time.start(); #endif for(auto s : m_manager->subscriptions()) { @@ -37,11 +43,15 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) if(r.match) { info.block(r.block); #ifdef DEBUG_VERBOSE - qDebug(">> matched [%s] [%s]", r.block ? "blocked" : "allowed", qUtf8Printable(r.pattern)); + qDebug(">> matched [%s] [%s] in %i ms", r.block ? "blocked" : "allowed", qUtf8Printable(r.pattern), time.elapsed()); #endif return; } } + +#ifdef DEBUG_VERBOSE + qDebug(">> passed in %i ms", time.elapsed()); +#endif } void UrlRequestInterceptor::setSubscription(BlockerManager *manager) diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h index 65f2ce0..acd076a 100644 --- a/src/webengine/urlinterceptor.h +++ b/src/webengine/urlinterceptor.h @@ -22,7 +22,7 @@ #define ADBLOCKINTERCEPTOR_H #include <QWebEngineUrlRequestInterceptor> -#include "blocker/blockermanager.h" +#include "filter/blockermanager.h" class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor { |