diff options
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r-- | net/http/http_cache.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index 3758a51..61e5a91 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc @@ -775,6 +775,19 @@ void HttpCache::ConvertWriterToReader(ActiveEntry* entry) { ProcessPendingQueue(entry); } +LoadState HttpCache::GetLoadStateForPendingTransaction( + const Transaction* trans) { + ActiveEntriesMap::const_iterator i = active_entries_.find(trans->key()); + if (i == active_entries_.end()) { + // If this is really a pending transaction, and it is not part of + // active_entries_, we should be creating the backend or the entry. + return LOAD_STATE_WAITING_FOR_CACHE; + } + + Transaction* writer = i->second->writer; + return writer->GetWriterLoadState(); +} + void HttpCache::RemovePendingTransaction(Transaction* trans) { ActiveEntriesMap::const_iterator i = active_entries_.find(trans->key()); bool found = false; |