summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 22:43:35 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 22:43:35 +0000
commit8f82f9d9ae8dfd23ab63fb9e63c6246da71d29fd (patch)
tree3c4308efb534a5585d947882666b86073ae89463 /net/disk_cache/backend_impl.h
parentd756326c7c3c4a53ca94bc8d709d13e65c0d6464 (diff)
downloadchromium_src-8f82f9d9ae8dfd23ab63fb9e63c6246da71d29fd.zip
chromium_src-8f82f9d9ae8dfd23ab63fb9e63c6246da71d29fd.tar.gz
chromium_src-8f82f9d9ae8dfd23ab63fb9e63c6246da71d29fd.tar.bz2
Disk cache: Don't evict entries if we are busy doing other stuff.
BUG=10727 TEST=none Review URL: http://codereview.chromium.org/155314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20330 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/backend_impl.h')
-rw-r--r--net/disk_cache/backend_impl.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/backend_impl.h
index 84a10c1..e53150e 100644
--- a/net/disk_cache/backend_impl.h
+++ b/net/disk_cache/backend_impl.h
@@ -119,17 +119,20 @@ class BackendImpl : public Backend {
// Logs requests that are denied due to being too big.
void TooMuchStorageRequested(int32 size);
+ // Returns true if this instance seems to be under heavy load.
+ bool IsLoaded() const;
+
// Returns the full histogram name, for the given base |name| and experiment,
// and the current cache type. The name will be "DiskCache.t.name_e" where n
// is the cache type and e the provided |experiment|.
- std::string HistogramName(const char* name, int experiment);
+ std::string HistogramName(const char* name, int experiment) const;
- net::CacheType cache_type() {
+ net::CacheType cache_type() const {
return cache_type_;
}
// Returns the group for this client, based on the current cache size.
- int GetSizeGroup();
+ int GetSizeGroup() const;
// Returns true if we should send histograms for this user again. The caller
// must call this function only once per run (because it returns always the