summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dns/dns_config_service_posix.cc4
-rw-r--r--net/dns/dns_config_service_posix.h9
-rw-r--r--net/dns/dns_config_service_win.cc4
3 files changed, 9 insertions, 8 deletions
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index 4dda0fc..db93418 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -215,8 +215,7 @@ class DnsConfigServicePosix::HostsReader : public SerialWorker {
};
DnsConfigServicePosix::DnsConfigServicePosix()
- : watcher_(new Watcher(this)),
- config_reader_(new ConfigReader(this)),
+ : config_reader_(new ConfigReader(this)),
hosts_reader_(new HostsReader(this)) {}
DnsConfigServicePosix::~DnsConfigServicePosix() {
@@ -231,6 +230,7 @@ void DnsConfigServicePosix::ReadNow() {
bool DnsConfigServicePosix::StartWatching() {
// TODO(szym): re-start watcher if that makes sense. http://crbug.com/116139
+ watcher_.reset(new Watcher(this));
return watcher_->Watch();
}
diff --git a/net/dns/dns_config_service_posix.h b/net/dns/dns_config_service_posix.h
index 1450457..95a4377 100644
--- a/net/dns/dns_config_service_posix.h
+++ b/net/dns/dns_config_service_posix.h
@@ -23,15 +23,16 @@ class NET_EXPORT_PRIVATE DnsConfigServicePosix : public DnsConfigService {
DnsConfigServicePosix();
virtual ~DnsConfigServicePosix();
+ protected:
+ // DnsConfigService:
+ virtual void ReadNow() OVERRIDE;
+ virtual bool StartWatching() OVERRIDE;
+
private:
class Watcher;
class ConfigReader;
class HostsReader;
- // DnsConfigService:
- virtual void ReadNow() OVERRIDE;
- virtual bool StartWatching() OVERRIDE;
-
void OnConfigChanged(bool succeeded);
void OnHostsChanged(bool succeeded);
diff --git a/net/dns/dns_config_service_win.cc b/net/dns/dns_config_service_win.cc
index 8fa7209..1e4f153 100644
--- a/net/dns/dns_config_service_win.cc
+++ b/net/dns/dns_config_service_win.cc
@@ -656,8 +656,7 @@ class DnsConfigServiceWin::HostsReader : public SerialWorker {
};
DnsConfigServiceWin::DnsConfigServiceWin()
- : watcher_(new Watcher(this)),
- config_reader_(new ConfigReader(this)),
+ : config_reader_(new ConfigReader(this)),
hosts_reader_(new HostsReader(this)) {}
DnsConfigServiceWin::~DnsConfigServiceWin() {
@@ -672,6 +671,7 @@ void DnsConfigServiceWin::ReadNow() {
bool DnsConfigServiceWin::StartWatching() {
// TODO(szym): re-start watcher if that makes sense. http://crbug.com/116139
+ watcher_.reset(new Watcher(this));
return watcher_->Watch();
}