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

Unified Diff: net/dns/mojo_type_converters.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/mojo_type_converters.h ('k') | net/dns/notify_watcher_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mojo_type_converters.cc
diff --git a/net/dns/mojo_type_converters.cc b/net/dns/mojo_type_converters.cc
deleted file mode 100644
index b9f11e70a4e8089e26df8890d4942e6eec7b15b8..0000000000000000000000000000000000000000
--- a/net/dns/mojo_type_converters.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/dns/mojo_type_converters.h"
-
-#include "net/base/address_list.h"
-#include "net/base/net_util.h"
-#include "third_party/mojo/src/mojo/public/cpp/bindings/type_converter.h"
-
-namespace mojo {
-
-// static
-net::HostResolver::RequestInfo
-TypeConverter<net::HostResolver::RequestInfo,
- net::interfaces::HostResolverRequestInfo>::
- Convert(const net::interfaces::HostResolverRequestInfo& obj) {
- net::HostResolver::RequestInfo result(net::HostPortPair(obj.host, obj.port));
- result.set_address_family(
- static_cast<net::AddressFamily>(obj.address_family));
- return result;
-}
-
-// static
-net::interfaces::AddressListPtr
-TypeConverter<net::interfaces::AddressListPtr, net::AddressList>::Convert(
- const net::AddressList& obj) {
- net::interfaces::AddressListPtr result(net::interfaces::AddressList::New());
- for (const auto& endpoint : obj) {
- net::interfaces::IPEndPointPtr ep(net::interfaces::IPEndPoint::New());
- ep->port = endpoint.port();
- ep->address = mojo::Array<uint8_t>::From(endpoint.address());
- result->addresses.push_back(ep.Pass());
- }
- return result.Pass();
-}
-
-// static
-net::AddressList
-TypeConverter<net::AddressList, net::interfaces::AddressList>::Convert(
- const net::interfaces::AddressList& obj) {
- net::AddressList address_list;
- for (size_t i = 0; i < obj.addresses.size(); i++) {
- const net::interfaces::IPEndPointPtr& ep = obj.addresses[i];
- address_list.push_back(
- net::IPEndPoint(ep->address.To<net::IPAddressNumber>(), ep->port));
- }
- return address_list;
-}
-
-} // namespace mojo
« no previous file with comments | « net/dns/mojo_type_converters.h ('k') | net/dns/notify_watcher_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698