Title: [108499] trunk/Source/WebKit2
- Revision
- 108499
- Author
- [email protected]
- Date
- 2012-02-22 07:11:31 -0800 (Wed, 22 Feb 2012)
Log Message
[Qt][WK2] Implement proxy authentication handling.
https://bugs.webkit.org/show_bug.cgi?id=78792
Patch by Michael BrĂ¼ning <[email protected]> on 2012-02-22
Reviewed by Simon Hausmann.
This patch corrects two bugs with the previous implementation:
1. The signal proxyAuthenticationRequired was not connected to a
slot.
2. The slot onProxyAuthenticationRequired had the wrong parameters.
* WebProcess/qt/QtNetworkAccessManager.cpp:
(WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
(WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
* WebProcess/qt/QtNetworkAccessManager.h: Added include.
(QtNetworkAccessManager):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (108498 => 108499)
--- trunk/Source/WebKit2/ChangeLog 2012-02-22 15:10:21 UTC (rev 108498)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-22 15:11:31 UTC (rev 108499)
@@ -1,3 +1,21 @@
+2012-02-22 Michael BrĂ¼ning <[email protected]>
+
+ [Qt][WK2] Implement proxy authentication handling.
+ https://bugs.webkit.org/show_bug.cgi?id=78792
+
+ Reviewed by Simon Hausmann.
+
+ This patch corrects two bugs with the previous implementation:
+ 1. The signal proxyAuthenticationRequired was not connected to a
+ slot.
+ 2. The slot onProxyAuthenticationRequired had the wrong parameters.
+
+ * WebProcess/qt/QtNetworkAccessManager.cpp:
+ (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
+ (WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired):
+ * WebProcess/qt/QtNetworkAccessManager.h: Added include.
+ (QtNetworkAccessManager):
+
2012-02-22 Kenneth Rohde Christiansen <[email protected]>
Merge setVisibleRectTrajectoryVector and adjustVisibleRect to
Modified: trunk/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.cpp (108498 => 108499)
--- trunk/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.cpp 2012-02-22 15:10:21 UTC (rev 108498)
+++ trunk/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.cpp 2012-02-22 15:11:31 UTC (rev 108499)
@@ -44,6 +44,7 @@
, m_webProcess(webProcess)
{
connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), SLOT(onAuthenticationRequired(QNetworkReply*, QAuthenticator*)));
+ connect(this, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), SLOT(onProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
connect(this, SIGNAL(sslErrors(QNetworkReply*, QList<QSslError>)), SLOT(onSslErrors(QNetworkReply*, QList<QSslError>)));
}
@@ -74,12 +75,16 @@
m_applicationSchemes.insert(page, scheme.toLower());
}
-void QtNetworkAccessManager::onProxyAuthenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator)
+void QtNetworkAccessManager::onProxyAuthenticationRequired(const QNetworkProxy& proxy, QAuthenticator* authenticator)
{
- WebPage* webPage = obtainOriginatingWebPage(reply->request());
+ // FIXME: Check if there is a better way to get a reference to the page.
+ WebPage* webPage = m_webProcess->focusedWebPage();
- String hostname = proxy().hostName();
- uint16_t port = static_cast<uint16_t>(proxy().port());
+ if (!webPage)
+ return;
+
+ String hostname = proxy.hostName();
+ uint16_t port = static_cast<uint16_t>(proxy.port());
String prefilledUsername = authenticator->user();
String username;
String password;
Modified: trunk/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h (108498 => 108499)
--- trunk/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h 2012-02-22 15:10:21 UTC (rev 108498)
+++ trunk/Source/WebKit2/WebProcess/qt/QtNetworkAccessManager.h 2012-02-22 15:11:31 UTC (rev 108499)
@@ -29,6 +29,7 @@
#include <QMultiHash>
#include <QNetworkAccessManager>
+#include <QNetworkProxy>
#include <QString>
namespace WebKit {
@@ -47,7 +48,7 @@
private Q_SLOTS:
void onAuthenticationRequired(QNetworkReply *, QAuthenticator *);
- void onProxyAuthenticationRequired(QNetworkReply *, QAuthenticator *);
+ void onProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator *);
void onSslErrors(QNetworkReply*, const QList<QSslError>&);
private:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes