summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 23:44:20 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 23:44:20 +0000
commit6192f73a9dd17c950ef1ca97db086e8bc4eaf05e (patch)
tree7af372f9670e74b144d17f1f7c009a9eb13a74a2 /net/http/http_cache.h
parent1ba590018ad58ea18ec3079f089feb64fd951d87 (diff)
downloadchromium_src-6192f73a9dd17c950ef1ca97db086e8bc4eaf05e.zip
chromium_src-6192f73a9dd17c950ef1ca97db086e8bc4eaf05e.tar.gz
chromium_src-6192f73a9dd17c950ef1ca97db086e8bc4eaf05e.tar.bz2
Disk cache: First pass to make it possible to have
multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.h')
-rw-r--r--net/http/http_cache.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index eb47b44..af2d83a 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -21,6 +21,7 @@
#include "base/hash_tables.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
+#include "net/base/cache_type.h"
#include "net/http/http_transaction_factory.h"
namespace disk_cache {
@@ -50,17 +51,6 @@ class HttpCache : public HttpTransactionFactory {
PLAYBACK
};
- // The type of an HttpCache object, essentially describe what an HttpCache
- // object is for.
- enum Type {
- // An HttpCache object for common objects, e.g. html pages, images, fonts,
- // css files, js files and other common web resources.
- COMMON = 0,
- // A cache system for media file, e.g. video and audio files. These files
- // are huge and has special requirement for access.
- MEDIA
- };
-
// Initialize the cache from the directory where its data is stored. The
// disk cache is initialized lazily (by CreateTransaction) in this case. If
// |cache_size| is zero, a default value will be calculated automatically.
@@ -110,8 +100,8 @@ class HttpCache : public HttpTransactionFactory {
void set_mode(Mode value) { mode_ = value; }
Mode mode() { return mode_; }
- void set_type(Type type) { type_ = type; }
- Type type() { return type_; }
+ void set_type(CacheType type) { type_ = type; }
+ CacheType type() { return type_; }
private:
@@ -169,7 +159,7 @@ class HttpCache : public HttpTransactionFactory {
std::wstring disk_cache_dir_;
Mode mode_;
- Type type_;
+ CacheType type_;
scoped_ptr<HttpTransactionFactory> network_layer_;
scoped_ptr<disk_cache::Backend> disk_cache_;