| Index: Source/WebCore/platform/network/chromium/ResourceHandle.cpp
|
| ===================================================================
|
| --- Source/WebCore/platform/network/chromium/ResourceHandle.cpp (revision 141117)
|
| +++ Source/WebCore/platform/network/chromium/ResourceHandle.cpp (working copy)
|
| @@ -277,6 +277,22 @@
|
| }
|
|
|
| // static
|
| +bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*)
|
| +{
|
| + // This method is used to determine if a POST request can be repeated from
|
| + // cache, but you cannot really know until you actually try to read from the
|
| + // cache. Even if we checked now, something else could come along and wipe
|
| + // out the cache entry by the time we fetch it.
|
| + //
|
| + // So, we always say yes here, to prevent the FrameLoader from initiating a
|
| + // reload. Then in FrameLoaderClientImpl::dispatchWillSendRequest, we
|
| + // fix-up the cache policy of the request to force a load from the cache.
|
| + //
|
| + ASSERT(request.httpMethod() == "POST");
|
| + return true;
|
| +}
|
| +
|
| +// static
|
| void ResourceHandle::cacheMetadata(const ResourceResponse& response, const Vector<char>& data)
|
| {
|
| WebKit::Platform::current()->cacheMetadata(response.url(), response.responseTime(), data.data(), data.size());
|
|
|