summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp6
-rw-r--r--src/core/renderer_host/resource_dispatcher_host_delegate_qt.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
index 421b3167b..eb43f46ad 100644
--- a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
@@ -59,6 +59,7 @@ namespace QtWebEngineCore {
ResourceDispatcherHostLoginDelegateQt::ResourceDispatcherHostLoginDelegateQt(net::AuthChallengeInfo *authInfo, net::URLRequest *request)
: m_authInfo(authInfo)
, m_request(request)
+ , m_url(request->url())
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
const content::ResourceRequestInfo *requestInfo = content::ResourceRequestInfo::ForRequest(request);
@@ -81,11 +82,12 @@ ResourceDispatcherHostLoginDelegateQt::~ResourceDispatcherHostLoginDelegateQt()
void ResourceDispatcherHostLoginDelegateQt::OnRequestCancelled()
{
destroy();
+ // TODO: this should close native dialog, since page can be navigated somewhere else
}
QUrl ResourceDispatcherHostLoginDelegateQt::url() const
{
- return toQt(m_request->url());
+ return toQt(m_url);
}
QString ResourceDispatcherHostLoginDelegateQt::realm() const
@@ -135,7 +137,7 @@ void ResourceDispatcherHostLoginDelegateQt::sendAuthToRequester(bool success, co
void ResourceDispatcherHostLoginDelegateQt::destroy()
{
m_dialogController.reset();
- m_request = 0;
+ m_request = nullptr;
}
static void LaunchURL(const GURL& url, int render_process_id,
diff --git a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
index c254a60f5..fa1f8108f 100644
--- a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
@@ -73,7 +73,7 @@ private:
// The request that wants login data.
// Must only be accessed on the IO thread.
net::URLRequest *m_request;
-
+ GURL m_url;
// This member is used to keep authentication dialog controller alive until
// authorization is sent or cancelled.
QSharedPointer<AuthenticationDialogController> m_dialogController;