Chromium Code Reviews| Index: third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| diff --git a/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp b/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| index 8d29d8fc6080450a5c3df196657ba3ce70177f7a..66b12dd44c35f8f5941927a68cfb8d221b7fcdc3 100644 |
| --- a/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| +++ b/third_party/WebKit/Source/core/page/NetworkStateNotifier.cpp |
| @@ -104,6 +104,14 @@ void NetworkStateNotifier::removeObserver(NetworkStateObserver* observer, Execut |
| void NetworkStateNotifier::setTestUpdatesOnly(bool updatesOnly) |
| { |
| ASSERT(isMainThread()); |
| + |
| + // Reset state to default when entering or leaving test mode. |
|
jkarlin
2015/10/21 13:24:49
Update the comment in the header file with this ch
DaleCurtis
2015/10/21 22:34:32
Done.
|
| + if (updatesOnly != m_testUpdatesOnly) { |
| + m_isOnLine = true; |
|
philipj_slow
2015/10/21 11:11:29
I didn't look very closely before, but I see that
jkarlin
2015/10/21 13:24:49
Yes, the mutex is required here.
DaleCurtis
2015/10/21 22:34:32
Done.
|
| + m_type = WebConnectionTypeOther; |
| + m_maxBandwidthMbps = std::numeric_limits<double>::infinity(); |
| + } |
| + |
| m_testUpdatesOnly = updatesOnly; |
| } |