diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 22:42:08 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 22:42:08 +0000 |
commit | 232a58169700ed7abde79d9858c288eb21409e60 (patch) | |
tree | a1424f86d252cd3859c060954882a9a1809a5121 /net/spdy/spdy_session_pool.cc | |
parent | cdc5489ddff18b5ff13296abc1c8869e3cd7db28 (diff) | |
download | chromium_src-232a58169700ed7abde79d9858c288eb21409e60.zip chromium_src-232a58169700ed7abde79d9858c288eb21409e60.tar.gz chromium_src-232a58169700ed7abde79d9858c288eb21409e60.tar.bz2 |
Plumb through NetworkChangeNotifier::IsOffline() to WebKit, enabling
navigator.onLine and online/offline events. Only works on Windows at the moment, as IsCurrentlyOffline() is supported only by NetworkChangeNotifierWin.
Most of the changes are due to the need to support two different kinds of NetworkChangeNotifier observers. Both observers currently happen to trigger on the same event, but that could change, e.g., if we store the previous online state and only notify on a change. Thus the need for two different observer interfaces, and associated Add/Remove methods.
BUG=7469
TEST=Load https://bug336359.bugzilla.mozilla.org/attachment.cgi?id=220609, unplug network cable, reload, see that page changes to note offline status
Review URL: http://codereview.chromium.org/6526059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_pool.cc')
-rw-r--r-- | net/spdy/spdy_session_pool.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc index b32495e..e2cae2b 100644 --- a/net/spdy/spdy_session_pool.cc +++ b/net/spdy/spdy_session_pool.cc @@ -19,7 +19,7 @@ bool SpdySessionPool::g_force_single_domain = false; SpdySessionPool::SpdySessionPool(SSLConfigService* ssl_config_service) : ssl_config_service_(ssl_config_service) { - NetworkChangeNotifier::AddObserver(this); + NetworkChangeNotifier::AddIPAddressObserver(this); if (ssl_config_service_) ssl_config_service_->AddObserver(this); } @@ -29,7 +29,7 @@ SpdySessionPool::~SpdySessionPool() { if (ssl_config_service_) ssl_config_service_->RemoveObserver(this); - NetworkChangeNotifier::RemoveObserver(this); + NetworkChangeNotifier::RemoveIPAddressObserver(this); } scoped_refptr<SpdySession> SpdySessionPool::Get( |