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

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: on top of trunk, ready to land 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
« no previous file with comments | « net/disk_cache/simple/simple_entry_impl.cc ('k') | net/disk_cache/simple/simple_synchronous_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1bf6a54d555cba451c36fddddccfbf4981fab7cf..0c3b0bd0a582c3d7e5d922991fb2aa0de2913403 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;
@@ -72,14 +73,13 @@ class SimpleSynchronousEntry {
const SynchronousOperationCallback& 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;
-
SimpleSynchronousEntry(
const scoped_refptr<base::TaskRunner>& callback_runner,
const base::FilePath& path,
@@ -101,9 +101,9 @@ class SimpleSynchronousEntry {
base::Time last_used_;
base::Time last_modified_;
- int32 data_size_[kIndexCount];
+ int32 data_size_[kSimpleEntryFileCount];
- base::PlatformFile files_[kIndexCount];
+ base::PlatformFile files_[kSimpleEntryFileCount];
};
} // namespace disk_cache
« no previous file with comments | « net/disk_cache/simple/simple_entry_impl.cc ('k') | net/disk_cache/simple/simple_synchronous_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698