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

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

Issue 1965013002: Implement headers attributes in ForeignFetchResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using instead of typedef Created 4 years, 7 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/FetchResponseData.h
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseData.h b/third_party/WebKit/Source/modules/fetch/FetchResponseData.h
index a61b98ebdd7bdbc7a163ada081589ce8f64308da..615a0feeace2f190439d24f31433e6e7aeee458b 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseData.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseData.h
@@ -5,6 +5,7 @@
#ifndef FetchResponseData_h
#define FetchResponseData_h
+#include "core/fetch/CrossOriginAccessControl.h"
#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
@@ -35,7 +36,13 @@ public:
static FetchResponseData* createWithBuffer(BodyStreamBuffer*);
FetchResponseData* createBasicFilteredResponse() const;
+ // Creates a CORS filtered response, settings the response's cors exposed
+ // header names list to the result of parsing the Access-Control-Expose-Headers
+ // header.
FetchResponseData* createCORSFilteredResponse() const;
+ // Creates a CORS filtered response with an explicit set of exposed header
+ // names.
+ FetchResponseData* createCORSFilteredResponse(const HTTPHeaderSet& exposedHeaders) const;
FetchResponseData* createOpaqueFilteredResponse() const;
FetchResponseData* createOpaqueRedirectFilteredResponse() const;
@@ -55,6 +62,7 @@ public:
String internalMIMEType() const;
int64_t responseTime() const { return m_responseTime; }
String cacheStorageCacheName() const { return m_cacheStorageCacheName; }
+ const HTTPHeaderSet& corsExposedHeaderNames() const { return m_corsExposedHeaderNames; }
void setURL(const KURL& url) { m_url = url; }
void setStatus(unsigned short status) { m_status = status; }
@@ -62,6 +70,7 @@ public:
void setMIMEType(const String& type) { m_mimeType = type; }
void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; }
void setCacheStorageCacheName(const String& cacheStorageCacheName) { m_cacheStorageCacheName = cacheStorageCacheName; }
+ void setCorsExposedHeaderNames(const HTTPHeaderSet& headerNames) { m_corsExposedHeaderNames = headerNames; }
// If the type is Default, replaces |m_buffer|.
// If the type is Basic or CORS, replaces |m_buffer| and
@@ -88,6 +97,7 @@ private:
String m_mimeType;
int64_t m_responseTime;
String m_cacheStorageCacheName;
+ HTTPHeaderSet m_corsExposedHeaderNames;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698