Title: [122444] trunk/Source
Revision
122444
Author
[email protected]
Date
2012-07-12 04:18:05 -0700 (Thu, 12 Jul 2012)

Log Message

[BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
https://bugs.webkit.org/show_bug.cgi?id=91054

Patch by Jonathan Dong <[email protected]> on 2012-07-12
Reviewed by George Staikos.

Source/WebCore:

Added an interface function syncProxyCredential() in class
PageClientBlackBerry, which is responsible to notify WebPageClient
to synchronize proxy credential to the chrome process.

Internally reviewed by Jason Liu <[email protected]>

No new tests since there's no functional change.

* platform/blackberry/PageClientBlackBerry.h:
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
credential and notify webpage client to synchronize it.

Source/WebKit/blackberry:

Implemented interface function syncProxyCredential() derived
from class PageClientBlackBerry.

Internally reviewed by Jason Liu <[email protected]>

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
(WebKit):
* Api/WebPageClient.h:
* Api/WebPage_p.h:
(WebPagePrivate):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122443 => 122444)


--- trunk/Source/WebCore/ChangeLog	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebCore/ChangeLog	2012-07-12 11:18:05 UTC (rev 122444)
@@ -1,3 +1,23 @@
+2012-07-12  Jonathan Dong  <[email protected]>
+
+        [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
+        https://bugs.webkit.org/show_bug.cgi?id=91054
+
+        Reviewed by George Staikos.
+
+        Added an interface function syncProxyCredential() in class
+        PageClientBlackBerry, which is responsible to notify WebPageClient
+        to synchronize proxy credential to the chrome process.
+
+        Internally reviewed by Jason Liu <[email protected]>
+
+        No new tests since there's no functional change.
+
+        * platform/blackberry/PageClientBlackBerry.h:
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
+        credential and notify webpage client to synchronize it.
+
 2012-07-12  Xingnan Wang  <[email protected]>
 
         [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound()

Modified: trunk/Source/WebCore/platform/blackberry/PageClientBlackBerry.h (122443 => 122444)


--- trunk/Source/WebCore/platform/blackberry/PageClientBlackBerry.h	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebCore/platform/blackberry/PageClientBlackBerry.h	2012-07-12 11:18:05 UTC (rev 122444)
@@ -72,6 +72,7 @@
     virtual bool isVisible() const = 0;
     virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&) = 0;
     virtual SaveCredentialType notifyShouldSaveCredential(bool) = 0;
+    virtual void syncProxyCredential(const WebCore::Credential&) = 0;
 };
 
 #endif // PageClientBlackBerry_h

Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (122443 => 122444)


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-07-12 11:18:05 UTC (rev 122444)
@@ -800,6 +800,12 @@
 
     CredentialStorage::set(challenge.proposedCredential(), challenge.protectionSpace(), m_response.url());
     challenge.setStored(true);
+
+    if (challenge.protectionSpace().serverType() == ProtectionSpaceProxyHTTP) {
+        BlackBerry::Platform::Client::get()->setProxyCredential(challenge.proposedCredential().user().utf8().data(),
+                                                                challenge.proposedCredential().password().utf8().data());
+        m_frame->page()->chrome()->client()->platformPageClient()->syncProxyCredential(challenge.proposedCredential());
+    }
 }
 
 void NetworkJob::purgeCredentials()

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (122443 => 122444)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-07-12 11:18:05 UTC (rev 122444)
@@ -2343,6 +2343,11 @@
     return static_cast<PageClientBlackBerry::SaveCredentialType>(m_client->notifyShouldSaveCredential(isNew));
 }
 
+void WebPagePrivate::syncProxyCredential(const WebCore::Credential& credential)
+{
+    m_client->syncProxyCredential(credential.user().utf8().data(), credential.password().utf8().data());
+}
+
 void WebPagePrivate::notifyPopupAutofillDialog(const Vector<String>& candidates, const WebCore::IntRect& screenRect)
 {
     vector<string> textItems;

Modified: trunk/Source/WebKit/blackberry/Api/WebPageClient.h (122443 => 122444)


--- trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2012-07-12 11:18:05 UTC (rev 122444)
@@ -215,6 +215,7 @@
     virtual void setPreventsScreenIdleDimming(bool noDimming) = 0;
     virtual bool authenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0;
     virtual SaveCredentialType notifyShouldSaveCredential(bool isNew) = 0;
+    virtual void syncProxyCredential(const WebString& username, const WebString& password) = 0;
     virtual void notifyPopupAutofillDialog(const std::vector<std::string>&, const Platform::IntRect&) = 0;
     virtual void notifyDismissAutofillDialog() = 0;
 

Modified: trunk/Source/WebKit/blackberry/Api/WebPage_p.h (122443 => 122444)


--- trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-07-12 11:18:05 UTC (rev 122444)
@@ -191,6 +191,7 @@
     virtual bool isVisible() const { return m_visible; }
     virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&);
     virtual SaveCredentialType notifyShouldSaveCredential(bool);
+    virtual void syncProxyCredential(const WebCore::Credential&);
 
     // Called from within WebKit via ChromeClientBlackBerry.
     void enterFullscreenForNode(WebCore::Node*);

Modified: trunk/Source/WebKit/blackberry/ChangeLog (122443 => 122444)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-07-12 11:16:21 UTC (rev 122443)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-07-12 11:18:05 UTC (rev 122444)
@@ -1,3 +1,22 @@
+2012-07-12  Jonathan Dong  <[email protected]>
+
+        [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
+        https://bugs.webkit.org/show_bug.cgi?id=91054
+
+        Reviewed by George Staikos.
+
+        Implemented interface function syncProxyCredential() derived
+        from class PageClientBlackBerry.
+
+        Internally reviewed by Jason Liu <[email protected]>
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
+        (WebKit):
+        * Api/WebPageClient.h:
+        * Api/WebPage_p.h:
+        (WebPagePrivate):
+
 2012-07-11  Mike Lattanzio  <[email protected]>
 
         [BlackBerry] UserViewportArguments are not properly respected.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to