From e1fcf1482fd306b7e404ed037106801840deda76 Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Mon, 23 Aug 2010 18:47:25 +0000 Subject: Disk cache: Extend the internal buffering performed by each entry to cover external files. We now keep a variable-size buffer and use it even after we know that the data is not going to be stored by a block-file. The backend keeps track of the total memory used by all entries and prevents that value from going over a max value that depends on the total memory available. This CL removes the tests that were checking the synchronous operation of sparse IO because that model is no longer supported by the public API, and this CL would add complexity to them (they fail due to thread safety concerns). BUG=6626 TEST=net_unittests Review URL: http://codereview.chromium.org/3167020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57082 0039d316-1c4b-4281-b951-d872f2087c98 --- net/disk_cache/file.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'net/disk_cache/file.h') diff --git a/net/disk_cache/file.h b/net/disk_cache/file.h index 2535866..43ba5c1 100644 --- a/net/disk_cache/file.h +++ b/net/disk_cache/file.h @@ -59,10 +59,6 @@ class File : public base::RefCounted { bool Write(const void* buffer, size_t buffer_len, size_t offset, FileIOCallback* callback, bool* completed); - // Performs asynchronous writes, but doesn't notify when done. Automatically - // deletes buffer when done. - bool PostWrite(const void* buffer, size_t buffer_len, size_t offset); - // Sets the file's length. The file is truncated or extended with zeros to // the new length. bool SetLength(size_t length); @@ -77,7 +73,7 @@ class File : public base::RefCounted { // Performs the actual asynchronous write. If notify is set and there is no // callback, the call will be re-synchronized. bool AsyncWrite(const void* buffer, size_t buffer_len, size_t offset, - bool notify, FileIOCallback* callback, bool* completed); + FileIOCallback* callback, bool* completed); private: bool init_; -- cgit v1.1