| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 // Convert a TXT record to a vector of strings (metadata). | 191 // Convert a TXT record to a vector of strings (metadata). |
| 192 const std::vector<std::string>& RecordToMetadata( | 192 const std::vector<std::string>& RecordToMetadata( |
| 193 const net::RecordParsed* record) const; | 193 const net::RecordParsed* record) const; |
| 194 | 194 |
| 195 // Convert an SRV record to a host and port pair. | 195 // Convert an SRV record to a host and port pair. |
| 196 net::HostPortPair RecordToAddress( | 196 net::HostPortPair RecordToAddress( |
| 197 const net::RecordParsed* record) const; | 197 const net::RecordParsed* record) const; |
| 198 | 198 |
| 199 // Convert an A record to an IP address. | 199 // Convert an A record to an IP address. |
| 200 net::IPAddress RecordToIPAddress(const net::RecordParsed* record) const; | 200 const net::IPAddressNumber& RecordToIPAddress( |
| 201 const net::RecordParsed* record) const; |
| 201 | 202 |
| 202 // Convert an MDns status to a service discovery status. | 203 // Convert an MDns status to a service discovery status. |
| 203 RequestStatus MDnsStatusToRequestStatus( | 204 RequestStatus MDnsStatusToRequestStatus( |
| 204 net::MDnsTransaction::Result status) const; | 205 net::MDnsTransaction::Result status) const; |
| 205 | 206 |
| 206 bool CreateTxtTransaction(); | 207 bool CreateTxtTransaction(); |
| 207 bool CreateSrvTransaction(); | 208 bool CreateSrvTransaction(); |
| 208 void CreateATransaction(); | 209 void CreateATransaction(); |
| 209 | 210 |
| 210 std::string service_name_; | 211 std::string service_name_; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 net::AddressFamily address_family_; | 252 net::AddressFamily address_family_; |
| 252 IPAddressCallback callback_; | 253 IPAddressCallback callback_; |
| 253 | 254 |
| 254 scoped_ptr<net::MDnsTransaction> transaction_a_; | 255 scoped_ptr<net::MDnsTransaction> transaction_a_; |
| 255 scoped_ptr<net::MDnsTransaction> transaction_aaaa_; | 256 scoped_ptr<net::MDnsTransaction> transaction_aaaa_; |
| 256 | 257 |
| 257 int transactions_finished_; | 258 int transactions_finished_; |
| 258 | 259 |
| 259 net::MDnsClient* mdns_client_; | 260 net::MDnsClient* mdns_client_; |
| 260 | 261 |
| 261 net::IPAddress address_ipv4_; | 262 net::IPAddressNumber address_ipv4_; |
| 262 net::IPAddress address_ipv6_; | 263 net::IPAddressNumber address_ipv6_; |
| 263 | 264 |
| 264 base::CancelableCallback<void()> timeout_callback_; | 265 base::CancelableCallback<void()> timeout_callback_; |
| 265 | 266 |
| 266 DISALLOW_COPY_AND_ASSIGN(LocalDomainResolverImpl); | 267 DISALLOW_COPY_AND_ASSIGN(LocalDomainResolverImpl); |
| 267 }; | 268 }; |
| 268 | 269 |
| 269 | 270 |
| 270 } // namespace local_discovery | 271 } // namespace local_discovery |
| 271 | 272 |
| 272 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ | 273 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ |
| OLD | NEW |