Index: third_party/WebKit/Source/platform/network/NetworkUtils.cpp |
diff --git a/third_party/WebKit/Source/platform/network/NetworkUtils.cpp b/third_party/WebKit/Source/platform/network/NetworkUtils.cpp |
index f5e93f1e25675e1a3f1a32e084aa7697fb51726a..d728be05f44004791f96e10a85eb993c646f7e80 100644 |
--- a/third_party/WebKit/Source/platform/network/NetworkUtils.cpp |
+++ b/third_party/WebKit/Source/platform/network/NetworkUtils.cpp |
@@ -105,6 +105,19 @@ PassRefPtr<SharedBuffer> parseDataURLAndPopulateResponse( |
return data; |
} |
+PLATFORM_EXPORT bool getDataURLMimeType(const KURL& url, |
+ AtomicString& mimetype, |
+ bool* isSupportedMimeType) { |
+ std::string utf8MimeType; |
+ std::string utf8Charset; |
+ if (net::DataURL::Parse(WebStringToGURL(url.getString()), &utf8MimeType, |
kinuko
2017/04/07 07:52:34
WebURL(url) should work (and more efficient)
meacer
2017/04/11 01:08:51
I'm getting
error: no viable conversion from 'bl
kinuko
2017/04/13 07:28:18
Um, ok sorry we're in blink where operator GURL is
|
+ &utf8Charset, nullptr)) { |
+ *isSupportedMimeType = mime_util::IsSupportedMimeType(utf8MimeType); |
+ return true; |
+ } |
+ return false; |
+} |
+ |
bool isRedirectResponseCode(int responseCode) { |
return net::HttpResponseHeaders::IsRedirectResponseCode(responseCode); |
} |