From edce9a33027cc5f73c4866d70e34f690f6720a56 Mon Sep 17 00:00:00 2001 From: brettw Date: Wed, 15 Jul 2015 23:48:05 -0700 Subject: Remove some legacy versions of StartsWith and EndsWith. This just replaces true -> base::CompareCase::SENSITIVE false -> base::CompareCase::INSENSITIVE_ASCII I checked the insensitive cases to make sure they're not doing anything suspicious. The old version is a sometimes-correct Unicode comparison so converting to INSENSTITIVE_ASCII isn't a no-op. However, generally the prefix/suffix checking is done against a hardcoded string so there were very few cases to actually look at. extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc has a not-quite search-and-replace change where I changed the type of a class variable. BUG=506255 TBR=jam Review URL: https://codereview.chromium.org/1239493005 Cr-Commit-Position: refs/heads/master@{#338996} --- base/android/library_loader/library_prefetcher.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'base/android/library_loader') diff --git a/base/android/library_loader/library_prefetcher.cc b/base/android/library_loader/library_prefetcher.cc index 798a283..9b54843 100644 --- a/base/android/library_loader/library_prefetcher.cc +++ b/base/android/library_loader/library_prefetcher.cc @@ -36,7 +36,7 @@ bool IsReadableAndPrivate(const base::debug::MappedMemoryRegion& region) { bool PathMatchesSuffix(const std::string& path) { for (size_t i = 0; i < arraysize(kSuffixesToMatch); i++) { - if (EndsWith(path, kSuffixesToMatch[i], true)) { + if (EndsWith(path, kSuffixesToMatch[i], CompareCase::SENSITIVE)) { return true; } } @@ -82,14 +82,14 @@ void NativeLibraryPrefetcher::FilterLibchromeRangesOnlyIfPossible( std::vector* ranges) { bool has_libchrome_region = false; for (const base::debug::MappedMemoryRegion& region : regions) { - if (EndsWith(region.path, kLibchromeSuffix, true)) { + if (EndsWith(region.path, kLibchromeSuffix, CompareCase::SENSITIVE)) { has_libchrome_region = true; break; } } for (const base::debug::MappedMemoryRegion& region : regions) { if (has_libchrome_region && - !EndsWith(region.path, kLibchromeSuffix, true)) { + !EndsWith(region.path, kLibchromeSuffix, CompareCase::SENSITIVE)) { continue; } ranges->push_back(std::make_pair(region.start, region.end)); -- cgit v1.1