RequestServer: Remove "dump connection info" mechanism and UI

This is not relevant anymore when we use CURL.
This commit is contained in:
Andreas Kling 2024-09-06 07:35:18 +02:00 committed by Andreas Kling
parent e483bb70f0
commit 6d91c42214
Notes: github-actions[bot] 2024-09-19 05:39:11 +00:00
9 changed files with 0 additions and 78 deletions

View file

@ -137,11 +137,6 @@ static ErrorOr<NonnullRefPtr<ImageDecoderClient::Client>> launch_new_image_decod
return worker_client->dup_socket();
}
- (void)dumpConnectionInfo:(id)sender
{
m_request_server_client->dump_connection_info();
}
#pragma mark - NSApplication
- (void)terminate:(id)sender

View file

@ -642,9 +642,6 @@
[submenu addItem:[[NSMenuItem alloc] initWithTitle:@"Dump Local Storage"
action:@selector(dumpLocalStorage:)
keyEquivalent:@""]];
[submenu addItem:[[NSMenuItem alloc] initWithTitle:@"Dump Connection Info"
action:@selector(dumpConnectionInfo:)
keyEquivalent:@""]];
[submenu addItem:[NSMenuItem separatorItem]];
[submenu addItem:[[NSMenuItem alloc] initWithTitle:@"Show Line Box Borders"

View file

@ -431,11 +431,6 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, IsPopupWindow
debug_request("dump-local-storage");
});
auto* dump_connection_info = new QAction("Dump Co&nnection Info", this);
dump_connection_info->setIcon(load_icon_from_uri("resource://icons/16x16/network.png"sv));
debug_menu->addAction(dump_connection_info);
QObject::connect(dump_connection_info, &QAction::triggered, this, &BrowserWindow::dump_connection_info);
debug_menu->addSeparator();
m_show_line_box_borders_action = new QAction("Show Line Box Borders", this);
@ -1239,10 +1234,4 @@ void BrowserWindow::closeEvent(QCloseEvent* event)
QMainWindow::closeEvent(event);
}
void BrowserWindow::dump_connection_info()
{
if (auto& application = static_cast<Application&>(WebView::Application::the()); application.request_server_client)
application.request_server_client->dump_connection_info();
}
}

View file

@ -183,8 +183,6 @@ private:
Web::CSS::PreferredColorScheme m_preferred_color_scheme;
void set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_scheme);
static void dump_connection_info();
QTabWidget* m_tabs_container { nullptr };
Tab* m_current_tab { nullptr };
QMenu* m_zoom_menu { nullptr };

View file

@ -146,9 +146,4 @@ void RequestClient::websocket_certificate_requested(i32 connection_id)
maybe_connection.value()->did_request_certificates({});
}
void RequestClient::dump_connection_info()
{
async_dump_connection_info();
}
}

View file

@ -36,8 +36,6 @@ public:
bool stop_request(Badge<Request>, Request&);
bool set_certificate(Badge<Request>, Request&, ByteString, ByteString);
void dump_connection_info();
private:
virtual void die() override;

View file

@ -204,48 +204,6 @@ ConnectionFromClient::~ConnectionFromClient()
{
}
class Job : public RefCounted<Job>
, public Weakable<Job> {
public:
static NonnullRefPtr<Job> ensure(URL::URL const& url)
{
RefPtr<Job> job;
if (auto it = s_jobs.find(url); it != s_jobs.end())
job = it->value.strong_ref();
if (job == nullptr) {
job = adopt_ref(*new Job(url));
s_jobs.set(url, job);
}
return *job;
}
void start(Core::Socket& socket)
{
auto is_connected = socket.is_open();
VERIFY(is_connected);
ConnectionCache::request_did_finish(m_url, &socket);
}
void fail(Core::NetworkJob::Error error)
{
dbgln("Pre-connect to {} failed: {}", m_url, Core::to_string(error));
}
void will_be_destroyed() const
{
s_jobs.remove(m_url);
}
private:
explicit Job(URL::URL url)
: m_url(move(url))
{
}
URL::URL m_url;
inline static HashMap<URL::URL, WeakPtr<Job>> s_jobs {};
};
void ConnectionFromClient::die()
{
auto client_id = this->client_id();
@ -504,9 +462,4 @@ Messages::RequestServer::WebsocketSetCertificateResponse ConnectionFromClient::w
return success;
}
void ConnectionFromClient::dump_connection_info()
{
ConnectionCache::dump_jobs();
}
}

View file

@ -49,8 +49,6 @@ private:
virtual void websocket_close(i32, u16, ByteString const&) override;
virtual Messages::RequestServer::WebsocketSetCertificateResponse websocket_set_certificate(i32, ByteString const&, ByteString const&) override;
virtual void dump_connection_info() override;
HashMap<i32, RefPtr<WebSocket::WebSocket>> m_websockets;
struct ActiveRequest;

View file

@ -23,5 +23,4 @@ endpoint RequestServer
websocket_close(i32 connection_id, u16 code, ByteString reason) =|
websocket_set_certificate(i32 request_id, ByteString certificate, ByteString key) => (bool success)
dump_connection_info() =|
}