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

Unified Diff: content/browser/download/download_stats.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y 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/download/download_stats.cc
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index cc14b383bee7f2d7acf793a2674818c994cbfc6a..248ece0954c7d2de8564234033f59875894c262d 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -481,14 +481,18 @@ void RecordDownloadMimeType(const std::string& mime_type_string) {
// Do partial matches.
if (download_content == DOWNLOAD_CONTENT_UNRECOGNIZED) {
- if (base::StartsWithASCII(mime_type_string, "text/", true)) {
+ if (base::StartsWith(mime_type_string, "text/",
+ base::CompareCase::SENSITIVE)) {
download_content = DOWNLOAD_CONTENT_TEXT;
- } else if (base::StartsWithASCII(mime_type_string, "image/", true)) {
+ } else if (base::StartsWith(mime_type_string, "image/",
+ base::CompareCase::SENSITIVE)) {
download_content = DOWNLOAD_CONTENT_IMAGE;
RecordDownloadImageType(mime_type_string);
- } else if (base::StartsWithASCII(mime_type_string, "audio/", true)) {
+ } else if (base::StartsWith(mime_type_string, "audio/",
+ base::CompareCase::SENSITIVE)) {
download_content = DOWNLOAD_CONTENT_AUDIO;
- } else if (base::StartsWithASCII(mime_type_string, "video/", true)) {
+ } else if (base::StartsWith(mime_type_string, "video/",
+ base::CompareCase::SENSITIVE)) {
download_content = DOWNLOAD_CONTENT_VIDEO;
}
}

Powered by Google App Engine
This is Rietveld 408576698