Chromium Code Reviews| Index: webrtc/base/networkmonitor.cc |
| diff --git a/webrtc/base/networkmonitor.cc b/webrtc/base/networkmonitor.cc |
| index 92bf0592b5fa3932b243968c93b3759c1e93365d..63e92f51227486875a795680ed09af72a4411afa 100644 |
| --- a/webrtc/base/networkmonitor.cc |
| +++ b/webrtc/base/networkmonitor.cc |
| @@ -26,11 +26,17 @@ NetworkMonitorInterface::NetworkMonitorInterface() {} |
| NetworkMonitorInterface::~NetworkMonitorInterface() {} |
| -NetworkMonitorBase::NetworkMonitorBase() : thread_(Thread::Current()) {} |
| +NetworkMonitorBase::NetworkMonitorBase() : thread_(nullptr) {} |
| NetworkMonitorBase::~NetworkMonitorBase() {} |
| +void NetworkMonitorBase::Start() { |
|
pthatcher1
2016/01/14 20:07:24
Should we check to make sure Start() isn't called
honghaiz3
2016/01/15 01:00:38
Removed this change.
|
| + if (thread_ == nullptr) { |
| + thread_ = Thread::Current(); |
| + } |
| +} |
| void NetworkMonitorBase::OnNetworksChanged() { |
| LOG(LS_VERBOSE) << "Network change is received at the network monitor"; |
| + ASSERT(thread_ != nullptr); |
| thread_->Post(this, UPDATE_NETWORKS_MESSAGE); |
| } |