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

Unified Diff: pdf/document_loader.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: pdf/document_loader.cc
diff --git a/pdf/document_loader.cc b/pdf/document_loader.cc
index f696656058eb889c7fe73240892f1f07d0c557a7..28a6ee4ebd74dfc643fd49759ddde124f7847d0b 100644
--- a/pdf/document_loader.cc
+++ b/pdf/document_loader.cc
@@ -68,12 +68,15 @@ std::string GetMultiPartBoundary(const std::string& headers) {
}
bool IsValidContentType(const std::string& type) {
- return (base::EndsWith(type, "/pdf", false) ||
- base::EndsWith(type, ".pdf", false) ||
- base::EndsWith(type, "/x-pdf", false) ||
- base::EndsWith(type, "/*", false) ||
- base::EndsWith(type, "/acrobat", false) ||
- base::EndsWith(type, "/unknown", false));
+ return (base::EndsWith(type, "/pdf", base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(type, ".pdf", base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(type, "/x-pdf",
+ base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(type, "/*", base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(type, "/acrobat",
+ base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(type, "/unknown",
+ base::CompareCase::INSENSITIVE_ASCII));
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698