Chromium Code Reviews| Index: net/disk_cache/simple/simple_entry_impl.h |
| diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h |
| index aa5b55c1ff32538419cc9109e261aedbef27bb8f..a11d1af3b05f8ffa4773d6b23b0c202caa401c54 100644 |
| --- a/net/disk_cache/simple/simple_entry_impl.h |
| +++ b/net/disk_cache/simple/simple_entry_impl.h |
| @@ -104,6 +104,10 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
| // IO is currently in flight, operations must wait for completion before |
| // launching. |
| STATE_IO_PENDING, |
| + |
| + // A failure occurred in the current or previous operation. All operations |
| + // after that must fail too. |
| + STATE_FAILURE, |
| }; |
| virtual ~SimpleEntryImpl(); |
| @@ -130,11 +134,10 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
| // the last reference. |
| void RunNextOperationIfNeeded(); |
| - void OpenEntryInternal(Entry** entry, |
| - const CompletionCallback& callback); |
| + void OpenEntryInternal(const CompletionCallback& callback, Entry** out_entry); |
| - void CreateEntryInternal(Entry** entry, |
| - const CompletionCallback& callback); |
| + void CreateEntryInternal(const CompletionCallback& callback, |
| + Entry** out_entry); |
| void CloseInternal(); |
| @@ -234,6 +237,9 @@ class SimpleEntryImpl : public Entry, public base::RefCounted<SimpleEntryImpl>, |
| SimpleSynchronousEntry* synchronous_entry_; |
| std::queue<base::Closure> pending_operations_; |
| + |
| + // Flag to turn On or Off Create and Write optimistic operations. |
| + bool optimistic_; |
|
gavinp
2013/05/01 13:11:22
I think we should either test with this flag (sinc
felipeg
2013/05/02 09:49:27
I will remove it and we add it later if we need it
|
| }; |
| } // namespace disk_cache |