| Index: Source/core/fetch/Resource.h
|
| diff --git a/Source/core/fetch/Resource.h b/Source/core/fetch/Resource.h
|
| index 5e742ff4f84f1508b2c7924127f11a423346f1b1..8344ca9539bf61dbe8cc340d97ec42f5548f86c0 100644
|
| --- a/Source/core/fetch/Resource.h
|
| +++ b/Source/core/fetch/Resource.h
|
| @@ -121,8 +121,6 @@
|
| const ResourceRequest& resourceRequest() const { return m_resourceRequest; }
|
| const ResourceRequest& lastResourceRequest() const;
|
|
|
| - void setRevalidatingRequest(const ResourceRequest& request) { m_revalidatingRequest = request; }
|
| -
|
| const KURL& url() const { return m_resourceRequest.url();}
|
| Type type() const { return static_cast<Type>(m_type); }
|
| const ResourceLoaderOptions& options() const { return m_options; }
|
| @@ -232,7 +230,9 @@
|
| bool canReuseRedirectChain();
|
| bool mustRevalidateDueToCacheHeaders();
|
| bool canUseCacheValidator();
|
| - bool isCacheValidator() const { return !m_revalidatingRequest.isNull(); }
|
| + bool isCacheValidator() const { return m_resourceToRevalidate; }
|
| + Resource* resourceToRevalidate() const { return m_resourceToRevalidate; }
|
| + void setResourceToRevalidate(Resource*);
|
| bool hasCacheControlNoStoreHeader();
|
|
|
| double currentAge() const;
|
| @@ -267,8 +267,6 @@
|
| protected:
|
| virtual void checkNotify();
|
| virtual void finishOnePart();
|
| -
|
| - virtual void destroyDecodedDataForFailedRevalidation() { }
|
|
|
| // Normal resource pointers will silently switch what Resource* they reference when we
|
| // successfully revalidated the resource. We need a way to guarantee that the Resource
|
| @@ -300,6 +298,9 @@
|
| void setDecodedSize(size_t);
|
| void didAccessDecodedData();
|
|
|
| + void clearResourceToRevalidate();
|
| + void updateResponseAfterRevalidation(const ResourceResponse& validatingResponse);
|
| +
|
| void finishPendingClients();
|
|
|
| HashCountedSet<ResourceClient*> m_clients;
|
| @@ -337,7 +338,6 @@
|
| virtual void destroyDecodedDataIfPossible() { }
|
|
|
| ResourceRequest m_resourceRequest;
|
| - ResourceRequest m_revalidatingRequest;
|
| AtomicString m_accept;
|
| PersistentWillBeMember<ResourceLoader> m_loader;
|
| ResourceLoaderOptions m_options;
|
| @@ -402,6 +402,18 @@
|
| bool m_deleted;
|
| #endif
|
|
|
| + // If this field is non-null we are using the resource as a proxy for checking whether an existing resource is still up to date
|
| + // using HTTP If-Modified-Since/If-None-Match headers. If the response is 304 all clients of this resource are moved
|
| + // to to be clients of m_resourceToRevalidate and the resource is deleted. If not, the field is zeroed and this
|
| + // resources becomes normal resource load.
|
| + RawPtrWillBeMember<Resource> m_resourceToRevalidate;
|
| +
|
| + // If this field is non-null, the resource has a proxy for checking whether it is still up to date (see m_resourceToRevalidate).
|
| + RawPtrWillBeMember<Resource> m_proxyResource;
|
| +
|
| + // These handles will need to be updated to point to the m_resourceToRevalidate in case we get 304 response.
|
| + HashSet<ResourcePtrBase*> m_handlesToRevalidate;
|
| +
|
| // Ordered list of all redirects followed while fetching this resource.
|
| Vector<RedirectPair> m_redirectChain;
|
| };
|
|
|