diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-07 18:30:09 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-07 18:30:09 +0000 |
commit | 9be4f02cac155a7f0a6f4ff56f4ee3ca9d215dbe (patch) | |
tree | 026f730b37fc7c76a2660b5dc4d5313da46c6ee0 /net | |
parent | 445873cae45fd143a1f1fd936a578b576b6118ec (diff) | |
download | chromium_src-9be4f02cac155a7f0a6f4ff56f4ee3ca9d215dbe.zip chromium_src-9be4f02cac155a7f0a6f4ff56f4ee3ca9d215dbe.tar.gz chromium_src-9be4f02cac155a7f0a6f4ff56f4ee3ca9d215dbe.tar.bz2 |
Cleanup the FlipSession GetLoadState to be more specific.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/515039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/flip/flip_session.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc index 9cc20f6..73cf834 100644 --- a/net/flip/flip_session.cc +++ b/net/flip/flip_session.cc @@ -437,8 +437,18 @@ bool FlipSession::IsStreamActive(flip::FlipStreamId stream_id) const { } LoadState FlipSession::GetLoadState() const { - // TODO(mbelshe): needs more work - return LOAD_STATE_CONNECTING; + // NOTE: The application only queries the LoadState via the + // FlipNetworkTransaction, and details are only needed when + // we're in the process of connecting. + + // If we're connecting, defer to the connection to give us the actual + // LoadState. + if (state_ == CONNECTING) + return connection_->GetLoadState(); + + // Just report that we're idle since the session could be doing + // many things concurrently. + return LOAD_STATE_IDLE; } void FlipSession::OnTCPConnect(int result) { |