OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_HOST_DNS_BLACKHOLE_CHECKER_H_ | 5 #ifndef REMOTING_HOST_DNS_BLACKHOLE_CHECKER_H_ |
6 #define REMOTING_HOST_DNS_BLACKHOLE_CHECKER_H_ | 6 #define REMOTING_HOST_DNS_BLACKHOLE_CHECKER_H_ |
7 | 7 |
8 #include "net/url_request/url_fetcher_delegate.h" | 8 #include "net/url_request/url_fetcher_delegate.h" |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // Initiates a check the verify that the host talkgadget has not been "DNS | 34 // Initiates a check the verify that the host talkgadget has not been "DNS |
35 // blackholed" to prevent connections. If this is called again before the | 35 // blackholed" to prevent connections. If this is called again before the |
36 // callback has been called, then the second call is ignored. | 36 // callback has been called, then the second call is ignored. |
37 void CheckForDnsBlackhole(const base::Callback<void(bool)>& callback); | 37 void CheckForDnsBlackhole(const base::Callback<void(bool)>& callback); |
38 | 38 |
39 private: | 39 private: |
40 // URL request context getter to use to create the URL fetcher. | 40 // URL request context getter to use to create the URL fetcher. |
41 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | 41 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
42 | 42 |
43 // URL fetcher used to verify access to the host talkgadget. | 43 // URL fetcher used to verify access to the host talkgadget. |
44 scoped_ptr<net::URLFetcher> url_fetcher_; | 44 std::unique_ptr<net::URLFetcher> url_fetcher_; |
45 | 45 |
46 // The string pre-pended to '.talkgadget.google.com' to create the full | 46 // The string pre-pended to '.talkgadget.google.com' to create the full |
47 // talkgadget domain name for the host. | 47 // talkgadget domain name for the host. |
48 std::string talkgadget_prefix_; | 48 std::string talkgadget_prefix_; |
49 | 49 |
50 // Called with the results of the connection check. | 50 // Called with the results of the connection check. |
51 base::Callback<void(bool)> callback_; | 51 base::Callback<void(bool)> callback_; |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(DnsBlackholeChecker); | 53 DISALLOW_COPY_AND_ASSIGN(DnsBlackholeChecker); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace remoting | 56 } // namespace remoting |
57 | 57 |
58 #endif // REMOTING_HOST_DNS_BLACKHOLE_CHECKER_H_ | 58 #endif // REMOTING_HOST_DNS_BLACKHOLE_CHECKER_H_ |
OLD | NEW |