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

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

Issue 1214183008: Update StartsWith calls to use new versions in chrome and content (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 | « chrome/browser/net/async_dns_field_trial.cc ('k') | chrome/browser/net/safe_search_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1975b78954fbc3758650ebe2a595610e0172c7d2..c604207b08513b502b11623215a603c42daa2422 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -174,7 +174,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);
@@ -182,9 +181,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;
}
« no previous file with comments | « chrome/browser/net/async_dns_field_trial.cc ('k') | chrome/browser/net/safe_search_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698