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

Unified Diff: net/disk_cache/backend_impl.h

Issue 3167020: Disk cache: Extend the internal buffering performed by each entry... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.h
===================================================================
--- net/disk_cache/backend_impl.h (revision 55505)
+++ net/disk_cache/backend_impl.h (working copy)
@@ -175,6 +175,17 @@
// Logs requests that are denied due to being too big.
void TooMuchStorageRequested(int32 size);
+ // Returns true if a temporary buffer is allowed to be extended.
+ bool IsAllocAllowed(int current_size, int new_size);
+
+ // Tracks the release of |size| bytes by an entry buffer.
+ void BufferDeleted(int size);
+
+ // Only intended for testing the two previous methods.
+ int GetTotalBuffersSize() const {
+ return buffer_bytes_;
+ }
+
// Returns true if this instance seems to be under heavy load.
bool IsLoaded() const;
@@ -314,6 +325,9 @@
// Part of the self test. Returns false if the entry is corrupt.
bool CheckEntry(EntryImpl* cache_entry);
+ // Returns the maximum total memory for the memory buffers.
+ int MaxBuffersSize();
+
InFlightBackendIO background_queue_; // The controller of pending operations.
scoped_refptr<MappedFile> index_; // The main cache index.
FilePath path_; // Path to the folder used as backing storage.
@@ -329,6 +343,7 @@
int num_pending_io_; // Number of pending IO operations.
int entry_count_; // Number of entries accessed lately.
int byte_count_; // Number of bytes read/written lately.
+ int buffer_bytes_; // Total size of the temporary entries' buffers.
net::CacheType cache_type_;
int uma_report_; // Controls transmision of UMA data.
uint32 user_flags_; // Flags set by the user.
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698