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

Unified Diff: net/dns/dns_response.cc

Issue 2545163002: net: move kRcodeMask into dns_response.cc (Closed)
Patch Set: Created 4 years 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 | « net/dns/dns_protocol.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_response.cc
diff --git a/net/dns/dns_response.cc b/net/dns/dns_response.cc
index 98967899156faad218b343c54b81f3cfb2eb3291..f168a255f39db80490350457131c1a393024f56a 100644
--- a/net/dns/dns_response.cc
+++ b/net/dns/dns_response.cc
@@ -19,6 +19,12 @@
namespace net {
+namespace {
+
+const uint8_t kRcodeMask = 0xf;
+
+} // namespace
+
DnsResourceRecord::DnsResourceRecord() {
}
@@ -221,12 +227,12 @@ bool DnsResponse::IsValid() const {
uint16_t DnsResponse::flags() const {
DCHECK(parser_.IsValid());
- return base::NetToHost16(header()->flags) & ~(dns_protocol::kRcodeMask);
+ return base::NetToHost16(header()->flags) & ~(kRcodeMask);
}
uint8_t DnsResponse::rcode() const {
DCHECK(parser_.IsValid());
- return base::NetToHost16(header()->flags) & dns_protocol::kRcodeMask;
+ return base::NetToHost16(header()->flags) & kRcodeMask;
}
unsigned DnsResponse::answer_count() const {
« no previous file with comments | « net/dns/dns_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698