Chromium Code Reviews| 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 4f1358404eea48e28730c89629cf21c065cbc469..060fd655116e76a6153868c23ea31ead4936cf21 100644 |
| --- a/third_party/WebKit/Source/platform/network/NetworkUtils.cpp |
| +++ b/third_party/WebKit/Source/platform/network/NetworkUtils.cpp |
| @@ -105,6 +105,16 @@ PassRefPtr<SharedBuffer> ParseDataURLAndPopulateResponse( |
| return data; |
| } |
| +bool IsDataURLMimeTypeSupported(const KURL& url) { |
| + std::string utf8_mime_type; |
| + std::string utf8_charset; |
| + if (net::DataURL::Parse(WebStringToGURL(url.GetString()), &utf8_mime_type, |
|
dcheng
2017/04/19 11:59:49
Hmm... it would be kind of nice if we had a way to
meacer
2017/04/21 01:31:21
Acknowledged. I can file a bug, but there doesn't
|
| + &utf8_charset, nullptr)) { |
| + return mime_util::IsSupportedMimeType(utf8_mime_type); |
| + } |
| + return false; |
| +} |
| + |
| bool IsRedirectResponseCode(int response_code) { |
| return net::HttpResponseHeaders::IsRedirectResponseCode(response_code); |
| } |