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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponse.cpp

Issue 2689173002: Implement script MIME restrictions for X-Content-Type-Options: nosniff for Workers (Closed)
Patch Set: incorporated mkwst@'s comment Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceResponse.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/ResourceResponse.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
index 79b9a01b33defeb70725e1d289a458253c18b3f8..e55514d3341bc7788b45201f612c9aea2ebc8e9c 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
@@ -27,6 +27,7 @@
#include "platform/network/ResourceResponse.h"
#include "platform/HTTPNames.h"
+#include "platform/network/HTTPParsers.h"
#include "wtf/CurrentTime.h"
#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
@@ -538,6 +539,11 @@ bool ResourceResponse::isAttachment() const {
return equalIgnoringCase(value, attachmentString);
}
+AtomicString ResourceResponse::httpContentType() const {
+ return extractMIMETypeFromMediaType(
+ httpHeaderField(HTTPNames::Content_Type).lower());
+}
+
void ResourceResponse::setLastModifiedDate(time_t lastModifiedDate) {
m_lastModifiedDate = lastModifiedDate;
}
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceResponse.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698