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

Unified Diff: content/browser/webui/web_ui_data_source_impl.cc

Issue 1239493005: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 5 months 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
Index: content/browser/webui/web_ui_data_source_impl.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index b401710b939947285cdd383bd0509aaa728623fa..09c58966aa121bba4ae29d76ddb0e0299c6da3a7 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -190,19 +190,19 @@ std::string WebUIDataSourceImpl::GetSource() const {
}
std::string WebUIDataSourceImpl::GetMimeType(const std::string& path) const {
- if (base::EndsWith(path, ".css", false))
+ if (base::EndsWith(path, ".css", base::CompareCase::INSENSITIVE_ASCII))
return "text/css";
- if (base::EndsWith(path, ".js", false))
+ if (base::EndsWith(path, ".js", base::CompareCase::INSENSITIVE_ASCII))
return "application/javascript";
- if (base::EndsWith(path, ".json", false))
+ if (base::EndsWith(path, ".json", base::CompareCase::INSENSITIVE_ASCII))
return "application/json";
- if (base::EndsWith(path, ".pdf", false))
+ if (base::EndsWith(path, ".pdf", base::CompareCase::INSENSITIVE_ASCII))
return "application/pdf";
- if (base::EndsWith(path, ".svg", false))
+ if (base::EndsWith(path, ".svg", base::CompareCase::INSENSITIVE_ASCII))
return "image/svg+xml";
return "text/html";

Powered by Google App Engine
This is Rietveld 408576698