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 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) { |
|
dcheng
2017/04/12 23:51:24
Nit: please update the naming style to be GetDataU
meacer
2017/04/13 18:06:36
Done.
kinuko
2017/04/14 14:29:53
We're neither populating the mime_type nor using i
meacer
2017/04/14 17:51:19
Yes, I copied this over from net and missed that p
|
| + std::string utf8MimeType; |
| + std::string utf8Charset; |
| + if (net::DataURL::Parse(WebStringToGURL(url.getString()), &utf8MimeType, |
| + &utf8Charset, nullptr)) { |
| + *isSupportedMimeType = mime_util::IsSupportedMimeType(utf8MimeType); |
| + return true; |
| + } |
| + return false; |
| +} |
| + |
| bool isRedirectResponseCode(int responseCode) { |
| return net::HttpResponseHeaders::IsRedirectResponseCode(responseCode); |
| } |