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

Unified Diff: base/files/file_path.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert CLD 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
« no previous file with comments | « no previous file | base/strings/string_util.h » ('j') | base/strings/string_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path.cc
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 92123533aaa55d1ec72eb72be873ed3bbd021340..d580c402b9d979b0779cf84c8f8f35450fabfc59 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -1263,12 +1263,7 @@ int FilePath::CompareIgnoreCase(StringPieceType string1,
// TODO(rolandsteiner) check if this is sufficient/correct.
int FilePath::CompareIgnoreCase(StringPieceType string1,
StringPieceType string2) {
- int comparison = strcasecmp(string1.data(), string2.data());
- if (comparison < 0)
- return -1;
- if (comparison > 0)
- return 1;
- return 0;
+ return CompareCaseInsensitiveASCII(string1, string2);
}
#endif // OS versions of CompareIgnoreCase()
« no previous file with comments | « no previous file | base/strings/string_util.h » ('j') | base/strings/string_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698