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

Unified Diff: net/dns/dns_response.cc

Issue 145873006: ui/base/resource: Roll our own version of ReadBigEndian() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 | « net/dns/dns_query.cc ('k') | net/dns/dns_test_util.cc » ('j') | 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 d29d3c4813cea9c1c712d96ab52e4056912ceb16..64db818b2b9426a73a5d4c20e2a24bec32396b2e 100644
--- a/net/dns/dns_response.cc
+++ b/net/dns/dns_response.cc
@@ -4,10 +4,10 @@
#include "net/dns/dns_response.h"
+#include "base/big_endian.h"
#include "base/strings/string_util.h"
#include "base/sys_byteorder.h"
#include "net/base/address_list.h"
-#include "net/base/big_endian.h"
#include "net/base/dns_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -73,7 +73,7 @@ unsigned DnsRecordParser::ReadName(const void* const vpos,
if (seen > length_)
return 0;
uint16 offset;
- ReadBigEndian<uint16>(p, &offset);
+ base::ReadBigEndian<uint16>(p, &offset);
offset &= dns_protocol::kOffsetMask;
p = packet_ + offset;
if (p >= end)
@@ -113,8 +113,8 @@ bool DnsRecordParser::ReadRecord(DnsResourceRecord* out) {
size_t consumed = ReadName(cur_, &out->name);
if (!consumed)
return false;
- BigEndianReader reader(cur_ + consumed,
- packet_ + length_ - (cur_ + consumed));
+ base::BigEndianReader reader(cur_ + consumed,
+ packet_ + length_ - (cur_ + consumed));
uint16 rdlen;
if (reader.ReadU16(&out->type) &&
reader.ReadU16(&out->klass) &&
@@ -251,7 +251,7 @@ uint16 DnsResponse::qtype() const {
// QTYPE starts where QNAME ends.
const size_t type_offset = parser_.GetOffset() - 2 * sizeof(uint16);
uint16 type;
- ReadBigEndian<uint16>(io_buffer_->data() + type_offset, &type);
+ base::ReadBigEndian<uint16>(io_buffer_->data() + type_offset, &type);
return type;
}
« no previous file with comments | « net/dns/dns_query.cc ('k') | net/dns/dns_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698