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

Unified Diff: net/disk_cache/flash/log_store.h

Issue 14265009: FlashCache refactorings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More refactorings. 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
« no previous file with comments | « net/disk_cache/flash/flash_entry_unittest.cc ('k') | net/disk_cache/flash/log_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/flash/log_store.h
diff --git a/net/disk_cache/flash/log_store.h b/net/disk_cache/flash/log_store.h
index ed2ca63f4f76114cc727577e80edacef9fc5e602..e53b83e16259dccffe46f4afb33258fe91f74377 100644
--- a/net/disk_cache/flash/log_store.h
+++ b/net/disk_cache/flash/log_store.h
@@ -11,11 +11,11 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "net/base/net_export.h"
+#include "net/disk_cache/flash/storage.h"
namespace disk_cache {
class Segment;
-class Storage;
// This class implements a general purpose store for storing and retrieving
// entries consisting of arbitrary binary data. The store has log semantics,
@@ -24,7 +24,7 @@ class Storage;
// any given time, while concurrent reading of multiple entries is supported.
class NET_EXPORT_PRIVATE LogStore {
public:
- explicit LogStore(Storage* storage);
+ LogStore(const base::FilePath& path, int32 size);
~LogStore();
// Performs initialization. Must be the first function called and further
@@ -58,19 +58,15 @@ class NET_EXPORT_PRIVATE LogStore {
void CloseEntry(int32 id);
private:
- FRIEND_TEST_ALL_PREFIXES(FlashCacheTest,
- LogStoreReadFromClosedSegment);
- FRIEND_TEST_ALL_PREFIXES(FlashCacheTest,
- LogStoreSegmentSelectionIsFifo);
- FRIEND_TEST_ALL_PREFIXES(FlashCacheTest,
- LogStoreInUseSegmentIsSkipped);
- FRIEND_TEST_ALL_PREFIXES(FlashCacheTest,
- LogStoreReadFromCurrentAfterClose);
+ FRIEND_TEST_ALL_PREFIXES(FlashCacheTest, LogStoreReadFromClosedSegment);
+ FRIEND_TEST_ALL_PREFIXES(FlashCacheTest, LogStoreSegmentSelectionIsFifo);
+ FRIEND_TEST_ALL_PREFIXES(FlashCacheTest, LogStoreInUseSegmentIsSkipped);
+ FRIEND_TEST_ALL_PREFIXES(FlashCacheTest, LogStoreReadFromCurrentAfterClose);
int32 GetNextSegmentIndex();
bool InUse(int32 segment_index) const;
- Storage* storage_;
+ Storage storage_;
int32 num_segments_;
« no previous file with comments | « net/disk_cache/flash/flash_entry_unittest.cc ('k') | net/disk_cache/flash/log_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698