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

Unified Diff: cloud_print/gcp20/prototype/dns_response_builder.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 | « cloud_print/gcp20/prototype/dns_packet_parser.cc ('k') | cloud_print/gcp20/prototype/dns_sd_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/gcp20/prototype/dns_response_builder.cc
diff --git a/cloud_print/gcp20/prototype/dns_response_builder.cc b/cloud_print/gcp20/prototype/dns_response_builder.cc
index 23cc866d2b865405e3a098b67036f10c1a23f8ca..46f82cdb0a4ae7c8ae5fa65f5f3f2b5d4cdf7c80 100644
--- a/cloud_print/gcp20/prototype/dns_response_builder.cc
+++ b/cloud_print/gcp20/prototype/dns_response_builder.cc
@@ -4,8 +4,8 @@
#include "cloud_print/gcp20/prototype/dns_response_builder.h"
+#include "base/big_endian.h"
#include "base/logging.h"
-#include "net/base/big_endian.h"
#include "net/base/dns_util.h"
#include "net/base/io_buffer.h"
#include "net/base/ip_endpoint.h"
@@ -61,7 +61,8 @@ void DnsResponseBuilder::AppendSrv(const std::string& service_name,
std::vector<uint8> rdata(2 + 2 + 2 + domain_name.size());
- net::BigEndianWriter writer(rdata.data(), rdata.size());
+ base::BigEndianWriter writer(reinterpret_cast<char*>(rdata.data()),
+ rdata.size());
success = writer.WriteU16(priority) &&
writer.WriteU16(weight) &&
writer.WriteU16(http_port) &&
@@ -136,7 +137,7 @@ scoped_refptr<net::IOBufferWithSize> DnsResponseBuilder::Build() {
responses_.size());
scoped_refptr<net::IOBufferWithSize> message(
new net::IOBufferWithSize(static_cast<int>(size)));
- net::BigEndianWriter writer(message->data(), message->size());
+ base::BigEndianWriter writer(message->data(), message->size());
bool success = writer.WriteU16(header_.id) &&
writer.WriteU16(header_.flags) &&
writer.WriteU16(header_.qdcount) &&
« no previous file with comments | « cloud_print/gcp20/prototype/dns_packet_parser.cc ('k') | cloud_print/gcp20/prototype/dns_sd_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698