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

Unified Diff: chrome/browser/media_galleries/fileapi/media_path_filter.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « base/strings/string_util_win.h ('k') | chrome/browser/net/sdch_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_galleries/fileapi/media_path_filter.cc
diff --git a/chrome/browser/media_galleries/fileapi/media_path_filter.cc b/chrome/browser/media_galleries/fileapi/media_path_filter.cc
index 0212e1113603514ee0670006c2a3f71c093c8ec0..5b27f1019ab286700e79dd1abbbececbc51b89b9 100644
--- a/chrome/browser/media_galleries/fileapi/media_path_filter.cc
+++ b/chrome/browser/media_galleries/fileapi/media_path_filter.cc
@@ -126,15 +126,12 @@ bool MediaPathFilter::ShouldSkip(const base::FilePath& path) {
const char win_98_recycle_bin_name[] = "RECYCLED";
const char win_xp_recycle_bin_name[] = "RECYCLER";
const char win_vista_recycle_bin_name[] = "$Recycle.bin";
- if ((base::strncasecmp(base_name.c_str(),
- win_98_recycle_bin_name,
- strlen(win_98_recycle_bin_name)) == 0) ||
- (base::strncasecmp(base_name.c_str(),
- win_xp_recycle_bin_name,
- strlen(win_xp_recycle_bin_name)) == 0) ||
- (base::strncasecmp(base_name.c_str(),
- win_vista_recycle_bin_name,
- strlen(win_vista_recycle_bin_name)) == 0))
+ if (base::StartsWith(base_name, win_98_recycle_bin_name,
+ base::CompareCase::INSENSITIVE_ASCII) ||
+ base::StartsWith(base_name, win_xp_recycle_bin_name,
+ base::CompareCase::INSENSITIVE_ASCII) ||
+ base::StartsWith(base_name, win_vista_recycle_bin_name,
+ base::CompareCase::INSENSITIVE_ASCII))
return true;
#endif // defined(OS_WIN)
return false;
« no previous file with comments | « base/strings/string_util_win.h ('k') | chrome/browser/net/sdch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698