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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchRequestData.h

Issue 2811623002: Fetch API: Add Request#cache attribute (Closed)
Patch Set: address comments Created 3 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/modules/fetch/FetchRequestData.h
diff --git a/third_party/WebKit/Source/modules/fetch/FetchRequestData.h b/third_party/WebKit/Source/modules/fetch/FetchRequestData.h
index d96b33537a60442d7cb4f889f1b9367b08f23032..cdfa0d27cdc826feae7c183eb32bbec98694e7f9 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchRequestData.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchRequestData.h
@@ -66,6 +66,10 @@ class FetchRequestData final
WebURLRequest::FetchCredentialsMode Credentials() const {
return credentials_;
}
+ void SetCacheMode(WebURLRequest::FetchRequestCacheMode cache_mode) {
+ cache_mode_ = cache_mode;
+ }
+ WebURLRequest::FetchRequestCacheMode CacheMode() const { return cache_mode_; }
void SetRedirect(WebURLRequest::FetchRedirectMode redirect) {
redirect_ = redirect;
}
@@ -120,6 +124,10 @@ class FetchRequestData final
// FIXME: Support m_synchronousFlag;
WebURLRequest::FetchRequestMode mode_;
WebURLRequest::FetchCredentialsMode credentials_;
+ // TODO(yiyix): |cache_mode_| is exposed but does not yet affect fetch
+ // behavior. We must transfer the mode to the network layer and service
+ // worker.
+ WebURLRequest::FetchRequestCacheMode cache_mode_;
WebURLRequest::FetchRedirectMode redirect_;
// FIXME: Support m_useURLCredentialsFlag;
// FIXME: Support m_redirectCount;

Powered by Google App Engine
This is Rietveld 408576698