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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (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
Index: chrome/browser/safe_browsing/safe_browsing_database.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc
index 09e4643276e8896b51d8c0ff4a0450dff3a7ffb2..5a7929e17c12765db3631e4faa7efb8bfb5dc909 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -1792,7 +1792,8 @@ void SafeBrowsingDatabaseNew::RecordFileSizeHistogram(
// Default to logging DB sizes unless |file_path| points at PrefixSet storage.
std::string histogram_name("SB2.DatabaseSizeKilobytes");
- if (base::EndsWith(filename, kPrefixSetFileSuffix, true)) {
+ if (base::EndsWith(filename, kPrefixSetFileSuffix,
+ base::CompareCase::SENSITIVE)) {
histogram_name = "SB2.PrefixSetSizeKilobytes";
// Clear the PrefixSet suffix to have the histogram suffix selector below
// work the same for PrefixSet-based storage as it does for simple safe
@@ -1805,21 +1806,28 @@ void SafeBrowsingDatabaseNew::RecordFileSizeHistogram(
// Changes to histogram suffixes below need to be mirrored in the
// SafeBrowsingLists suffix enum in histograms.xml.
- if (base::EndsWith(filename, kBrowseDBFile, true))
+ if (base::EndsWith(filename, kBrowseDBFile, base::CompareCase::SENSITIVE))
histogram_name.append(".Browse");
- else if (base::EndsWith(filename, kDownloadDBFile, true))
+ else if (base::EndsWith(filename, kDownloadDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".Download");
- else if (base::EndsWith(filename, kCsdWhitelistDBFile, true))
+ else if (base::EndsWith(filename, kCsdWhitelistDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".CsdWhitelist");
- else if (base::EndsWith(filename, kDownloadWhitelistDBFile, true))
+ else if (base::EndsWith(filename, kDownloadWhitelistDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".DownloadWhitelist");
- else if (base::EndsWith(filename, kInclusionWhitelistDBFile, true))
+ else if (base::EndsWith(filename, kInclusionWhitelistDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".InclusionWhitelist");
- else if (base::EndsWith(filename, kExtensionBlacklistDBFile, true))
+ else if (base::EndsWith(filename, kExtensionBlacklistDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".ExtensionBlacklist");
- else if (base::EndsWith(filename, kIPBlacklistDBFile, true))
+ else if (base::EndsWith(filename, kIPBlacklistDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".IPBlacklist");
- else if (base::EndsWith(filename, kUnwantedSoftwareDBFile, true))
+ else if (base::EndsWith(filename, kUnwantedSoftwareDBFile,
+ base::CompareCase::SENSITIVE))
histogram_name.append(".UnwantedSoftware");
else
NOTREACHED(); // Add support for new lists above.
« no previous file with comments | « chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc ('k') | chrome/browser/search/iframe_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698