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

Unified Diff: cloud_print/gcp20/prototype/dns_packet_parser.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 | « chrome/utility/cloud_print/pwg_encoder.cc ('k') | cloud_print/gcp20/prototype/dns_response_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/gcp20/prototype/dns_packet_parser.cc
diff --git a/cloud_print/gcp20/prototype/dns_packet_parser.cc b/cloud_print/gcp20/prototype/dns_packet_parser.cc
index f85ffc72f8b5487f79661d0c031ec75e7e881281..26cd2e514a262c560d2056d65f67256d5ad0ac20 100644
--- a/cloud_print/gcp20/prototype/dns_packet_parser.cc
+++ b/cloud_print/gcp20/prototype/dns_packet_parser.cc
@@ -4,13 +4,13 @@
#include "cloud_print/gcp20/prototype/dns_packet_parser.h"
-#include "net/base/big_endian.h"
+#include "base/big_endian.h"
DnsPacketParser::DnsPacketParser(const char* packet, size_t length)
: packet_(packet),
length_(length),
record_parser_(packet, length, sizeof(header_)) {
- net::BigEndianReader reader(packet, length);
+ base::BigEndianReader reader(packet, length);
is_header_read_ = reader.ReadU16(&header_.id) &&
reader.ReadU16(&header_.flags) &&
reader.ReadU16(&header_.qdcount) &&
@@ -25,8 +25,8 @@ bool DnsPacketParser::ReadRecord(DnsQueryRecord* out) {
size_t consumed = ReadName(&result.qname);
if (!consumed)
return false;
- net::BigEndianReader reader(packet_ + GetOffset() + consumed,
- length_ - (GetOffset() + consumed));
+ base::BigEndianReader reader(packet_ + GetOffset() + consumed,
+ length_ - (GetOffset() + consumed));
if (reader.ReadU16(&result.qtype) && reader.ReadU16(&result.qclass) &&
record_parser_.SkipQuestion()) { // instead of |cur_ = reader.ptr();|
*out = result;
« no previous file with comments | « chrome/utility/cloud_print/pwg_encoder.cc ('k') | cloud_print/gcp20/prototype/dns_response_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698