diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 18:14:57 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 18:14:57 +0000 |
commit | d9806a97728e34d79a34d2d7a04dfa6048ad048c (patch) | |
tree | 8c71ff87111e177731fd02101f05bdd354cb336d /cloud_print | |
parent | 9ea8ec9f63db0b2473b4a84648cebce4e0bfcf93 (diff) | |
download | chromium_src-d9806a97728e34d79a34d2d7a04dfa6048ad048c.zip chromium_src-d9806a97728e34d79a34d2d7a04dfa6048ad048c.tar.gz chromium_src-d9806a97728e34d79a34d2d7a04dfa6048ad048c.tar.bz2 |
ui/base/resource: Remove dependency on net's big_endian implementation.
To remove this dependency we ended up moving big_endian* to base/, since besides ui/,
big_endian is also used by other top-level modules: chrome/utility/, cloud_print, media/cast
This way we removed one more net dependency from ui/base/.
BUG=299841
TEST=ui_unittests
R=tony@chromium.org,mark@chromium.org,hclam@chromium.org,vitalybuka@chromium.org
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/145873006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r-- | cloud_print/gcp20/prototype/dns_packet_parser.cc | 8 | ||||
-rw-r--r-- | cloud_print/gcp20/prototype/dns_response_builder.cc | 7 | ||||
-rw-r--r-- | cloud_print/gcp20/prototype/dns_sd_server.cc | 1 |
3 files changed, 8 insertions, 8 deletions
diff --git a/cloud_print/gcp20/prototype/dns_packet_parser.cc b/cloud_print/gcp20/prototype/dns_packet_parser.cc index f85ffc7..26cd2e5 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; diff --git a/cloud_print/gcp20/prototype/dns_response_builder.cc b/cloud_print/gcp20/prototype/dns_response_builder.cc index 23cc866..46f82cd 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) && diff --git a/cloud_print/gcp20/prototype/dns_sd_server.cc b/cloud_print/gcp20/prototype/dns_sd_server.cc index f5500de..1419cc7 100644 --- a/cloud_print/gcp20/prototype/dns_sd_server.cc +++ b/cloud_print/gcp20/prototype/dns_sd_server.cc @@ -13,7 +13,6 @@ #include "base/strings/stringprintf.h" #include "cloud_print/gcp20/prototype/dns_packet_parser.h" #include "cloud_print/gcp20/prototype/dns_response_builder.h" -#include "net/base/big_endian.h" #include "net/base/dns_util.h" #include "net/base/net_errors.h" #include "net/base/net_util.h" |