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

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

Issue 12226095: Make synchronous methods on disk_cache::SimpleEntryImpl() reentrant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove bad blank line Created 7 years, 10 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_synchronous_entry.h
diff --git a/net/disk_cache/simple/simple_synchronous_entry.h b/net/disk_cache/simple/simple_synchronous_entry.h
index af4b1e0bcb9627bd36ff78a859b9f54e8721f479..54b7b27fa2a50139fef3d3b930c0bf794d2b9e79 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.h
+++ b/net/disk_cache/simple/simple_synchronous_entry.h
@@ -14,6 +14,7 @@
#include "base/task_runner.h"
#include "base/time.h"
#include "net/base/completion_callback.h"
+#include "net/disk_cache/simple/simple_disk_format.h"
namespace base {
class SingleThreadTaskRunner;
@@ -71,14 +72,13 @@ class SimpleSynchronousEntry {
const SynchronousEntryCallback& callback,
bool truncate);
+ const base::FilePath& path() const { return path_; }
std::string key() const { return key_; }
base::Time last_used() const { return last_used_; }
base::Time last_modified() const { return last_modified_; }
int32 data_size(int index) const { return data_size_[index]; }
private:
- static const int kIndexCount = 3;
-
struct EntryStatus {
enum Mode {
ENTRY_UNINITIALIZED,
@@ -113,10 +113,10 @@ class SimpleSynchronousEntry {
base::Time last_used_;
base::Time last_modified_;
- int32 data_size_[kIndexCount];
+ int32 data_size_[kSimpleEntryFileCount];
- base::PlatformFile files_[kIndexCount];
- EntryStatus status_[kIndexCount];
+ base::PlatformFile files_[kSimpleEntryFileCount];
+ EntryStatus status_[kSimpleEntryFileCount];
};
} // namespace disk_cache

Powered by Google App Engine
This is Rietveld 408576698