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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 6 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/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 25a00238f80306a66909e07a4d116bca42c34d35..fdddd9cb561653a1bc5b1bb5d5d666aa2b55aab6 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -173,7 +173,6 @@ bool CanRequestBeDeltaEncoded(const net::URLRequest* request) {
// XML (application/xml and application/*+xml) is eligible.
{ "application/", "xml" },
};
- const bool kCaseSensitive = true;
std::string mime_type;
request->GetMimeType(&mime_type);
@@ -181,9 +180,11 @@ bool CanRequestBeDeltaEncoded(const net::URLRequest* request) {
for (size_t i = 0; i < arraysize(kEligibleMasks); i++) {
const char *prefix = kEligibleMasks[i].prefix;
const char *suffix = kEligibleMasks[i].suffix;
- if (prefix && !base::StartsWithASCII(mime_type, prefix, kCaseSensitive))
+ if (prefix &&
+ !base::StartsWith(mime_type, prefix, base::CompareCase::SENSITIVE))
continue;
- if (suffix && !base::EndsWith(mime_type, suffix, kCaseSensitive))
+ if (suffix &&
+ !base::EndsWith(mime_type, suffix, base::CompareCase::SENSITIVE))
continue;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698