Index: chrome/browser/local_discovery/service_discovery_client_mdns.cc |
diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.cc b/chrome/browser/local_discovery/service_discovery_client_mdns.cc |
index b40a169f70b8e13e1f80e958ee190ae5215f24f9..08ca55c9e0a63c3f67d2b3f45724c71c7dfd7f79 100644 |
--- a/chrome/browser/local_discovery/service_discovery_client_mdns.cc |
+++ b/chrome/browser/local_discovery/service_discovery_client_mdns.cc |
@@ -4,8 +4,11 @@ |
#include "chrome/browser/local_discovery/service_discovery_client_mdns.h" |
+#include "base/location.h" |
#include "base/memory/scoped_vector.h" |
#include "base/metrics/histogram.h" |
+#include "base/single_thread_task_runner.h" |
+#include "base/thread_task_runner_handle.h" |
#include "chrome/common/local_discovery/service_discovery_client_impl.h" |
#include "content/public/browser/browser_thread.h" |
#include "net/dns/mdns_client.h" |
@@ -367,12 +370,11 @@ void ServiceDiscoveryClientMdns::ScheduleStartNewClient() { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
OnBeforeMdnsDestroy(); |
if (restart_attempts_ < kMaxRestartAttempts) { |
- base::MessageLoop::current()->PostDelayedTask( |
- FROM_HERE, |
- base::Bind(&ServiceDiscoveryClientMdns::StartNewClient, |
- weak_ptr_factory_.GetWeakPtr()), |
- base::TimeDelta::FromSeconds( |
- kRestartDelayOnNetworkChangeSeconds * (1 << restart_attempts_))); |
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
+ FROM_HERE, base::Bind(&ServiceDiscoveryClientMdns::StartNewClient, |
+ weak_ptr_factory_.GetWeakPtr()), |
+ base::TimeDelta::FromSeconds(kRestartDelayOnNetworkChangeSeconds * |
+ (1 << restart_attempts_))); |
} else { |
ReportSuccess(); |
} |