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-03-27 20:12:34 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 20:12:34 +0000
commit17a8396f14051151059e95ce14b8a3e27b7c5882 (patch)
tree01f45ab023a8115f552f81a21da3b5f6cbfd4aa0 /net/disk_cache/backend_impl.h
parent63088d3724219e46dfa72818249553bbb6781345 (diff)
downloadchromium_src-17a8396f14051151059e95ce14b8a3e27b7c5882.zip
chromium_src-17a8396f14051151059e95ce14b8a3e27b7c5882.tar.gz
chromium_src-17a8396f14051151059e95ce14b8a3e27b7c5882.tar.bz2
Disk Cache: Second pass (and final) to allow multiple instances
of BackendImpl. This cl takes care of all the histograms on the disk cache. Most of them have to be splitted in three so that we get separate data from different cache types. There are a few places where the complexity of splitting the histogram is not worth it so we just keep either all data together (if it makes sense), or just ignore data for some types of caches. note: Having multiple versions of a histogram but only one "active" for a given client is not the same as having multiple histograms working at the same time for different objects. Review URL: http://codereview.chromium.org/42682 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12692 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, 9 insertions, 0 deletions
diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/backend_impl.h
index b66ab2f..3fbc2a4 100644
--- a/net/disk_cache/backend_impl.h
+++ b/net/disk_cache/backend_impl.h
@@ -105,6 +105,15 @@ class BackendImpl : public Backend {
// Logs requests that are denied due to being too big.
void TooMuchStorageRequested(int32 size);
+ // 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 th ecache type and e the provided |experiment|.
+ std::string HistogramName(const char* name, int experiment);
+
+ net::CacheType cache_type() {
+ return cache_type_;
+ }
+
// 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
// same thing on a given run).