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

Unified Diff: net/disk_cache/block_files.h

Issue 2891022: Disk cache: Read the index and data_0 files in a single... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/block_files.h
===================================================================
--- net/disk_cache/block_files.h (revision 52189)
+++ net/disk_cache/block_files.h (working copy)
@@ -46,6 +46,9 @@
// cache is being purged.
void CloseFiles();
+ // Sends UMA stats.
+ void ReportStats();
+
private:
// Set force to true to overwrite the file if it exists.
bool CreateBlockFile(int index, FileType file_type, bool force);
@@ -69,6 +72,9 @@
// Restores the header of a potentially inconsistent file.
bool FixBlockFileHeader(MappedFile* file);
+ // Retrieves stats for the given file index.
+ void GetFileStats(int index, int* used_count, int* load);
+
// Returns the filename for a given file index.
FilePath Name(int index);
@@ -79,6 +85,7 @@
FRIEND_TEST(DiskCacheTest, BlockFiles_ZeroSizeFile);
FRIEND_TEST(DiskCacheTest, BlockFiles_InvalidFile);
+ FRIEND_TEST(DiskCacheTest, BlockFiles_Stats);
DISALLOW_COPY_AND_ASSIGN(BlockFiles);
};

Powered by Google App Engine
This is Rietveld 408576698