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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 1706243002: Don't use SVG resource documents with an unrecognized MIME-type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/fetch/Resource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index fb32fc9cb99bbfe20480f148aad71201944379dc..19e960e4c0fb25c4855fcf5bbec6aadc3525b6bb 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -35,6 +35,7 @@
#include "platform/Logging.h"
#include "platform/SharedBuffer.h"
#include "platform/TraceEvent.h"
+#include "platform/network/HTTPParsers.h"
#include "platform/weborigin/KURL.h"
#include "public/platform/Platform.h"
#include "public/platform/WebProcessMemoryDump.h"
@@ -318,6 +319,11 @@ void Resource::finish()
m_status = Cached;
}
+AtomicString Resource::httpContentType() const
+{
+ return extractMIMETypeFromMediaType(m_response.httpHeaderField(HTTPNames::Content_Type)).lower();
Mike West 2016/02/24 13:23:44 Would you mind adding some unit tests for this met
fs 2016/02/24 17:04:59 Not sure if there was anything in particular you w
+}
+
bool Resource::passesAccessControlCheck(SecurityOrigin* securityOrigin) const
{
String ignoredErrorDescription;

Powered by Google App Engine
This is Rietveld 408576698