| 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_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_IMPL_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_IMPL_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_IMPL_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/local_discovery/privet_http.h" | 8 #include "chrome/browser/local_discovery/privet_http.h" |
| 9 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h" | 9 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h" |
| 10 #include "chrome/common/local_discovery/service_discovery_client.h" | 10 #include "chrome/common/local_discovery/service_discovery_client.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 scoped_ptr<PrivetHTTPResolution> CreatePrivetHTTP( | 22 scoped_ptr<PrivetHTTPResolution> CreatePrivetHTTP( |
| 23 const std::string& service_name) override; | 23 const std::string& service_name) override; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 class ResolutionImpl : public PrivetHTTPResolution { | 26 class ResolutionImpl : public PrivetHTTPResolution { |
| 27 public: | 27 public: |
| 28 ResolutionImpl(const std::string& service_name, | 28 ResolutionImpl(const std::string& service_name, |
| 29 net::URLRequestContextGetter* request_context); | 29 net::URLRequestContextGetter* request_context); |
| 30 ~ResolutionImpl() override; | 30 ~ResolutionImpl() override; |
| 31 | 31 |
| 32 void Start(const ResultCallback& callback) override; |
| 33 |
| 32 void Start(const net::HostPortPair& address, | 34 void Start(const net::HostPortPair& address, |
| 33 const ResultCallback& callback) override; | 35 const ResultCallback& callback) override; |
| 34 | 36 |
| 35 const std::string& GetName() override; | 37 const std::string& GetName() override; |
| 36 | 38 |
| 37 private: | 39 private: |
| 40 void ServiceResolveComplete(const ResultCallback& callback, |
| 41 ServiceResolver::RequestStatus result, |
| 42 const ServiceDescription& description); |
| 43 |
| 38 void DomainResolveComplete(uint16 port, | 44 void DomainResolveComplete(uint16 port, |
| 39 const ResultCallback& callback, | 45 const ResultCallback& callback, |
| 40 bool success, | 46 bool success, |
| 41 const net::IPAddressNumber& address_ipv4, | 47 const net::IPAddressNumber& address_ipv4, |
| 42 const net::IPAddressNumber& address_ipv6); | 48 const net::IPAddressNumber& address_ipv6); |
| 43 | 49 |
| 44 std::string name_; | 50 std::string name_; |
| 45 scoped_refptr<net::URLRequestContextGetter> request_context_; | 51 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 46 scoped_refptr<ServiceDiscoverySharedClient> service_discovery_client_; | 52 scoped_refptr<ServiceDiscoverySharedClient> service_discovery_client_; |
| 53 scoped_ptr<ServiceResolver> service_resolver_; |
| 47 scoped_ptr<LocalDomainResolver> domain_resolver_; | 54 scoped_ptr<LocalDomainResolver> domain_resolver_; |
| 48 }; | 55 }; |
| 49 | 56 |
| 50 scoped_refptr<net::URLRequestContextGetter> request_context_; | 57 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 51 }; | 58 }; |
| 52 | 59 |
| 53 } // namespace local_discovery | 60 } // namespace local_discovery |
| 54 | 61 |
| 55 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_IMPL_
H_ | 62 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_IMPL_
H_ |
| OLD | NEW |