diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-20 06:43:20 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-20 06:43:20 +0000 |
commit | 4f65c416358732ca7eb8f64e763355109894fc98 (patch) | |
tree | 707c60d7b1483bfe18b554b207c98d46538b38bc /net/quic | |
parent | 5c878f934bc93a1550ec2a1cf404f8cd3ac71a80 (diff) | |
download | chromium_src-4f65c416358732ca7eb8f64e763355109894fc98.zip chromium_src-4f65c416358732ca7eb8f64e763355109894fc98.tar.gz chromium_src-4f65c416358732ca7eb8f64e763355109894fc98.tar.bz2 |
QUIC - Added IsReadyToPersist method to check if the QuicServerInfo is ready to persist data.
Fixed comments from wtc:
https://codereview.chromium.org/196343017/diff/1/net/http/disk_cache_based_quic_server_info.cc
R=wtc@chromium.org
Review URL: https://codereview.chromium.org/197873026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic')
-rw-r--r-- | net/quic/crypto/quic_server_info.h | 4 | ||||
-rw-r--r-- | net/quic/quic_client_session.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/net/quic/crypto/quic_server_info.h b/net/quic/crypto/quic_server_info.h index 51533ec..0f09f3b 100644 --- a/net/quic/crypto/quic_server_info.h +++ b/net/quic/crypto/quic_server_info.h @@ -49,6 +49,10 @@ class NET_EXPORT_PRIVATE QuicServerInfo { // doesn't have a pending callback). virtual bool IsDataReady() = 0; + // Returns true if the object is ready to persist data, in other words, if + // data is loaded from disk cache and ready and there are no pending writes. + virtual bool IsReadyToPersist() = 0; + // Persist allows for the server information to be updated for future users. // This is a fire and forget operation: the caller may drop its reference // from this object and the store operation will still complete. This can diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc index 5146b95..865c9b0 100644 --- a/net/quic/quic_client_session.cc +++ b/net/quic/quic_client_session.cc @@ -466,7 +466,7 @@ void QuicClientSession::OnProofValid( const QuicCryptoClientConfig::CachedState& cached) { DCHECK(cached.proof_valid()); - if (!server_info_ || !server_info_->IsDataReady()) { + if (!server_info_ || !server_info_->IsReadyToPersist()) { return; } |