summaryrefslogtreecommitdiffstats
path: root/src/core/net
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-09 15:08:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-22 11:56:55 +0000
commit93a6cc9df0f012bc1e0ed96b6016e1ad1ad07f9d (patch)
tree6d17cc64e3ddde650392066af3d7dd2af8d88139 /src/core/net
parent2ad08a9e97b181d461f472f831160ca963b49f9b (diff)
Add web-ui chrome://net-internals
Fixes: QTBUG-91695 Change-Id: Ie00b9bb92b62b97c500d427defbf2a4632ddbeda Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/net')
-rw-r--r--src/core/net/webui_controller_factory_qt.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/net/webui_controller_factory_qt.cpp b/src/core/net/webui_controller_factory_qt.cpp
index 59c5ca205..b645a6d72 100644
--- a/src/core/net/webui_controller_factory_qt.cpp
+++ b/src/core/net/webui_controller_factory_qt.cpp
@@ -51,6 +51,7 @@
#include "chrome/browser/accessibility/accessibility_ui.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/devtools_ui.h"
+#include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
#include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
#include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
#include "chrome/common/url_constants.h"
@@ -116,6 +117,8 @@ std::unique_ptr<WebUIController> NewWebUI(WebUI *web_ui, const GURL & /*url*/)
// with it.
WebUIFactoryFunction GetWebUIFactoryFunction(WebUI *web_ui, Profile *profile, const GURL &url)
{
+ Q_UNUSED(web_ui);
+ Q_UNUSED(profile);
// This will get called a lot to check all URLs, so do a quick check of other
// schemes to filter out most URLs.
if (!content::HasWebUIScheme(url))
@@ -123,6 +126,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI *web_ui, Profile *profile, co
// We must compare hosts only since some of the Web UIs append extra stuff
// after the host name.
+ if (url.host() == chrome::kChromeUINetInternalsHost)
+ return &NewWebUI<NetInternalsUI>;
+
if (url.host() == chrome::kChromeUIQuotaInternalsHost)
return &NewWebUI<QuotaInternalsUI>;