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

Unified Diff: net/disk_cache/pending_create_entry.h

Issue 11787007: Race Create vs SendRequest on cache misses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lose a race Created 7 years, 11 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
« no previous file with comments | « net/base/net_error_list.h ('k') | net/disk_cache/pending_create_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/pending_create_entry.h
diff --git a/net/disk_cache/pending_create_entry.h b/net/disk_cache/pending_create_entry.h
new file mode 100644
index 0000000000000000000000000000000000000000..79ee6c9139a0f54cdf137950c836e59dc2516ea3
--- /dev/null
+++ b/net/disk_cache/pending_create_entry.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_DISK_CACHE_PENDING_CREATE_ENTRY_H_
+#define NET_DISK_CACHE_PENDING_CREATE_ENTRY_H_
+
+#include <string>
+
+#include "base/memory/weak_ptr.h"
+#include "net/base/completion_callback.h"
+
+namespace disk_cache {
+
+class Backend;
+class Entry;
+
+// Create an entry representing a create that is in flight, without blocking.
+// When the entry pointer is no longer needed, its Close or Doom method should
+// be called. If operations are performed on this entry before the real entry
+// has been created, operations may return net::ERR_CACHE_CREATE_RACE_FAILED.
+int PendingCreateEntry(Backend* backend, const std::string& key, Entry** entry);
+
+} // namespace disk_cache
+
+#endif // NET_DISK_CACHE_PENDING_CREATE_ENTRY_H_
« no previous file with comments | « net/base/net_error_list.h ('k') | net/disk_cache/pending_create_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698