diff options
author | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 03:14:37 +0000 |
---|---|---|
committer | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 03:14:37 +0000 |
commit | ec5c192817606b55ad99edb256997b70eea41b85 (patch) | |
tree | 16e863d9b1fa02f029c050b028177b7c984da6eb /webkit/appcache/appcache.cc | |
parent | 16d35b25ec19b82c13dc7cd24f744951cc12fad0 (diff) | |
download | chromium_src-ec5c192817606b55ad99edb256997b70eea41b85.zip chromium_src-ec5c192817606b55ad99edb256997b70eea41b85.tar.gz chromium_src-ec5c192817606b55ad99edb256997b70eea41b85.tar.bz2 |
Chrome side of changes required to populate appcache resource list.
BUG = 2821005
TEST = Manually navigate.
Review URL: http://codereview.chromium.org/3009005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache.cc')
-rw-r--r-- | webkit/appcache/appcache.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webkit/appcache/appcache.cc b/webkit/appcache/appcache.cc index e1819d4..4bc7294 100644 --- a/webkit/appcache/appcache.cc +++ b/webkit/appcache/appcache.cc @@ -21,6 +21,7 @@ AppCache::AppCache(AppCacheService *service, int64 cache_id) owning_group_(NULL), online_whitelist_all_(false), is_complete_(false), + cache_size_(0), service_(service) { service_->storage()->working_set()->AddCache(this); } @@ -51,7 +52,8 @@ bool AppCache::AddOrModifyEntry(const GURL& url, const AppCacheEntry& entry) { // Entry already exists. Merge the types of the new and existing entries. if (!ret.second) ret.first->second.add_types(entry.types()); - + else + cache_size_ += entry.response_size(); // New entry. Add to cache size. return ret.second; } @@ -61,12 +63,10 @@ AppCacheEntry* AppCache::GetEntry(const GURL& url) { } namespace { - bool SortByLength( const FallbackNamespace& lhs, const FallbackNamespace& rhs) { return lhs.first.spec().length() > rhs.first.spec().length(); } - } void AppCache::InitializeWithManifest(Manifest* manifest) { @@ -162,7 +162,6 @@ void AppCache::ToDatabaseRecords( } } - bool AppCache::FindResponseForRequest(const GURL& url, AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, GURL* found_fallback_namespace, bool* found_network_namespace) { |