summaryrefslogtreecommitdiffstats
path: root/WebKit/win/WebDownloadCFNet.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-10-08 17:19:54 +0100
committerSteve Block <steveblock@google.com>2009-10-20 00:41:58 +0100
commit231d4e3152a9c27a73b6ac7badbe6be673aa3ddf (patch)
treea6c7e2d6cd7bfa7011cc39abbb436142d7a4a7c8 /WebKit/win/WebDownloadCFNet.cpp
parente196732677050bd463301566a68a643b6d14b907 (diff)
downloadexternal_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.zip
external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.gz
external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.bz2
Merge webkit.org at R49305 : Automatic merge by git.
Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7
Diffstat (limited to 'WebKit/win/WebDownloadCFNet.cpp')
-rw-r--r--WebKit/win/WebDownloadCFNet.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/WebKit/win/WebDownloadCFNet.cpp b/WebKit/win/WebDownloadCFNet.cpp
index 0df738e..144a6a5 100644
--- a/WebKit/win/WebDownloadCFNet.cpp
+++ b/WebKit/win/WebDownloadCFNet.cpp
@@ -47,6 +47,7 @@
#pragma warning(push, 0)
#include <WebCore/AuthenticationCF.h>
#include <WebCore/BString.h>
+#include <WebCore/CredentialStorage.h>
#include <WebCore/ResourceError.h>
#include <WebCore/ResourceHandle.h>
#include <WebCore/ResourceRequest.h>
@@ -193,7 +194,7 @@ HRESULT STDMETHODCALLTYPE WebDownload::initToResumeWithBundle(
// Attempt to remove the ".download" extension from the bundle for the final file destination
// Failing that, we clear m_destination and will ask the delegate later once the download starts
if (m_bundlePath.endsWith(bundleExtension(), false)) {
- m_destination = m_bundlePath.copy();
+ m_destination = m_bundlePath.threadsafeCopy();
m_destination.truncate(m_destination.length() - bundleExtension().length());
} else
m_destination = String();
@@ -381,9 +382,10 @@ void WebDownload::didReceiveAuthenticationChallenge(CFURLAuthChallengeRef challe
{
// Try previously stored credential first.
if (!CFURLAuthChallengeGetPreviousFailureCount(challenge)) {
- CFURLCredentialRef credential = WebCoreCredentialStorage::get(CFURLAuthChallengeGetProtectionSpace(challenge));
- if (credential) {
- CFURLDownloadUseCredential(m_download.get(), credential, challenge);
+ Credential credential = CredentialStorage::get(core(CFURLAuthChallengeGetProtectionSpace(challenge)));
+ if (!credential.isEmpty()) {
+ RetainPtr<CFURLCredentialRef> cfCredential(AdoptCF, createCF(credential));
+ CFURLDownloadUseCredential(m_download.get(), cfCredential.get(), challenge);
return;
}
}