| Index: net/http/http_cache_transaction.cc
|
| ===================================================================
|
| --- net/http/http_cache_transaction.cc (revision 52151)
|
| +++ net/http/http_cache_transaction.cc (working copy)
|
| @@ -314,11 +314,14 @@
|
| }
|
|
|
| LoadState HttpCache::Transaction::GetLoadState() const {
|
| - if (network_trans_.get())
|
| - return network_trans_->GetLoadState();
|
| - if (entry_ || !request_)
|
| - return LOAD_STATE_IDLE;
|
| - return LOAD_STATE_WAITING_FOR_CACHE;
|
| + LoadState state = GetWriterLoadState();
|
| + if (state != LOAD_STATE_WAITING_FOR_CACHE)
|
| + return state;
|
| +
|
| + if (cache_)
|
| + return cache_->GetLoadStateForPendingTransaction(this);
|
| +
|
| + return LOAD_STATE_IDLE;
|
| }
|
|
|
| uint64 HttpCache::Transaction::GetUploadProgress() const {
|
| @@ -366,6 +369,14 @@
|
| return true;
|
| }
|
|
|
| +LoadState HttpCache::Transaction::GetWriterLoadState() const {
|
| + if (network_trans_.get())
|
| + return network_trans_->GetLoadState();
|
| + if (entry_ || !request_)
|
| + return LOAD_STATE_IDLE;
|
| + return LOAD_STATE_WAITING_FOR_CACHE;
|
| +}
|
| +
|
| //-----------------------------------------------------------------------------
|
|
|
| void HttpCache::Transaction::DoCallback(int rv) {
|
|
|