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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H_
8 #include "chrome/browser/local_discovery/privet_http.h"
9 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h"
11 namespace local_discovery {
13 class PrivetHTTPAsynchronousFactoryMac : public PrivetHTTPAsynchronousFactory {
15 explicit PrivetHTTPAsynchronousFactoryMac(
16 net::URLRequestContextGetter* request_context);
17 ~PrivetHTTPAsynchronousFactoryMac() override;
19 scoped_ptr<PrivetHTTPResolution> CreatePrivetHTTP(
20 const std::string& name,
21 const net::HostPortPair& address,
22 const ResultCallback& callback) override;
25 class ResolutionMac : public PrivetHTTPResolution {
27 ResolutionMac(net::URLRequestContextGetter* request_context,
28 const std::string& name,
29 const net::HostPortPair& host_port,
30 const ResultCallback& callback);
31 ~ResolutionMac() override;
33 void Start() override;
34 const std::string& GetName() override;
37 net::URLRequestContextGetter* request_context_;
39 net::HostPortPair host_port_;
40 ResultCallback callback_;
43 net::URLRequestContextGetter* request_context_;
46 } // namespace local_discovery
48 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H_