Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3460)

Unified Diff: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm

Issue 1458703004: Fixes document type detection on iOS 9. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl w Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller+protected.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fa5719fa087ddc55a9da86deb62dabf60d4bdb0e 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
@@ -510,16 +510,7 @@ WKWebViewErrorSource WKWebViewErrorSourceFromError(NSError* error) {
}
std::string mimeType = self.webState->GetContentsMimeType();
Eugene But (OOO till 7-30) 2015/11/20 18:13:49 Optional NIT: Could you please s/mimeType/MIMEType
stkhapugin 2015/11/23 13:35:48 Done.
- 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;
+ return [self documentTypeFromMIMEType:base::SysUTF8ToNSString(mimeType)];
}
- (void)loadRequest:(NSMutableURLRequest*)request {
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller+protected.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698