diff options
author | pauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-31 21:48:54 +0000 |
---|---|---|
committer | pauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-31 21:48:54 +0000 |
commit | 582957ea17f3c6c8449b019e634c77644e427d32 (patch) | |
tree | 8aab69c47b5b0776450b1697013a44973afaa702 /net | |
parent | ea6fc52a76f650252b73e89f3a714df54dc5c1b4 (diff) | |
download | chromium_src-582957ea17f3c6c8449b019e634c77644e427d32.zip chromium_src-582957ea17f3c6c8449b019e634c77644e427d32.tar.gz chromium_src-582957ea17f3c6c8449b019e634c77644e427d32.tar.bz2 |
Avoid calling any Windows networking functions during unit-testing.
It is important to avoid this as some of these functions have
proven themselves to not be thread-safe, see http://crbug.com/324913.
This creeped back into the unit-test with r239024.
BUG=356401
TEST=net_unittests --gtest_filter=NetChangeWinFail*
Review URL: https://codereview.chromium.org/219343005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/network_change_notifier_win.h | 2 | ||||
-rw-r--r-- | net/base/network_change_notifier_win_unittest.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/base/network_change_notifier_win.h b/net/base/network_change_notifier_win.h index 177bad2..7b75c15 100644 --- a/net/base/network_change_notifier_win.h +++ b/net/base/network_change_notifier_win.h @@ -59,7 +59,7 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierWin // Does the actual work to determine the current connection type. // It is not thread safe, see crbug.com/324913. - ConnectionType RecomputeCurrentConnectionType() const; + virtual ConnectionType RecomputeCurrentConnectionType() const; void SetCurrentConnectionType(ConnectionType connection_type); diff --git a/net/base/network_change_notifier_win_unittest.cc b/net/base/network_change_notifier_win_unittest.cc index 878060e..c71edbc 100644 --- a/net/base/network_change_notifier_win_unittest.cc +++ b/net/base/network_change_notifier_win_unittest.cc @@ -30,9 +30,9 @@ class TestNetworkChangeNotifierWin : public NetworkChangeNotifierWin { set_is_watching(false); } - // From NetworkChangeNotifier. + // From NetworkChangeNotifierWin. virtual NetworkChangeNotifier::ConnectionType - GetCurrentConnectionType() const OVERRIDE { + RecomputeCurrentConnectionType() const OVERRIDE { return NetworkChangeNotifier::CONNECTION_UNKNOWN; } |