Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM
[chromium-blink-merge.git] / chrome / browser / local_discovery / privet_http_asynchronous_factory_mac.h
blobcd25d680b56ce32daad49b210183b748ef245c9e
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 {
14 public:
15 explicit PrivetHTTPAsynchronousFactoryMac(
16 net::URLRequestContextGetter* request_context);
17 virtual ~PrivetHTTPAsynchronousFactoryMac();
19 virtual scoped_ptr<PrivetHTTPResolution> CreatePrivetHTTP(
20 const std::string& name,
21 const net::HostPortPair& address,
22 const ResultCallback& callback) OVERRIDE;
24 private:
25 class ResolutionMac : public PrivetHTTPResolution {
26 public:
27 ResolutionMac(net::URLRequestContextGetter* request_context,
28 const std::string& name,
29 const net::HostPortPair& host_port,
30 const ResultCallback& callback);
31 virtual ~ResolutionMac();
33 virtual void Start() OVERRIDE;
34 virtual const std::string& GetName() OVERRIDE;
36 private:
37 net::URLRequestContextGetter* request_context_;
38 std::string name_;
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_