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

Unified Diff: third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp

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/platform/exported/WebServiceWorkerRequest.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp b/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
index aa9478f6bc7dd82b10ed5de48805442158dadb58..6d315ab7fbc17b93133ba1b81f88ade99845094e 100644
--- a/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
@@ -20,6 +20,7 @@ class WebServiceWorkerRequestPrivate
: mode_(WebURLRequest::kFetchRequestModeNoCORS),
is_main_resource_load_(false),
credentials_mode_(WebURLRequest::kFetchCredentialsModeOmit),
+ cache_mode_(WebURLRequest::kFetchRequestCacheModeDefault),
redirect_mode_(WebURLRequest::kFetchRedirectModeFollow),
request_context_(WebURLRequest::kRequestContextUnspecified),
frame_type_(WebURLRequest::kFrameTypeNone),
@@ -33,6 +34,7 @@ class WebServiceWorkerRequestPrivate
WebURLRequest::FetchRequestMode mode_;
bool is_main_resource_load_;
WebURLRequest::FetchCredentialsMode credentials_mode_;
+ WebURLRequest::FetchRequestCacheMode cache_mode_;
WebURLRequest::FetchRedirectMode redirect_mode_;
WebURLRequest::RequestContext request_context_;
WebURLRequest::FrameType frame_type_;
@@ -154,6 +156,16 @@ WebURLRequest::FetchCredentialsMode WebServiceWorkerRequest::CredentialsMode()
return private_->credentials_mode_;
}
+void WebServiceWorkerRequest::SetCacheMode(
+ WebURLRequest::FetchRequestCacheMode cache_mode) {
+ private_->cache_mode_ = cache_mode;
+}
+
+WebURLRequest::FetchRequestCacheMode WebServiceWorkerRequest::CacheMode()
+ const {
+ return private_->cache_mode_;
+}
+
void WebServiceWorkerRequest::SetRedirectMode(
WebURLRequest::FetchRedirectMode redirect_mode) {
private_->redirect_mode_ = redirect_mode;
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 ('k') | third_party/WebKit/public/platform/WebURLRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698