Index: chrome/browser/predictors/resource_prefetch_predictor.cc |
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc |
index 7816a3791e1492fb222a9173e66ffd627439e5ed..3e1055e33bc992f51552e57aa90c25a3f6d27b7c 100644 |
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc |
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc |
@@ -25,6 +25,7 @@ |
#include "components/history/core/browser/history_database.h" |
#include "components/history/core/browser/history_db_task.h" |
#include "components/history/core/browser/history_service.h" |
+#include "components/mime_util/mime_util.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/resource_request_info.h" |
@@ -246,9 +247,8 @@ bool ResourcePrefetchPredictor::IsHandledSubresource( |
std::string mime_type; |
response->GetMimeType(&mime_type); |
- if (!mime_type.empty() && |
- !net::IsSupportedImageMimeType(mime_type.c_str()) && |
- !net::IsSupportedJavascriptMimeType(mime_type.c_str()) && |
+ if (!mime_type.empty() && !mime_util::IsSupportedImageMimeType(mime_type) && |
+ !mime_util::IsSupportedJavascriptMimeType(mime_type) && |
!net::MatchesMimeType("text/css", mime_type)) { |
resource_status |= RESOURCE_STATUS_UNSUPPORTED_MIME_TYPE; |
} |
@@ -295,9 +295,9 @@ bool ResourcePrefetchPredictor::IsCacheable(const net::URLRequest* response) { |
content::ResourceType ResourcePrefetchPredictor::GetResourceTypeFromMimeType( |
const std::string& mime_type, |
content::ResourceType fallback) { |
- if (net::IsSupportedImageMimeType(mime_type.c_str())) |
+ if (mime_util::IsSupportedImageMimeType(mime_type)) |
return content::RESOURCE_TYPE_IMAGE; |
- else if (net::IsSupportedJavascriptMimeType(mime_type.c_str())) |
+ else if (mime_util::IsSupportedJavascriptMimeType(mime_type)) |
return content::RESOURCE_TYPE_SCRIPT; |
else if (net::MatchesMimeType("text/css", mime_type)) |
return content::RESOURCE_TYPE_STYLESHEET; |