Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1195)

Unified Diff: third_party/WebKit/Source/platform/network/ResourceRequest.h

Issue 1858533002: Introduce WebCachePolicy to merge cache policy enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hiroshige review Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/network/ResourceRequest.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.h b/third_party/WebKit/Source/platform/network/ResourceRequest.h
index c47898a33c36ee18637da95b9a0e698c8386a358..302b19224d74c4f28c2ade67a0755da7986586f6 100644
--- a/third_party/WebKit/Source/platform/network/ResourceRequest.h
+++ b/third_party/WebKit/Source/platform/network/ResourceRequest.h
@@ -42,15 +42,7 @@
namespace blink {
-// Should be same with WebURLRequest::CachePolicy.
-// TODO(crbug.com/599364): Merge this with WebURLRequest::CachePolicy
-enum ResourceRequestCachePolicy {
- UseProtocolCachePolicy, // normal load
- ValidatingCacheData, // reload
- BypassingCache, // end-to-end reload
- ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data
- ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache
-};
+enum class WebCachePolicy;
enum ResourceRequestBlockedReason {
ResourceRequestBlockedReasonCSP,
@@ -105,8 +97,8 @@ public:
void removeCredentials();
- ResourceRequestCachePolicy getCachePolicy() const;
- void setCachePolicy(ResourceRequestCachePolicy cachePolicy);
+ WebCachePolicy getCachePolicy() const;
+ void setCachePolicy(WebCachePolicy);
double timeoutInterval() const; // May return 0 when using platform default.
void setTimeoutInterval(double timeoutInterval);
@@ -257,7 +249,7 @@ private:
const CacheControlHeader& cacheControlHeader() const;
KURL m_url;
- ResourceRequestCachePolicy m_cachePolicy;
+ WebCachePolicy m_cachePolicy;
double m_timeoutInterval; // 0 is a magic value for platform default on platforms that have one.
KURL m_firstPartyForCookies;
RefPtr<SecurityOrigin> m_requestorOrigin;
@@ -305,7 +297,7 @@ public:
CrossThreadResourceRequestData() { }
KURL m_url;
- ResourceRequestCachePolicy m_cachePolicy;
+ WebCachePolicy m_cachePolicy;
double m_timeoutInterval;
KURL m_firstPartyForCookies;
RefPtr<SecurityOrigin> m_requestorOrigin;

Powered by Google App Engine
This is Rietveld 408576698