[BlackBerry] Remove redundant requireAuth parameter of NetworkJob::notifyAuthReceived
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 15:25:41 +0000 (15:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 15:25:41 +0000 (15:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109855

Patch by Joe Mason <jmason@rim.com> on 2013-02-15
Reviewed by Yong Li.

Internal PR: 296697
Internally Reviewed By: Leo Yang

Code cleanup: The requireAuth parameter of NetworkJob::notifyAuthReceived is redundant as its value
can be determined from "result" - if result is AuthResultRetry, requireAuth is false, otherwise it
is true.

No new tests as there is no behaviour change.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142996 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/blackberry/NetworkJob.cpp
Source/WebCore/platform/network/blackberry/NetworkJob.h

index abb2e80a776c187f623ed0b2acace8df92824a2a..1104292b8c730c2fca28ccb104987c4fa02ec039 100644 (file)
@@ -1,3 +1,24 @@
+2013-02-15  Joe Mason  <jmason@rim.com>
+
+        [BlackBerry] Remove redundant requireAuth parameter of NetworkJob::notifyAuthReceived
+        https://bugs.webkit.org/show_bug.cgi?id=109855
+
+        Reviewed by Yong Li.
+
+        Internal PR: 296697
+        Internally Reviewed By: Leo Yang
+
+        Code cleanup: The requireAuth parameter of NetworkJob::notifyAuthReceived is redundant as its value
+        can be determined from "result" - if result is AuthResultRetry, requireAuth is false, otherwise it
+        is true.
+
+        No new tests as there is no behaviour change.
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::notifyAuthReceived):
+        * platform/network/blackberry/NetworkJob.h:
+        (NetworkJob):
+
 2013-02-15  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Web Inspector: Redo in text editor should always collapse selection to end.
index 973da355f5ba49eb9e383b1edec3be0cb1e91bce..02716dc9f464ceae28fa87d640f836b6c7228bf0 100644 (file)
@@ -270,7 +270,7 @@ void NetworkJob::notifyMultipartHeaderReceived(const char* key, const char* valu
         handleNotifyMultipartHeaderReceived(key, value);
 }
 
-void NetworkJob::notifyAuthReceived(NetworkRequest::AuthType authType, NetworkRequest::AuthProtocol authProtocol, NetworkRequest::AuthScheme authScheme, const char* realm, AuthResult result, bool requireCredentials)
+void NetworkJob::notifyAuthReceived(NetworkRequest::AuthType authType, NetworkRequest::AuthProtocol authProtocol, NetworkRequest::AuthScheme authScheme, const char* realm, AuthResult result)
 {
     ProtectionSpaceServerType serverType;
     switch (authType) {
@@ -355,7 +355,7 @@ void NetworkJob::notifyAuthReceived(NetworkRequest::AuthType authType, NetworkRe
         storeCredentials();
     }
     if (result != AuthResultSuccess) {
-        switch (sendRequestWithCredentials(serverType, scheme, realm, requireCredentials)) {
+        switch (sendRequestWithCredentials(serverType, scheme, realm, result != AuthResultRetry)) {
         case SendRequestSucceeded:
             m_newJobWithCredentialsStarted = true;
             break;
index bb5a1d4bd313ac4b907577e8702627cc1ea9d935..d18ff2dde1e6c5e4ec90d8f6b6ae42d369effe5b 100644 (file)
@@ -77,8 +77,7 @@ public:
         BlackBerry::Platform::NetworkRequest::AuthProtocol,
         BlackBerry::Platform::NetworkRequest::AuthScheme,
         const char* realm,
-        AuthResult,
-        bool requireCredentials);
+        AuthResult);
     // notifyStringHeaderReceived exists only to resolve ambiguity between char* and String parameters
     void notifyStringHeaderReceived(const String& key, const String& value);
     void handleNotifyHeaderReceived(const String& key, const String& value);