Move ResourceRequest construction out of SubresourceLoader
authorjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2012 22:55:33 +0000 (22:55 +0000)
committerjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2012 22:55:33 +0000 (22:55 +0000)
commit539a796dd4d59b4ac239ec9aa9ec7a5698311961
tree1ab84088ca09c70804b1373d081d08d5198ee785
parentc2adec946881b5a7c56303e109888e67a59e5005
Move ResourceRequest construction out of SubresourceLoader
https://bugs.webkit.org/show_bug.cgi?id=99627

Reviewed by Adam Barth.

CachedResource::load() fills out a bunch of http headers.
SubresourceLoader::create() adds a bunch more. Merge them.
Note that this merge requires a bit more care in CachedRawResource::canReuse(),
because more headers are set directly on CachedResource::m_resourceRequest, rather
than on a copy of it.

No new tests, no functionality change intended.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create):
* loader/cache/CachedRawResource.cpp:
(WebCore::shouldIgnoreHeaderForCacheReuse):
(WebCore):
(WebCore::CachedRawResource::canReuse):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::failBeforeStarting):
(WebCore):
(WebCore::CachedResource::addAdditionalRequestHeaders):
(WebCore::CachedResource::load):
* loader/cache/CachedResource.h:
(CachedResource):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/cache/CachedRawResource.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h