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

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

Issue 2811623002: Fetch API: Add Request#cache attribute (Closed)
Patch Set: 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..1271e969a4820f8656279feeddaea7b228cca7f6 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),
+ request_cache_(WebURLRequest::kFetchRequestCacheDefault),
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::FetchRequestCache request_cache_;
falken 2017/04/11 05:53:59 nit: I prefer calling this |cache_mode_|. I think
yiyix 2017/04/11 10:00:06 Done.
WebURLRequest::FetchRedirectMode redirect_mode_;
WebURLRequest::RequestContext request_context_;
WebURLRequest::FrameType frame_type_;
@@ -154,6 +156,15 @@ WebURLRequest::FetchCredentialsMode WebServiceWorkerRequest::CredentialsMode()
return private_->credentials_mode_;
}
+void WebServiceWorkerRequest::SetRequestCache(
falken 2017/04/11 05:53:59 nit: I prefer SetCacheMode() and CacheMode() here.
yiyix 2017/04/11 10:00:06 Done.
+ WebURLRequest::FetchRequestCache request_cache) {
+ private_->request_cache_ = request_cache;
+}
+
+WebURLRequest::FetchRequestCache WebServiceWorkerRequest::RequestCache() const {
+ return private_->request_cache_;
+}
+
void WebServiceWorkerRequest::SetRedirectMode(
WebURLRequest::FetchRedirectMode redirect_mode) {
private_->redirect_mode_ = redirect_mode;

Powered by Google App Engine
This is Rietveld 408576698