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

Unified Diff: net/dns/dns_response.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert CLD 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: net/dns/dns_response.cc
diff --git a/net/dns/dns_response.cc b/net/dns/dns_response.cc
index 64db818b2b9426a73a5d4c20e2a24bec32396b2e..730206ca6080193454bb3a70dea5c8cef5667eec 100644
--- a/net/dns/dns_response.cc
+++ b/net/dns/dns_response.cc
@@ -303,7 +303,7 @@ DnsResponse::Result DnsResponse::ParseToAddressList(
if (!ip_addresses.empty())
return DNS_CNAME_AFTER_ADDRESS;
- if (base::strcasecmp(record.name.c_str(), expected_name.c_str()) != 0)
+ if (!base::EqualsCaseInsensitiveASCII(record.name, expected_name))
return DNS_NAME_MISMATCH;
if (record.rdata.size() !=
@@ -315,7 +315,7 @@ DnsResponse::Result DnsResponse::ParseToAddressList(
if (record.rdata.size() != expected_size)
return DNS_SIZE_MISMATCH;
- if (base::strcasecmp(record.name.c_str(), expected_name.c_str()) != 0)
+ if (!base::EqualsCaseInsensitiveASCII(record.name, expected_name))
return DNS_NAME_MISMATCH;
ttl_sec = std::min(ttl_sec, record.ttl);

Powered by Google App Engine
This is Rietveld 408576698