Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: chrome/browser/net/dns_probe_service.h

Issue 1047103002: Avoid initial NetworkChangeNotifier OnDNSChanged() signal on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert an accidental test enabling Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/net/dns_probe_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
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 ~DnsProbeService() override; 36 ~DnsProbeService() override;
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 void OnDNSChanged() override; 41 void OnDNSChanged() override;
42 void OnInitialDNSConfigRead() override;
42 43
43 void SetSystemClientForTesting(scoped_ptr<net::DnsClient> system_client); 44 void SetSystemClientForTesting(scoped_ptr<net::DnsClient> system_client);
44 void SetPublicClientForTesting(scoped_ptr<net::DnsClient> public_client); 45 void SetPublicClientForTesting(scoped_ptr<net::DnsClient> public_client);
45 void ClearCachedResultForTesting(); 46 void ClearCachedResultForTesting();
46 47
47 private: 48 private:
48 enum State { 49 enum State {
49 STATE_NO_RESULT, 50 STATE_NO_RESULT,
50 STATE_PROBE_RUNNING, 51 STATE_PROBE_RUNNING,
51 STATE_RESULT_CACHED, 52 STATE_RESULT_CACHED,
(...skipping 20 matching lines...) Expand all
72 // DnsProbeRunners for the system DNS configuration and a public DNS server. 73 // DnsProbeRunners for the system DNS configuration and a public DNS server.
73 DnsProbeRunner system_runner_; 74 DnsProbeRunner system_runner_;
74 DnsProbeRunner public_runner_; 75 DnsProbeRunner public_runner_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(DnsProbeService); 77 DISALLOW_COPY_AND_ASSIGN(DnsProbeService);
77 }; 78 };
78 79
79 } // namespace chrome_browser_net 80 } // namespace chrome_browser_net
80 81
81 #endif // CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_ 82 #endif // CHROME_BROWSER_NET_DNS_PROBE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/dns_probe_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698