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 CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ |
6 #define CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ | 6 #define CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 public: | 31 public: |
32 typedef base::Callback<void(chrome_common_net::DnsProbeStatus result)> | 32 typedef base::Callback<void(chrome_common_net::DnsProbeStatus result)> |
33 ProbeCallback; | 33 ProbeCallback; |
34 | 34 |
35 DnsProbeService(); | 35 DnsProbeService(); |
36 virtual ~DnsProbeService(); | 36 virtual ~DnsProbeService(); |
37 | 37 |
38 virtual void ProbeDns(const ProbeCallback& callback); | 38 virtual void ProbeDns(const ProbeCallback& callback); |
39 | 39 |
40 // NetworkChangeNotifier::DNSObserver implementation: | 40 // NetworkChangeNotifier::DNSObserver implementation: |
41 virtual void OnDNSChanged() OVERRIDE; | 41 virtual void OnDNSChanged() override; |
42 | 42 |
43 void SetSystemClientForTesting(scoped_ptr<net::DnsClient> system_client); | 43 void SetSystemClientForTesting(scoped_ptr<net::DnsClient> system_client); |
44 void SetPublicClientForTesting(scoped_ptr<net::DnsClient> public_client); | 44 void SetPublicClientForTesting(scoped_ptr<net::DnsClient> public_client); |
45 void ClearCachedResultForTesting(); | 45 void ClearCachedResultForTesting(); |
46 | 46 |
47 private: | 47 private: |
48 enum State { | 48 enum State { |
49 STATE_NO_RESULT, | 49 STATE_NO_RESULT, |
50 STATE_PROBE_RUNNING, | 50 STATE_PROBE_RUNNING, |
51 STATE_RESULT_CACHED, | 51 STATE_RESULT_CACHED, |
(...skipping 20 matching lines...) Expand all Loading... |
72 // DnsProbeRunners for the system DNS configuration and a public DNS server. | 72 // DnsProbeRunners for the system DNS configuration and a public DNS server. |
73 DnsProbeRunner system_runner_; | 73 DnsProbeRunner system_runner_; |
74 DnsProbeRunner public_runner_; | 74 DnsProbeRunner public_runner_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(DnsProbeService); | 76 DISALLOW_COPY_AND_ASSIGN(DnsProbeService); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace chrome_browser_net | 79 } // namespace chrome_browser_net |
80 | 80 |
81 #endif // CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ | 81 #endif // CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ |
OLD | NEW |