Changeset 155108 in webkit
- Timestamp:
- Sep 5, 2013 2:51:25 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r155077 r155108 2048 2048 platform/network/ResourceResponseBase.cpp 2049 2049 platform/network/SocketStreamHandleBase.cpp 2050 platform/network/SynchronousLoaderClient.cpp 2050 2051 2051 2052 platform/sql/SQLValue.cpp -
trunk/Source/WebCore/ChangeLog
r155107 r155108 1 2013-09-05 Csaba Osztrogonác <ossy@webkit.org> 2 3 Fix SynchronousLoaderClient class for !USE(CFNETWORK) platforms 4 https://bugs.webkit.org/show_bug.cgi?id=120532 5 6 Reviewed by Darin Adler. 7 8 * CMakeLists.txt: 9 * PlatformEfl.cmake: 10 * PlatformGTK.cmake: 11 * WebCore.vcxproj/WebCore.vcxproj: 12 * WebCore.vcxproj/WebCore.vcxproj.filters: 13 * platform/network/SynchronousLoaderClient.cpp: 14 * platform/network/cf/SynchronousLoaderClientCFNet.cpp: Added. 15 (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge): 16 (WebCore::SynchronousLoaderClient::platformBadResponseError): 17 * platform/network/soup/SynchronousLoaderClientSoup.cpp: Added. 18 (WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge): 19 (WebCore::SynchronousLoaderClient::platformBadResponseError): 20 1 21 2013-09-05 Jinwoo Song <jinwoo7.song@samsung.com> 2 22 -
trunk/Source/WebCore/PlatformEfl.cmake
r154908 r155108 162 162 platform/network/soup/SocketStreamHandleSoup.cpp 163 163 platform/network/soup/SoupURIUtils.cpp 164 platform/network/soup/SynchronousLoaderClientSoup.cpp 164 165 165 166 platform/posix/FileSystemPOSIX.cpp -
trunk/Source/WebCore/PlatformGTK.cmake
r154262 r155108 203 203 platform/network/soup/SocketStreamHandleSoup.cpp 204 204 platform/network/soup/SoupURIUtils.cpp 205 platform/network/soup/SynchronousLoaderClientSoup.cpp 205 206 206 207 platform/PlatformStrategies.cpp -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r155077 r155108 8243 8243 </ClCompile> 8244 8244 <ClCompile Include="..\platform\network\cf\SocketStreamHandleCFNet.cpp"> 8245 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild> 8246 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild> 8247 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild> 8248 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild> 8249 </ClCompile> 8250 <ClCompile Include="..\platform\network\cf\SynchronousLoaderClientCFNet.cpp"> 8245 8251 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild> 8246 8252 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r155084 r155108 1954 1954 <Filter>platform\network\cf</Filter> 1955 1955 </ClCompile> 1956 <ClCompile Include="..\platform\network\cf\SynchronousLoaderClientCFNet.cpp"> 1957 <Filter>platform\network\cf</Filter> 1958 </ClCompile> 1956 1959 <ClCompile Include="..\platform\network\win\DownloadBundleWin.cpp"> 1957 1960 <Filter>platform\network\win</Filter> -
trunk/Source/WebCore/platform/network/SynchronousLoaderClient.cpp
r149255 r155108 30 30 #include "ResourceHandle.h" 31 31 #include "ResourceRequest.h" 32 33 #if USE(CFNETWORK)34 #include <CFNetwork/CFURLConnectionPriv.h>35 #endif36 32 37 33 namespace WebCore { … … 67 63 #endif 68 64 69 #if USE(CFNETWORK)70 void SynchronousLoaderClient::didReceiveAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge& challenge)71 {72 // FIXME: The user should be asked for credentials, as in async case.73 CFURLConnectionUseCredential(handle->connection(), 0, challenge.cfURLAuthChallengeRef());74 }75 #endif76 77 65 void SynchronousLoaderClient::didReceiveResponse(ResourceHandle*, const ResourceResponse& response) 78 66 { … … 98 86 } 99 87 100 #if USE(CFNETWORK)101 ResourceError SynchronousLoaderClient::platformBadResponseError()102 {103 RetainPtr<CFErrorRef> cfError = adoptCF(CFErrorCreate(kCFAllocatorDefault, kCFErrorDomainCFNetwork, kCFURLErrorBadServerResponse, 0));104 return cfError.get();105 88 } 106 #endif107 108 } -
trunk/Source/WebCore/platform/network/cf/SynchronousLoaderClientCFNet.cpp
r155107 r155108 27 27 #include "SynchronousLoaderClient.h" 28 28 29 #if USE(CFNETWORK) 30 29 31 #include "AuthenticationChallenge.h" 30 32 #include "ResourceHandle.h" 31 #include "ResourceRequest.h"32 33 #if USE(CFNETWORK)34 33 #include <CFNetwork/CFURLConnectionPriv.h> 35 #endif36 34 37 35 namespace WebCore { 38 36 39 SynchronousLoaderClient::~SynchronousLoaderClient()40 {41 }42 43 void SynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/)44 {45 // FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.46 if (protocolHostAndPortAreEqual(handle->firstRequest().url(), request.url()))47 return;48 49 ASSERT(m_error.isNull());50 m_error = platformBadResponseError();51 m_isDone = true;52 request = 0;53 }54 55 bool SynchronousLoaderClient::shouldUseCredentialStorage(ResourceHandle*)56 {57 // FIXME: We should ask FrameLoaderClient whether using credential storage is globally forbidden.58 return m_allowStoredCredentials;59 }60 61 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)62 bool SynchronousLoaderClient::canAuthenticateAgainstProtectionSpace(ResourceHandle*, const ProtectionSpace&)63 {64 // FIXME: We should ask FrameLoaderClient. <http://webkit.org/b/65196>65 return true;66 }67 #endif68 69 #if USE(CFNETWORK)70 37 void SynchronousLoaderClient::didReceiveAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge& challenge) 71 38 { … … 73 40 CFURLConnectionUseCredential(handle->connection(), 0, challenge.cfURLAuthChallengeRef()); 74 41 } 75 #endif76 42 77 void SynchronousLoaderClient::didReceiveResponse(ResourceHandle*, const ResourceResponse& response)78 {79 m_response = response;80 }81 82 void SynchronousLoaderClient::didReceiveData(ResourceHandle*, const char* data, int length, int /*encodedDataLength*/)83 {84 m_data.append(data, length);85 }86 87 void SynchronousLoaderClient::didFinishLoading(ResourceHandle*, double)88 {89 m_isDone = true;90 }91 92 void SynchronousLoaderClient::didFail(ResourceHandle*, const ResourceError& error)93 {94 ASSERT(m_error.isNull());95 96 m_error = error;97 m_isDone = true;98 }99 100 #if USE(CFNETWORK)101 43 ResourceError SynchronousLoaderClient::platformBadResponseError() 102 44 { … … 104 46 return cfError.get(); 105 47 } 106 #endif107 48 108 } 49 } // namespace WebCore 50 51 #endif // USE(CFNETWORK)
Note: See TracChangeset
for help on using the changeset viewer.