| Index: content/child/blink_platform_impl.cc
|
| diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
|
| index 6474a7f8741570ee5ae6e789be4967cf5af72759..042a5dc9d6d6f65e9eda60be695065a8795aba85 100644
|
| --- a/content/child/blink_platform_impl.cc
|
| +++ b/content/child/blink_platform_impl.cc
|
| @@ -432,17 +432,25 @@ WebString BlinkPlatformImpl::userAgent() {
|
| return user_agent;
|
| }
|
|
|
| -WebData BlinkPlatformImpl::parseDataURL(const WebURL& url,
|
| - WebString& mimetype_out,
|
| - WebString& charset_out) {
|
| +bool BlinkPlatformImpl::parseDataURLIfCanBeHandledLocally(
|
| + const blink::WebURLRequest& request,
|
| + WebString& mimetype_out,
|
| + WebString& charset_out,
|
| + WebData& data_out) {
|
| + // |resource_dispatcher_exists| is a workaround for RenderViewImplTest
|
| + // (https://crbug.com/187500). We set it to |true| when used from Blink.
|
| + if (!WebURLLoaderImpl::CanHandleDataURLRequestLocally(request, true))
|
| + return false;
|
| +
|
| std::string mime_type, char_set, data;
|
| - if (net::DataURL::Parse(url, &mime_type, &char_set, &data) &&
|
| - mime_util::IsSupportedMimeType(mime_type)) {
|
| + if (net::DataURL::Parse(request.url(), &mime_type, &char_set, &data)) {
|
| mimetype_out = WebString::fromUTF8(mime_type);
|
| charset_out = WebString::fromUTF8(char_set);
|
| - return data;
|
| + data_out = data;
|
| + } else {
|
| + data_out = WebData();
|
| }
|
| - return WebData();
|
| + return true;
|
| }
|
|
|
| WebURLError BlinkPlatformImpl::cancelledError(
|
|
|