Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Unified Diff: net/disk_cache/simple/simple_entry_impl.h

Issue 13907009: Support optimistic Create and Write operations on the SimpleCache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix SimpleCacheOptimistic4 Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 87eeccae810a508b1a9cdfe984f8375028d18ff2..fcaff7953d8afba868c15154222e45e7b84a6c8c 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.
pasko-google - do not use 2013/05/02 14:01:43 this is not strictly true because we can still do
felipeg 2013/05/02 14:10:05 No we can't do optimistic creates on a failed entr
+ 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);
gavinp 2013/05/02 12:47:39 This change of parameter ordering is a bit confusi
felipeg 2013/05/02 13:55:58 Output parameters should come last. That is not in
- void CreateEntryInternal(Entry** entry,
- const CompletionCallback& callback);
+ void CreateEntryInternal(const CompletionCallback& callback,
+ Entry** out_entry);
void CloseInternal();

Powered by Google App Engine
This is Rietveld 408576698