| Index: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| index a254291c0b210d52bbffc4e7411cfdcf15a22b97..ea5ca812dc1a2e5095eaabbfb3b6cf985a2de4d0 100644
|
| --- a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| @@ -509,17 +509,8 @@ WKWebViewErrorSource WKWebViewErrorSourceFromError(NSError* error) {
|
| return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
|
| }
|
|
|
| - std::string mimeType = self.webState->GetContentsMimeType();
|
| - if (mimeType.empty()) {
|
| - return web::WEB_VIEW_DOCUMENT_TYPE_UNKNOWN;
|
| - }
|
| -
|
| - if (mimeType == "text/html" || mimeType == "application/xhtml+xml" ||
|
| - mimeType == "application/xml") {
|
| - return web::WEB_VIEW_DOCUMENT_TYPE_HTML;
|
| - }
|
| -
|
| - return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
|
| + std::string MIMEType = self.webState->GetContentsMimeType();
|
| + return [self documentTypeFromMIMEType:base::SysUTF8ToNSString(MIMEType)];
|
| }
|
|
|
| - (void)loadRequest:(NSMutableURLRequest*)request {
|
|
|