diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/loader/SubresourceLoader.cpp | |
parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/loader/SubresourceLoader.cpp')
-rw-r--r-- | WebCore/loader/SubresourceLoader.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/WebCore/loader/SubresourceLoader.cpp b/WebCore/loader/SubresourceLoader.cpp index bff48b2..4a339ef 100644 --- a/WebCore/loader/SubresourceLoader.cpp +++ b/WebCore/loader/SubresourceLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,15 +29,11 @@ #include "config.h" #include "SubresourceLoader.h" -#include "Document.h" #include "DocumentLoader.h" #include "Frame.h" #include "FrameLoader.h" -#include "Logging.h" #include "ResourceHandle.h" -#include "ResourceRequest.h" #include "SubresourceLoaderClient.h" -#include "SharedBuffer.h" #include <wtf/RefCountedLeakCounter.h> namespace WebCore { @@ -64,13 +60,6 @@ SubresourceLoader::~SubresourceLoader() #endif } -bool SubresourceLoader::load(const ResourceRequest& r) -{ - m_frame->loader()->didTellClientAboutLoad(r.url().string()); - - return ResourceLoader::load(r); -} - PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, SubresourceLoaderClient* client, const ResourceRequest& request, bool skipCanLoadCheck, bool sendResourceLoadCallbacks, bool shouldContentSniff) { if (!frame) @@ -106,7 +95,7 @@ PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, Subresourc else newRequest.setCachePolicy(fl->originalRequest().cachePolicy()); - fl->addExtraFieldsToRequest(newRequest, false, false); + fl->addExtraFieldsToSubresourceRequest(newRequest); RefPtr<SubresourceLoader> subloader(adoptRef(new SubresourceLoader(frame, client, sendResourceLoadCallbacks, shouldContentSniff))); if (!subloader->load(newRequest)) @@ -237,6 +226,17 @@ void SubresourceLoader::didCancel(const ResourceError& error) ResourceLoader::didCancel(error); } +bool SubresourceLoader::shouldUseCredentialStorage() +{ + RefPtr<SubresourceLoader> protect(this); + + bool shouldUse; + if (m_client && m_client->getShouldUseCredentialStorage(this, shouldUse)) + return shouldUse; + + return ResourceLoader::shouldUseCredentialStorage(); +} + void SubresourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge) { RefPtr<SubresourceLoader> protect(this); |