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 53d3e88ba0a5db97276c6284d2d36f41ee9771d7..421b3167ba51fb5fa8babdfc06d06cde1b1bd8e8 100644
--- a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.cpp
@@ -61,11 +61,14 @@ ResourceDispatcherHostLoginDelegateQt::ResourceDispatcherHostLoginDelegateQt(net
     , m_request(request)
 {
     Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
-    content::ResourceRequestInfo::GetRenderFrameForRequest(request, &m_renderProcessId,  &m_renderFrameId);
+    const content::ResourceRequestInfo *requestInfo = content::ResourceRequestInfo::ForRequest(request);
+    Q_ASSERT(requestInfo);
 
     content::BrowserThread::PostTask(
-        content::BrowserThread::UI, FROM_HERE,
-        base::Bind(&ResourceDispatcherHostLoginDelegateQt::triggerDialog, this));
+            content::BrowserThread::UI, FROM_HERE,
+            base::Bind(&ResourceDispatcherHostLoginDelegateQt::triggerDialog,
+                       this,
+                       requestInfo->GetWebContentsGetterForRequest()));
 }
 
 ResourceDispatcherHostLoginDelegateQt::~ResourceDispatcherHostLoginDelegateQt()
@@ -100,14 +103,13 @@ bool ResourceDispatcherHostLoginDelegateQt::isProxy() const
     return m_authInfo->is_proxy;
 }
 
-void ResourceDispatcherHostLoginDelegateQt::triggerDialog()
+void ResourceDispatcherHostLoginDelegateQt::triggerDialog(const content::ResourceRequestInfo::WebContentsGetter &webContentsGetter)
 {
     Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
-    content::RenderFrameHost *renderFrameHost = content::RenderFrameHost::FromID(m_renderProcessId, m_renderFrameId);
-    if (!renderFrameHost)
+    content::WebContentsImpl *webContents =
+            static_cast<content::WebContentsImpl *>(webContentsGetter.Run());
+    if (!webContents)
         return;
-    content::RenderViewHost *renderViewHost = renderFrameHost->GetRenderViewHost();
-    content::WebContentsImpl *webContents = static_cast<content::WebContentsImpl *>(content::WebContents::FromRenderViewHost(renderViewHost));
     WebContentsAdapterClient *client = WebContentsViewQt::from(webContents->GetView())->client();
 
     AuthenticationDialogControllerPrivate *dialogControllerData = new AuthenticationDialogControllerPrivate(this);
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 305f0cea56cdef743021a30d8d27f79b96525127..c254a60f520d455007a5b7fa264452ec696583da 100644
--- a/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/renderer_host/resource_dispatcher_host_delegate_qt.h
@@ -65,12 +65,9 @@ public:
     void sendAuthToRequester(bool success, const QString &user, const QString &password);
 
 private:
-    void triggerDialog();
+    void triggerDialog(const content::ResourceRequestInfo::WebContentsGetter &);
     void destroy();
 
-    int m_renderProcessId;
-    int m_renderFrameId;
-
     scoped_refptr<net::AuthChallengeInfo> m_authInfo;
 
     // The request that wants login data.