Index: net/dns/dns_config_service_win.cc |
diff --git a/net/dns/dns_config_service_win.cc b/net/dns/dns_config_service_win.cc |
index d4a615f00485dbae5226be36a53de69bfe84e95d..3695eab1da79d5e02b592cf11137b35fa5ed439c 100644 |
--- a/net/dns/dns_config_service_win.cc |
+++ b/net/dns/dns_config_service_win.cc |
@@ -307,9 +307,6 @@ class DnsConfigServiceWin::ConfigReader : public SerialWorker { |
bool StartWatch() { |
DCHECK(loop()->BelongsToCurrentThread()); |
- // This is done only once per lifetime so open the keys on this thread. |
- base::ThreadRestrictions::ScopedAllowIO allow_io; |
- |
base::Closure callback = base::Bind(&SerialWorker::WorkNow, |
base::Unretained(this)); |
@@ -448,6 +445,11 @@ DnsConfigServiceWin::~DnsConfigServiceWin() { |
void DnsConfigServiceWin::Watch() { |
DCHECK(CalledOnValidThread()); |
+ |
+ // This is done only once per lifetime so open the keys and file watcher |
+ // handles on this thread. |
+ base::ThreadRestrictions::ScopedAllowIO allow_io; |
cbentzel
2012/02/14 02:01:54
Can you add a bug about whether we should try to r
|
+ |
bool started = config_reader_->StartWatch(); |
// TODO(szym): handle possible failure |
DCHECK(started); |
@@ -461,8 +463,8 @@ void DnsConfigServiceWin::Watch() { |
} |
// static |
-DnsConfigService* DnsConfigService::CreateSystemService() { |
- return new DnsConfigServiceWin(); |
+scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { |
+ return scoped_ptr<DnsConfigService>(new DnsConfigServiceWin()); |
} |
} // namespace net |