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_MAC_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_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 | 10 |
11 namespace local_discovery { | 11 namespace local_discovery { |
12 | 12 |
13 class PrivetHTTPAsynchronousFactoryMac : public PrivetHTTPAsynchronousFactory { | 13 class PrivetHTTPAsynchronousFactoryMac : public PrivetHTTPAsynchronousFactory { |
14 public: | 14 public: |
15 explicit PrivetHTTPAsynchronousFactoryMac( | 15 explicit PrivetHTTPAsynchronousFactoryMac( |
16 net::URLRequestContextGetter* request_context); | 16 net::URLRequestContextGetter* request_context); |
17 virtual ~PrivetHTTPAsynchronousFactoryMac(); | 17 virtual ~PrivetHTTPAsynchronousFactoryMac(); |
18 | 18 |
19 virtual scoped_ptr<PrivetHTTPResolution> CreatePrivetHTTP( | 19 virtual scoped_ptr<PrivetHTTPResolution> CreatePrivetHTTP( |
20 const std::string& name, | 20 const std::string& name, |
21 const net::HostPortPair& address, | 21 const net::HostPortPair& address, |
22 const ResultCallback& callback) OVERRIDE; | 22 const ResultCallback& callback) override; |
23 | 23 |
24 private: | 24 private: |
25 class ResolutionMac : public PrivetHTTPResolution { | 25 class ResolutionMac : public PrivetHTTPResolution { |
26 public: | 26 public: |
27 ResolutionMac(net::URLRequestContextGetter* request_context, | 27 ResolutionMac(net::URLRequestContextGetter* request_context, |
28 const std::string& name, | 28 const std::string& name, |
29 const net::HostPortPair& host_port, | 29 const net::HostPortPair& host_port, |
30 const ResultCallback& callback); | 30 const ResultCallback& callback); |
31 virtual ~ResolutionMac(); | 31 virtual ~ResolutionMac(); |
32 | 32 |
33 virtual void Start() OVERRIDE; | 33 virtual void Start() override; |
34 virtual const std::string& GetName() OVERRIDE; | 34 virtual const std::string& GetName() override; |
35 | 35 |
36 private: | 36 private: |
37 net::URLRequestContextGetter* request_context_; | 37 net::URLRequestContextGetter* request_context_; |
38 std::string name_; | 38 std::string name_; |
39 net::HostPortPair host_port_; | 39 net::HostPortPair host_port_; |
40 ResultCallback callback_; | 40 ResultCallback callback_; |
41 }; | 41 }; |
42 | 42 |
43 net::URLRequestContextGetter* request_context_; | 43 net::URLRequestContextGetter* request_context_; |
44 }; | 44 }; |
45 | 45 |
46 } // namespace local_discovery | 46 } // namespace local_discovery |
47 | 47 |
48 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H
_ | 48 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_ASYNCHRONOUS_FACTORY_MAC_H
_ |
OLD | NEW |