Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // WARNING! Do NOT use this mojom. It is intended as a temporary interface to | |
| 6 // implement out-of-process proxy resolution. If you wish to use a Mojo DNS | |
| 7 // service, contact amistry@/sammc@ and net-dev to discuss a permanent Mojo DNS | |
| 8 // interface. | |
| 9 | |
| 10 // Put Mojo definitions into their own namespace to avoid collisions with C++ | |
| 11 // definitions. | |
| 12 // TODO(amistry): Resolve the conflict between these two sets of definitions. | |
| 13 module net.interfaces; | |
| 14 | |
| 15 // Mirror of net::AddressFamily. | |
| 16 enum AddressFamily { | |
| 17 ADDRESS_FAMILY_UNSPECIFIED, | |
| 18 ADDRESS_FAMILY_IPV4, | |
| 19 ADDRESS_FAMILY_IPV6, | |
|
eroman
2015/02/03 04:53:29
I doubt this is actually going to be needed. That
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Acknowledged.
| |
| 20 }; | |
| 21 | |
| 22 // Mirror of net::HostResolver::RequestInfo. | |
| 23 struct RequestInfo { | |
|
eroman
2015/02/03 04:53:29
RequestInfo is fairly vague. How about HostResolve
Anand Mistry (off Chromium)
2015/02/03 06:27:22
done.
| |
| 24 string host; | |
| 25 uint16 port; | |
| 26 AddressFamily address_family; | |
| 27 bool is_my_ip_address; | |
| 28 }; | |
| 29 | |
| 30 // Mirror of net::IPEndPoint. | |
| 31 struct IPEndPoint { | |
| 32 // IP address as a numeric value from most to least significant byte. | |
| 33 // Will be of length 4 for IPv4 addresses and 16 for IPv6. | |
| 34 array<uint8> address; | |
| 35 uint16 port; | |
| 36 }; | |
| 37 | |
| 38 // Mirror of net::AddressList. | |
| 39 struct AddressList { | |
| 40 array<IPEndPoint> addresses; | |
| 41 string canonical_name; | |
|
eroman
2015/02/03 04:53:29
I don't believe canonical_name is needed.
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Removed.
I saw the comment about crbug.com/126134
eroman
2015/02/04 01:25:19
I was thinking more in terms of "is this needed by
Anand Mistry (off Chromium)
2015/02/04 04:05:31
Acknowledged.
| |
| 42 }; | |
| 43 | |
| 44 interface HostResolverService { | |
| 45 // Use a HostResolveRequestClient instead of returning a result so we can | |
| 46 // cancel in-flight requests by destroying the client. IPC requests in Mojo | |
| 47 // cannot be cancelled directly. | |
| 48 // TODO(amistry): Add BoundNetLog. | |
| 49 Resolve(RequestInfo request_info, HostResolveRequestClient client); | |
| 50 }; | |
| 51 | |
| 52 interface HostResolveRequestClient { | |
|
eroman
2015/02/03 04:53:29
I would epected HostResolverRequestClient rather t
Anand Mistry (off Chromium)
2015/02/03 06:27:22
Done.
| |
| 53 // |error| is a value in net::Error. | |
| 54 ReportResult(int32 error, AddressList? result); | |
| 55 }; | |
| OLD | NEW |