summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/mem_backend_impl.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 19:31:51 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 19:31:51 +0000
commitec44a9a1abaf8ffdc001182b0345295081c6b714 (patch)
treea14fa1aa0cdee98b8257b5845499bf33e5a36394 /net/disk_cache/mem_backend_impl.h
parenteb69ca8e12e0d7a7d42ea328a4597475d5198bc7 (diff)
downloadchromium_src-ec44a9a1abaf8ffdc001182b0345295081c6b714.zip
chromium_src-ec44a9a1abaf8ffdc001182b0345295081c6b714.tar.gz
chromium_src-ec44a9a1abaf8ffdc001182b0345295081c6b714.tar.bz2
Disk cache: Update the disk cache tools and tests to use
the new interface (provide a cache thread and callback). BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2739007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/mem_backend_impl.h')
-rw-r--r--net/disk_cache/mem_backend_impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/disk_cache/mem_backend_impl.h b/net/disk_cache/mem_backend_impl.h
index e687410..2072a56 100644
--- a/net/disk_cache/mem_backend_impl.h
+++ b/net/disk_cache/mem_backend_impl.h
@@ -23,6 +23,13 @@ class MemBackendImpl : public Backend {
MemBackendImpl() : max_size_(0), current_size_(0) {}
~MemBackendImpl();
+ // Returns an instance of a Backend implemented only in memory. The returned
+ // object should be deleted when not needed anymore. max_bytes is the maximum
+ // size the cache can grow to. If zero is passed in as max_bytes, the cache
+ // will determine the value to use based on the available memory. The returned
+ // pointer can be NULL if a fatal error is found.
+ static Backend* CreateBackend(int max_bytes);
+
// Performs general initialization for this current instance of the cache.
bool Init();