Index: net/http/http_cache.h |
diff --git a/net/http/http_cache.h b/net/http/http_cache.h |
index 026d476e92f0dcfd36c309d07c5016ddfaa04854..ad6f661ae9aecd9396dbb0ecdeaf2744ccf3bbad 100644 |
--- a/net/http/http_cache.h |
+++ b/net/http/http_cache.h |
@@ -347,17 +347,22 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory, |
// one (in this case, the entry is no longer valid). |
int AddTransactionToEntry(ActiveEntry* entry, Transaction* trans); |
- // Called when the transaction has finished working with this entry. |cancel| |
- // is true if the operation was cancelled by the caller instead of running |
- // to completion. |
- void DoneWithEntry(ActiveEntry* entry, Transaction* trans, bool cancel); |
+ // Used with DoneWithEntry() to indicate the state of the entry. |
+ enum class EntryState { SUCCEEDED, DOOMED }; |
rvargas (doing something else)
2015/09/11 23:56:17
nit: types go before methods.
asanka
2015/09/17 21:59:40
Done.
|
- // Called when the transaction has finished writing to this entry. |success| |
- // is false if the cache entry should be deleted. |
- void DoneWritingToEntry(ActiveEntry* entry, bool success); |
- |
- // Called when the transaction has finished reading from this entry. |
- void DoneReadingFromEntry(ActiveEntry* entry, Transaction* trans); |
+ // Removes |trans| from |entry|. |trans| is required to be a reader or writer |
+ // that was added to |trans| by AddTransactionToEntry(). For writers, |
+ // |entry_state| indicates the state of the entry after releasing. |
rvargas (doing something else)
2015/09/11 23:56:17
nit: what is "after releasing"?
asanka
2015/09/17 21:59:40
Clarified.
|
+ // |
+ // If |entry_state| is DOOMED, then the cache entry is destroyed and any |
rvargas (doing something else)
2015/09/11 23:56:17
nit: Can we change this to a command like word ins
asanka
2015/09/17 21:59:40
Changed to KEEP/DOOM
|
+ // pending transactions that were formerly waiting to be added to |entry| will |
+ // receive ERR_CACHE_RACE. |
+ // |
+ // If |entry_state| is SUCCEEDED, then |entry| is assumed to be safe for |
+ // further consumption and pending transaction will be permitted to use it. |
+ void DoneWithEntry(ActiveEntry* entry, |
+ Transaction* trans, |
+ EntryState entry_state); |
// Converts the active writer transaction to a reader so that other |
// transactions can start reading from this entry. |